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 FIXPATH
 638 LIBCXX
 639 LLVM_LIBS
 640 LLVM_LDFLAGS
 641 LLVM_CFLAGS
 642 LLVM_CONFIG
 643 LIBFFI_LIBS
 644 LIBFFI_CFLAGS
 645 STATIC_CXX_SETTING
 646 LIBDL
 647 LIBM
 648 LIBZIP_CAN_USE_MMAP
 649 USE_EXTERNAL_LIBZ
 650 USE_EXTERNAL_LIBGIF
 651 USE_EXTERNAL_LIBJPEG
 652 ALSA_LIBS
 653 ALSA_CFLAGS
 654 FREETYPE2_LIB_PATH
 655 USING_SYSTEM_FT_LIB
 656 FREETYPE2_LIBS
 657 FREETYPE2_CFLAGS
 658 CUPS_CFLAGS
 659 OPENWIN_HOME
 660 X_EXTRA_LIBS
 661 X_LIBS
 662 X_PRE_LIBS
 663 X_CFLAGS
 664 XMKMF
 665 CXXFLAGS_DEBUG_SYMBOLS
 666 CFLAGS_DEBUG_SYMBOLS
 667 ZIP_DEBUGINFO_FILES
 668 ENABLE_DEBUG_SYMBOLS
 669 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 670 ZERO_ARCHFLAG
 671 LDFLAGS_CXX_JDK
 672 LDFLAGS_JDKEXE_SUFFIX
 673 LDFLAGS_JDKLIB_SUFFIX
 674 LDFLAGS_JDKEXE
 675 LDFLAGS_JDKLIB
 676 CXXFLAGS_JDKEXE
 677 CXXFLAGS_JDKLIB
 678 CFLAGS_JDKEXE
 679 CFLAGS_JDKLIB
 680 MACOSX_VERSION_MIN
 681 PACKAGE_PATH
 682 LEGACY_EXTRA_LDFLAGS
 683 LEGACY_EXTRA_CXXFLAGS
 684 LEGACY_EXTRA_CFLAGS
 685 CXX_FLAG_DEPS
 686 C_FLAG_DEPS
 687 CXX_O_FLAG_NONE
 688 CXX_O_FLAG_NORM
 689 CXX_O_FLAG_HI
 690 CXX_O_FLAG_HIGHEST
 691 C_O_FLAG_NONE
 692 C_O_FLAG_NORM
 693 C_O_FLAG_HI
 694 C_O_FLAG_HIGHEST
 695 POST_MCS_CMD
 696 POST_STRIP_CMD
 697 SET_EXECUTABLE_ORIGIN
 698 SET_SHARED_LIBRARY_ORIGIN
 699 CXX_FLAG_REORDER
 700 C_FLAG_REORDER
 701 SET_SHARED_LIBRARY_MAPFILE
 702 SET_SHARED_LIBRARY_NAME
 703 SHARED_LIBRARY_FLAGS
 704 EXE_SUFFIX
 705 STATIC_LIBRARY_SUFFIX
 706 SHARED_LIBRARY_SUFFIX
 707 LIBRARY_PREFIX
 708 STATIC_LIBRARY
 709 SHARED_LIBRARY
 710 OBJ_SUFFIX
 711 COMPILER_NAME
 712 TARGET_BITS_FLAG
 713 JT_HOME
 714 JTREGEXE
 715 LIPO
 716 ac_ct_OBJDUMP
 717 OBJDUMP
 718 ac_ct_OBJCOPY
 719 OBJCOPY
 720 MCS
 721 STRIP
 722 GNM
 723 NM
 724 AS
 725 CXXCPP
 726 CPP
 727 COMPILER_TYPE
 728 RC_FLAGS
 729 DUMPBIN
 730 WINAR
 731 HOTSPOT_RC
 732 HOTSPOT_MT
 733 RC
 734 MT
 735 WINLD
 736 HOTSPOT_LD
 737 HOTSPOT_CXX
 738 ARFLAGS
 739 AR
 740 LDEXECXX
 741 LDCXX
 742 LDEXE
 743 LD
 744 ac_ct_OBJC
 745 OBJCFLAGS
 746 OBJC
 747 ac_ct_CXX
 748 CXXFLAGS
 749 CXX
 750 ac_ct_PROPER_COMPILER_CXX
 751 PROPER_COMPILER_CXX
 752 POTENTIAL_CXX
 753 TOOLS_DIR_CXX
 754 OBJEXT
 755 EXEEXT
 756 ac_ct_CC
 757 CPPFLAGS
 758 LDFLAGS
 759 CFLAGS
 760 CC
 761 ac_ct_PROPER_COMPILER_CC
 762 PROPER_COMPILER_CC
 763 POTENTIAL_CC
 764 TOOLS_DIR_CC
 765 BUILD_LD
 766 BUILD_CXX
 767 BUILD_CC
 768 MSVCR_DLL
 769 VS_PATH
 770 VS_LIB
 771 VS_INCLUDE
 772 CYGWIN_LINK
 773 AR_OUT_OPTION
 774 LD_OUT_OPTION
 775 EXE_OUT_OPTION
 776 CC_OUT_OPTION
 777 BUILD_HOTSPOT
 778 HOTSPOT_DIST
 779 BUILD_OUTPUT
 780 OVERRIDE_SRC_ROOT
 781 ADD_SRC_ROOT
 782 JDK_TOPDIR
 783 NASHORN_TOPDIR
 784 HOTSPOT_TOPDIR
 785 JAXWS_TOPDIR
 786 JAXP_TOPDIR
 787 CORBA_TOPDIR
 788 LANGTOOLS_TOPDIR
 789 BOOT_JDK_JVMARGS
 790 JAVAC_FLAGS
 791 BOOT_JDK_SOURCETARGET
 792 BOOT_JDK
 793 BOOT_TOOLSJAR
 794 BOOT_RTJAR
 795 JAVA_CHECK
 796 JAVAC_CHECK
 797 COOKED_BUILD_NUMBER
 798 JDK_VERSION
 799 COPYRIGHT_YEAR
 800 MACOSX_BUNDLE_ID_BASE
 801 MACOSX_BUNDLE_NAME_BASE
 802 COMPANY_NAME
 803 JDK_RC_PLATFORM_NAME
 804 PRODUCT_SUFFIX
 805 PRODUCT_NAME
 806 LAUNCHER_NAME
 807 MILESTONE
 808 JDK_BUILD_NUMBER
 809 JDK_UPDATE_VERSION
 810 JDK_MICRO_VERSION
 811 JDK_MINOR_VERSION
 812 JDK_MAJOR_VERSION
 813 USER_RELEASE_SUFFIX
 814 COMPRESS_JARS
 815 UNLIMITED_CRYPTO
 816 CACERTS_FILE
 817 TEST_IN_BUILD
 818 BUILD_HEADLESS
 819 SUPPORT_HEADFUL
 820 SUPPORT_HEADLESS
 821 BDEPS_FTP
 822 BDEPS_UNZIP
 823 OS_VERSION_MICRO
 824 OS_VERSION_MINOR
 825 OS_VERSION_MAJOR
 826 PKG_CONFIG
 827 CODESIGN
 828 XATTR
 829 IS_GNU_TIME
 830 TIME
 831 STAT
 832 HG
 833 READELF
 834 OTOOL
 835 LDD
 836 ZIP
 837 UNZIP
 838 FIND_DELETE
 839 MAKE
 840 CHECK_TOOLSDIR_MAKE
 841 CHECK_TOOLSDIR_GMAKE
 842 CHECK_MAKE
 843 CHECK_GMAKE
 844 PKGHANDLER
 845 OUTPUT_ROOT
 846 CONF_NAME
 847 SPEC
 848 BUILD_VARIANT_RELEASE
 849 DEBUG_CLASSFILES
 850 FASTDEBUG
 851 VARIANT
 852 DEBUG_LEVEL
 853 MACOSX_UNIVERSAL
 854 INCLUDE_SA
 855 JVM_VARIANT_ZEROSHARK
 856 JVM_VARIANT_ZERO
 857 JVM_VARIANT_KERNEL
 858 JVM_VARIANT_MINIMAL1
 859 JVM_VARIANT_CLIENT
 860 JVM_VARIANT_SERVER
 861 JVM_VARIANTS
 862 JDK_VARIANT
 863 SET_OPENJDK
 864 BUILD_LOG_WRAPPER
 865 BUILD_LOG_PREVIOUS
 866 BUILD_LOG
 867 SYS_ROOT
 868 PATH_SEP
 869 SRC_ROOT
 870 ZERO_ARCHDEF
 871 DEFINE_CROSS_COMPILE_ARCH
 872 LP64
 873 OPENJDK_TARGET_OS_API_DIR
 874 OPENJDK_TARGET_CPU_JLI_CFLAGS
 875 OPENJDK_TARGET_CPU_OSARCH
 876 OPENJDK_TARGET_CPU_ISADIR
 877 OPENJDK_TARGET_CPU_LIBDIR
 878 OPENJDK_TARGET_CPU_LEGACY_LIB
 879 OPENJDK_TARGET_CPU_LEGACY
 880 REQUIRED_OS_VERSION
 881 REQUIRED_OS_NAME
 882 COMPILE_TYPE
 883 OPENJDK_TARGET_CPU_ENDIAN
 884 OPENJDK_TARGET_CPU_BITS
 885 OPENJDK_TARGET_CPU_ARCH
 886 OPENJDK_TARGET_CPU
 887 OPENJDK_TARGET_OS_API
 888 OPENJDK_TARGET_OS
 889 OPENJDK_BUILD_CPU_ENDIAN
 890 OPENJDK_BUILD_CPU_BITS
 891 OPENJDK_BUILD_CPU_ARCH
 892 OPENJDK_BUILD_CPU
 893 OPENJDK_BUILD_OS_API
 894 OPENJDK_BUILD_OS
 895 OPENJDK_BUILD_AUTOCONF_NAME
 896 OPENJDK_TARGET_AUTOCONF_NAME
 897 target_os
 898 target_vendor
 899 target_cpu
 900 target
 901 host_os
 902 host_vendor
 903 host_cpu
 904 host
 905 build_os
 906 build_vendor
 907 build_cpu
 908 build
 909 SETFILE
 910 DF
 911 READLINK
 912 CYGPATH
 913 NAWK
 914 SED
 915 FGREP
 916 EGREP
 917 GREP
 918 AWK
 919 XARGS
 920 WHICH
 921 WC
 922 UNIQ
 923 UNAME
 924 TR
 925 TOUCH
 926 TEE
 927 TAR
 928 TAIL
 929 SORT
 930 SH
 931 RM
 932 PRINTF
 933 MV
 934 MKTEMP
 935 MKDIR
 936 LS
 937 LN
 938 HEAD
 939 FIND
 940 FILE
 941 EXPR
 942 ECHO
 943 DIRNAME
 944 DIFF
 945 DATE
 946 CUT
 947 CPIO
 948 CP
 949 COMM
 950 CMP
 951 CHMOD
 952 CAT
 953 BASH
 954 BASENAME
 955 DATE_WHEN_CONFIGURED
 956 CONFIGURE_COMMAND_LINE
 957 CUSTOM_MAKE_DIR
 958 target_alias
 959 host_alias
 960 build_alias
 961 LIBS
 962 ECHO_T
 963 ECHO_N
 964 ECHO_C
 965 DEFS
 966 mandir
 967 localedir
 968 libdir
 969 psdir
 970 pdfdir
 971 dvidir
 972 htmldir
 973 infodir
 974 docdir
 975 oldincludedir
 976 includedir
 977 localstatedir
 978 sharedstatedir
 979 sysconfdir
 980 datadir
 981 datarootdir
 982 libexecdir
 983 sbindir
 984 bindir
 985 program_transform_name
 986 prefix
 987 exec_prefix
 988 PACKAGE_URL
 989 PACKAGE_BUGREPORT
 990 PACKAGE_STRING
 991 PACKAGE_VERSION
 992 PACKAGE_TARNAME
 993 PACKAGE_NAME
 994 PATH_SEPARATOR
 995 SHELL'
 996 ac_subst_files=''
 997 ac_user_opts='
 998 enable_option_checking
 999 with_custom_make_dir
1000 with_target_bits
1001 with_sys_root
1002 with_tools_dir
1003 with_devkit
1004 enable_openjdk_only
1005 with_jdk_variant
1006 with_jvm_variants
1007 enable_debug
1008 with_debug_level
1009 with_conf_name
1010 with_builddeps_conf
1011 with_builddeps_server
1012 with_builddeps_dir
1013 with_builddeps_group
1014 enable_headful
1015 enable_hotspot_test_in_build
1016 with_cacerts_file
1017 enable_unlimited_crypto
1018 with_milestone
1019 with_update_version
1020 with_build_number
1021 with_user_release_suffix
1022 with_boot_jdk
1023 with_boot_jdk_jvmargs
1024 with_add_source_root
1025 with_override_source_root
1026 with_adds_and_overrides
1027 with_override_langtools
1028 with_override_corba
1029 with_override_jaxp
1030 with_override_jaxws
1031 with_override_hotspot
1032 with_override_jdk
1033 with_import_hotspot
1034 with_msvcr_dll
1035 with_jtreg
1036 with_extra_cflags
1037 with_extra_cxxflags
1038 with_extra_ldflags
1039 enable_debug_symbols
1040 enable_zip_debug_info
1041 enable_macosx_runtime_support
1042 with_x
1043 with_cups
1044 with_cups_include
1045 with_freetype
1046 with_alsa
1047 with_alsa_include
1048 with_alsa_lib
1049 with_giflib
1050 with_zlib
1051 with_stdc__lib
1052 with_num_cores
1053 with_memory_size
1054 with_jobs
1055 with_sjavac_server_java
1056 enable_sjavac
1057 enable_precompiled_headers
1058 enable_ccache
1059 with_ccache_dir
1060 '
1061       ac_precious_vars='build_alias
1062 host_alias
1063 target_alias
1064 PKG_CONFIG
1065 CC
1066 CFLAGS
1067 LDFLAGS
1068 LIBS
1069 CPPFLAGS
1070 CXX
1071 CXXFLAGS
1072 CCC
1073 OBJC
1074 OBJCFLAGS
1075 CPP
1076 CXXCPP
1077 XMKMF
1078 FREETYPE2_CFLAGS
1079 FREETYPE2_LIBS
1080 ALSA_CFLAGS
1081 ALSA_LIBS
1082 LIBFFI_CFLAGS
1083 LIBFFI_LIBS'
1084 
1085 
1086 # Initialize some variables set by options.
1087 ac_init_help=
1088 ac_init_version=false
1089 ac_unrecognized_opts=
1090 ac_unrecognized_sep=
1091 # The variables have the same names as the options, with
1092 # dashes changed to underlines.
1093 cache_file=/dev/null
1094 exec_prefix=NONE
1095 no_create=
1096 no_recursion=
1097 prefix=NONE
1098 program_prefix=NONE
1099 program_suffix=NONE
1100 program_transform_name=s,x,x,
1101 silent=
1102 site=
1103 srcdir=
1104 verbose=
1105 x_includes=NONE
1106 x_libraries=NONE
1107 
1108 # Installation directory options.
1109 # These are left unexpanded so users can "make install exec_prefix=/foo"
1110 # and all the variables that are supposed to be based on exec_prefix
1111 # by default will actually change.
1112 # Use braces instead of parens because sh, perl, etc. also accept them.
1113 # (The list follows the same order as the GNU Coding Standards.)
1114 bindir='${exec_prefix}/bin'
1115 sbindir='${exec_prefix}/sbin'
1116 libexecdir='${exec_prefix}/libexec'
1117 datarootdir='${prefix}/share'
1118 datadir='${datarootdir}'
1119 sysconfdir='${prefix}/etc'
1120 sharedstatedir='${prefix}/com'
1121 localstatedir='${prefix}/var'
1122 includedir='${prefix}/include'
1123 oldincludedir='/usr/include'
1124 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1125 infodir='${datarootdir}/info'
1126 htmldir='${docdir}'
1127 dvidir='${docdir}'
1128 pdfdir='${docdir}'
1129 psdir='${docdir}'
1130 libdir='${exec_prefix}/lib'
1131 localedir='${datarootdir}/locale'
1132 mandir='${datarootdir}/man'
1133 
1134 ac_prev=
1135 ac_dashdash=
1136 for ac_option
1137 do
1138   # If the previous option needs an argument, assign it.
1139   if test -n "$ac_prev"; then
1140     eval $ac_prev=\$ac_option
1141     ac_prev=
1142     continue
1143   fi
1144 
1145   case $ac_option in
1146   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1147   *=)   ac_optarg= ;;
1148   *)    ac_optarg=yes ;;
1149   esac
1150 
1151   # Accept the important Cygnus configure options, so we can diagnose typos.
1152 
1153   case $ac_dashdash$ac_option in
1154   --)
1155     ac_dashdash=yes ;;
1156 
1157   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1158     ac_prev=bindir ;;
1159   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1160     bindir=$ac_optarg ;;
1161 
1162   -build | --build | --buil | --bui | --bu)
1163     ac_prev=build_alias ;;
1164   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1165     build_alias=$ac_optarg ;;
1166 
1167   -cache-file | --cache-file | --cache-fil | --cache-fi \
1168   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1169     ac_prev=cache_file ;;
1170   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1171   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1172     cache_file=$ac_optarg ;;
1173 
1174   --config-cache | -C)
1175     cache_file=config.cache ;;
1176 
1177   -datadir | --datadir | --datadi | --datad)
1178     ac_prev=datadir ;;
1179   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1180     datadir=$ac_optarg ;;
1181 
1182   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1183   | --dataroo | --dataro | --datar)
1184     ac_prev=datarootdir ;;
1185   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1186   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1187     datarootdir=$ac_optarg ;;
1188 
1189   -disable-* | --disable-*)
1190     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1191     # Reject names that are not valid shell variable names.
1192     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193       as_fn_error $? "invalid feature name: $ac_useropt"
1194     ac_useropt_orig=$ac_useropt
1195     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196     case $ac_user_opts in
1197       *"
1198 "enable_$ac_useropt"
1199 "*) ;;
1200       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1201          ac_unrecognized_sep=', ';;
1202     esac
1203     eval enable_$ac_useropt=no ;;
1204 
1205   -docdir | --docdir | --docdi | --doc | --do)
1206     ac_prev=docdir ;;
1207   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1208     docdir=$ac_optarg ;;
1209 
1210   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1211     ac_prev=dvidir ;;
1212   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1213     dvidir=$ac_optarg ;;
1214 
1215   -enable-* | --enable-*)
1216     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1217     # Reject names that are not valid shell variable names.
1218     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1219       as_fn_error $? "invalid feature name: $ac_useropt"
1220     ac_useropt_orig=$ac_useropt
1221     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222     case $ac_user_opts in
1223       *"
1224 "enable_$ac_useropt"
1225 "*) ;;
1226       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1227          ac_unrecognized_sep=', ';;
1228     esac
1229     eval enable_$ac_useropt=\$ac_optarg ;;
1230 
1231   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1232   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1233   | --exec | --exe | --ex)
1234     ac_prev=exec_prefix ;;
1235   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1236   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1237   | --exec=* | --exe=* | --ex=*)
1238     exec_prefix=$ac_optarg ;;
1239 
1240   -gas | --gas | --ga | --g)
1241     # Obsolete; use --with-gas.
1242     with_gas=yes ;;
1243 
1244   -help | --help | --hel | --he | -h)
1245     ac_init_help=long ;;
1246   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1247     ac_init_help=recursive ;;
1248   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1249     ac_init_help=short ;;
1250 
1251   -host | --host | --hos | --ho)
1252     ac_prev=host_alias ;;
1253   -host=* | --host=* | --hos=* | --ho=*)
1254     host_alias=$ac_optarg ;;
1255 
1256   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1257     ac_prev=htmldir ;;
1258   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1259   | --ht=*)
1260     htmldir=$ac_optarg ;;
1261 
1262   -includedir | --includedir | --includedi | --included | --include \
1263   | --includ | --inclu | --incl | --inc)
1264     ac_prev=includedir ;;
1265   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1266   | --includ=* | --inclu=* | --incl=* | --inc=*)
1267     includedir=$ac_optarg ;;
1268 
1269   -infodir | --infodir | --infodi | --infod | --info | --inf)
1270     ac_prev=infodir ;;
1271   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1272     infodir=$ac_optarg ;;
1273 
1274   -libdir | --libdir | --libdi | --libd)
1275     ac_prev=libdir ;;
1276   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1277     libdir=$ac_optarg ;;
1278 
1279   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1280   | --libexe | --libex | --libe)
1281     ac_prev=libexecdir ;;
1282   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1283   | --libexe=* | --libex=* | --libe=*)
1284     libexecdir=$ac_optarg ;;
1285 
1286   -localedir | --localedir | --localedi | --localed | --locale)
1287     ac_prev=localedir ;;
1288   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1289     localedir=$ac_optarg ;;
1290 
1291   -localstatedir | --localstatedir | --localstatedi | --localstated \
1292   | --localstate | --localstat | --localsta | --localst | --locals)
1293     ac_prev=localstatedir ;;
1294   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1295   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1296     localstatedir=$ac_optarg ;;
1297 
1298   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1299     ac_prev=mandir ;;
1300   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1301     mandir=$ac_optarg ;;
1302 
1303   -nfp | --nfp | --nf)
1304     # Obsolete; use --without-fp.
1305     with_fp=no ;;
1306 
1307   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1308   | --no-cr | --no-c | -n)
1309     no_create=yes ;;
1310 
1311   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1312   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1313     no_recursion=yes ;;
1314 
1315   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1316   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1317   | --oldin | --oldi | --old | --ol | --o)
1318     ac_prev=oldincludedir ;;
1319   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1320   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1321   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1322     oldincludedir=$ac_optarg ;;
1323 
1324   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1325     ac_prev=prefix ;;
1326   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1327     prefix=$ac_optarg ;;
1328 
1329   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1330   | --program-pre | --program-pr | --program-p)
1331     ac_prev=program_prefix ;;
1332   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1333   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1334     program_prefix=$ac_optarg ;;
1335 
1336   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1337   | --program-suf | --program-su | --program-s)
1338     ac_prev=program_suffix ;;
1339   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1340   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1341     program_suffix=$ac_optarg ;;
1342 
1343   -program-transform-name | --program-transform-name \
1344   | --program-transform-nam | --program-transform-na \
1345   | --program-transform-n | --program-transform- \
1346   | --program-transform | --program-transfor \
1347   | --program-transfo | --program-transf \
1348   | --program-trans | --program-tran \
1349   | --progr-tra | --program-tr | --program-t)
1350     ac_prev=program_transform_name ;;
1351   -program-transform-name=* | --program-transform-name=* \
1352   | --program-transform-nam=* | --program-transform-na=* \
1353   | --program-transform-n=* | --program-transform-=* \
1354   | --program-transform=* | --program-transfor=* \
1355   | --program-transfo=* | --program-transf=* \
1356   | --program-trans=* | --program-tran=* \
1357   | --progr-tra=* | --program-tr=* | --program-t=*)
1358     program_transform_name=$ac_optarg ;;
1359 
1360   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1361     ac_prev=pdfdir ;;
1362   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1363     pdfdir=$ac_optarg ;;
1364 
1365   -psdir | --psdir | --psdi | --psd | --ps)
1366     ac_prev=psdir ;;
1367   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1368     psdir=$ac_optarg ;;
1369 
1370   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1371   | -silent | --silent | --silen | --sile | --sil)
1372     silent=yes ;;
1373 
1374   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1375     ac_prev=sbindir ;;
1376   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1377   | --sbi=* | --sb=*)
1378     sbindir=$ac_optarg ;;
1379 
1380   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1381   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1382   | --sharedst | --shareds | --shared | --share | --shar \
1383   | --sha | --sh)
1384     ac_prev=sharedstatedir ;;
1385   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1386   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1387   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1388   | --sha=* | --sh=*)
1389     sharedstatedir=$ac_optarg ;;
1390 
1391   -site | --site | --sit)
1392     ac_prev=site ;;
1393   -site=* | --site=* | --sit=*)
1394     site=$ac_optarg ;;
1395 
1396   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1397     ac_prev=srcdir ;;
1398   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1399     srcdir=$ac_optarg ;;
1400 
1401   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1402   | --syscon | --sysco | --sysc | --sys | --sy)
1403     ac_prev=sysconfdir ;;
1404   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1405   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1406     sysconfdir=$ac_optarg ;;
1407 
1408   -target | --target | --targe | --targ | --tar | --ta | --t)
1409     ac_prev=target_alias ;;
1410   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1411     target_alias=$ac_optarg ;;
1412 
1413   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1414     verbose=yes ;;
1415 
1416   -version | --version | --versio | --versi | --vers | -V)
1417     ac_init_version=: ;;
1418 
1419   -with-* | --with-*)
1420     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1421     # Reject names that are not valid shell variable names.
1422     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1423       as_fn_error $? "invalid package name: $ac_useropt"
1424     ac_useropt_orig=$ac_useropt
1425     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1426     case $ac_user_opts in
1427       *"
1428 "with_$ac_useropt"
1429 "*) ;;
1430       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1431          ac_unrecognized_sep=', ';;
1432     esac
1433     eval with_$ac_useropt=\$ac_optarg ;;
1434 
1435   -without-* | --without-*)
1436     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1437     # Reject names that are not valid shell variable names.
1438     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1439       as_fn_error $? "invalid package name: $ac_useropt"
1440     ac_useropt_orig=$ac_useropt
1441     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1442     case $ac_user_opts in
1443       *"
1444 "with_$ac_useropt"
1445 "*) ;;
1446       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1447          ac_unrecognized_sep=', ';;
1448     esac
1449     eval with_$ac_useropt=no ;;
1450 
1451   --x)
1452     # Obsolete; use --with-x.
1453     with_x=yes ;;
1454 
1455   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1456   | --x-incl | --x-inc | --x-in | --x-i)
1457     ac_prev=x_includes ;;
1458   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1459   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1460     x_includes=$ac_optarg ;;
1461 
1462   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1463   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1464     ac_prev=x_libraries ;;
1465   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1466   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1467     x_libraries=$ac_optarg ;;
1468 
1469   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1470 Try \`$0 --help' for more information"
1471     ;;
1472 
1473   *=*)
1474     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1475     # Reject names that are not valid shell variable names.
1476     case $ac_envvar in #(
1477       '' | [0-9]* | *[!_$as_cr_alnum]* )
1478       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1479     esac
1480     eval $ac_envvar=\$ac_optarg
1481     export $ac_envvar ;;
1482 
1483   *)
1484     # FIXME: should be removed in autoconf 3.0.
1485     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1486     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1487       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1488     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1489     ;;
1490 
1491   esac
1492 done
1493 
1494 if test -n "$ac_prev"; then
1495   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1496   as_fn_error $? "missing argument to $ac_option"
1497 fi
1498 
1499 if test -n "$ac_unrecognized_opts"; then
1500   case $enable_option_checking in
1501     no) ;;
1502     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1503     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1504   esac
1505 fi
1506 
1507 # Check all directory arguments for consistency.
1508 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1509                 datadir sysconfdir sharedstatedir localstatedir includedir \
1510                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1511                 libdir localedir mandir
1512 do
1513   eval ac_val=\$$ac_var
1514   # Remove trailing slashes.
1515   case $ac_val in
1516     */ )
1517       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1518       eval $ac_var=\$ac_val;;
1519   esac
1520   # Be sure to have absolute directory names.
1521   case $ac_val in
1522     [\\/$]* | ?:[\\/]* )  continue;;
1523     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1524   esac
1525   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1526 done
1527 
1528 # There might be people who depend on the old broken behavior: `$host'
1529 # used to hold the argument of --host etc.
1530 # FIXME: To remove some day.
1531 build=$build_alias
1532 host=$host_alias
1533 target=$target_alias
1534 
1535 # FIXME: To remove some day.
1536 if test "x$host_alias" != x; then
1537   if test "x$build_alias" = x; then
1538     cross_compiling=maybe
1539   elif test "x$build_alias" != "x$host_alias"; then
1540     cross_compiling=yes
1541   fi
1542 fi
1543 
1544 ac_tool_prefix=
1545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1546 
1547 test "$silent" = yes && exec 6>/dev/null
1548 
1549 
1550 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1551 ac_ls_di=`ls -di .` &&
1552 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1553   as_fn_error $? "working directory cannot be determined"
1554 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1555   as_fn_error $? "pwd does not report name of working directory"
1556 
1557 
1558 # Find the source files, if location was not specified.
1559 if test -z "$srcdir"; then
1560   ac_srcdir_defaulted=yes
1561   # Try the directory containing this script, then the parent directory.
1562   ac_confdir=`$as_dirname -- "$as_myself" ||
1563 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1564          X"$as_myself" : 'X\(//\)[^/]' \| \
1565          X"$as_myself" : 'X\(//\)$' \| \
1566          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1567 $as_echo X"$as_myself" |
1568     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1569             s//\1/
1570             q
1571           }
1572           /^X\(\/\/\)[^/].*/{
1573             s//\1/
1574             q
1575           }
1576           /^X\(\/\/\)$/{
1577             s//\1/
1578             q
1579           }
1580           /^X\(\/\).*/{
1581             s//\1/
1582             q
1583           }
1584           s/.*/./; q'`
1585   srcdir=$ac_confdir
1586   if test ! -r "$srcdir/$ac_unique_file"; then
1587     srcdir=..
1588   fi
1589 else
1590   ac_srcdir_defaulted=no
1591 fi
1592 if test ! -r "$srcdir/$ac_unique_file"; then
1593   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1594   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1595 fi
1596 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1597 ac_abs_confdir=`(
1598         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1599         pwd)`
1600 # When building in place, set srcdir=.
1601 if test "$ac_abs_confdir" = "$ac_pwd"; then
1602   srcdir=.
1603 fi
1604 # Remove unnecessary trailing slashes from srcdir.
1605 # Double slashes in file names in object file debugging info
1606 # mess up M-x gdb in Emacs.
1607 case $srcdir in
1608 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1609 esac
1610 for ac_var in $ac_precious_vars; do
1611   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1612   eval ac_env_${ac_var}_value=\$${ac_var}
1613   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1614   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1615 done
1616 
1617 #
1618 # Report the --help message.
1619 #
1620 if test "$ac_init_help" = "long"; then
1621   # Omit some internal or obsolete options to make the list less imposing.
1622   # This message is too long to be a string in the A/UX 3.1 sh.
1623   cat <<_ACEOF
1624 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1625 
1626 Usage: $0 [OPTION]... [VAR=VALUE]...
1627 
1628 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1629 VAR=VALUE.  See below for descriptions of some of the useful variables.
1630 
1631 Defaults for the options are specified in brackets.
1632 
1633 Configuration:
1634   -h, --help              display this help and exit
1635       --help=short        display options specific to this package
1636       --help=recursive    display the short help of all the included packages
1637   -V, --version           display version information and exit
1638   -q, --quiet, --silent   do not print \`checking ...' messages
1639       --cache-file=FILE   cache test results in FILE [disabled]
1640   -C, --config-cache      alias for \`--cache-file=config.cache'
1641   -n, --no-create         do not create output files
1642       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1643 
1644 Installation directories:
1645   --prefix=PREFIX         install architecture-independent files in PREFIX
1646                           [$ac_default_prefix]
1647   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1648                           [PREFIX]
1649 
1650 By default, \`make install' will install all the files in
1651 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1652 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1653 for instance \`--prefix=\$HOME'.
1654 
1655 For better control, use the options below.
1656 
1657 Fine tuning of the installation directories:
1658   --bindir=DIR            user executables [EPREFIX/bin]
1659   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1660   --libexecdir=DIR        program executables [EPREFIX/libexec]
1661   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1662   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1663   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1664   --libdir=DIR            object code libraries [EPREFIX/lib]
1665   --includedir=DIR        C header files [PREFIX/include]
1666   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1667   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1668   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1669   --infodir=DIR           info documentation [DATAROOTDIR/info]
1670   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1671   --mandir=DIR            man documentation [DATAROOTDIR/man]
1672   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1673   --htmldir=DIR           html documentation [DOCDIR]
1674   --dvidir=DIR            dvi documentation [DOCDIR]
1675   --pdfdir=DIR            pdf documentation [DOCDIR]
1676   --psdir=DIR             ps documentation [DOCDIR]
1677 _ACEOF
1678 
1679   cat <<\_ACEOF
1680 
1681 X features:
1682   --x-includes=DIR    X include files are in DIR
1683   --x-libraries=DIR   X library files are in DIR
1684 
1685 System types:
1686   --build=BUILD     configure for building on BUILD [guessed]
1687   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1688   --target=TARGET   configure for building compilers for TARGET [HOST]
1689 _ACEOF
1690 fi
1691 
1692 if test -n "$ac_init_help"; then
1693   case $ac_init_help in
1694      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1695    esac
1696   cat <<\_ACEOF
1697 
1698 Optional Features:
1699   --disable-option-checking  ignore unrecognized --enable/--with options
1700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1702   --enable-openjdk-only   suppress building custom source even if present
1703                           [disabled]
1704   --enable-debug          set the debug level to fastdebug (shorthand for
1705                           --with-debug-level=fastdebug) [disabled]
1706   --disable-headful       disable building headful support (graphical UI
1707                           support) [enabled]
1708   --enable-hotspot-test-in-build
1709                           run the Queens test after Hotspot build [disabled]
1710   --enable-unlimited-crypto
1711                           Enable unlimited crypto policy [disabled]
1712   --disable-debug-symbols disable generation of debug symbols [enabled]
1713   --disable-zip-debug-info
1714                           disable zipping of debug-info files [enabled]
1715   --disable-macosx-runtime-support
1716                           disable the use of MacOSX Java runtime support
1717                           framework [enabled]
1718   --enable-sjavac         use sjavac to do fast incremental compiles
1719                           [disabled]
1720   --disable-precompiled-headers
1721                           disable using precompiled headers when compiling C++
1722                           [enabled]
1723   --disable-ccache        disable using ccache to speed up recompilations
1724                           [enabled]
1725 
1726 Optional Packages:
1727   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1728   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1729   --with-custom-make-dir  use this directory for custom build/make files
1730   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1731                           support it), e.g. --with-target-bits=32 [guessed]
1732   --with-sys-root         pass this sys-root to the compilers and tools (for
1733                           cross-compiling)
1734   --with-tools-dir        search this directory for compilers and tools (for
1735                           cross-compiling)
1736   --with-devkit           use this directory as base for tools-dir and
1737                           sys-root (for cross-compiling)
1738   --with-jdk-variant      JDK variant to build (normal) [normal]
1739   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1740                           client, minimal1, kernel, zero, zeroshark) [server]
1741   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1742                           [release]
1743   --with-conf-name        use this as the name of the configuration [generated
1744                           from important configuration options]
1745   --with-builddeps-conf   use this configuration file for the builddeps
1746   --with-builddeps-server download and use build dependencies from this server
1747                           url
1748   --with-builddeps-dir    store downloaded build dependencies here
1749                           [/localhome/builddeps]
1750   --with-builddeps-group  chgrp the downloaded build dependencies to this
1751                           group
1752   --with-cacerts-file     specify alternative cacerts file
1753   --with-milestone        Set milestone value for build [internal]
1754   --with-update-version   Set update version value for build [b00]
1755   --with-build-number     Set build number value for build [b00]
1756   --with-user-release-suffix
1757                           Add a custom string to the version string if build
1758                           number isn't set.[username_builddateb00]
1759   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1760   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1761                           invocations of the Boot JDK, overriding the default
1762                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1763                           -enableassertions"
1764   --with-add-source-root  for each and every source directory, look in this
1765                           additional source root for the same directory; if it
1766                           exists and have files in it, include it in the build
1767   --with-override-source-root
1768                           for each and every source directory, look in this
1769                           override source root for the same directory; if it
1770                           exists, use that directory instead and ignore the
1771                           directory in the original source root
1772   --with-adds-and-overrides
1773                           use the subdirs 'adds' and 'overrides' in the
1774                           specified directory as add-source-root and
1775                           override-source-root
1776   --with-override-langtools
1777                           use this langtools dir for the build
1778   --with-override-corba   use this corba dir for the build
1779   --with-override-jaxp    use this jaxp dir for the build
1780   --with-override-jaxws   use this jaxws dir for the build
1781   --with-override-hotspot use this hotspot dir for the build
1782   --with-override-jdk     use this jdk dir for the build
1783   --with-import-hotspot   import hotspot binaries from this jdk image or
1784                           hotspot build dist dir instead of building from
1785                           source
1786   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1787                           only) [probed]
1788   --with-jtreg            Regression Test Harness [probed]
1789   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1790   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1791   --with-extra-ldflags    extra flags to be used when linking jdk
1792   --with-x                use the X Window System
1793   --with-cups             specify prefix directory for the cups package
1794                           (expecting the headers under PATH/include)
1795   --with-cups-include     specify directory for the cups include files
1796   --with-freetype         specify prefix directory for the freetype2 package
1797                           (expecting the libraries under PATH/lib and the
1798                           headers under PATH/include)
1799   --with-alsa             specify prefix directory for the alsa package
1800                           (expecting the libraries under PATH/lib and the
1801                           headers under PATH/include)
1802   --with-alsa-include     specify directory for the alsa include files
1803   --with-alsa-lib         specify directory for the alsa library
1804   --with-giflib           use giflib from build system or OpenJDK source
1805                           (system, bundled) [bundled]
1806   --with-zlib             use zlib from build system or OpenJDK source
1807                           (system, bundled) [bundled]
1808   --with-stdc++lib=<static>,<dynamic>,<default>
1809                           force linking of the C++ runtime on Linux to either
1810                           static or dynamic, default is static with dynamic as
1811                           fallback
1812   --with-num-cores        number of cores in the build system, e.g.
1813                           --with-num-cores=8 [probed]
1814   --with-memory-size      memory (in MB) available in the build system, e.g.
1815                           --with-memory-size=1024 [probed]
1816   --with-jobs             number of parallel jobs to let make run [calculated
1817                           based on cores and memory]
1818   --with-sjavac-server-java
1819                           use this java binary for running the sjavac
1820                           background server [Boot JDK java]
1821   --with-ccache-dir       where to store ccache files [~/.ccache]
1822 
1823 Some influential environment variables:
1824   PKG_CONFIG  path to pkg-config utility
1825   CC          C compiler command
1826   CFLAGS      C compiler flags
1827   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1828               nonstandard directory <lib dir>
1829   LIBS        libraries to pass to the linker, e.g. -l<library>
1830   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1831               you have headers in a nonstandard directory <include dir>
1832   CXX         C++ compiler command
1833   CXXFLAGS    C++ compiler flags
1834   OBJC        Objective C compiler command
1835   OBJCFLAGS   Objective C compiler flags
1836   CPP         C preprocessor
1837   CXXCPP      C++ preprocessor
1838   XMKMF       Path to xmkmf, Makefile generator for X Window System
1839   FREETYPE2_CFLAGS
1840               C compiler flags for FREETYPE2, overriding pkg-config
1841   FREETYPE2_LIBS
1842               linker flags for FREETYPE2, overriding pkg-config
1843   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1844   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1845   LIBFFI_CFLAGS
1846               C compiler flags for LIBFFI, overriding pkg-config
1847   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1848 
1849 Use these variables to override the choices made by `configure' or to help
1850 it to find libraries and programs with nonstandard names/locations.
1851 
1852 Report bugs to <build-dev@openjdk.java.net>.
1853 OpenJDK home page: <http://openjdk.java.net>.
1854 _ACEOF
1855 ac_status=$?
1856 fi
1857 
1858 if test "$ac_init_help" = "recursive"; then
1859   # If there are subdirs, report their specific --help.
1860   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1861     test -d "$ac_dir" ||
1862       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1863       continue
1864     ac_builddir=.
1865 
1866 case "$ac_dir" in
1867 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1868 *)
1869   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1870   # A ".." for each directory in $ac_dir_suffix.
1871   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1872   case $ac_top_builddir_sub in
1873   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1874   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1875   esac ;;
1876 esac
1877 ac_abs_top_builddir=$ac_pwd
1878 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1879 # for backward compatibility:
1880 ac_top_builddir=$ac_top_build_prefix
1881 
1882 case $srcdir in
1883   .)  # We are building in place.
1884     ac_srcdir=.
1885     ac_top_srcdir=$ac_top_builddir_sub
1886     ac_abs_top_srcdir=$ac_pwd ;;
1887   [\\/]* | ?:[\\/]* )  # Absolute name.
1888     ac_srcdir=$srcdir$ac_dir_suffix;
1889     ac_top_srcdir=$srcdir
1890     ac_abs_top_srcdir=$srcdir ;;
1891   *) # Relative name.
1892     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1893     ac_top_srcdir=$ac_top_build_prefix$srcdir
1894     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1895 esac
1896 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1897 
1898     cd "$ac_dir" || { ac_status=$?; continue; }
1899     # Check for guested configure.
1900     if test -f "$ac_srcdir/configure.gnu"; then
1901       echo &&
1902       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1903     elif test -f "$ac_srcdir/configure"; then
1904       echo &&
1905       $SHELL "$ac_srcdir/configure" --help=recursive
1906     else
1907       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1908     fi || ac_status=$?
1909     cd "$ac_pwd" || { ac_status=$?; break; }
1910   done
1911 fi
1912 
1913 test -n "$ac_init_help" && exit $ac_status
1914 if $ac_init_version; then
1915   cat <<\_ACEOF
1916 OpenJDK configure jdk8
1917 generated by GNU Autoconf 2.69
1918 
1919 Copyright (C) 2012 Free Software Foundation, Inc.
1920 This configure script is free software; the Free Software Foundation
1921 gives unlimited permission to copy, distribute and modify it.
1922 _ACEOF
1923   exit
1924 fi
1925 
1926 ## ------------------------ ##
1927 ## Autoconf initialization. ##
1928 ## ------------------------ ##
1929 
1930 # ac_fn_c_try_compile LINENO
1931 # --------------------------
1932 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1933 ac_fn_c_try_compile ()
1934 {
1935   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936   rm -f conftest.$ac_objext
1937   if { { ac_try="$ac_compile"
1938 case "(($ac_try" in
1939   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1940   *) ac_try_echo=$ac_try;;
1941 esac
1942 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1943 $as_echo "$ac_try_echo"; } >&5
1944   (eval "$ac_compile") 2>conftest.err
1945   ac_status=$?
1946   if test -s conftest.err; then
1947     grep -v '^ *+' conftest.err >conftest.er1
1948     cat conftest.er1 >&5
1949     mv -f conftest.er1 conftest.err
1950   fi
1951   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1952   test $ac_status = 0; } && {
1953          test -z "$ac_c_werror_flag" ||
1954          test ! -s conftest.err
1955        } && test -s conftest.$ac_objext; then :
1956   ac_retval=0
1957 else
1958   $as_echo "$as_me: failed program was:" >&5
1959 sed 's/^/| /' conftest.$ac_ext >&5
1960 
1961         ac_retval=1
1962 fi
1963   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1964   as_fn_set_status $ac_retval
1965 
1966 } # ac_fn_c_try_compile
1967 
1968 # ac_fn_cxx_try_compile LINENO
1969 # ----------------------------
1970 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1971 ac_fn_cxx_try_compile ()
1972 {
1973   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1974   rm -f conftest.$ac_objext
1975   if { { ac_try="$ac_compile"
1976 case "(($ac_try" in
1977   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1978   *) ac_try_echo=$ac_try;;
1979 esac
1980 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1981 $as_echo "$ac_try_echo"; } >&5
1982   (eval "$ac_compile") 2>conftest.err
1983   ac_status=$?
1984   if test -s conftest.err; then
1985     grep -v '^ *+' conftest.err >conftest.er1
1986     cat conftest.er1 >&5
1987     mv -f conftest.er1 conftest.err
1988   fi
1989   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1990   test $ac_status = 0; } && {
1991          test -z "$ac_cxx_werror_flag" ||
1992          test ! -s conftest.err
1993        } && test -s conftest.$ac_objext; then :
1994   ac_retval=0
1995 else
1996   $as_echo "$as_me: failed program was:" >&5
1997 sed 's/^/| /' conftest.$ac_ext >&5
1998 
1999         ac_retval=1
2000 fi
2001   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2002   as_fn_set_status $ac_retval
2003 
2004 } # ac_fn_cxx_try_compile
2005 
2006 # ac_fn_objc_try_compile LINENO
2007 # -----------------------------
2008 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2009 ac_fn_objc_try_compile ()
2010 {
2011   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2012   rm -f conftest.$ac_objext
2013   if { { ac_try="$ac_compile"
2014 case "(($ac_try" in
2015   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016   *) ac_try_echo=$ac_try;;
2017 esac
2018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019 $as_echo "$ac_try_echo"; } >&5
2020   (eval "$ac_compile") 2>conftest.err
2021   ac_status=$?
2022   if test -s conftest.err; then
2023     grep -v '^ *+' conftest.err >conftest.er1
2024     cat conftest.er1 >&5
2025     mv -f conftest.er1 conftest.err
2026   fi
2027   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028   test $ac_status = 0; } && {
2029          test -z "$ac_objc_werror_flag" ||
2030          test ! -s conftest.err
2031        } && test -s conftest.$ac_objext; then :
2032   ac_retval=0
2033 else
2034   $as_echo "$as_me: failed program was:" >&5
2035 sed 's/^/| /' conftest.$ac_ext >&5
2036 
2037         ac_retval=1
2038 fi
2039   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2040   as_fn_set_status $ac_retval
2041 
2042 } # ac_fn_objc_try_compile
2043 
2044 # ac_fn_c_try_cpp LINENO
2045 # ----------------------
2046 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2047 ac_fn_c_try_cpp ()
2048 {
2049   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050   if { { ac_try="$ac_cpp conftest.$ac_ext"
2051 case "(($ac_try" in
2052   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2053   *) ac_try_echo=$ac_try;;
2054 esac
2055 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2056 $as_echo "$ac_try_echo"; } >&5
2057   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2058   ac_status=$?
2059   if test -s conftest.err; then
2060     grep -v '^ *+' conftest.err >conftest.er1
2061     cat conftest.er1 >&5
2062     mv -f conftest.er1 conftest.err
2063   fi
2064   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2065   test $ac_status = 0; } > conftest.i && {
2066          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2067          test ! -s conftest.err
2068        }; then :
2069   ac_retval=0
2070 else
2071   $as_echo "$as_me: failed program was:" >&5
2072 sed 's/^/| /' conftest.$ac_ext >&5
2073 
2074     ac_retval=1
2075 fi
2076   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2077   as_fn_set_status $ac_retval
2078 
2079 } # ac_fn_c_try_cpp
2080 
2081 # ac_fn_cxx_try_cpp LINENO
2082 # ------------------------
2083 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2084 ac_fn_cxx_try_cpp ()
2085 {
2086   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2087   if { { ac_try="$ac_cpp conftest.$ac_ext"
2088 case "(($ac_try" in
2089   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2090   *) ac_try_echo=$ac_try;;
2091 esac
2092 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2093 $as_echo "$ac_try_echo"; } >&5
2094   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2095   ac_status=$?
2096   if test -s conftest.err; then
2097     grep -v '^ *+' conftest.err >conftest.er1
2098     cat conftest.er1 >&5
2099     mv -f conftest.er1 conftest.err
2100   fi
2101   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2102   test $ac_status = 0; } > conftest.i && {
2103          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2104          test ! -s conftest.err
2105        }; then :
2106   ac_retval=0
2107 else
2108   $as_echo "$as_me: failed program was:" >&5
2109 sed 's/^/| /' conftest.$ac_ext >&5
2110 
2111     ac_retval=1
2112 fi
2113   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2114   as_fn_set_status $ac_retval
2115 
2116 } # ac_fn_cxx_try_cpp
2117 
2118 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2119 # ---------------------------------------------------------
2120 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2121 # the include files in INCLUDES and setting the cache variable VAR
2122 # accordingly.
2123 ac_fn_cxx_check_header_mongrel ()
2124 {
2125   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2126   if eval \${$3+:} false; then :
2127   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2128 $as_echo_n "checking for $2... " >&6; }
2129 if eval \${$3+:} false; then :
2130   $as_echo_n "(cached) " >&6
2131 fi
2132 eval ac_res=\$$3
2133                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2134 $as_echo "$ac_res" >&6; }
2135 else
2136   # Is the header compilable?
2137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2138 $as_echo_n "checking $2 usability... " >&6; }
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h.  */
2141 $4
2142 #include <$2>
2143 _ACEOF
2144 if ac_fn_cxx_try_compile "$LINENO"; then :
2145   ac_header_compiler=yes
2146 else
2147   ac_header_compiler=no
2148 fi
2149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2151 $as_echo "$ac_header_compiler" >&6; }
2152 
2153 # Is the header present?
2154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2155 $as_echo_n "checking $2 presence... " >&6; }
2156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2157 /* end confdefs.h.  */
2158 #include <$2>
2159 _ACEOF
2160 if ac_fn_cxx_try_cpp "$LINENO"; then :
2161   ac_header_preproc=yes
2162 else
2163   ac_header_preproc=no
2164 fi
2165 rm -f conftest.err conftest.i conftest.$ac_ext
2166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2167 $as_echo "$ac_header_preproc" >&6; }
2168 
2169 # So?  What about this header?
2170 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2171   yes:no: )
2172     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2173 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2174     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2175 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2176     ;;
2177   no:yes:* )
2178     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2179 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2180     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2181 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2182     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2183 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2184     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2185 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2186     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2187 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2188 ( $as_echo "## ----------------------------------------- ##
2189 ## Report this to build-dev@openjdk.java.net ##
2190 ## ----------------------------------------- ##"
2191      ) | sed "s/^/$as_me: WARNING:     /" >&2
2192     ;;
2193 esac
2194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2195 $as_echo_n "checking for $2... " >&6; }
2196 if eval \${$3+:} false; then :
2197   $as_echo_n "(cached) " >&6
2198 else
2199   eval "$3=\$ac_header_compiler"
2200 fi
2201 eval ac_res=\$$3
2202                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203 $as_echo "$ac_res" >&6; }
2204 fi
2205   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206 
2207 } # ac_fn_cxx_check_header_mongrel
2208 
2209 # ac_fn_cxx_try_run LINENO
2210 # ------------------------
2211 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2212 # that executables *can* be run.
2213 ac_fn_cxx_try_run ()
2214 {
2215   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216   if { { ac_try="$ac_link"
2217 case "(($ac_try" in
2218   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2219   *) ac_try_echo=$ac_try;;
2220 esac
2221 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2222 $as_echo "$ac_try_echo"; } >&5
2223   (eval "$ac_link") 2>&5
2224   ac_status=$?
2225   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2226   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2227   { { case "(($ac_try" in
2228   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2229   *) ac_try_echo=$ac_try;;
2230 esac
2231 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2232 $as_echo "$ac_try_echo"; } >&5
2233   (eval "$ac_try") 2>&5
2234   ac_status=$?
2235   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2236   test $ac_status = 0; }; }; then :
2237   ac_retval=0
2238 else
2239   $as_echo "$as_me: program exited with status $ac_status" >&5
2240        $as_echo "$as_me: failed program was:" >&5
2241 sed 's/^/| /' conftest.$ac_ext >&5
2242 
2243        ac_retval=$ac_status
2244 fi
2245   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2246   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2247   as_fn_set_status $ac_retval
2248 
2249 } # ac_fn_cxx_try_run
2250 
2251 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2252 # ---------------------------------------------------------
2253 # Tests whether HEADER exists and can be compiled using the include files in
2254 # INCLUDES, setting the cache variable VAR accordingly.
2255 ac_fn_cxx_check_header_compile ()
2256 {
2257   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2258   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2259 $as_echo_n "checking for $2... " >&6; }
2260 if eval \${$3+:} false; then :
2261   $as_echo_n "(cached) " >&6
2262 else
2263   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2264 /* end confdefs.h.  */
2265 $4
2266 #include <$2>
2267 _ACEOF
2268 if ac_fn_cxx_try_compile "$LINENO"; then :
2269   eval "$3=yes"
2270 else
2271   eval "$3=no"
2272 fi
2273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274 fi
2275 eval ac_res=\$$3
2276                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277 $as_echo "$ac_res" >&6; }
2278   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279 
2280 } # ac_fn_cxx_check_header_compile
2281 
2282 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2283 # ----------------------------------------------
2284 # Tries to find the compile-time value of EXPR in a program that includes
2285 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2286 # computed
2287 ac_fn_cxx_compute_int ()
2288 {
2289   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290   if test "$cross_compiling" = yes; then
2291     # Depending upon the size, compute the lo and hi bounds.
2292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2293 /* end confdefs.h.  */
2294 $4
2295 int
2296 main ()
2297 {
2298 static int test_array [1 - 2 * !(($2) >= 0)];
2299 test_array [0] = 0;
2300 return test_array [0];
2301 
2302   ;
2303   return 0;
2304 }
2305 _ACEOF
2306 if ac_fn_cxx_try_compile "$LINENO"; then :
2307   ac_lo=0 ac_mid=0
2308   while :; do
2309     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310 /* end confdefs.h.  */
2311 $4
2312 int
2313 main ()
2314 {
2315 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2316 test_array [0] = 0;
2317 return test_array [0];
2318 
2319   ;
2320   return 0;
2321 }
2322 _ACEOF
2323 if ac_fn_cxx_try_compile "$LINENO"; then :
2324   ac_hi=$ac_mid; break
2325 else
2326   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2327                         if test $ac_lo -le $ac_mid; then
2328                           ac_lo= ac_hi=
2329                           break
2330                         fi
2331                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2332 fi
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334   done
2335 else
2336   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337 /* end confdefs.h.  */
2338 $4
2339 int
2340 main ()
2341 {
2342 static int test_array [1 - 2 * !(($2) < 0)];
2343 test_array [0] = 0;
2344 return test_array [0];
2345 
2346   ;
2347   return 0;
2348 }
2349 _ACEOF
2350 if ac_fn_cxx_try_compile "$LINENO"; then :
2351   ac_hi=-1 ac_mid=-1
2352   while :; do
2353     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354 /* end confdefs.h.  */
2355 $4
2356 int
2357 main ()
2358 {
2359 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2360 test_array [0] = 0;
2361 return test_array [0];
2362 
2363   ;
2364   return 0;
2365 }
2366 _ACEOF
2367 if ac_fn_cxx_try_compile "$LINENO"; then :
2368   ac_lo=$ac_mid; break
2369 else
2370   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2371                         if test $ac_mid -le $ac_hi; then
2372                           ac_lo= ac_hi=
2373                           break
2374                         fi
2375                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2376 fi
2377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2378   done
2379 else
2380   ac_lo= ac_hi=
2381 fi
2382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383 fi
2384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2385 # Binary search between lo and hi bounds.
2386 while test "x$ac_lo" != "x$ac_hi"; do
2387   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2388   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389 /* end confdefs.h.  */
2390 $4
2391 int
2392 main ()
2393 {
2394 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2395 test_array [0] = 0;
2396 return test_array [0];
2397 
2398   ;
2399   return 0;
2400 }
2401 _ACEOF
2402 if ac_fn_cxx_try_compile "$LINENO"; then :
2403   ac_hi=$ac_mid
2404 else
2405   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2406 fi
2407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408 done
2409 case $ac_lo in #((
2410 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2411 '') ac_retval=1 ;;
2412 esac
2413   else
2414     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415 /* end confdefs.h.  */
2416 $4
2417 static long int longval () { return $2; }
2418 static unsigned long int ulongval () { return $2; }
2419 #include <stdio.h>
2420 #include <stdlib.h>
2421 int
2422 main ()
2423 {
2424 
2425   FILE *f = fopen ("conftest.val", "w");
2426   if (! f)
2427     return 1;
2428   if (($2) < 0)
2429     {
2430       long int i = longval ();
2431       if (i != ($2))
2432         return 1;
2433       fprintf (f, "%ld", i);
2434     }
2435   else
2436     {
2437       unsigned long int i = ulongval ();
2438       if (i != ($2))
2439         return 1;
2440       fprintf (f, "%lu", i);
2441     }
2442   /* Do not output a trailing newline, as this causes \r\n confusion
2443      on some platforms.  */
2444   return ferror (f) || fclose (f) != 0;
2445 
2446   ;
2447   return 0;
2448 }
2449 _ACEOF
2450 if ac_fn_cxx_try_run "$LINENO"; then :
2451   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2452 else
2453   ac_retval=1
2454 fi
2455 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2456   conftest.$ac_objext conftest.beam conftest.$ac_ext
2457 rm -f conftest.val
2458 
2459   fi
2460   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461   as_fn_set_status $ac_retval
2462 
2463 } # ac_fn_cxx_compute_int
2464 
2465 # ac_fn_cxx_try_link LINENO
2466 # -------------------------
2467 # Try to link conftest.$ac_ext, and return whether this succeeded.
2468 ac_fn_cxx_try_link ()
2469 {
2470   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471   rm -f conftest.$ac_objext conftest$ac_exeext
2472   if { { ac_try="$ac_link"
2473 case "(($ac_try" in
2474   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2475   *) ac_try_echo=$ac_try;;
2476 esac
2477 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2478 $as_echo "$ac_try_echo"; } >&5
2479   (eval "$ac_link") 2>conftest.err
2480   ac_status=$?
2481   if test -s conftest.err; then
2482     grep -v '^ *+' conftest.err >conftest.er1
2483     cat conftest.er1 >&5
2484     mv -f conftest.er1 conftest.err
2485   fi
2486   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2487   test $ac_status = 0; } && {
2488          test -z "$ac_cxx_werror_flag" ||
2489          test ! -s conftest.err
2490        } && test -s conftest$ac_exeext && {
2491          test "$cross_compiling" = yes ||
2492          test -x conftest$ac_exeext
2493        }; then :
2494   ac_retval=0
2495 else
2496   $as_echo "$as_me: failed program was:" >&5
2497 sed 's/^/| /' conftest.$ac_ext >&5
2498 
2499         ac_retval=1
2500 fi
2501   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2502   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2503   # interfere with the next link command; also delete a directory that is
2504   # left behind by Apple's compiler.  We do this before executing the actions.
2505   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2506   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2507   as_fn_set_status $ac_retval
2508 
2509 } # ac_fn_cxx_try_link
2510 
2511 # ac_fn_cxx_check_func LINENO FUNC VAR
2512 # ------------------------------------
2513 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2514 ac_fn_cxx_check_func ()
2515 {
2516   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2518 $as_echo_n "checking for $2... " >&6; }
2519 if eval \${$3+:} false; then :
2520   $as_echo_n "(cached) " >&6
2521 else
2522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2523 /* end confdefs.h.  */
2524 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2525    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2526 #define $2 innocuous_$2
2527 
2528 /* System header to define __stub macros and hopefully few prototypes,
2529     which can conflict with char $2 (); below.
2530     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2531     <limits.h> exists even on freestanding compilers.  */
2532 
2533 #ifdef __STDC__
2534 # include <limits.h>
2535 #else
2536 # include <assert.h>
2537 #endif
2538 
2539 #undef $2
2540 
2541 /* Override any GCC internal prototype to avoid an error.
2542    Use char because int might match the return type of a GCC
2543    builtin and then its argument prototype would still apply.  */
2544 #ifdef __cplusplus
2545 extern "C"
2546 #endif
2547 char $2 ();
2548 /* The GNU C library defines this for functions which it implements
2549     to always fail with ENOSYS.  Some functions are actually named
2550     something starting with __ and the normal name is an alias.  */
2551 #if defined __stub_$2 || defined __stub___$2
2552 choke me
2553 #endif
2554 
2555 int
2556 main ()
2557 {
2558 return $2 ();
2559   ;
2560   return 0;
2561 }
2562 _ACEOF
2563 if ac_fn_cxx_try_link "$LINENO"; then :
2564   eval "$3=yes"
2565 else
2566   eval "$3=no"
2567 fi
2568 rm -f core conftest.err conftest.$ac_objext \
2569     conftest$ac_exeext conftest.$ac_ext
2570 fi
2571 eval ac_res=\$$3
2572                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2573 $as_echo "$ac_res" >&6; }
2574   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2575 
2576 } # ac_fn_cxx_check_func
2577 
2578 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2579 # -------------------------------------------------------
2580 # Tests whether HEADER exists and can be compiled using the include files in
2581 # INCLUDES, setting the cache variable VAR accordingly.
2582 ac_fn_c_check_header_compile ()
2583 {
2584   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2585   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2586 $as_echo_n "checking for $2... " >&6; }
2587 if eval \${$3+:} false; then :
2588   $as_echo_n "(cached) " >&6
2589 else
2590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591 /* end confdefs.h.  */
2592 $4
2593 #include <$2>
2594 _ACEOF
2595 if ac_fn_c_try_compile "$LINENO"; then :
2596   eval "$3=yes"
2597 else
2598   eval "$3=no"
2599 fi
2600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601 fi
2602 eval ac_res=\$$3
2603                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2604 $as_echo "$ac_res" >&6; }
2605   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2606 
2607 } # ac_fn_c_check_header_compile
2608 cat >config.log <<_ACEOF
2609 This file contains any messages produced by compilers while
2610 running configure, to aid debugging if configure makes a mistake.
2611 
2612 It was created by OpenJDK $as_me jdk8, which was
2613 generated by GNU Autoconf 2.69.  Invocation command line was
2614 
2615   $ $0 $@
2616 
2617 _ACEOF
2618 exec 5>>config.log
2619 {
2620 cat <<_ASUNAME
2621 ## --------- ##
2622 ## Platform. ##
2623 ## --------- ##
2624 
2625 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2626 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2627 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2628 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2629 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2630 
2631 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2632 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2633 
2634 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2635 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2636 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2637 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2638 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2639 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2640 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2641 
2642 _ASUNAME
2643 
2644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2645 for as_dir in $PATH
2646 do
2647   IFS=$as_save_IFS
2648   test -z "$as_dir" && as_dir=.
2649     $as_echo "PATH: $as_dir"
2650   done
2651 IFS=$as_save_IFS
2652 
2653 } >&5
2654 
2655 cat >&5 <<_ACEOF
2656 
2657 
2658 ## ----------- ##
2659 ## Core tests. ##
2660 ## ----------- ##
2661 
2662 _ACEOF
2663 
2664 
2665 # Keep a trace of the command line.
2666 # Strip out --no-create and --no-recursion so they do not pile up.
2667 # Strip out --silent because we don't want to record it for future runs.
2668 # Also quote any args containing shell meta-characters.
2669 # Make two passes to allow for proper duplicate-argument suppression.
2670 ac_configure_args=
2671 ac_configure_args0=
2672 ac_configure_args1=
2673 ac_must_keep_next=false
2674 for ac_pass in 1 2
2675 do
2676   for ac_arg
2677   do
2678     case $ac_arg in
2679     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2680     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2681     | -silent | --silent | --silen | --sile | --sil)
2682       continue ;;
2683     *\'*)
2684       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2685     esac
2686     case $ac_pass in
2687     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2688     2)
2689       as_fn_append ac_configure_args1 " '$ac_arg'"
2690       if test $ac_must_keep_next = true; then
2691         ac_must_keep_next=false # Got value, back to normal.
2692       else
2693         case $ac_arg in
2694           *=* | --config-cache | -C | -disable-* | --disable-* \
2695           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2696           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2697           | -with-* | --with-* | -without-* | --without-* | --x)
2698             case "$ac_configure_args0 " in
2699               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2700             esac
2701             ;;
2702           -* ) ac_must_keep_next=true ;;
2703         esac
2704       fi
2705       as_fn_append ac_configure_args " '$ac_arg'"
2706       ;;
2707     esac
2708   done
2709 done
2710 { ac_configure_args0=; unset ac_configure_args0;}
2711 { ac_configure_args1=; unset ac_configure_args1;}
2712 
2713 # When interrupted or exit'd, cleanup temporary files, and complete
2714 # config.log.  We remove comments because anyway the quotes in there
2715 # would cause problems or look ugly.
2716 # WARNING: Use '\'' to represent an apostrophe within the trap.
2717 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2718 trap 'exit_status=$?
2719   # Save into config.log some information that might help in debugging.
2720   {
2721     echo
2722 
2723     $as_echo "## ---------------- ##
2724 ## Cache variables. ##
2725 ## ---------------- ##"
2726     echo
2727     # The following way of writing the cache mishandles newlines in values,
2728 (
2729   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2730     eval ac_val=\$$ac_var
2731     case $ac_val in #(
2732     *${as_nl}*)
2733       case $ac_var in #(
2734       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2735 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2736       esac
2737       case $ac_var in #(
2738       _ | IFS | as_nl) ;; #(
2739       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2740       *) { eval $ac_var=; unset $ac_var;} ;;
2741       esac ;;
2742     esac
2743   done
2744   (set) 2>&1 |
2745     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2746     *${as_nl}ac_space=\ *)
2747       sed -n \
2748         "s/'\''/'\''\\\\'\'''\''/g;
2749           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2750       ;; #(
2751     *)
2752       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2753       ;;
2754     esac |
2755     sort
2756 )
2757     echo
2758 
2759     $as_echo "## ----------------- ##
2760 ## Output variables. ##
2761 ## ----------------- ##"
2762     echo
2763     for ac_var in $ac_subst_vars
2764     do
2765       eval ac_val=\$$ac_var
2766       case $ac_val in
2767       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2768       esac
2769       $as_echo "$ac_var='\''$ac_val'\''"
2770     done | sort
2771     echo
2772 
2773     if test -n "$ac_subst_files"; then
2774       $as_echo "## ------------------- ##
2775 ## File substitutions. ##
2776 ## ------------------- ##"
2777       echo
2778       for ac_var in $ac_subst_files
2779       do
2780         eval ac_val=\$$ac_var
2781         case $ac_val in
2782         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2783         esac
2784         $as_echo "$ac_var='\''$ac_val'\''"
2785       done | sort
2786       echo
2787     fi
2788 
2789     if test -s confdefs.h; then
2790       $as_echo "## ----------- ##
2791 ## confdefs.h. ##
2792 ## ----------- ##"
2793       echo
2794       cat confdefs.h
2795       echo
2796     fi
2797     test "$ac_signal" != 0 &&
2798       $as_echo "$as_me: caught signal $ac_signal"
2799     $as_echo "$as_me: exit $exit_status"
2800   } >&5
2801   rm -f core *.core core.conftest.* &&
2802     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2803     exit $exit_status
2804 ' 0
2805 for ac_signal in 1 2 13 15; do
2806   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2807 done
2808 ac_signal=0
2809 
2810 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2811 rm -f -r conftest* confdefs.h
2812 
2813 $as_echo "/* confdefs.h */" > confdefs.h
2814 
2815 # Predefined preprocessor variables.
2816 
2817 cat >>confdefs.h <<_ACEOF
2818 #define PACKAGE_NAME "$PACKAGE_NAME"
2819 _ACEOF
2820 
2821 cat >>confdefs.h <<_ACEOF
2822 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2823 _ACEOF
2824 
2825 cat >>confdefs.h <<_ACEOF
2826 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2827 _ACEOF
2828 
2829 cat >>confdefs.h <<_ACEOF
2830 #define PACKAGE_STRING "$PACKAGE_STRING"
2831 _ACEOF
2832 
2833 cat >>confdefs.h <<_ACEOF
2834 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2835 _ACEOF
2836 
2837 cat >>confdefs.h <<_ACEOF
2838 #define PACKAGE_URL "$PACKAGE_URL"
2839 _ACEOF
2840 
2841 
2842 # Let the site file select an alternate cache file if it wants to.
2843 # Prefer an explicitly selected file to automatically selected ones.
2844 ac_site_file1=NONE
2845 ac_site_file2=NONE
2846 if test -n "$CONFIG_SITE"; then
2847   # We do not want a PATH search for config.site.
2848   case $CONFIG_SITE in #((
2849     -*)  ac_site_file1=./$CONFIG_SITE;;
2850     */*) ac_site_file1=$CONFIG_SITE;;
2851     *)   ac_site_file1=./$CONFIG_SITE;;
2852   esac
2853 elif test "x$prefix" != xNONE; then
2854   ac_site_file1=$prefix/share/config.site
2855   ac_site_file2=$prefix/etc/config.site
2856 else
2857   ac_site_file1=$ac_default_prefix/share/config.site
2858   ac_site_file2=$ac_default_prefix/etc/config.site
2859 fi
2860 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2861 do
2862   test "x$ac_site_file" = xNONE && continue
2863   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2864     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2865 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2866     sed 's/^/| /' "$ac_site_file" >&5
2867     . "$ac_site_file" \
2868       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2869 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2870 as_fn_error $? "failed to load site script $ac_site_file
2871 See \`config.log' for more details" "$LINENO" 5; }
2872   fi
2873 done
2874 
2875 if test -r "$cache_file"; then
2876   # Some versions of bash will fail to source /dev/null (special files
2877   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2878   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2879     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2880 $as_echo "$as_me: loading cache $cache_file" >&6;}
2881     case $cache_file in
2882       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2883       *)                      . "./$cache_file";;
2884     esac
2885   fi
2886 else
2887   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2888 $as_echo "$as_me: creating cache $cache_file" >&6;}
2889   >$cache_file
2890 fi
2891 
2892 # Check that the precious variables saved in the cache have kept the same
2893 # value.
2894 ac_cache_corrupted=false
2895 for ac_var in $ac_precious_vars; do
2896   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2897   eval ac_new_set=\$ac_env_${ac_var}_set
2898   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2899   eval ac_new_val=\$ac_env_${ac_var}_value
2900   case $ac_old_set,$ac_new_set in
2901     set,)
2902       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2903 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2904       ac_cache_corrupted=: ;;
2905     ,set)
2906       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2907 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2908       ac_cache_corrupted=: ;;
2909     ,);;
2910     *)
2911       if test "x$ac_old_val" != "x$ac_new_val"; then
2912         # differences in whitespace do not lead to failure.
2913         ac_old_val_w=`echo x $ac_old_val`
2914         ac_new_val_w=`echo x $ac_new_val`
2915         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2916           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2917 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2918           ac_cache_corrupted=:
2919         else
2920           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2921 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2922           eval $ac_var=\$ac_old_val
2923         fi
2924         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2925 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2926         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2927 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2928       fi;;
2929   esac
2930   # Pass precious variables to config.status.
2931   if test "$ac_new_set" = set; then
2932     case $ac_new_val in
2933     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2934     *) ac_arg=$ac_var=$ac_new_val ;;
2935     esac
2936     case " $ac_configure_args " in
2937       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2938       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2939     esac
2940   fi
2941 done
2942 if $ac_cache_corrupted; then
2943   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2944 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2945   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2946 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2947   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2948 fi
2949 ## -------------------- ##
2950 ## Main body of script. ##
2951 ## -------------------- ##
2952 
2953 ac_ext=c
2954 ac_cpp='$CPP $CPPFLAGS'
2955 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2956 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2957 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2958 
2959 
2960 
2961 ac_aux_dir=
2962 for ac_dir in build-aux "$srcdir"/build-aux; do
2963   if test -f "$ac_dir/install-sh"; then
2964     ac_aux_dir=$ac_dir
2965     ac_install_sh="$ac_aux_dir/install-sh -c"
2966     break
2967   elif test -f "$ac_dir/install.sh"; then
2968     ac_aux_dir=$ac_dir
2969     ac_install_sh="$ac_aux_dir/install.sh -c"
2970     break
2971   elif test -f "$ac_dir/shtool"; then
2972     ac_aux_dir=$ac_dir
2973     ac_install_sh="$ac_aux_dir/shtool install -c"
2974     break
2975   fi
2976 done
2977 if test -z "$ac_aux_dir"; then
2978   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2979 fi
2980 
2981 # These three variables are undocumented and unsupported,
2982 # and are intended to be withdrawn in a future Autoconf release.
2983 # They can cause serious problems if a builder's source tree is in a directory
2984 # whose full name contains unusual characters.
2985 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2986 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2987 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2988 
2989 
2990 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2991 
2992 #
2993 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2994 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2995 #
2996 # This code is free software; you can redistribute it and/or modify it
2997 # under the terms of the GNU General Public License version 2 only, as
2998 # published by the Free Software Foundation.  Oracle designates this
2999 # particular file as subject to the "Classpath" exception as provided
3000 # by Oracle in the LICENSE file that accompanied this code.
3001 #
3002 # This code is distributed in the hope that it will be useful, but WITHOUT
3003 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3004 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3005 # version 2 for more details (a copy is included in the LICENSE file that
3006 # accompanied this code).
3007 #
3008 # You should have received a copy of the GNU General Public License version
3009 # 2 along with this work; if not, write to the Free Software Foundation,
3010 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3011 #
3012 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3013 # or visit www.oracle.com if you need additional information or have any
3014 # questions.
3015 #
3016 
3017 #
3018 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3019 #
3020 # This program is free software; you can redistribute it and/or modify
3021 # it under the terms of the GNU General Public License as published by
3022 # the Free Software Foundation; either version 2 of the License, or
3023 # (at your option) any later version.
3024 #
3025 # This program is distributed in the hope that it will be useful, but
3026 # WITHOUT ANY WARRANTY; without even the implied warranty of
3027 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3028 # General Public License for more details.
3029 #
3030 # You should have received a copy of the GNU General Public License
3031 # along with this program; if not, write to the Free Software
3032 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3033 #
3034 # As a special exception to the GNU General Public License, if you
3035 # distribute this file as part of a program that contains a
3036 # configuration script generated by Autoconf, you may include it under
3037 # the same distribution terms that you use for the rest of that program.
3038 
3039 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3040 # ----------------------------------
3041 # PKG_PROG_PKG_CONFIG
3042 
3043 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3044 #
3045 # Check to see whether a particular set of modules exists.  Similar
3046 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3047 #
3048 #
3049 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3050 # this or PKG_CHECK_MODULES is called, or make sure to call
3051 # PKG_CHECK_EXISTS manually
3052 # --------------------------------------------------------------
3053 
3054 
3055 
3056 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3057 # ---------------------------------------------
3058 # _PKG_CONFIG
3059 
3060 # _PKG_SHORT_ERRORS_SUPPORTED
3061 # -----------------------------
3062 # _PKG_SHORT_ERRORS_SUPPORTED
3063 
3064 
3065 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3066 # [ACTION-IF-NOT-FOUND])
3067 #
3068 #
3069 # Note that if there is a possibility the first call to
3070 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3071 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3072 #
3073 #
3074 # --------------------------------------------------------------
3075 # PKG_CHECK_MODULES
3076 
3077 
3078 # Include these first...
3079 #
3080 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3081 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3082 #
3083 # This code is free software; you can redistribute it and/or modify it
3084 # under the terms of the GNU General Public License version 2 only, as
3085 # published by the Free Software Foundation.  Oracle designates this
3086 # particular file as subject to the "Classpath" exception as provided
3087 # by Oracle in the LICENSE file that accompanied this code.
3088 #
3089 # This code is distributed in the hope that it will be useful, but WITHOUT
3090 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3091 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3092 # version 2 for more details (a copy is included in the LICENSE file that
3093 # accompanied this code).
3094 #
3095 # You should have received a copy of the GNU General Public License version
3096 # 2 along with this work; if not, write to the Free Software Foundation,
3097 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3098 #
3099 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3100 # or visit www.oracle.com if you need additional information or have any
3101 # questions.
3102 #
3103 
3104 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3105 # If so, then append $1 to $2\
3106 # Also set JVM_ARG_OK to true/false depending on outcome.
3107 
3108 
3109 # Appends a string to a path variable, only adding the : when needed.
3110 
3111 
3112 # This will make sure the given variable points to a full and proper
3113 # path. This means:
3114 # 1) There will be no spaces in the path. On posix platforms,
3115 #    spaces in the path will result in an error. On Windows,
3116 #    the path will be rewritten using short-style to be space-free.
3117 # 2) The path will be absolute, and it will be in unix-style (on
3118 #     cygwin).
3119 # $1: The name of the variable to fix
3120 
3121 
3122 # This will make sure the given variable points to a executable
3123 # with a full and proper path. This means:
3124 # 1) There will be no spaces in the path. On posix platforms,
3125 #    spaces in the path will result in an error. On Windows,
3126 #    the path will be rewritten using short-style to be space-free.
3127 # 2) The path will be absolute, and it will be in unix-style (on
3128 #     cygwin).
3129 # Any arguments given to the executable is preserved.
3130 # If the input variable does not have a directory specification, then
3131 # it need to be in the PATH.
3132 # $1: The name of the variable to fix
3133 
3134 
3135 
3136 
3137 
3138 
3139 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3140 # $1: variable to check
3141 # $2: executable name to print in warning (optional)
3142 
3143 
3144 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3145 # Arguments as AC_PATH_PROG:
3146 # $1: variable to set
3147 # $2: executable name to look for
3148 
3149 
3150 # Setup the most fundamental tools that relies on not much else to set up,
3151 # but is used by much of the early bootstrap code.
3152 
3153 
3154 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3155 
3156 
3157 
3158 
3159 
3160 
3161 
3162 #%%% Simple tools %%%
3163 
3164 # Check if we have found a usable version of make
3165 # $1: the path to a potential make binary (or empty)
3166 # $2: the description on how we found this
3167 
3168 
3169 # Goes looking for a usable version of GNU make.
3170 
3171 
3172 
3173 
3174 
3175 
3176 # Check if build directory is on local disk. If not possible to determine,
3177 # we prefer to claim it's local.
3178 # Argument 1: directory to test
3179 # Argument 2: what to do if it is on local disk
3180 # Argument 3: what to do otherwise (remote disk or failure)
3181 
3182 
3183 # Check that source files have basic read permissions set. This might
3184 # not be the case in cygwin in certain conditions.
3185 
3186 
3187 
3188 
3189 #
3190 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3191 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3192 #
3193 # This code is free software; you can redistribute it and/or modify it
3194 # under the terms of the GNU General Public License version 2 only, as
3195 # published by the Free Software Foundation.  Oracle designates this
3196 # particular file as subject to the "Classpath" exception as provided
3197 # by Oracle in the LICENSE file that accompanied this code.
3198 #
3199 # This code is distributed in the hope that it will be useful, but WITHOUT
3200 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3201 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3202 # version 2 for more details (a copy is included in the LICENSE file that
3203 # accompanied this code).
3204 #
3205 # You should have received a copy of the GNU General Public License version
3206 # 2 along with this work; if not, write to the Free Software Foundation,
3207 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3208 #
3209 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3210 # or visit www.oracle.com if you need additional information or have any
3211 # questions.
3212 #
3213 
3214 
3215 
3216 
3217 
3218 # Helper function which possibly converts a path using DOS-style short mode.
3219 # If so, the updated path is stored in $new_path.
3220 # $1: The path to check
3221 
3222 
3223 # Helper function which possibly converts a path using DOS-style short mode.
3224 # If so, the updated path is stored in $new_path.
3225 # $1: The path to check
3226 
3227 
3228 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3229 # and could probably be heavily simplified. However, all changes in this
3230 # area tend to need lot of testing in different scenarios, and in lack of
3231 # proper unit testing, cleaning this up has not been deemed worth the effort
3232 # at the moment.
3233 
3234 
3235 
3236 
3237 
3238 
3239 
3240 
3241 
3242 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3243 
3244 
3245 
3246 
3247 #
3248 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3249 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3250 #
3251 # This code is free software; you can redistribute it and/or modify it
3252 # under the terms of the GNU General Public License version 2 only, as
3253 # published by the Free Software Foundation.  Oracle designates this
3254 # particular file as subject to the "Classpath" exception as provided
3255 # by Oracle in the LICENSE file that accompanied this code.
3256 #
3257 # This code is distributed in the hope that it will be useful, but WITHOUT
3258 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3259 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3260 # version 2 for more details (a copy is included in the LICENSE file that
3261 # accompanied this code).
3262 #
3263 # You should have received a copy of the GNU General Public License version
3264 # 2 along with this work; if not, write to the Free Software Foundation,
3265 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3266 #
3267 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3268 # or visit www.oracle.com if you need additional information or have any
3269 # questions.
3270 #
3271 
3272 
3273 
3274 
3275 
3276 
3277 
3278 
3279 
3280 
3281 
3282 # ... then the rest
3283 #
3284 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3285 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3286 #
3287 # This code is free software; you can redistribute it and/or modify it
3288 # under the terms of the GNU General Public License version 2 only, as
3289 # published by the Free Software Foundation.  Oracle designates this
3290 # particular file as subject to the "Classpath" exception as provided
3291 # by Oracle in the LICENSE file that accompanied this code.
3292 #
3293 # This code is distributed in the hope that it will be useful, but WITHOUT
3294 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3295 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3296 # version 2 for more details (a copy is included in the LICENSE file that
3297 # accompanied this code).
3298 #
3299 # You should have received a copy of the GNU General Public License version
3300 # 2 along with this work; if not, write to the Free Software Foundation,
3301 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3302 #
3303 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3304 # or visit www.oracle.com if you need additional information or have any
3305 # questions.
3306 #
3307 
3308 # Execute the check given as argument, and verify the result
3309 # If the Boot JDK was previously found, do nothing
3310 # $1 A command line (typically autoconf macro) to execute
3311 
3312 
3313 # Test: Is bootjdk explicitely set by command line arguments?
3314 
3315 
3316 # Test: Is bootjdk available from builddeps?
3317 
3318 
3319 # Test: Is $JAVA_HOME set?
3320 
3321 
3322 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3323 
3324 
3325 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3326 
3327 
3328 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3329 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3330 # $1 = Path to directory containing jdk installations.
3331 # $2 = String to append to the found JDK directory to get the proper JDK home
3332 
3333 
3334 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3335 # environmental variable as base for where to look.
3336 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3337 
3338 
3339 # Test: Is there a JDK installed in default, well-known locations?
3340 
3341 
3342 # Check that a command-line tool in the Boot JDK is correct
3343 # $1 = name of variable to assign
3344 # $2 = name of binary
3345 
3346 
3347 ###############################################################################
3348 #
3349 # We need a Boot JDK to bootstrap the build.
3350 #
3351 
3352 
3353 
3354 
3355 
3356 #
3357 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3358 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3359 #
3360 # This code is free software; you can redistribute it and/or modify it
3361 # under the terms of the GNU General Public License version 2 only, as
3362 # published by the Free Software Foundation.  Oracle designates this
3363 # particular file as subject to the "Classpath" exception as provided
3364 # by Oracle in the LICENSE file that accompanied this code.
3365 #
3366 # This code is distributed in the hope that it will be useful, but WITHOUT
3367 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3368 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3369 # version 2 for more details (a copy is included in the LICENSE file that
3370 # accompanied this code).
3371 #
3372 # You should have received a copy of the GNU General Public License version
3373 # 2 along with this work; if not, write to the Free Software Foundation,
3374 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3375 #
3376 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3377 # or visit www.oracle.com if you need additional information or have any
3378 # questions.
3379 #
3380 
3381 
3382 
3383 
3384 
3385 
3386 
3387 
3388 
3389 
3390 
3391 
3392 
3393 
3394 
3395 
3396 
3397 
3398 
3399 
3400 #
3401 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3402 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3403 #
3404 # This code is free software; you can redistribute it and/or modify it
3405 # under the terms of the GNU General Public License version 2 only, as
3406 # published by the Free Software Foundation.  Oracle designates this
3407 # particular file as subject to the "Classpath" exception as provided
3408 # by Oracle in the LICENSE file that accompanied this code.
3409 #
3410 # This code is distributed in the hope that it will be useful, but WITHOUT
3411 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3412 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3413 # version 2 for more details (a copy is included in the LICENSE file that
3414 # accompanied this code).
3415 #
3416 # You should have received a copy of the GNU General Public License version
3417 # 2 along with this work; if not, write to the Free Software Foundation,
3418 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3419 #
3420 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3421 # or visit www.oracle.com if you need additional information or have any
3422 # questions.
3423 #
3424 
3425 
3426 
3427 
3428 
3429 cygwin_help() {
3430     case $1 in
3431     unzip)
3432         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3433     zip)
3434         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3435     make)
3436         PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3437     * )
3438        break ;;
3439     esac
3440 }
3441 
3442 apt_help() {
3443     case $1 in
3444     devkit)
3445         PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3446     openjdk)
3447         PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3448     alsa)
3449         PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3450     cups)
3451         PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3452     freetype2)
3453         PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3454     pulse)
3455         PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3456     x11)
3457         PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3458     ccache)
3459         PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3460     * )
3461        break ;;
3462     esac
3463 }
3464 
3465 yum_help() {
3466     case $1 in
3467     devkit)
3468         PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3469     openjdk)
3470         PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3471     alsa)
3472         PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3473     cups)
3474         PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3475     freetype2)
3476         PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3477     pulse)
3478         PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3479     x11)
3480         PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3481     ccache)
3482         PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3483     * )
3484        break ;;
3485     esac
3486 }
3487 
3488 port_help() {
3489     PKGHANDLER_COMMAND=""
3490 }
3491 
3492 pkgutil_help() {
3493     PKGHANDLER_COMMAND=""
3494 }
3495 
3496 pkgadd_help() {
3497     PKGHANDLER_COMMAND=""
3498 }
3499 
3500 
3501 
3502 #
3503 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3504 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3505 #
3506 # This code is free software; you can redistribute it and/or modify it
3507 # under the terms of the GNU General Public License version 2 only, as
3508 # published by the Free Software Foundation.  Oracle designates this
3509 # particular file as subject to the "Classpath" exception as provided
3510 # by Oracle in the LICENSE file that accompanied this code.
3511 #
3512 # This code is distributed in the hope that it will be useful, but WITHOUT
3513 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3514 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3515 # version 2 for more details (a copy is included in the LICENSE file that
3516 # accompanied this code).
3517 #
3518 # You should have received a copy of the GNU General Public License version
3519 # 2 along with this work; if not, write to the Free Software Foundation,
3520 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3521 #
3522 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3523 # or visit www.oracle.com if you need additional information or have any
3524 # questions.
3525 #
3526 
3527 
3528 
3529 
3530 
3531 
3532 
3533 
3534 ###############################################################################
3535 #
3536 # Should we build only OpenJDK even if closed sources are present?
3537 #
3538 
3539 
3540 
3541 
3542 ###############################################################################
3543 #
3544 # Setup version numbers
3545 #
3546 
3547 
3548 
3549 
3550 
3551 
3552 # Support for customization of the build process. Some build files
3553 # will include counterparts from this location, if they exist. This allows
3554 # for a degree of customization of the build targets and the rules/recipes
3555 # to create them
3556 
3557 # Check whether --with-custom-make-dir was given.
3558 if test "${with_custom_make_dir+set}" = set; then :
3559   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3560 fi
3561 
3562 
3563 
3564 #
3565 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3566 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3567 #
3568 # This code is free software; you can redistribute it and/or modify it
3569 # under the terms of the GNU General Public License version 2 only, as
3570 # published by the Free Software Foundation.  Oracle designates this
3571 # particular file as subject to the "Classpath" exception as provided
3572 # by Oracle in the LICENSE file that accompanied this code.
3573 #
3574 # This code is distributed in the hope that it will be useful, but WITHOUT
3575 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3576 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3577 # version 2 for more details (a copy is included in the LICENSE file that
3578 # accompanied this code).
3579 #
3580 # You should have received a copy of the GNU General Public License version
3581 # 2 along with this work; if not, write to the Free Software Foundation,
3582 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3583 #
3584 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3585 # or visit www.oracle.com if you need additional information or have any
3586 # questions.
3587 #
3588 
3589 
3590 
3591 
3592 
3593 
3594 
3595 
3596 
3597 
3598 
3599 
3600 
3601 
3602 
3603 #
3604 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3605 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3606 #
3607 # This code is free software; you can redistribute it and/or modify it
3608 # under the terms of the GNU General Public License version 2 only, as
3609 # published by the Free Software Foundation.  Oracle designates this
3610 # particular file as subject to the "Classpath" exception as provided
3611 # by Oracle in the LICENSE file that accompanied this code.
3612 #
3613 # This code is distributed in the hope that it will be useful, but WITHOUT
3614 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3615 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3616 # version 2 for more details (a copy is included in the LICENSE file that
3617 # accompanied this code).
3618 #
3619 # You should have received a copy of the GNU General Public License version
3620 # 2 along with this work; if not, write to the Free Software Foundation,
3621 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3622 #
3623 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3624 # or visit www.oracle.com if you need additional information or have any
3625 # questions.
3626 #
3627 
3628 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3629 # Converts autoconf style CPU name to OpenJDK style, into
3630 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3631 
3632 
3633 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3634 # Converts autoconf style OS name to OpenJDK style, into
3635 # VAR_OS and VAR_OS_API.
3636 
3637 
3638 # Expects $host_os $host_cpu $build_os and $build_cpu
3639 # and $with_target_bits to have been setup!
3640 #
3641 # Translate the standard triplet(quadruplet) definition
3642 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3643 # OPENJDK_BUILD_OS, etc.
3644 
3645 
3646 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3647 # accordingly. Must be done after setting up build and target system, but before
3648 # doing anything else with these values.
3649 
3650 
3651     # Setup the legacy variables, for controlling the old makefiles.
3652     #
3653 
3654 
3655 
3656 
3657 #%%% Build and target systems %%%
3658 
3659 
3660 
3661 
3662 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3663 # Add -mX to various FLAGS variables.
3664 
3665 
3666 
3667 
3668 
3669 
3670 #
3671 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3672 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3673 #
3674 # This code is free software; you can redistribute it and/or modify it
3675 # under the terms of the GNU General Public License version 2 only, as
3676 # published by the Free Software Foundation.  Oracle designates this
3677 # particular file as subject to the "Classpath" exception as provided
3678 # by Oracle in the LICENSE file that accompanied this code.
3679 #
3680 # This code is distributed in the hope that it will be useful, but WITHOUT
3681 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3682 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3683 # version 2 for more details (a copy is included in the LICENSE file that
3684 # accompanied this code).
3685 #
3686 # You should have received a copy of the GNU General Public License version
3687 # 2 along with this work; if not, write to the Free Software Foundation,
3688 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3689 #
3690 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3691 # or visit www.oracle.com if you need additional information or have any
3692 # questions.
3693 #
3694 
3695 
3696 
3697 
3698 
3699 
3700 
3701 
3702 #
3703 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3704 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3705 #
3706 # This code is free software; you can redistribute it and/or modify it
3707 # under the terms of the GNU General Public License version 2 only, as
3708 # published by the Free Software Foundation.  Oracle designates this
3709 # particular file as subject to the "Classpath" exception as provided
3710 # by Oracle in the LICENSE file that accompanied this code.
3711 #
3712 # This code is distributed in the hope that it will be useful, but WITHOUT
3713 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3714 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3715 # version 2 for more details (a copy is included in the LICENSE file that
3716 # accompanied this code).
3717 #
3718 # You should have received a copy of the GNU General Public License version
3719 # 2 along with this work; if not, write to the Free Software Foundation,
3720 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3721 #
3722 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3723 # or visit www.oracle.com if you need additional information or have any
3724 # questions.
3725 #
3726 
3727 # $1 = compiler to test (CC or CXX)
3728 # $2 = human readable name of compiler (C or C++)
3729 
3730 
3731 
3732 
3733 
3734 # $1 = compiler to test (CC or CXX)
3735 # $2 = human readable name of compiler (C or C++)
3736 # $3 = list of compiler names to search for
3737 
3738 
3739 
3740 
3741 
3742 
3743 
3744 
3745 
3746 
3747 
3748 
3749 
3750 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3751 #                                   [RUN-IF-FALSE])
3752 # ------------------------------------------------------------
3753 # Check that the c and c++ compilers support an argument
3754 
3755 
3756 
3757 
3758 # Setup the JTREG paths
3759 
3760 
3761 #
3762 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3763 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3764 #
3765 # This code is free software; you can redistribute it and/or modify it
3766 # under the terms of the GNU General Public License version 2 only, as
3767 # published by the Free Software Foundation.  Oracle designates this
3768 # particular file as subject to the "Classpath" exception as provided
3769 # by Oracle in the LICENSE file that accompanied this code.
3770 #
3771 # This code is distributed in the hope that it will be useful, but WITHOUT
3772 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3773 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3774 # version 2 for more details (a copy is included in the LICENSE file that
3775 # accompanied this code).
3776 #
3777 # You should have received a copy of the GNU General Public License version
3778 # 2 along with this work; if not, write to the Free Software Foundation,
3779 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3780 #
3781 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3782 # or visit www.oracle.com if you need additional information or have any
3783 # questions.
3784 #
3785 
3786 
3787 
3788 
3789 
3790 
3791 
3792 # Check if the VS env variables were setup prior to running configure.
3793 # If not, then find vcvarsall.bat and run it automatically, and integrate
3794 # the set env variables into the spec file.
3795 
3796 
3797 
3798 
3799 
3800 
3801 # This line needs to be here, verbatim, after all includes and the dummy hook
3802 # definitions. It is replaced with custom functionality when building
3803 # custom sources.
3804 #CUSTOM_AUTOCONF_INCLUDE
3805 
3806 # Do not change or remove the following line, it is needed for consistency checks:
3807 DATE_WHEN_GENERATED=1378978734
3808 
3809 ###############################################################################
3810 #
3811 # Initialization / Boot-strapping
3812 #
3813 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3814 # thus it jumps back and forth, each time gaining something needed later on.
3815 #
3816 ###############################################################################
3817 
3818 # Basic initialization that must happen first of all
3819 
3820 # Save the original command line. This is passed to us by the wrapper configure script.
3821 
3822 DATE_WHEN_CONFIGURED=`LANG=C date`
3823 
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3825 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3827 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3828 
3829 
3830 
3831 # Start with tools that do not need have cross compilation support
3832 # and can be expected to be found in the default PATH. These tools are
3833 # used by configure. Nor are these tools expected to be found in the
3834 # devkit from the builddeps server either, since they are
3835 # needed to download the devkit.
3836 
3837 # First are all the simple required tools.
3838 
3839     for ac_prog in basename
3840 do
3841   # Extract the first word of "$ac_prog", so it can be a program name with args.
3842 set dummy $ac_prog; ac_word=$2
3843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3844 $as_echo_n "checking for $ac_word... " >&6; }
3845 if ${ac_cv_path_BASENAME+:} false; then :
3846   $as_echo_n "(cached) " >&6
3847 else
3848   case $BASENAME in
3849   [\\/]* | ?:[\\/]*)
3850   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3851   ;;
3852   *)
3853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3854 for as_dir in $PATH
3855 do
3856   IFS=$as_save_IFS
3857   test -z "$as_dir" && as_dir=.
3858     for ac_exec_ext in '' $ac_executable_extensions; do
3859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3860     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3862     break 2
3863   fi
3864 done
3865   done
3866 IFS=$as_save_IFS
3867 
3868   ;;
3869 esac
3870 fi
3871 BASENAME=$ac_cv_path_BASENAME
3872 if test -n "$BASENAME"; then
3873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3874 $as_echo "$BASENAME" >&6; }
3875 else
3876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3877 $as_echo "no" >&6; }
3878 fi
3879 
3880 
3881   test -n "$BASENAME" && break
3882 done
3883 
3884 
3885     if test "x$BASENAME" = x; then
3886         if test "xbasename" = x; then
3887           PROG_NAME=basename
3888         else
3889           PROG_NAME=basename
3890         fi
3891         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3892 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3893         as_fn_error $? "Cannot continue" "$LINENO" 5
3894     fi
3895 
3896 
3897 
3898     for ac_prog in bash
3899 do
3900   # Extract the first word of "$ac_prog", so it can be a program name with args.
3901 set dummy $ac_prog; ac_word=$2
3902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3903 $as_echo_n "checking for $ac_word... " >&6; }
3904 if ${ac_cv_path_BASH+:} false; then :
3905   $as_echo_n "(cached) " >&6
3906 else
3907   case $BASH in
3908   [\\/]* | ?:[\\/]*)
3909   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3910   ;;
3911   *)
3912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913 for as_dir in $PATH
3914 do
3915   IFS=$as_save_IFS
3916   test -z "$as_dir" && as_dir=.
3917     for ac_exec_ext in '' $ac_executable_extensions; do
3918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3919     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921     break 2
3922   fi
3923 done
3924   done
3925 IFS=$as_save_IFS
3926 
3927   ;;
3928 esac
3929 fi
3930 BASH=$ac_cv_path_BASH
3931 if test -n "$BASH"; then
3932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3933 $as_echo "$BASH" >&6; }
3934 else
3935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3936 $as_echo "no" >&6; }
3937 fi
3938 
3939 
3940   test -n "$BASH" && break
3941 done
3942 
3943 
3944     if test "x$BASH" = x; then
3945         if test "xbash" = x; then
3946           PROG_NAME=bash
3947         else
3948           PROG_NAME=bash
3949         fi
3950         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3951 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3952         as_fn_error $? "Cannot continue" "$LINENO" 5
3953     fi
3954 
3955 
3956 
3957     for ac_prog in cat
3958 do
3959   # Extract the first word of "$ac_prog", so it can be a program name with args.
3960 set dummy $ac_prog; ac_word=$2
3961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3962 $as_echo_n "checking for $ac_word... " >&6; }
3963 if ${ac_cv_path_CAT+:} false; then :
3964   $as_echo_n "(cached) " >&6
3965 else
3966   case $CAT in
3967   [\\/]* | ?:[\\/]*)
3968   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3969   ;;
3970   *)
3971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972 for as_dir in $PATH
3973 do
3974   IFS=$as_save_IFS
3975   test -z "$as_dir" && as_dir=.
3976     for ac_exec_ext in '' $ac_executable_extensions; do
3977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3978     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3980     break 2
3981   fi
3982 done
3983   done
3984 IFS=$as_save_IFS
3985 
3986   ;;
3987 esac
3988 fi
3989 CAT=$ac_cv_path_CAT
3990 if test -n "$CAT"; then
3991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3992 $as_echo "$CAT" >&6; }
3993 else
3994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995 $as_echo "no" >&6; }
3996 fi
3997 
3998 
3999   test -n "$CAT" && break
4000 done
4001 
4002 
4003     if test "x$CAT" = x; then
4004         if test "xcat" = x; then
4005           PROG_NAME=cat
4006         else
4007           PROG_NAME=cat
4008         fi
4009         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4010 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4011         as_fn_error $? "Cannot continue" "$LINENO" 5
4012     fi
4013 
4014 
4015 
4016     for ac_prog in chmod
4017 do
4018   # Extract the first word of "$ac_prog", so it can be a program name with args.
4019 set dummy $ac_prog; ac_word=$2
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4021 $as_echo_n "checking for $ac_word... " >&6; }
4022 if ${ac_cv_path_CHMOD+:} false; then :
4023   $as_echo_n "(cached) " >&6
4024 else
4025   case $CHMOD in
4026   [\\/]* | ?:[\\/]*)
4027   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4028   ;;
4029   *)
4030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4031 for as_dir in $PATH
4032 do
4033   IFS=$as_save_IFS
4034   test -z "$as_dir" && as_dir=.
4035     for ac_exec_ext in '' $ac_executable_extensions; do
4036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4037     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4039     break 2
4040   fi
4041 done
4042   done
4043 IFS=$as_save_IFS
4044 
4045   ;;
4046 esac
4047 fi
4048 CHMOD=$ac_cv_path_CHMOD
4049 if test -n "$CHMOD"; then
4050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4051 $as_echo "$CHMOD" >&6; }
4052 else
4053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4054 $as_echo "no" >&6; }
4055 fi
4056 
4057 
4058   test -n "$CHMOD" && break
4059 done
4060 
4061 
4062     if test "x$CHMOD" = x; then
4063         if test "xchmod" = x; then
4064           PROG_NAME=chmod
4065         else
4066           PROG_NAME=chmod
4067         fi
4068         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4069 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4070         as_fn_error $? "Cannot continue" "$LINENO" 5
4071     fi
4072 
4073 
4074 
4075     for ac_prog in cmp
4076 do
4077   # Extract the first word of "$ac_prog", so it can be a program name with args.
4078 set dummy $ac_prog; ac_word=$2
4079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4080 $as_echo_n "checking for $ac_word... " >&6; }
4081 if ${ac_cv_path_CMP+:} false; then :
4082   $as_echo_n "(cached) " >&6
4083 else
4084   case $CMP in
4085   [\\/]* | ?:[\\/]*)
4086   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4087   ;;
4088   *)
4089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4090 for as_dir in $PATH
4091 do
4092   IFS=$as_save_IFS
4093   test -z "$as_dir" && as_dir=.
4094     for ac_exec_ext in '' $ac_executable_extensions; do
4095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4096     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4098     break 2
4099   fi
4100 done
4101   done
4102 IFS=$as_save_IFS
4103 
4104   ;;
4105 esac
4106 fi
4107 CMP=$ac_cv_path_CMP
4108 if test -n "$CMP"; then
4109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4110 $as_echo "$CMP" >&6; }
4111 else
4112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113 $as_echo "no" >&6; }
4114 fi
4115 
4116 
4117   test -n "$CMP" && break
4118 done
4119 
4120 
4121     if test "x$CMP" = x; then
4122         if test "xcmp" = x; then
4123           PROG_NAME=cmp
4124         else
4125           PROG_NAME=cmp
4126         fi
4127         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4128 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4129         as_fn_error $? "Cannot continue" "$LINENO" 5
4130     fi
4131 
4132 
4133 
4134     for ac_prog in comm
4135 do
4136   # Extract the first word of "$ac_prog", so it can be a program name with args.
4137 set dummy $ac_prog; ac_word=$2
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4139 $as_echo_n "checking for $ac_word... " >&6; }
4140 if ${ac_cv_path_COMM+:} false; then :
4141   $as_echo_n "(cached) " >&6
4142 else
4143   case $COMM in
4144   [\\/]* | ?:[\\/]*)
4145   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4146   ;;
4147   *)
4148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4149 for as_dir in $PATH
4150 do
4151   IFS=$as_save_IFS
4152   test -z "$as_dir" && as_dir=.
4153     for ac_exec_ext in '' $ac_executable_extensions; do
4154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4155     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4157     break 2
4158   fi
4159 done
4160   done
4161 IFS=$as_save_IFS
4162 
4163   ;;
4164 esac
4165 fi
4166 COMM=$ac_cv_path_COMM
4167 if test -n "$COMM"; then
4168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4169 $as_echo "$COMM" >&6; }
4170 else
4171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4172 $as_echo "no" >&6; }
4173 fi
4174 
4175 
4176   test -n "$COMM" && break
4177 done
4178 
4179 
4180     if test "x$COMM" = x; then
4181         if test "xcomm" = x; then
4182           PROG_NAME=comm
4183         else
4184           PROG_NAME=comm
4185         fi
4186         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4187 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4188         as_fn_error $? "Cannot continue" "$LINENO" 5
4189     fi
4190 
4191 
4192 
4193     for ac_prog in cp
4194 do
4195   # Extract the first word of "$ac_prog", so it can be a program name with args.
4196 set dummy $ac_prog; ac_word=$2
4197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4198 $as_echo_n "checking for $ac_word... " >&6; }
4199 if ${ac_cv_path_CP+:} false; then :
4200   $as_echo_n "(cached) " >&6
4201 else
4202   case $CP in
4203   [\\/]* | ?:[\\/]*)
4204   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4205   ;;
4206   *)
4207   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4208 for as_dir in $PATH
4209 do
4210   IFS=$as_save_IFS
4211   test -z "$as_dir" && as_dir=.
4212     for ac_exec_ext in '' $ac_executable_extensions; do
4213   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4214     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4216     break 2
4217   fi
4218 done
4219   done
4220 IFS=$as_save_IFS
4221 
4222   ;;
4223 esac
4224 fi
4225 CP=$ac_cv_path_CP
4226 if test -n "$CP"; then
4227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4228 $as_echo "$CP" >&6; }
4229 else
4230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4231 $as_echo "no" >&6; }
4232 fi
4233 
4234 
4235   test -n "$CP" && break
4236 done
4237 
4238 
4239     if test "x$CP" = x; then
4240         if test "xcp" = x; then
4241           PROG_NAME=cp
4242         else
4243           PROG_NAME=cp
4244         fi
4245         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4246 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4247         as_fn_error $? "Cannot continue" "$LINENO" 5
4248     fi
4249 
4250 
4251 
4252     for ac_prog in cpio
4253 do
4254   # Extract the first word of "$ac_prog", so it can be a program name with args.
4255 set dummy $ac_prog; ac_word=$2
4256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4257 $as_echo_n "checking for $ac_word... " >&6; }
4258 if ${ac_cv_path_CPIO+:} false; then :
4259   $as_echo_n "(cached) " >&6
4260 else
4261   case $CPIO in
4262   [\\/]* | ?:[\\/]*)
4263   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4264   ;;
4265   *)
4266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4267 for as_dir in $PATH
4268 do
4269   IFS=$as_save_IFS
4270   test -z "$as_dir" && as_dir=.
4271     for ac_exec_ext in '' $ac_executable_extensions; do
4272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4273     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4275     break 2
4276   fi
4277 done
4278   done
4279 IFS=$as_save_IFS
4280 
4281   ;;
4282 esac
4283 fi
4284 CPIO=$ac_cv_path_CPIO
4285 if test -n "$CPIO"; then
4286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4287 $as_echo "$CPIO" >&6; }
4288 else
4289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4290 $as_echo "no" >&6; }
4291 fi
4292 
4293 
4294   test -n "$CPIO" && break
4295 done
4296 
4297 
4298     if test "x$CPIO" = x; then
4299         if test "xcpio" = x; then
4300           PROG_NAME=cpio
4301         else
4302           PROG_NAME=cpio
4303         fi
4304         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4305 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4306         as_fn_error $? "Cannot continue" "$LINENO" 5
4307     fi
4308 
4309 
4310 
4311     for ac_prog in cut
4312 do
4313   # Extract the first word of "$ac_prog", so it can be a program name with args.
4314 set dummy $ac_prog; ac_word=$2
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4316 $as_echo_n "checking for $ac_word... " >&6; }
4317 if ${ac_cv_path_CUT+:} false; then :
4318   $as_echo_n "(cached) " >&6
4319 else
4320   case $CUT in
4321   [\\/]* | ?:[\\/]*)
4322   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4323   ;;
4324   *)
4325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326 for as_dir in $PATH
4327 do
4328   IFS=$as_save_IFS
4329   test -z "$as_dir" && as_dir=.
4330     for ac_exec_ext in '' $ac_executable_extensions; do
4331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4332     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4334     break 2
4335   fi
4336 done
4337   done
4338 IFS=$as_save_IFS
4339 
4340   ;;
4341 esac
4342 fi
4343 CUT=$ac_cv_path_CUT
4344 if test -n "$CUT"; then
4345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4346 $as_echo "$CUT" >&6; }
4347 else
4348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4349 $as_echo "no" >&6; }
4350 fi
4351 
4352 
4353   test -n "$CUT" && break
4354 done
4355 
4356 
4357     if test "x$CUT" = x; then
4358         if test "xcut" = x; then
4359           PROG_NAME=cut
4360         else
4361           PROG_NAME=cut
4362         fi
4363         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4364 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4365         as_fn_error $? "Cannot continue" "$LINENO" 5
4366     fi
4367 
4368 
4369 
4370     for ac_prog in date
4371 do
4372   # Extract the first word of "$ac_prog", so it can be a program name with args.
4373 set dummy $ac_prog; ac_word=$2
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375 $as_echo_n "checking for $ac_word... " >&6; }
4376 if ${ac_cv_path_DATE+:} false; then :
4377   $as_echo_n "(cached) " >&6
4378 else
4379   case $DATE in
4380   [\\/]* | ?:[\\/]*)
4381   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4382   ;;
4383   *)
4384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385 for as_dir in $PATH
4386 do
4387   IFS=$as_save_IFS
4388   test -z "$as_dir" && as_dir=.
4389     for ac_exec_ext in '' $ac_executable_extensions; do
4390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4391     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4393     break 2
4394   fi
4395 done
4396   done
4397 IFS=$as_save_IFS
4398 
4399   ;;
4400 esac
4401 fi
4402 DATE=$ac_cv_path_DATE
4403 if test -n "$DATE"; then
4404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4405 $as_echo "$DATE" >&6; }
4406 else
4407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4408 $as_echo "no" >&6; }
4409 fi
4410 
4411 
4412   test -n "$DATE" && break
4413 done
4414 
4415 
4416     if test "x$DATE" = x; then
4417         if test "xdate" = x; then
4418           PROG_NAME=date
4419         else
4420           PROG_NAME=date
4421         fi
4422         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4423 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4424         as_fn_error $? "Cannot continue" "$LINENO" 5
4425     fi
4426 
4427 
4428 
4429     for ac_prog in gdiff diff
4430 do
4431   # Extract the first word of "$ac_prog", so it can be a program name with args.
4432 set dummy $ac_prog; ac_word=$2
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434 $as_echo_n "checking for $ac_word... " >&6; }
4435 if ${ac_cv_path_DIFF+:} false; then :
4436   $as_echo_n "(cached) " >&6
4437 else
4438   case $DIFF in
4439   [\\/]* | ?:[\\/]*)
4440   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4441   ;;
4442   *)
4443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444 for as_dir in $PATH
4445 do
4446   IFS=$as_save_IFS
4447   test -z "$as_dir" && as_dir=.
4448     for ac_exec_ext in '' $ac_executable_extensions; do
4449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4450     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4452     break 2
4453   fi
4454 done
4455   done
4456 IFS=$as_save_IFS
4457 
4458   ;;
4459 esac
4460 fi
4461 DIFF=$ac_cv_path_DIFF
4462 if test -n "$DIFF"; then
4463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4464 $as_echo "$DIFF" >&6; }
4465 else
4466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4467 $as_echo "no" >&6; }
4468 fi
4469 
4470 
4471   test -n "$DIFF" && break
4472 done
4473 
4474 
4475     if test "x$DIFF" = x; then
4476         if test "xgdiff diff" = x; then
4477           PROG_NAME=diff
4478         else
4479           PROG_NAME=gdiff diff
4480         fi
4481         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4482 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4483         as_fn_error $? "Cannot continue" "$LINENO" 5
4484     fi
4485 
4486 
4487 
4488     for ac_prog in dirname
4489 do
4490   # Extract the first word of "$ac_prog", so it can be a program name with args.
4491 set dummy $ac_prog; ac_word=$2
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493 $as_echo_n "checking for $ac_word... " >&6; }
4494 if ${ac_cv_path_DIRNAME+:} false; then :
4495   $as_echo_n "(cached) " >&6
4496 else
4497   case $DIRNAME in
4498   [\\/]* | ?:[\\/]*)
4499   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4500   ;;
4501   *)
4502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503 for as_dir in $PATH
4504 do
4505   IFS=$as_save_IFS
4506   test -z "$as_dir" && as_dir=.
4507     for ac_exec_ext in '' $ac_executable_extensions; do
4508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4509     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511     break 2
4512   fi
4513 done
4514   done
4515 IFS=$as_save_IFS
4516 
4517   ;;
4518 esac
4519 fi
4520 DIRNAME=$ac_cv_path_DIRNAME
4521 if test -n "$DIRNAME"; then
4522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4523 $as_echo "$DIRNAME" >&6; }
4524 else
4525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526 $as_echo "no" >&6; }
4527 fi
4528 
4529 
4530   test -n "$DIRNAME" && break
4531 done
4532 
4533 
4534     if test "x$DIRNAME" = x; then
4535         if test "xdirname" = x; then
4536           PROG_NAME=dirname
4537         else
4538           PROG_NAME=dirname
4539         fi
4540         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4541 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4542         as_fn_error $? "Cannot continue" "$LINENO" 5
4543     fi
4544 
4545 
4546 
4547     for ac_prog in echo
4548 do
4549   # Extract the first word of "$ac_prog", so it can be a program name with args.
4550 set dummy $ac_prog; ac_word=$2
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4552 $as_echo_n "checking for $ac_word... " >&6; }
4553 if ${ac_cv_path_ECHO+:} false; then :
4554   $as_echo_n "(cached) " >&6
4555 else
4556   case $ECHO in
4557   [\\/]* | ?:[\\/]*)
4558   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4559   ;;
4560   *)
4561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562 for as_dir in $PATH
4563 do
4564   IFS=$as_save_IFS
4565   test -z "$as_dir" && as_dir=.
4566     for ac_exec_ext in '' $ac_executable_extensions; do
4567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4568     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570     break 2
4571   fi
4572 done
4573   done
4574 IFS=$as_save_IFS
4575 
4576   ;;
4577 esac
4578 fi
4579 ECHO=$ac_cv_path_ECHO
4580 if test -n "$ECHO"; then
4581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4582 $as_echo "$ECHO" >&6; }
4583 else
4584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585 $as_echo "no" >&6; }
4586 fi
4587 
4588 
4589   test -n "$ECHO" && break
4590 done
4591 
4592 
4593     if test "x$ECHO" = x; then
4594         if test "xecho" = x; then
4595           PROG_NAME=echo
4596         else
4597           PROG_NAME=echo
4598         fi
4599         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4600 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4601         as_fn_error $? "Cannot continue" "$LINENO" 5
4602     fi
4603 
4604 
4605 
4606     for ac_prog in expr
4607 do
4608   # Extract the first word of "$ac_prog", so it can be a program name with args.
4609 set dummy $ac_prog; ac_word=$2
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611 $as_echo_n "checking for $ac_word... " >&6; }
4612 if ${ac_cv_path_EXPR+:} false; then :
4613   $as_echo_n "(cached) " >&6
4614 else
4615   case $EXPR in
4616   [\\/]* | ?:[\\/]*)
4617   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4618   ;;
4619   *)
4620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4621 for as_dir in $PATH
4622 do
4623   IFS=$as_save_IFS
4624   test -z "$as_dir" && as_dir=.
4625     for ac_exec_ext in '' $ac_executable_extensions; do
4626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4627     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4629     break 2
4630   fi
4631 done
4632   done
4633 IFS=$as_save_IFS
4634 
4635   ;;
4636 esac
4637 fi
4638 EXPR=$ac_cv_path_EXPR
4639 if test -n "$EXPR"; then
4640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4641 $as_echo "$EXPR" >&6; }
4642 else
4643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4644 $as_echo "no" >&6; }
4645 fi
4646 
4647 
4648   test -n "$EXPR" && break
4649 done
4650 
4651 
4652     if test "x$EXPR" = x; then
4653         if test "xexpr" = x; then
4654           PROG_NAME=expr
4655         else
4656           PROG_NAME=expr
4657         fi
4658         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4659 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4660         as_fn_error $? "Cannot continue" "$LINENO" 5
4661     fi
4662 
4663 
4664 
4665     for ac_prog in file
4666 do
4667   # Extract the first word of "$ac_prog", so it can be a program name with args.
4668 set dummy $ac_prog; ac_word=$2
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670 $as_echo_n "checking for $ac_word... " >&6; }
4671 if ${ac_cv_path_FILE+:} false; then :
4672   $as_echo_n "(cached) " >&6
4673 else
4674   case $FILE in
4675   [\\/]* | ?:[\\/]*)
4676   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4677   ;;
4678   *)
4679   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680 for as_dir in $PATH
4681 do
4682   IFS=$as_save_IFS
4683   test -z "$as_dir" && as_dir=.
4684     for ac_exec_ext in '' $ac_executable_extensions; do
4685   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4686     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4687     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688     break 2
4689   fi
4690 done
4691   done
4692 IFS=$as_save_IFS
4693 
4694   ;;
4695 esac
4696 fi
4697 FILE=$ac_cv_path_FILE
4698 if test -n "$FILE"; then
4699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4700 $as_echo "$FILE" >&6; }
4701 else
4702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703 $as_echo "no" >&6; }
4704 fi
4705 
4706 
4707   test -n "$FILE" && break
4708 done
4709 
4710 
4711     if test "x$FILE" = x; then
4712         if test "xfile" = x; then
4713           PROG_NAME=file
4714         else
4715           PROG_NAME=file
4716         fi
4717         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4718 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4719         as_fn_error $? "Cannot continue" "$LINENO" 5
4720     fi
4721 
4722 
4723 
4724     for ac_prog in find
4725 do
4726   # Extract the first word of "$ac_prog", so it can be a program name with args.
4727 set dummy $ac_prog; ac_word=$2
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729 $as_echo_n "checking for $ac_word... " >&6; }
4730 if ${ac_cv_path_FIND+:} false; then :
4731   $as_echo_n "(cached) " >&6
4732 else
4733   case $FIND in
4734   [\\/]* | ?:[\\/]*)
4735   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4736   ;;
4737   *)
4738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739 for as_dir in $PATH
4740 do
4741   IFS=$as_save_IFS
4742   test -z "$as_dir" && as_dir=.
4743     for ac_exec_ext in '' $ac_executable_extensions; do
4744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4745     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747     break 2
4748   fi
4749 done
4750   done
4751 IFS=$as_save_IFS
4752 
4753   ;;
4754 esac
4755 fi
4756 FIND=$ac_cv_path_FIND
4757 if test -n "$FIND"; then
4758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4759 $as_echo "$FIND" >&6; }
4760 else
4761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762 $as_echo "no" >&6; }
4763 fi
4764 
4765 
4766   test -n "$FIND" && break
4767 done
4768 
4769 
4770     if test "x$FIND" = x; then
4771         if test "xfind" = x; then
4772           PROG_NAME=find
4773         else
4774           PROG_NAME=find
4775         fi
4776         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4777 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4778         as_fn_error $? "Cannot continue" "$LINENO" 5
4779     fi
4780 
4781 
4782 
4783     for ac_prog in head
4784 do
4785   # Extract the first word of "$ac_prog", so it can be a program name with args.
4786 set dummy $ac_prog; ac_word=$2
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4788 $as_echo_n "checking for $ac_word... " >&6; }
4789 if ${ac_cv_path_HEAD+:} false; then :
4790   $as_echo_n "(cached) " >&6
4791 else
4792   case $HEAD in
4793   [\\/]* | ?:[\\/]*)
4794   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4795   ;;
4796   *)
4797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4798 for as_dir in $PATH
4799 do
4800   IFS=$as_save_IFS
4801   test -z "$as_dir" && as_dir=.
4802     for ac_exec_ext in '' $ac_executable_extensions; do
4803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4804     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4806     break 2
4807   fi
4808 done
4809   done
4810 IFS=$as_save_IFS
4811 
4812   ;;
4813 esac
4814 fi
4815 HEAD=$ac_cv_path_HEAD
4816 if test -n "$HEAD"; then
4817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4818 $as_echo "$HEAD" >&6; }
4819 else
4820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4821 $as_echo "no" >&6; }
4822 fi
4823 
4824 
4825   test -n "$HEAD" && break
4826 done
4827 
4828 
4829     if test "x$HEAD" = x; then
4830         if test "xhead" = x; then
4831           PROG_NAME=head
4832         else
4833           PROG_NAME=head
4834         fi
4835         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4836 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4837         as_fn_error $? "Cannot continue" "$LINENO" 5
4838     fi
4839 
4840 
4841 
4842     for ac_prog in ln
4843 do
4844   # Extract the first word of "$ac_prog", so it can be a program name with args.
4845 set dummy $ac_prog; ac_word=$2
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847 $as_echo_n "checking for $ac_word... " >&6; }
4848 if ${ac_cv_path_LN+:} false; then :
4849   $as_echo_n "(cached) " >&6
4850 else
4851   case $LN in
4852   [\\/]* | ?:[\\/]*)
4853   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4854   ;;
4855   *)
4856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857 for as_dir in $PATH
4858 do
4859   IFS=$as_save_IFS
4860   test -z "$as_dir" && as_dir=.
4861     for ac_exec_ext in '' $ac_executable_extensions; do
4862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4863     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4865     break 2
4866   fi
4867 done
4868   done
4869 IFS=$as_save_IFS
4870 
4871   ;;
4872 esac
4873 fi
4874 LN=$ac_cv_path_LN
4875 if test -n "$LN"; then
4876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4877 $as_echo "$LN" >&6; }
4878 else
4879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880 $as_echo "no" >&6; }
4881 fi
4882 
4883 
4884   test -n "$LN" && break
4885 done
4886 
4887 
4888     if test "x$LN" = x; then
4889         if test "xln" = x; then
4890           PROG_NAME=ln
4891         else
4892           PROG_NAME=ln
4893         fi
4894         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4895 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4896         as_fn_error $? "Cannot continue" "$LINENO" 5
4897     fi
4898 
4899 
4900 
4901     for ac_prog in ls
4902 do
4903   # Extract the first word of "$ac_prog", so it can be a program name with args.
4904 set dummy $ac_prog; ac_word=$2
4905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906 $as_echo_n "checking for $ac_word... " >&6; }
4907 if ${ac_cv_path_LS+:} false; then :
4908   $as_echo_n "(cached) " >&6
4909 else
4910   case $LS in
4911   [\\/]* | ?:[\\/]*)
4912   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4913   ;;
4914   *)
4915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916 for as_dir in $PATH
4917 do
4918   IFS=$as_save_IFS
4919   test -z "$as_dir" && as_dir=.
4920     for ac_exec_ext in '' $ac_executable_extensions; do
4921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4922     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924     break 2
4925   fi
4926 done
4927   done
4928 IFS=$as_save_IFS
4929 
4930   ;;
4931 esac
4932 fi
4933 LS=$ac_cv_path_LS
4934 if test -n "$LS"; then
4935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4936 $as_echo "$LS" >&6; }
4937 else
4938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939 $as_echo "no" >&6; }
4940 fi
4941 
4942 
4943   test -n "$LS" && break
4944 done
4945 
4946 
4947     if test "x$LS" = x; then
4948         if test "xls" = x; then
4949           PROG_NAME=ls
4950         else
4951           PROG_NAME=ls
4952         fi
4953         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4954 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4955         as_fn_error $? "Cannot continue" "$LINENO" 5
4956     fi
4957 
4958 
4959 
4960     for ac_prog in mkdir
4961 do
4962   # Extract the first word of "$ac_prog", so it can be a program name with args.
4963 set dummy $ac_prog; ac_word=$2
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965 $as_echo_n "checking for $ac_word... " >&6; }
4966 if ${ac_cv_path_MKDIR+:} false; then :
4967   $as_echo_n "(cached) " >&6
4968 else
4969   case $MKDIR in
4970   [\\/]* | ?:[\\/]*)
4971   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4972   ;;
4973   *)
4974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975 for as_dir in $PATH
4976 do
4977   IFS=$as_save_IFS
4978   test -z "$as_dir" && as_dir=.
4979     for ac_exec_ext in '' $ac_executable_extensions; do
4980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983     break 2
4984   fi
4985 done
4986   done
4987 IFS=$as_save_IFS
4988 
4989   ;;
4990 esac
4991 fi
4992 MKDIR=$ac_cv_path_MKDIR
4993 if test -n "$MKDIR"; then
4994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4995 $as_echo "$MKDIR" >&6; }
4996 else
4997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998 $as_echo "no" >&6; }
4999 fi
5000 
5001 
5002   test -n "$MKDIR" && break
5003 done
5004 
5005 
5006     if test "x$MKDIR" = x; then
5007         if test "xmkdir" = x; then
5008           PROG_NAME=mkdir
5009         else
5010           PROG_NAME=mkdir
5011         fi
5012         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5013 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5014         as_fn_error $? "Cannot continue" "$LINENO" 5
5015     fi
5016 
5017 
5018 
5019     for ac_prog in mktemp
5020 do
5021   # Extract the first word of "$ac_prog", so it can be a program name with args.
5022 set dummy $ac_prog; ac_word=$2
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5024 $as_echo_n "checking for $ac_word... " >&6; }
5025 if ${ac_cv_path_MKTEMP+:} false; then :
5026   $as_echo_n "(cached) " >&6
5027 else
5028   case $MKTEMP in
5029   [\\/]* | ?:[\\/]*)
5030   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5031   ;;
5032   *)
5033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034 for as_dir in $PATH
5035 do
5036   IFS=$as_save_IFS
5037   test -z "$as_dir" && as_dir=.
5038     for ac_exec_ext in '' $ac_executable_extensions; do
5039   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5040     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5041     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5042     break 2
5043   fi
5044 done
5045   done
5046 IFS=$as_save_IFS
5047 
5048   ;;
5049 esac
5050 fi
5051 MKTEMP=$ac_cv_path_MKTEMP
5052 if test -n "$MKTEMP"; then
5053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5054 $as_echo "$MKTEMP" >&6; }
5055 else
5056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5057 $as_echo "no" >&6; }
5058 fi
5059 
5060 
5061   test -n "$MKTEMP" && break
5062 done
5063 
5064 
5065     if test "x$MKTEMP" = x; then
5066         if test "xmktemp" = x; then
5067           PROG_NAME=mktemp
5068         else
5069           PROG_NAME=mktemp
5070         fi
5071         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5072 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5073         as_fn_error $? "Cannot continue" "$LINENO" 5
5074     fi
5075 
5076 
5077 
5078     for ac_prog in mv
5079 do
5080   # Extract the first word of "$ac_prog", so it can be a program name with args.
5081 set dummy $ac_prog; ac_word=$2
5082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5083 $as_echo_n "checking for $ac_word... " >&6; }
5084 if ${ac_cv_path_MV+:} false; then :
5085   $as_echo_n "(cached) " >&6
5086 else
5087   case $MV in
5088   [\\/]* | ?:[\\/]*)
5089   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5090   ;;
5091   *)
5092   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093 for as_dir in $PATH
5094 do
5095   IFS=$as_save_IFS
5096   test -z "$as_dir" && as_dir=.
5097     for ac_exec_ext in '' $ac_executable_extensions; do
5098   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5099     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5100     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5101     break 2
5102   fi
5103 done
5104   done
5105 IFS=$as_save_IFS
5106 
5107   ;;
5108 esac
5109 fi
5110 MV=$ac_cv_path_MV
5111 if test -n "$MV"; then
5112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5113 $as_echo "$MV" >&6; }
5114 else
5115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5116 $as_echo "no" >&6; }
5117 fi
5118 
5119 
5120   test -n "$MV" && break
5121 done
5122 
5123 
5124     if test "x$MV" = x; then
5125         if test "xmv" = x; then
5126           PROG_NAME=mv
5127         else
5128           PROG_NAME=mv
5129         fi
5130         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5131 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5132         as_fn_error $? "Cannot continue" "$LINENO" 5
5133     fi
5134 
5135 
5136 
5137     for ac_prog in printf
5138 do
5139   # Extract the first word of "$ac_prog", so it can be a program name with args.
5140 set dummy $ac_prog; ac_word=$2
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142 $as_echo_n "checking for $ac_word... " >&6; }
5143 if ${ac_cv_path_PRINTF+:} false; then :
5144   $as_echo_n "(cached) " >&6
5145 else
5146   case $PRINTF in
5147   [\\/]* | ?:[\\/]*)
5148   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5149   ;;
5150   *)
5151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152 for as_dir in $PATH
5153 do
5154   IFS=$as_save_IFS
5155   test -z "$as_dir" && as_dir=.
5156     for ac_exec_ext in '' $ac_executable_extensions; do
5157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160     break 2
5161   fi
5162 done
5163   done
5164 IFS=$as_save_IFS
5165 
5166   ;;
5167 esac
5168 fi
5169 PRINTF=$ac_cv_path_PRINTF
5170 if test -n "$PRINTF"; then
5171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5172 $as_echo "$PRINTF" >&6; }
5173 else
5174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5175 $as_echo "no" >&6; }
5176 fi
5177 
5178 
5179   test -n "$PRINTF" && break
5180 done
5181 
5182 
5183     if test "x$PRINTF" = x; then
5184         if test "xprintf" = x; then
5185           PROG_NAME=printf
5186         else
5187           PROG_NAME=printf
5188         fi
5189         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5190 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5191         as_fn_error $? "Cannot continue" "$LINENO" 5
5192     fi
5193 
5194 
5195 
5196     for ac_prog in rm
5197 do
5198   # Extract the first word of "$ac_prog", so it can be a program name with args.
5199 set dummy $ac_prog; ac_word=$2
5200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201 $as_echo_n "checking for $ac_word... " >&6; }
5202 if ${ac_cv_path_RM+:} false; then :
5203   $as_echo_n "(cached) " >&6
5204 else
5205   case $RM in
5206   [\\/]* | ?:[\\/]*)
5207   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5208   ;;
5209   *)
5210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211 for as_dir in $PATH
5212 do
5213   IFS=$as_save_IFS
5214   test -z "$as_dir" && as_dir=.
5215     for ac_exec_ext in '' $ac_executable_extensions; do
5216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5217     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219     break 2
5220   fi
5221 done
5222   done
5223 IFS=$as_save_IFS
5224 
5225   ;;
5226 esac
5227 fi
5228 RM=$ac_cv_path_RM
5229 if test -n "$RM"; then
5230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5231 $as_echo "$RM" >&6; }
5232 else
5233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234 $as_echo "no" >&6; }
5235 fi
5236 
5237 
5238   test -n "$RM" && break
5239 done
5240 
5241 
5242     if test "x$RM" = x; then
5243         if test "xrm" = x; then
5244           PROG_NAME=rm
5245         else
5246           PROG_NAME=rm
5247         fi
5248         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5249 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5250         as_fn_error $? "Cannot continue" "$LINENO" 5
5251     fi
5252 
5253 
5254 
5255     for ac_prog in sh
5256 do
5257   # Extract the first word of "$ac_prog", so it can be a program name with args.
5258 set dummy $ac_prog; ac_word=$2
5259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260 $as_echo_n "checking for $ac_word... " >&6; }
5261 if ${ac_cv_path_SH+:} false; then :
5262   $as_echo_n "(cached) " >&6
5263 else
5264   case $SH in
5265   [\\/]* | ?:[\\/]*)
5266   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5267   ;;
5268   *)
5269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270 for as_dir in $PATH
5271 do
5272   IFS=$as_save_IFS
5273   test -z "$as_dir" && as_dir=.
5274     for ac_exec_ext in '' $ac_executable_extensions; do
5275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278     break 2
5279   fi
5280 done
5281   done
5282 IFS=$as_save_IFS
5283 
5284   ;;
5285 esac
5286 fi
5287 SH=$ac_cv_path_SH
5288 if test -n "$SH"; then
5289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5290 $as_echo "$SH" >&6; }
5291 else
5292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293 $as_echo "no" >&6; }
5294 fi
5295 
5296 
5297   test -n "$SH" && break
5298 done
5299 
5300 
5301     if test "x$SH" = x; then
5302         if test "xsh" = x; then
5303           PROG_NAME=sh
5304         else
5305           PROG_NAME=sh
5306         fi
5307         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5308 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5309         as_fn_error $? "Cannot continue" "$LINENO" 5
5310     fi
5311 
5312 
5313 
5314     for ac_prog in sort
5315 do
5316   # Extract the first word of "$ac_prog", so it can be a program name with args.
5317 set dummy $ac_prog; ac_word=$2
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319 $as_echo_n "checking for $ac_word... " >&6; }
5320 if ${ac_cv_path_SORT+:} false; then :
5321   $as_echo_n "(cached) " >&6
5322 else
5323   case $SORT in
5324   [\\/]* | ?:[\\/]*)
5325   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5326   ;;
5327   *)
5328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329 for as_dir in $PATH
5330 do
5331   IFS=$as_save_IFS
5332   test -z "$as_dir" && as_dir=.
5333     for ac_exec_ext in '' $ac_executable_extensions; do
5334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5335     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337     break 2
5338   fi
5339 done
5340   done
5341 IFS=$as_save_IFS
5342 
5343   ;;
5344 esac
5345 fi
5346 SORT=$ac_cv_path_SORT
5347 if test -n "$SORT"; then
5348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5349 $as_echo "$SORT" >&6; }
5350 else
5351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352 $as_echo "no" >&6; }
5353 fi
5354 
5355 
5356   test -n "$SORT" && break
5357 done
5358 
5359 
5360     if test "x$SORT" = x; then
5361         if test "xsort" = x; then
5362           PROG_NAME=sort
5363         else
5364           PROG_NAME=sort
5365         fi
5366         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5367 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5368         as_fn_error $? "Cannot continue" "$LINENO" 5
5369     fi
5370 
5371 
5372 
5373     for ac_prog in tail
5374 do
5375   # Extract the first word of "$ac_prog", so it can be a program name with args.
5376 set dummy $ac_prog; ac_word=$2
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5378 $as_echo_n "checking for $ac_word... " >&6; }
5379 if ${ac_cv_path_TAIL+:} false; then :
5380   $as_echo_n "(cached) " >&6
5381 else
5382   case $TAIL in
5383   [\\/]* | ?:[\\/]*)
5384   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5385   ;;
5386   *)
5387   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5388 for as_dir in $PATH
5389 do
5390   IFS=$as_save_IFS
5391   test -z "$as_dir" && as_dir=.
5392     for ac_exec_ext in '' $ac_executable_extensions; do
5393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5394     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5395     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5396     break 2
5397   fi
5398 done
5399   done
5400 IFS=$as_save_IFS
5401 
5402   ;;
5403 esac
5404 fi
5405 TAIL=$ac_cv_path_TAIL
5406 if test -n "$TAIL"; then
5407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5408 $as_echo "$TAIL" >&6; }
5409 else
5410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411 $as_echo "no" >&6; }
5412 fi
5413 
5414 
5415   test -n "$TAIL" && break
5416 done
5417 
5418 
5419     if test "x$TAIL" = x; then
5420         if test "xtail" = x; then
5421           PROG_NAME=tail
5422         else
5423           PROG_NAME=tail
5424         fi
5425         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5426 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5427         as_fn_error $? "Cannot continue" "$LINENO" 5
5428     fi
5429 
5430 
5431 
5432     for ac_prog in tar
5433 do
5434   # Extract the first word of "$ac_prog", so it can be a program name with args.
5435 set dummy $ac_prog; ac_word=$2
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5437 $as_echo_n "checking for $ac_word... " >&6; }
5438 if ${ac_cv_path_TAR+:} false; then :
5439   $as_echo_n "(cached) " >&6
5440 else
5441   case $TAR in
5442   [\\/]* | ?:[\\/]*)
5443   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5444   ;;
5445   *)
5446   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5447 for as_dir in $PATH
5448 do
5449   IFS=$as_save_IFS
5450   test -z "$as_dir" && as_dir=.
5451     for ac_exec_ext in '' $ac_executable_extensions; do
5452   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5453     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5454     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5455     break 2
5456   fi
5457 done
5458   done
5459 IFS=$as_save_IFS
5460 
5461   ;;
5462 esac
5463 fi
5464 TAR=$ac_cv_path_TAR
5465 if test -n "$TAR"; then
5466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5467 $as_echo "$TAR" >&6; }
5468 else
5469   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5470 $as_echo "no" >&6; }
5471 fi
5472 
5473 
5474   test -n "$TAR" && break
5475 done
5476 
5477 
5478     if test "x$TAR" = x; then
5479         if test "xtar" = x; then
5480           PROG_NAME=tar
5481         else
5482           PROG_NAME=tar
5483         fi
5484         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5485 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5486         as_fn_error $? "Cannot continue" "$LINENO" 5
5487     fi
5488 
5489 
5490 
5491     for ac_prog in tee
5492 do
5493   # Extract the first word of "$ac_prog", so it can be a program name with args.
5494 set dummy $ac_prog; ac_word=$2
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496 $as_echo_n "checking for $ac_word... " >&6; }
5497 if ${ac_cv_path_TEE+:} false; then :
5498   $as_echo_n "(cached) " >&6
5499 else
5500   case $TEE in
5501   [\\/]* | ?:[\\/]*)
5502   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5503   ;;
5504   *)
5505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506 for as_dir in $PATH
5507 do
5508   IFS=$as_save_IFS
5509   test -z "$as_dir" && as_dir=.
5510     for ac_exec_ext in '' $ac_executable_extensions; do
5511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5512     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514     break 2
5515   fi
5516 done
5517   done
5518 IFS=$as_save_IFS
5519 
5520   ;;
5521 esac
5522 fi
5523 TEE=$ac_cv_path_TEE
5524 if test -n "$TEE"; then
5525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5526 $as_echo "$TEE" >&6; }
5527 else
5528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529 $as_echo "no" >&6; }
5530 fi
5531 
5532 
5533   test -n "$TEE" && break
5534 done
5535 
5536 
5537     if test "x$TEE" = x; then
5538         if test "xtee" = x; then
5539           PROG_NAME=tee
5540         else
5541           PROG_NAME=tee
5542         fi
5543         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5544 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5545         as_fn_error $? "Cannot continue" "$LINENO" 5
5546     fi
5547 
5548 
5549 
5550     for ac_prog in touch
5551 do
5552   # Extract the first word of "$ac_prog", so it can be a program name with args.
5553 set dummy $ac_prog; ac_word=$2
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5555 $as_echo_n "checking for $ac_word... " >&6; }
5556 if ${ac_cv_path_TOUCH+:} false; then :
5557   $as_echo_n "(cached) " >&6
5558 else
5559   case $TOUCH in
5560   [\\/]* | ?:[\\/]*)
5561   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5562   ;;
5563   *)
5564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565 for as_dir in $PATH
5566 do
5567   IFS=$as_save_IFS
5568   test -z "$as_dir" && as_dir=.
5569     for ac_exec_ext in '' $ac_executable_extensions; do
5570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5571     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5573     break 2
5574   fi
5575 done
5576   done
5577 IFS=$as_save_IFS
5578 
5579   ;;
5580 esac
5581 fi
5582 TOUCH=$ac_cv_path_TOUCH
5583 if test -n "$TOUCH"; then
5584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5585 $as_echo "$TOUCH" >&6; }
5586 else
5587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5588 $as_echo "no" >&6; }
5589 fi
5590 
5591 
5592   test -n "$TOUCH" && break
5593 done
5594 
5595 
5596     if test "x$TOUCH" = x; then
5597         if test "xtouch" = x; then
5598           PROG_NAME=touch
5599         else
5600           PROG_NAME=touch
5601         fi
5602         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5603 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5604         as_fn_error $? "Cannot continue" "$LINENO" 5
5605     fi
5606 
5607 
5608 
5609     for ac_prog in tr
5610 do
5611   # Extract the first word of "$ac_prog", so it can be a program name with args.
5612 set dummy $ac_prog; ac_word=$2
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5614 $as_echo_n "checking for $ac_word... " >&6; }
5615 if ${ac_cv_path_TR+:} false; then :
5616   $as_echo_n "(cached) " >&6
5617 else
5618   case $TR in
5619   [\\/]* | ?:[\\/]*)
5620   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5621   ;;
5622   *)
5623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5624 for as_dir in $PATH
5625 do
5626   IFS=$as_save_IFS
5627   test -z "$as_dir" && as_dir=.
5628     for ac_exec_ext in '' $ac_executable_extensions; do
5629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5630     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5632     break 2
5633   fi
5634 done
5635   done
5636 IFS=$as_save_IFS
5637 
5638   ;;
5639 esac
5640 fi
5641 TR=$ac_cv_path_TR
5642 if test -n "$TR"; then
5643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5644 $as_echo "$TR" >&6; }
5645 else
5646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647 $as_echo "no" >&6; }
5648 fi
5649 
5650 
5651   test -n "$TR" && break
5652 done
5653 
5654 
5655     if test "x$TR" = x; then
5656         if test "xtr" = x; then
5657           PROG_NAME=tr
5658         else
5659           PROG_NAME=tr
5660         fi
5661         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5662 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5663         as_fn_error $? "Cannot continue" "$LINENO" 5
5664     fi
5665 
5666 
5667 
5668     for ac_prog in uname
5669 do
5670   # Extract the first word of "$ac_prog", so it can be a program name with args.
5671 set dummy $ac_prog; ac_word=$2
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673 $as_echo_n "checking for $ac_word... " >&6; }
5674 if ${ac_cv_path_UNAME+:} false; then :
5675   $as_echo_n "(cached) " >&6
5676 else
5677   case $UNAME in
5678   [\\/]* | ?:[\\/]*)
5679   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5680   ;;
5681   *)
5682   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5683 for as_dir in $PATH
5684 do
5685   IFS=$as_save_IFS
5686   test -z "$as_dir" && as_dir=.
5687     for ac_exec_ext in '' $ac_executable_extensions; do
5688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5689     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5691     break 2
5692   fi
5693 done
5694   done
5695 IFS=$as_save_IFS
5696 
5697   ;;
5698 esac
5699 fi
5700 UNAME=$ac_cv_path_UNAME
5701 if test -n "$UNAME"; then
5702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5703 $as_echo "$UNAME" >&6; }
5704 else
5705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5706 $as_echo "no" >&6; }
5707 fi
5708 
5709 
5710   test -n "$UNAME" && break
5711 done
5712 
5713 
5714     if test "x$UNAME" = x; then
5715         if test "xuname" = x; then
5716           PROG_NAME=uname
5717         else
5718           PROG_NAME=uname
5719         fi
5720         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5721 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5722         as_fn_error $? "Cannot continue" "$LINENO" 5
5723     fi
5724 
5725 
5726 
5727     for ac_prog in uniq
5728 do
5729   # Extract the first word of "$ac_prog", so it can be a program name with args.
5730 set dummy $ac_prog; ac_word=$2
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5732 $as_echo_n "checking for $ac_word... " >&6; }
5733 if ${ac_cv_path_UNIQ+:} false; then :
5734   $as_echo_n "(cached) " >&6
5735 else
5736   case $UNIQ in
5737   [\\/]* | ?:[\\/]*)
5738   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5739   ;;
5740   *)
5741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742 for as_dir in $PATH
5743 do
5744   IFS=$as_save_IFS
5745   test -z "$as_dir" && as_dir=.
5746     for ac_exec_ext in '' $ac_executable_extensions; do
5747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5748     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5750     break 2
5751   fi
5752 done
5753   done
5754 IFS=$as_save_IFS
5755 
5756   ;;
5757 esac
5758 fi
5759 UNIQ=$ac_cv_path_UNIQ
5760 if test -n "$UNIQ"; then
5761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5762 $as_echo "$UNIQ" >&6; }
5763 else
5764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765 $as_echo "no" >&6; }
5766 fi
5767 
5768 
5769   test -n "$UNIQ" && break
5770 done
5771 
5772 
5773     if test "x$UNIQ" = x; then
5774         if test "xuniq" = x; then
5775           PROG_NAME=uniq
5776         else
5777           PROG_NAME=uniq
5778         fi
5779         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5780 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5781         as_fn_error $? "Cannot continue" "$LINENO" 5
5782     fi
5783 
5784 
5785 
5786     for ac_prog in wc
5787 do
5788   # Extract the first word of "$ac_prog", so it can be a program name with args.
5789 set dummy $ac_prog; ac_word=$2
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5791 $as_echo_n "checking for $ac_word... " >&6; }
5792 if ${ac_cv_path_WC+:} false; then :
5793   $as_echo_n "(cached) " >&6
5794 else
5795   case $WC in
5796   [\\/]* | ?:[\\/]*)
5797   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5798   ;;
5799   *)
5800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801 for as_dir in $PATH
5802 do
5803   IFS=$as_save_IFS
5804   test -z "$as_dir" && as_dir=.
5805     for ac_exec_ext in '' $ac_executable_extensions; do
5806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5807     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5809     break 2
5810   fi
5811 done
5812   done
5813 IFS=$as_save_IFS
5814 
5815   ;;
5816 esac
5817 fi
5818 WC=$ac_cv_path_WC
5819 if test -n "$WC"; then
5820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5821 $as_echo "$WC" >&6; }
5822 else
5823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824 $as_echo "no" >&6; }
5825 fi
5826 
5827 
5828   test -n "$WC" && break
5829 done
5830 
5831 
5832     if test "x$WC" = x; then
5833         if test "xwc" = x; then
5834           PROG_NAME=wc
5835         else
5836           PROG_NAME=wc
5837         fi
5838         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5839 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5840         as_fn_error $? "Cannot continue" "$LINENO" 5
5841     fi
5842 
5843 
5844 
5845     for ac_prog in which
5846 do
5847   # Extract the first word of "$ac_prog", so it can be a program name with args.
5848 set dummy $ac_prog; ac_word=$2
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850 $as_echo_n "checking for $ac_word... " >&6; }
5851 if ${ac_cv_path_WHICH+:} false; then :
5852   $as_echo_n "(cached) " >&6
5853 else
5854   case $WHICH in
5855   [\\/]* | ?:[\\/]*)
5856   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5857   ;;
5858   *)
5859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5860 for as_dir in $PATH
5861 do
5862   IFS=$as_save_IFS
5863   test -z "$as_dir" && as_dir=.
5864     for ac_exec_ext in '' $ac_executable_extensions; do
5865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5866     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5868     break 2
5869   fi
5870 done
5871   done
5872 IFS=$as_save_IFS
5873 
5874   ;;
5875 esac
5876 fi
5877 WHICH=$ac_cv_path_WHICH
5878 if test -n "$WHICH"; then
5879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5880 $as_echo "$WHICH" >&6; }
5881 else
5882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5883 $as_echo "no" >&6; }
5884 fi
5885 
5886 
5887   test -n "$WHICH" && break
5888 done
5889 
5890 
5891     if test "x$WHICH" = x; then
5892         if test "xwhich" = x; then
5893           PROG_NAME=which
5894         else
5895           PROG_NAME=which
5896         fi
5897         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899         as_fn_error $? "Cannot continue" "$LINENO" 5
5900     fi
5901 
5902 
5903 
5904     for ac_prog in xargs
5905 do
5906   # Extract the first word of "$ac_prog", so it can be a program name with args.
5907 set dummy $ac_prog; ac_word=$2
5908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5909 $as_echo_n "checking for $ac_word... " >&6; }
5910 if ${ac_cv_path_XARGS+:} false; then :
5911   $as_echo_n "(cached) " >&6
5912 else
5913   case $XARGS in
5914   [\\/]* | ?:[\\/]*)
5915   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5916   ;;
5917   *)
5918   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5919 for as_dir in $PATH
5920 do
5921   IFS=$as_save_IFS
5922   test -z "$as_dir" && as_dir=.
5923     for ac_exec_ext in '' $ac_executable_extensions; do
5924   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5925     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5926     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5927     break 2
5928   fi
5929 done
5930   done
5931 IFS=$as_save_IFS
5932 
5933   ;;
5934 esac
5935 fi
5936 XARGS=$ac_cv_path_XARGS
5937 if test -n "$XARGS"; then
5938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5939 $as_echo "$XARGS" >&6; }
5940 else
5941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5942 $as_echo "no" >&6; }
5943 fi
5944 
5945 
5946   test -n "$XARGS" && break
5947 done
5948 
5949 
5950     if test "x$XARGS" = x; then
5951         if test "xxargs" = x; then
5952           PROG_NAME=xargs
5953         else
5954           PROG_NAME=xargs
5955         fi
5956         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5957 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5958         as_fn_error $? "Cannot continue" "$LINENO" 5
5959     fi
5960 
5961 
5962 
5963 # Then required tools that require some special treatment.
5964 for ac_prog in gawk mawk nawk awk
5965 do
5966   # Extract the first word of "$ac_prog", so it can be a program name with args.
5967 set dummy $ac_prog; ac_word=$2
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5969 $as_echo_n "checking for $ac_word... " >&6; }
5970 if ${ac_cv_prog_AWK+:} false; then :
5971   $as_echo_n "(cached) " >&6
5972 else
5973   if test -n "$AWK"; then
5974   ac_cv_prog_AWK="$AWK" # Let the user override the test.
5975 else
5976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5977 for as_dir in $PATH
5978 do
5979   IFS=$as_save_IFS
5980   test -z "$as_dir" && as_dir=.
5981     for ac_exec_ext in '' $ac_executable_extensions; do
5982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5983     ac_cv_prog_AWK="$ac_prog"
5984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5985     break 2
5986   fi
5987 done
5988   done
5989 IFS=$as_save_IFS
5990 
5991 fi
5992 fi
5993 AWK=$ac_cv_prog_AWK
5994 if test -n "$AWK"; then
5995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5996 $as_echo "$AWK" >&6; }
5997 else
5998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999 $as_echo "no" >&6; }
6000 fi
6001 
6002 
6003   test -n "$AWK" && break
6004 done
6005 
6006 
6007     if test "x$AWK" = x; then
6008         if test "x" = x; then
6009           PROG_NAME=awk
6010         else
6011           PROG_NAME=
6012         fi
6013         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6014 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6015         as_fn_error $? "Cannot continue" "$LINENO" 5
6016     fi
6017 
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6019 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6020 if ${ac_cv_path_GREP+:} false; then :
6021   $as_echo_n "(cached) " >&6
6022 else
6023   if test -z "$GREP"; then
6024   ac_path_GREP_found=false
6025   # Loop through the user's path and test for each of PROGNAME-LIST
6026   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6027 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6028 do
6029   IFS=$as_save_IFS
6030   test -z "$as_dir" && as_dir=.
6031     for ac_prog in grep ggrep; do
6032     for ac_exec_ext in '' $ac_executable_extensions; do
6033       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6034       as_fn_executable_p "$ac_path_GREP" || continue
6035 # Check for GNU ac_path_GREP and select it if it is found.
6036   # Check for GNU $ac_path_GREP
6037 case `"$ac_path_GREP" --version 2>&1` in
6038 *GNU*)
6039   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6040 *)
6041   ac_count=0
6042   $as_echo_n 0123456789 >"conftest.in"
6043   while :
6044   do
6045     cat "conftest.in" "conftest.in" >"conftest.tmp"
6046     mv "conftest.tmp" "conftest.in"
6047     cp "conftest.in" "conftest.nl"
6048     $as_echo 'GREP' >> "conftest.nl"
6049     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6050     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6051     as_fn_arith $ac_count + 1 && ac_count=$as_val
6052     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6053       # Best one so far, save it but keep looking for a better one
6054       ac_cv_path_GREP="$ac_path_GREP"
6055       ac_path_GREP_max=$ac_count
6056     fi
6057     # 10*(2^10) chars as input seems more than enough
6058     test $ac_count -gt 10 && break
6059   done
6060   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6061 esac
6062 
6063       $ac_path_GREP_found && break 3
6064     done
6065   done
6066   done
6067 IFS=$as_save_IFS
6068   if test -z "$ac_cv_path_GREP"; then
6069     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6070   fi
6071 else
6072   ac_cv_path_GREP=$GREP
6073 fi
6074 
6075 fi
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6077 $as_echo "$ac_cv_path_GREP" >&6; }
6078  GREP="$ac_cv_path_GREP"
6079 
6080 
6081 
6082     if test "x$GREP" = x; then
6083         if test "x" = x; then
6084           PROG_NAME=grep
6085         else
6086           PROG_NAME=
6087         fi
6088         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6089 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6090         as_fn_error $? "Cannot continue" "$LINENO" 5
6091     fi
6092 
6093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6094 $as_echo_n "checking for egrep... " >&6; }
6095 if ${ac_cv_path_EGREP+:} false; then :
6096   $as_echo_n "(cached) " >&6
6097 else
6098   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6099    then ac_cv_path_EGREP="$GREP -E"
6100    else
6101      if test -z "$EGREP"; then
6102   ac_path_EGREP_found=false
6103   # Loop through the user's path and test for each of PROGNAME-LIST
6104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6106 do
6107   IFS=$as_save_IFS
6108   test -z "$as_dir" && as_dir=.
6109     for ac_prog in egrep; do
6110     for ac_exec_ext in '' $ac_executable_extensions; do
6111       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6112       as_fn_executable_p "$ac_path_EGREP" || continue
6113 # Check for GNU ac_path_EGREP and select it if it is found.
6114   # Check for GNU $ac_path_EGREP
6115 case `"$ac_path_EGREP" --version 2>&1` in
6116 *GNU*)
6117   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6118 *)
6119   ac_count=0
6120   $as_echo_n 0123456789 >"conftest.in"
6121   while :
6122   do
6123     cat "conftest.in" "conftest.in" >"conftest.tmp"
6124     mv "conftest.tmp" "conftest.in"
6125     cp "conftest.in" "conftest.nl"
6126     $as_echo 'EGREP' >> "conftest.nl"
6127     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6128     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6129     as_fn_arith $ac_count + 1 && ac_count=$as_val
6130     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6131       # Best one so far, save it but keep looking for a better one
6132       ac_cv_path_EGREP="$ac_path_EGREP"
6133       ac_path_EGREP_max=$ac_count
6134     fi
6135     # 10*(2^10) chars as input seems more than enough
6136     test $ac_count -gt 10 && break
6137   done
6138   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6139 esac
6140 
6141       $ac_path_EGREP_found && break 3
6142     done
6143   done
6144   done
6145 IFS=$as_save_IFS
6146   if test -z "$ac_cv_path_EGREP"; then
6147     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6148   fi
6149 else
6150   ac_cv_path_EGREP=$EGREP
6151 fi
6152 
6153    fi
6154 fi
6155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6156 $as_echo "$ac_cv_path_EGREP" >&6; }
6157  EGREP="$ac_cv_path_EGREP"
6158 
6159 
6160 
6161     if test "x$EGREP" = x; then
6162         if test "x" = x; then
6163           PROG_NAME=egrep
6164         else
6165           PROG_NAME=
6166         fi
6167         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6168 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6169         as_fn_error $? "Cannot continue" "$LINENO" 5
6170     fi
6171 
6172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6173 $as_echo_n "checking for fgrep... " >&6; }
6174 if ${ac_cv_path_FGREP+:} false; then :
6175   $as_echo_n "(cached) " >&6
6176 else
6177   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6178    then ac_cv_path_FGREP="$GREP -F"
6179    else
6180      if test -z "$FGREP"; then
6181   ac_path_FGREP_found=false
6182   # Loop through the user's path and test for each of PROGNAME-LIST
6183   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6184 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6185 do
6186   IFS=$as_save_IFS
6187   test -z "$as_dir" && as_dir=.
6188     for ac_prog in fgrep; do
6189     for ac_exec_ext in '' $ac_executable_extensions; do
6190       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6191       as_fn_executable_p "$ac_path_FGREP" || continue
6192 # Check for GNU ac_path_FGREP and select it if it is found.
6193   # Check for GNU $ac_path_FGREP
6194 case `"$ac_path_FGREP" --version 2>&1` in
6195 *GNU*)
6196   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6197 *)
6198   ac_count=0
6199   $as_echo_n 0123456789 >"conftest.in"
6200   while :
6201   do
6202     cat "conftest.in" "conftest.in" >"conftest.tmp"
6203     mv "conftest.tmp" "conftest.in"
6204     cp "conftest.in" "conftest.nl"
6205     $as_echo 'FGREP' >> "conftest.nl"
6206     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6207     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6208     as_fn_arith $ac_count + 1 && ac_count=$as_val
6209     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6210       # Best one so far, save it but keep looking for a better one
6211       ac_cv_path_FGREP="$ac_path_FGREP"
6212       ac_path_FGREP_max=$ac_count
6213     fi
6214     # 10*(2^10) chars as input seems more than enough
6215     test $ac_count -gt 10 && break
6216   done
6217   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6218 esac
6219 
6220       $ac_path_FGREP_found && break 3
6221     done
6222   done
6223   done
6224 IFS=$as_save_IFS
6225   if test -z "$ac_cv_path_FGREP"; then
6226     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6227   fi
6228 else
6229   ac_cv_path_FGREP=$FGREP
6230 fi
6231 
6232    fi
6233 fi
6234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6235 $as_echo "$ac_cv_path_FGREP" >&6; }
6236  FGREP="$ac_cv_path_FGREP"
6237 
6238 
6239 
6240     if test "x$FGREP" = x; then
6241         if test "x" = x; then
6242           PROG_NAME=fgrep
6243         else
6244           PROG_NAME=
6245         fi
6246         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6247 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6248         as_fn_error $? "Cannot continue" "$LINENO" 5
6249     fi
6250 
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6252 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6253 if ${ac_cv_path_SED+:} false; then :
6254   $as_echo_n "(cached) " >&6
6255 else
6256             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6257      for ac_i in 1 2 3 4 5 6 7; do
6258        ac_script="$ac_script$as_nl$ac_script"
6259      done
6260      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6261      { ac_script=; unset ac_script;}
6262      if test -z "$SED"; then
6263   ac_path_SED_found=false
6264   # Loop through the user's path and test for each of PROGNAME-LIST
6265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266 for as_dir in $PATH
6267 do
6268   IFS=$as_save_IFS
6269   test -z "$as_dir" && as_dir=.
6270     for ac_prog in sed gsed; do
6271     for ac_exec_ext in '' $ac_executable_extensions; do
6272       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6273       as_fn_executable_p "$ac_path_SED" || continue
6274 # Check for GNU ac_path_SED and select it if it is found.
6275   # Check for GNU $ac_path_SED
6276 case `"$ac_path_SED" --version 2>&1` in
6277 *GNU*)
6278   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6279 *)
6280   ac_count=0
6281   $as_echo_n 0123456789 >"conftest.in"
6282   while :
6283   do
6284     cat "conftest.in" "conftest.in" >"conftest.tmp"
6285     mv "conftest.tmp" "conftest.in"
6286     cp "conftest.in" "conftest.nl"
6287     $as_echo '' >> "conftest.nl"
6288     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6289     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6290     as_fn_arith $ac_count + 1 && ac_count=$as_val
6291     if test $ac_count -gt ${ac_path_SED_max-0}; then
6292       # Best one so far, save it but keep looking for a better one
6293       ac_cv_path_SED="$ac_path_SED"
6294       ac_path_SED_max=$ac_count
6295     fi
6296     # 10*(2^10) chars as input seems more than enough
6297     test $ac_count -gt 10 && break
6298   done
6299   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6300 esac
6301 
6302       $ac_path_SED_found && break 3
6303     done
6304   done
6305   done
6306 IFS=$as_save_IFS
6307   if test -z "$ac_cv_path_SED"; then
6308     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6309   fi
6310 else
6311   ac_cv_path_SED=$SED
6312 fi
6313 
6314 fi
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6316 $as_echo "$ac_cv_path_SED" >&6; }
6317  SED="$ac_cv_path_SED"
6318   rm -f conftest.sed
6319 
6320 
6321     if test "x$SED" = x; then
6322         if test "x" = x; then
6323           PROG_NAME=sed
6324         else
6325           PROG_NAME=
6326         fi
6327         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6328 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6329         as_fn_error $? "Cannot continue" "$LINENO" 5
6330     fi
6331 
6332 
6333 for ac_prog in nawk gawk awk
6334 do
6335   # Extract the first word of "$ac_prog", so it can be a program name with args.
6336 set dummy $ac_prog; ac_word=$2
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6338 $as_echo_n "checking for $ac_word... " >&6; }
6339 if ${ac_cv_path_NAWK+:} false; then :
6340   $as_echo_n "(cached) " >&6
6341 else
6342   case $NAWK in
6343   [\\/]* | ?:[\\/]*)
6344   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6345   ;;
6346   *)
6347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6348 for as_dir in $PATH
6349 do
6350   IFS=$as_save_IFS
6351   test -z "$as_dir" && as_dir=.
6352     for ac_exec_ext in '' $ac_executable_extensions; do
6353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6354     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6356     break 2
6357   fi
6358 done
6359   done
6360 IFS=$as_save_IFS
6361 
6362   ;;
6363 esac
6364 fi
6365 NAWK=$ac_cv_path_NAWK
6366 if test -n "$NAWK"; then
6367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6368 $as_echo "$NAWK" >&6; }
6369 else
6370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371 $as_echo "no" >&6; }
6372 fi
6373 
6374 
6375   test -n "$NAWK" && break
6376 done
6377 
6378 
6379     if test "x$NAWK" = x; then
6380         if test "x" = x; then
6381           PROG_NAME=nawk
6382         else
6383           PROG_NAME=
6384         fi
6385         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6386 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6387         as_fn_error $? "Cannot continue" "$LINENO" 5
6388     fi
6389 
6390 
6391 # Always force rm.
6392 RM="$RM -f"
6393 
6394 # pwd behaves differently on various platforms and some don't support the -L flag.
6395 # Always use the bash builtin pwd to get uniform behavior.
6396 THEPWDCMD=pwd
6397 
6398 # These are not required on all platforms
6399 # Extract the first word of "cygpath", so it can be a program name with args.
6400 set dummy cygpath; ac_word=$2
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402 $as_echo_n "checking for $ac_word... " >&6; }
6403 if ${ac_cv_path_CYGPATH+:} false; then :
6404   $as_echo_n "(cached) " >&6
6405 else
6406   case $CYGPATH in
6407   [\\/]* | ?:[\\/]*)
6408   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6409   ;;
6410   *)
6411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412 for as_dir in $PATH
6413 do
6414   IFS=$as_save_IFS
6415   test -z "$as_dir" && as_dir=.
6416     for ac_exec_ext in '' $ac_executable_extensions; do
6417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420     break 2
6421   fi
6422 done
6423   done
6424 IFS=$as_save_IFS
6425 
6426   ;;
6427 esac
6428 fi
6429 CYGPATH=$ac_cv_path_CYGPATH
6430 if test -n "$CYGPATH"; then
6431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6432 $as_echo "$CYGPATH" >&6; }
6433 else
6434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435 $as_echo "no" >&6; }
6436 fi
6437 
6438 
6439 # Extract the first word of "readlink", so it can be a program name with args.
6440 set dummy readlink; ac_word=$2
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442 $as_echo_n "checking for $ac_word... " >&6; }
6443 if ${ac_cv_path_READLINK+:} false; then :
6444   $as_echo_n "(cached) " >&6
6445 else
6446   case $READLINK in
6447   [\\/]* | ?:[\\/]*)
6448   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6449   ;;
6450   *)
6451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6452 for as_dir in $PATH
6453 do
6454   IFS=$as_save_IFS
6455   test -z "$as_dir" && as_dir=.
6456     for ac_exec_ext in '' $ac_executable_extensions; do
6457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6458     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6460     break 2
6461   fi
6462 done
6463   done
6464 IFS=$as_save_IFS
6465 
6466   ;;
6467 esac
6468 fi
6469 READLINK=$ac_cv_path_READLINK
6470 if test -n "$READLINK"; then
6471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6472 $as_echo "$READLINK" >&6; }
6473 else
6474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6475 $as_echo "no" >&6; }
6476 fi
6477 
6478 
6479 # Extract the first word of "df", so it can be a program name with args.
6480 set dummy df; ac_word=$2
6481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482 $as_echo_n "checking for $ac_word... " >&6; }
6483 if ${ac_cv_path_DF+:} false; then :
6484   $as_echo_n "(cached) " >&6
6485 else
6486   case $DF in
6487   [\\/]* | ?:[\\/]*)
6488   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6489   ;;
6490   *)
6491   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492 for as_dir in $PATH
6493 do
6494   IFS=$as_save_IFS
6495   test -z "$as_dir" && as_dir=.
6496     for ac_exec_ext in '' $ac_executable_extensions; do
6497   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6498     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6499     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500     break 2
6501   fi
6502 done
6503   done
6504 IFS=$as_save_IFS
6505 
6506   ;;
6507 esac
6508 fi
6509 DF=$ac_cv_path_DF
6510 if test -n "$DF"; then
6511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6512 $as_echo "$DF" >&6; }
6513 else
6514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515 $as_echo "no" >&6; }
6516 fi
6517 
6518 
6519 # Extract the first word of "SetFile", so it can be a program name with args.
6520 set dummy SetFile; ac_word=$2
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6522 $as_echo_n "checking for $ac_word... " >&6; }
6523 if ${ac_cv_path_SETFILE+:} false; then :
6524   $as_echo_n "(cached) " >&6
6525 else
6526   case $SETFILE in
6527   [\\/]* | ?:[\\/]*)
6528   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6529   ;;
6530   *)
6531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532 for as_dir in $PATH
6533 do
6534   IFS=$as_save_IFS
6535   test -z "$as_dir" && as_dir=.
6536     for ac_exec_ext in '' $ac_executable_extensions; do
6537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6538     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540     break 2
6541   fi
6542 done
6543   done
6544 IFS=$as_save_IFS
6545 
6546   ;;
6547 esac
6548 fi
6549 SETFILE=$ac_cv_path_SETFILE
6550 if test -n "$SETFILE"; then
6551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6552 $as_echo "$SETFILE" >&6; }
6553 else
6554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555 $as_echo "no" >&6; }
6556 fi
6557 
6558 
6559 
6560 
6561 # Now we can determine OpenJDK build and target platforms. This is required to
6562 # have early on.
6563 # Make sure we can run config.sub.
6564 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6565   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6566 
6567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6568 $as_echo_n "checking build system type... " >&6; }
6569 if ${ac_cv_build+:} false; then :
6570   $as_echo_n "(cached) " >&6
6571 else
6572   ac_build_alias=$build_alias
6573 test "x$ac_build_alias" = x &&
6574   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6575 test "x$ac_build_alias" = x &&
6576   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6577 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6578   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6579 
6580 fi
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6582 $as_echo "$ac_cv_build" >&6; }
6583 case $ac_cv_build in
6584 *-*-*) ;;
6585 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6586 esac
6587 build=$ac_cv_build
6588 ac_save_IFS=$IFS; IFS='-'
6589 set x $ac_cv_build
6590 shift
6591 build_cpu=$1
6592 build_vendor=$2
6593 shift; shift
6594 # Remember, the first character of IFS is used to create $*,
6595 # except with old shells:
6596 build_os=$*
6597 IFS=$ac_save_IFS
6598 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6599 
6600 
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6602 $as_echo_n "checking host system type... " >&6; }
6603 if ${ac_cv_host+:} false; then :
6604   $as_echo_n "(cached) " >&6
6605 else
6606   if test "x$host_alias" = x; then
6607   ac_cv_host=$ac_cv_build
6608 else
6609   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6610     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6611 fi
6612 
6613 fi
6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6615 $as_echo "$ac_cv_host" >&6; }
6616 case $ac_cv_host in
6617 *-*-*) ;;
6618 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6619 esac
6620 host=$ac_cv_host
6621 ac_save_IFS=$IFS; IFS='-'
6622 set x $ac_cv_host
6623 shift
6624 host_cpu=$1
6625 host_vendor=$2
6626 shift; shift
6627 # Remember, the first character of IFS is used to create $*,
6628 # except with old shells:
6629 host_os=$*
6630 IFS=$ac_save_IFS
6631 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6632 
6633 
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6635 $as_echo_n "checking target system type... " >&6; }
6636 if ${ac_cv_target+:} false; then :
6637   $as_echo_n "(cached) " >&6
6638 else
6639   if test "x$target_alias" = x; then
6640   ac_cv_target=$ac_cv_host
6641 else
6642   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6643     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6644 fi
6645 
6646 fi
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6648 $as_echo "$ac_cv_target" >&6; }
6649 case $ac_cv_target in
6650 *-*-*) ;;
6651 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6652 esac
6653 target=$ac_cv_target
6654 ac_save_IFS=$IFS; IFS='-'
6655 set x $ac_cv_target
6656 shift
6657 target_cpu=$1
6658 target_vendor=$2
6659 shift; shift
6660 # Remember, the first character of IFS is used to create $*,
6661 # except with old shells:
6662 target_os=$*
6663 IFS=$ac_save_IFS
6664 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6665 
6666 
6667 # The aliases save the names the user supplied, while $host etc.
6668 # will get canonicalized.
6669 test -n "$target_alias" &&
6670   test "$program_prefix$program_suffix$program_transform_name" = \
6671     NONENONEs,x,x, &&
6672   program_prefix=${target_alias}-
6673 
6674 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6675 # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6676 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6677 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6678 # to use the configure naming style.
6679 
6680 
6681 
6682 
6683 
6684     # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6685     # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6686     # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6687     # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6688     OPENJDK_TARGET_AUTOCONF_NAME="$host"
6689     OPENJDK_BUILD_AUTOCONF_NAME="$build"
6690 
6691 
6692 
6693     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6694 
6695   case "$build_os" in
6696     *linux*)
6697       VAR_OS=linux
6698       VAR_OS_API=posix
6699       VAR_OS_ENV=linux
6700       ;;
6701     *solaris*)
6702       VAR_OS=solaris
6703       VAR_OS_API=posix
6704       VAR_OS_ENV=solaris
6705       ;;
6706     *darwin*)
6707       VAR_OS=macosx
6708       VAR_OS_API=posix
6709       VAR_OS_ENV=macosx
6710       ;;
6711     *bsd*)
6712       VAR_OS=bsd
6713       VAR_OS_API=posix
6714       VAR_OS_ENV=bsd
6715       ;;
6716     *cygwin*)
6717       VAR_OS=windows
6718       VAR_OS_API=winapi
6719       VAR_OS_ENV=windows.cygwin
6720       ;;
6721     *mingw*)
6722       VAR_OS=windows
6723       VAR_OS_API=winapi
6724       VAR_OS_ENV=windows.msys
6725       ;;
6726     *)
6727       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6728       ;;
6729   esac
6730 
6731 
6732   # First argument is the cpu name from the trip/quad
6733   case "$build_cpu" in
6734     x86_64)
6735       VAR_CPU=x86_64
6736       VAR_CPU_ARCH=x86
6737       VAR_CPU_BITS=64
6738       VAR_CPU_ENDIAN=little
6739       ;;
6740     i?86)
6741       VAR_CPU=x86
6742       VAR_CPU_ARCH=x86
6743       VAR_CPU_BITS=32
6744       VAR_CPU_ENDIAN=little
6745       ;;
6746     arm*)
6747       VAR_CPU=arm
6748       VAR_CPU_ARCH=arm
6749       VAR_CPU_BITS=32
6750       VAR_CPU_ENDIAN=little
6751       ;;
6752     powerpc)
6753       VAR_CPU=ppc
6754       VAR_CPU_ARCH=ppc
6755       VAR_CPU_BITS=32
6756       VAR_CPU_ENDIAN=big
6757        ;;
6758     powerpc64)
6759       VAR_CPU=ppc64
6760       VAR_CPU_ARCH=ppc
6761       VAR_CPU_BITS=64
6762       VAR_CPU_ENDIAN=big
6763        ;;
6764     s390)
6765       VAR_CPU=s390
6766       VAR_CPU_ARCH=s390
6767       VAR_CPU_BITS=32
6768       VAR_CPU_ENDIAN=big
6769        ;;
6770     s390x)
6771       VAR_CPU=s390x
6772       VAR_CPU_ARCH=s390
6773       VAR_CPU_BITS=64
6774       VAR_CPU_ENDIAN=big
6775        ;;
6776     sparc)
6777       VAR_CPU=sparc
6778       VAR_CPU_ARCH=sparc
6779       VAR_CPU_BITS=32
6780       VAR_CPU_ENDIAN=big
6781        ;;
6782     sparcv9)
6783       VAR_CPU=sparcv9
6784       VAR_CPU_ARCH=sparc
6785       VAR_CPU_BITS=64
6786       VAR_CPU_ENDIAN=big
6787        ;;
6788     *)
6789       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6790       ;;
6791   esac
6792 
6793     # ..and setup our own variables. (Do this explicitely to facilitate searching)
6794     OPENJDK_BUILD_OS="$VAR_OS"
6795     OPENJDK_BUILD_OS_API="$VAR_OS_API"
6796     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6797     OPENJDK_BUILD_CPU="$VAR_CPU"
6798     OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6799     OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6800     OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6801 
6802 
6803 
6804 
6805 
6806 
6807 
6808     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6809 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6811 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6812 
6813     # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6814 
6815   case "$host_os" in
6816     *linux*)
6817       VAR_OS=linux
6818       VAR_OS_API=posix
6819       VAR_OS_ENV=linux
6820       ;;
6821     *solaris*)
6822       VAR_OS=solaris
6823       VAR_OS_API=posix
6824       VAR_OS_ENV=solaris
6825       ;;
6826     *darwin*)
6827       VAR_OS=macosx
6828       VAR_OS_API=posix
6829       VAR_OS_ENV=macosx
6830       ;;
6831     *bsd*)
6832       VAR_OS=bsd
6833       VAR_OS_API=posix
6834       VAR_OS_ENV=bsd
6835       ;;
6836     *cygwin*)
6837       VAR_OS=windows
6838       VAR_OS_API=winapi
6839       VAR_OS_ENV=windows.cygwin
6840       ;;
6841     *mingw*)
6842       VAR_OS=windows
6843       VAR_OS_API=winapi
6844       VAR_OS_ENV=windows.msys
6845       ;;
6846     *)
6847       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6848       ;;
6849   esac
6850 
6851 
6852   # First argument is the cpu name from the trip/quad
6853   case "$host_cpu" in
6854     x86_64)
6855       VAR_CPU=x86_64
6856       VAR_CPU_ARCH=x86
6857       VAR_CPU_BITS=64
6858       VAR_CPU_ENDIAN=little
6859       ;;
6860     i?86)
6861       VAR_CPU=x86
6862       VAR_CPU_ARCH=x86
6863       VAR_CPU_BITS=32
6864       VAR_CPU_ENDIAN=little
6865       ;;
6866     arm*)
6867       VAR_CPU=arm
6868       VAR_CPU_ARCH=arm
6869       VAR_CPU_BITS=32
6870       VAR_CPU_ENDIAN=little
6871       ;;
6872     powerpc)
6873       VAR_CPU=ppc
6874       VAR_CPU_ARCH=ppc
6875       VAR_CPU_BITS=32
6876       VAR_CPU_ENDIAN=big
6877        ;;
6878     powerpc64)
6879       VAR_CPU=ppc64
6880       VAR_CPU_ARCH=ppc
6881       VAR_CPU_BITS=64
6882       VAR_CPU_ENDIAN=big
6883        ;;
6884     s390)
6885       VAR_CPU=s390
6886       VAR_CPU_ARCH=s390
6887       VAR_CPU_BITS=32
6888       VAR_CPU_ENDIAN=big
6889        ;;
6890     s390x)
6891       VAR_CPU=s390x
6892       VAR_CPU_ARCH=s390
6893       VAR_CPU_BITS=64
6894       VAR_CPU_ENDIAN=big
6895        ;;
6896     sparc)
6897       VAR_CPU=sparc
6898       VAR_CPU_ARCH=sparc
6899       VAR_CPU_BITS=32
6900       VAR_CPU_ENDIAN=big
6901        ;;
6902     sparcv9)
6903       VAR_CPU=sparcv9
6904       VAR_CPU_ARCH=sparc
6905       VAR_CPU_BITS=64
6906       VAR_CPU_ENDIAN=big
6907        ;;
6908     *)
6909       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6910       ;;
6911   esac
6912 
6913     # ... and setup our own variables. (Do this explicitely to facilitate searching)
6914     OPENJDK_TARGET_OS="$VAR_OS"
6915     OPENJDK_TARGET_OS_API="$VAR_OS_API"
6916     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6917     OPENJDK_TARGET_CPU="$VAR_CPU"
6918     OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6919     OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6920     OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6921 
6922 
6923 
6924 
6925 
6926 
6927 
6928     { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6929 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
6930     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6931 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6932 
6933 
6934 
6935 # Check whether --with-target-bits was given.
6936 if test "${with_target_bits+set}" = set; then :
6937   withval=$with_target_bits;
6938 fi
6939 
6940 
6941   # We have three types of compiles:
6942   # native  == normal compilation, target system == build system
6943   # cross   == traditional cross compilation, target system != build system; special toolchain needed
6944   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6945   #
6946   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6947     # We're doing a proper cross-compilation
6948     COMPILE_TYPE="cross"
6949   else
6950     COMPILE_TYPE="native"
6951   fi
6952 
6953   if test "x$with_target_bits" != x; then
6954     if test "x$COMPILE_TYPE" = "xcross"; then
6955       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6956     fi
6957 
6958     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6959       # A reduced build is requested
6960       COMPILE_TYPE="reduced"
6961       OPENJDK_TARGET_CPU_BITS=32
6962       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6963         OPENJDK_TARGET_CPU=x86
6964       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6965         OPENJDK_TARGET_CPU=sparc
6966       else
6967         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6968       fi
6969     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6970       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
6971     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6972       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6973 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6974     else
6975       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6976     fi
6977   fi
6978 
6979 
6980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6981 $as_echo_n "checking compilation type... " >&6; }
6982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6983 $as_echo "$COMPILE_TYPE" >&6; }
6984 
6985 
6986     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6987        REQUIRED_OS_NAME=SunOS
6988        REQUIRED_OS_VERSION=5.10
6989     fi
6990     if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6991        REQUIRED_OS_NAME=Linux
6992        REQUIRED_OS_VERSION=2.6
6993     fi
6994     if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6995         REQUIRED_OS_NAME=Windows
6996         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6997             REQUIRED_OS_VERSION=5.2
6998         else
6999             REQUIRED_OS_VERSION=5.1
7000         fi
7001     fi
7002     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7003         REQUIRED_OS_NAME=Darwin
7004         REQUIRED_OS_VERSION=11.2
7005     fi
7006 
7007 
7008 
7009 
7010 
7011     # Also store the legacy naming of the cpu.
7012     # Ie i586 and amd64 instead of x86 and x86_64
7013     OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7014     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7015       OPENJDK_TARGET_CPU_LEGACY="i586"
7016     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7017       # On all platforms except MacOSX replace x86_64 with amd64.
7018       OPENJDK_TARGET_CPU_LEGACY="amd64"
7019     fi
7020 
7021 
7022     # And the second legacy naming of the cpu.
7023     # Ie i386 and amd64 instead of x86 and x86_64.
7024     OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7025     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7026       OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7027     elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7028       OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7029     fi
7030 
7031 
7032     # This is the name of the cpu (but using i386 and amd64 instead of
7033     # x86 and x86_64, respectively), preceeded by a /, to be used when
7034     # locating libraries. On macosx, it's empty, though.
7035     OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7036     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7037         OPENJDK_TARGET_CPU_LIBDIR=""
7038     fi
7039 
7040 
7041     # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7042     # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7043     # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7044     OPENJDK_TARGET_CPU_ISADIR=""
7045     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7046       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7047           OPENJDK_TARGET_CPU_ISADIR="/amd64"
7048       elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7049           OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7050       fi
7051     fi
7052 
7053 
7054     # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7055     OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7056     if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7057       # On linux only, we replace x86 with i386.
7058       OPENJDK_TARGET_CPU_OSARCH="i386"
7059     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7060       # On all platforms except macosx, we replace x86_64 with amd64.
7061       OPENJDK_TARGET_CPU_OSARCH="amd64"
7062     fi
7063 
7064 
7065     OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7066     if test "x$OPENJDK_TARGET_CPU" = xx86; then
7067       OPENJDK_TARGET_CPU_JLI="i386"
7068     elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7069       # On all platforms except macosx, we replace x86_64 with amd64.
7070       OPENJDK_TARGET_CPU_JLI="amd64"
7071     fi
7072     # Now setup the -D flags for building libjli.
7073     OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7074     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7075       if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7076         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7077       elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7078         OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7079       fi
7080     fi
7081 
7082 
7083     # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7084     if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7085         OPENJDK_TARGET_OS_API_DIR="solaris"
7086     fi
7087     if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7088         OPENJDK_TARGET_OS_API_DIR="windows"
7089     fi
7090 
7091 
7092     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7093         A_LP64="LP64:="
7094         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7095         # unpack200.exe
7096         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7097             ADD_LP64="-D_LP64=1"
7098         fi
7099     fi
7100     LP64=$A_LP64
7101 
7102 
7103     if test "x$COMPILE_TYPE" = "xcross"; then
7104       # FIXME: ... or should this include reduced builds..?
7105       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7106     else
7107       DEFINE_CROSS_COMPILE_ARCH=""
7108     fi
7109 
7110 
7111     # ZERO_ARCHDEF is used to enable architecture-specific code
7112     case "${OPENJDK_TARGET_CPU}" in
7113       ppc*)    ZERO_ARCHDEF=PPC   ;;
7114       s390*)   ZERO_ARCHDEF=S390  ;;
7115       sparc*)  ZERO_ARCHDEF=SPARC ;;
7116       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7117       x86)     ZERO_ARCHDEF=IA32  ;;
7118       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7119     esac
7120 
7121 
7122 
7123 
7124 
7125 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7126 
7127 # Locate the directory of this script.
7128 SCRIPT="$0"
7129 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7130 
7131 # Where is the source? It is located two levels above the configure script.
7132 CURDIR="$PWD"
7133 cd "$AUTOCONF_DIR/../.."
7134 SRC_ROOT="`$THEPWDCMD -L`"
7135 
7136 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7137   PATH_SEP=";"
7138 
7139   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7140   if test $SRC_ROOT_LENGTH -gt 100; then
7141       as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7142   fi
7143 
7144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7146 $as_echo_n "checking cygwin release... " >&6; }
7147     CYGWIN_VERSION=`$UNAME -r`
7148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7149 $as_echo "$CYGWIN_VERSION" >&6; }
7150     WINDOWS_ENV_VENDOR='cygwin'
7151     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7152 
7153     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7154     if test "x$CYGWIN_VERSION_OK" = x; then
7155       { $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
7156 $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;}
7157       as_fn_error $? "Cannot continue" "$LINENO" 5
7158     fi
7159     if test "x$CYGPATH" = x; then
7160         as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7161     fi
7162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7163 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7164     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7165     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7166     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7167     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7168     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7169 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7170     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7171     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7172     if test "x$test_cygdrive_prefix" = x; then
7173         as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7174     fi
7175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7176     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7177 $as_echo_n "checking msys release... " >&6; }
7178     MSYS_VERSION=`$UNAME -r`
7179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7180 $as_echo "$MSYS_VERSION" >&6; }
7181 
7182     WINDOWS_ENV_VENDOR='msys'
7183     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7184 
7185     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7186 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7187     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7188     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7189 
7190   windows_path="$MSYS_ROOT_PATH"
7191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7192     unix_path=`$CYGPATH -u "$windows_path"`
7193     MSYS_ROOT_PATH="$unix_path"
7194   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7195     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7196     MSYS_ROOT_PATH="$unix_path"
7197   fi
7198 
7199     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7200 $as_echo "$MSYS_ROOT_PATH" >&6; }
7201     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7202   else
7203     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7204   fi
7205 
7206   # Test if windows or unix (cygwin/msys) find is first in path.
7207   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7208 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7209   FIND_BINARY_OUTPUT=`find --version 2>&1`
7210   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7211     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7212 $as_echo "unix style" >&6; }
7213   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7214     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7215 $as_echo "Windows" >&6; }
7216     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7217 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7218     { $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
7219 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7220     as_fn_error $? "Cannot continue" "$LINENO" 5
7221   else
7222     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7223 $as_echo "unknown" >&6; }
7224     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7225 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7226   fi
7227 
7228 else
7229   PATH_SEP=":"
7230 fi
7231 
7232 
7233 
7234 cd "$CURDIR"
7235 
7236 
7237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7238 
7239   # Input might be given as Windows format, start by converting to
7240   # unix format.
7241   path="$SRC_ROOT"
7242   new_path=`$CYGPATH -u "$path"`
7243 
7244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7247   # "foo.exe" is OK but "foo" is an error.
7248   #
7249   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7250   # It is also a way to make sure we got the proper file name for the real test later on.
7251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7252   if test "x$test_shortpath" = x; then
7253     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7254 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7255     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7256   fi
7257 
7258   # Call helper function which possibly converts this using DOS-style short mode.
7259   # If so, the updated path is stored in $new_path.
7260 
7261   input_path="$new_path"
7262   # Check if we need to convert this using DOS-style short mode. If the path
7263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7264   # take no chances and rewrite it.
7265   # Note: m4 eats our [], so we need to use [ and ] instead.
7266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7267   if test "x$has_forbidden_chars" != x; then
7268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7269     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7270     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7271     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7272       # Going to short mode and back again did indeed matter. Since short mode is
7273       # case insensitive, let's make it lowercase to improve readability.
7274       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7275       # Now convert it back to Unix-stile (cygpath)
7276       input_path=`$CYGPATH -u "$shortmode_path"`
7277       new_path="$input_path"
7278     fi
7279   fi
7280 
7281   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7282   if test "x$test_cygdrive_prefix" = x; then
7283     # As a simple fix, exclude /usr/bin since it's not a real path.
7284     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7285       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7286       # a path prefixed by /cygdrive for fixpath to work.
7287       new_path="$CYGWIN_ROOT_PATH$input_path"
7288     fi
7289   fi
7290 
7291 
7292   if test "x$path" != "x$new_path"; then
7293     SRC_ROOT="$new_path"
7294     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7295 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7296   fi
7297 
7298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7299 
7300   path="$SRC_ROOT"
7301   has_colon=`$ECHO $path | $GREP ^.:`
7302   new_path="$path"
7303   if test "x$has_colon" = x; then
7304     # Not in mixed or Windows style, start by that.
7305     new_path=`cmd //c echo $path`
7306   fi
7307 
7308 
7309   input_path="$new_path"
7310   # Check if we need to convert this using DOS-style short mode. If the path
7311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7312   # take no chances and rewrite it.
7313   # Note: m4 eats our [], so we need to use [ and ] instead.
7314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7315   if test "x$has_forbidden_chars" != x; then
7316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7317     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7318   fi
7319 
7320 
7321   windows_path="$new_path"
7322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7323     unix_path=`$CYGPATH -u "$windows_path"`
7324     new_path="$unix_path"
7325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7327     new_path="$unix_path"
7328   fi
7329 
7330   if test "x$path" != "x$new_path"; then
7331     SRC_ROOT="$new_path"
7332     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7333 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7334   fi
7335 
7336   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7337   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7338 
7339   else
7340     # We're on a posix platform. Hooray! :)
7341     path="$SRC_ROOT"
7342     has_space=`$ECHO "$path" | $GREP " "`
7343     if test "x$has_space" != x; then
7344       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7345 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7346       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7347     fi
7348 
7349     # Use eval to expand a potential ~
7350     eval path="$path"
7351     if test ! -f "$path" && test ! -d "$path"; then
7352       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7353     fi
7354 
7355     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7356   fi
7357 
7358 
7359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7360 
7361   # Input might be given as Windows format, start by converting to
7362   # unix format.
7363   path="$CURDIR"
7364   new_path=`$CYGPATH -u "$path"`
7365 
7366   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7367   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7368   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7369   # "foo.exe" is OK but "foo" is an error.
7370   #
7371   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7372   # It is also a way to make sure we got the proper file name for the real test later on.
7373   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7374   if test "x$test_shortpath" = x; then
7375     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7376 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7377     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7378   fi
7379 
7380   # Call helper function which possibly converts this using DOS-style short mode.
7381   # If so, the updated path is stored in $new_path.
7382 
7383   input_path="$new_path"
7384   # Check if we need to convert this using DOS-style short mode. If the path
7385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7386   # take no chances and rewrite it.
7387   # Note: m4 eats our [], so we need to use [ and ] instead.
7388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7389   if test "x$has_forbidden_chars" != x; then
7390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7391     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7392     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7393     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7394       # Going to short mode and back again did indeed matter. Since short mode is
7395       # case insensitive, let's make it lowercase to improve readability.
7396       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7397       # Now convert it back to Unix-stile (cygpath)
7398       input_path=`$CYGPATH -u "$shortmode_path"`
7399       new_path="$input_path"
7400     fi
7401   fi
7402 
7403   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7404   if test "x$test_cygdrive_prefix" = x; then
7405     # As a simple fix, exclude /usr/bin since it's not a real path.
7406     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7407       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7408       # a path prefixed by /cygdrive for fixpath to work.
7409       new_path="$CYGWIN_ROOT_PATH$input_path"
7410     fi
7411   fi
7412 
7413 
7414   if test "x$path" != "x$new_path"; then
7415     CURDIR="$new_path"
7416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7417 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7418   fi
7419 
7420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7421 
7422   path="$CURDIR"
7423   has_colon=`$ECHO $path | $GREP ^.:`
7424   new_path="$path"
7425   if test "x$has_colon" = x; then
7426     # Not in mixed or Windows style, start by that.
7427     new_path=`cmd //c echo $path`
7428   fi
7429 
7430 
7431   input_path="$new_path"
7432   # Check if we need to convert this using DOS-style short mode. If the path
7433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7434   # take no chances and rewrite it.
7435   # Note: m4 eats our [], so we need to use [ and ] instead.
7436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7437   if test "x$has_forbidden_chars" != x; then
7438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7439     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7440   fi
7441 
7442 
7443   windows_path="$new_path"
7444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7445     unix_path=`$CYGPATH -u "$windows_path"`
7446     new_path="$unix_path"
7447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7449     new_path="$unix_path"
7450   fi
7451 
7452   if test "x$path" != "x$new_path"; then
7453     CURDIR="$new_path"
7454     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7455 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7456   fi
7457 
7458   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7459   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7460 
7461   else
7462     # We're on a posix platform. Hooray! :)
7463     path="$CURDIR"
7464     has_space=`$ECHO "$path" | $GREP " "`
7465     if test "x$has_space" != x; then
7466       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7467 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7468       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7469     fi
7470 
7471     # Use eval to expand a potential ~
7472     eval path="$path"
7473     if test ! -f "$path" && test ! -d "$path"; then
7474       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7475     fi
7476 
7477     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7478   fi
7479 
7480 
7481 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7482     # Add extra search paths on solaris for utilities like ar and as etc...
7483     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7484 fi
7485 
7486 # You can force the sys-root if the sys-root encoded into the cross compiler tools
7487 # is not correct.
7488 
7489 # Check whether --with-sys-root was given.
7490 if test "${with_sys_root+set}" = set; then :
7491   withval=$with_sys_root;
7492 fi
7493 
7494 
7495 if test "x$with_sys_root" != x; then
7496   SYS_ROOT=$with_sys_root
7497 else
7498   SYS_ROOT=/
7499 fi
7500 
7501 
7502 
7503 # Check whether --with-tools-dir was given.
7504 if test "${with_tools_dir+set}" = set; then :
7505   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7506 
7507 fi
7508 
7509 
7510 
7511 # Check whether --with-devkit was given.
7512 if test "${with_devkit+set}" = set; then :
7513   withval=$with_devkit;
7514     if test "x$with_sys_root" != x; then
7515       as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7516     fi
7517 
7518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7519 
7520   # Input might be given as Windows format, start by converting to
7521   # unix format.
7522   path="$with_devkit"
7523   new_path=`$CYGPATH -u "$path"`
7524 
7525   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7526   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7527   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7528   # "foo.exe" is OK but "foo" is an error.
7529   #
7530   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7531   # It is also a way to make sure we got the proper file name for the real test later on.
7532   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7533   if test "x$test_shortpath" = x; then
7534     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7535 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7536     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7537   fi
7538 
7539   # Call helper function which possibly converts this using DOS-style short mode.
7540   # If so, the updated path is stored in $new_path.
7541 
7542   input_path="$new_path"
7543   # Check if we need to convert this using DOS-style short mode. If the path
7544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7545   # take no chances and rewrite it.
7546   # Note: m4 eats our [], so we need to use [ and ] instead.
7547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7548   if test "x$has_forbidden_chars" != x; then
7549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7550     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7551     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7552     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7553       # Going to short mode and back again did indeed matter. Since short mode is
7554       # case insensitive, let's make it lowercase to improve readability.
7555       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7556       # Now convert it back to Unix-stile (cygpath)
7557       input_path=`$CYGPATH -u "$shortmode_path"`
7558       new_path="$input_path"
7559     fi
7560   fi
7561 
7562   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7563   if test "x$test_cygdrive_prefix" = x; then
7564     # As a simple fix, exclude /usr/bin since it's not a real path.
7565     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7566       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7567       # a path prefixed by /cygdrive for fixpath to work.
7568       new_path="$CYGWIN_ROOT_PATH$input_path"
7569     fi
7570   fi
7571 
7572 
7573   if test "x$path" != "x$new_path"; then
7574     with_devkit="$new_path"
7575     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7576 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7577   fi
7578 
7579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7580 
7581   path="$with_devkit"
7582   has_colon=`$ECHO $path | $GREP ^.:`
7583   new_path="$path"
7584   if test "x$has_colon" = x; then
7585     # Not in mixed or Windows style, start by that.
7586     new_path=`cmd //c echo $path`
7587   fi
7588 
7589 
7590   input_path="$new_path"
7591   # Check if we need to convert this using DOS-style short mode. If the path
7592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7593   # take no chances and rewrite it.
7594   # Note: m4 eats our [], so we need to use [ and ] instead.
7595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7596   if test "x$has_forbidden_chars" != x; then
7597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7598     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7599   fi
7600 
7601 
7602   windows_path="$new_path"
7603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7604     unix_path=`$CYGPATH -u "$windows_path"`
7605     new_path="$unix_path"
7606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7608     new_path="$unix_path"
7609   fi
7610 
7611   if test "x$path" != "x$new_path"; then
7612     with_devkit="$new_path"
7613     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7614 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7615   fi
7616 
7617   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7618   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7619 
7620   else
7621     # We're on a posix platform. Hooray! :)
7622     path="$with_devkit"
7623     has_space=`$ECHO "$path" | $GREP " "`
7624     if test "x$has_space" != x; then
7625       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7626 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7627       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7628     fi
7629 
7630     # Use eval to expand a potential ~
7631     eval path="$path"
7632     if test ! -f "$path" && test ! -d "$path"; then
7633       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7634     fi
7635 
7636     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7637   fi
7638 
7639 
7640   if test "x$TOOLS_DIR" = x; then
7641     TOOLS_DIR="$with_devkit/bin"
7642   else
7643     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7644   fi
7645 
7646     if test -d "$with_devkit/$host_alias/libc"; then
7647       SYS_ROOT=$with_devkit/$host_alias/libc
7648     elif test -d "$with_devkit/$host/sys-root"; then
7649       SYS_ROOT=$with_devkit/$host/sys-root
7650     fi
7651 
7652 fi
7653 
7654 
7655 
7656 # Setup default logging of stdout and stderr to build.log in the output root.
7657 BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7658 BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7659 BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7660 
7661 
7662 
7663 
7664 
7665 # Check if it's a pure open build or if custom sources are to be used.
7666 
7667   # Check whether --enable-openjdk-only was given.
7668 if test "${enable_openjdk_only+set}" = set; then :
7669   enableval=$enable_openjdk_only;
7670 else
7671   enable_openjdk_only="no"
7672 fi
7673 
7674 
7675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7676 $as_echo_n "checking for presence of closed sources... " >&6; }
7677   if test -d "$SRC_ROOT/jdk/src/closed"; then
7678     CLOSED_SOURCE_PRESENT=yes
7679   else
7680     CLOSED_SOURCE_PRESENT=no
7681   fi
7682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7683 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7684 
7685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7686 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7687   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7689 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7690 
7691   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7692     OPENJDK=true
7693     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7694       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7695 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7696     fi
7697   else
7698     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7699       OPENJDK=true
7700     else
7701       OPENJDK=false
7702     fi
7703   fi
7704 
7705   if test "x$OPENJDK" = "xtrue"; then
7706     SET_OPENJDK="OPENJDK=true"
7707   fi
7708 
7709 
7710 
7711 
7712 # These are needed to be able to create a configuration name (and thus the output directory)
7713 
7714 ###############################################################################
7715 #
7716 # Check which variant of the JDK that we want to build.
7717 # Currently we have:
7718 #    normal:   standard edition
7719 # but the custom make system may add other variants
7720 #
7721 # Effectively the JDK variant gives a name to a specific set of
7722 # modules to compile into the JDK. In the future, these modules
7723 # might even be Jigsaw modules.
7724 #
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7726 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7727 
7728 # Check whether --with-jdk-variant was given.
7729 if test "${with_jdk_variant+set}" = set; then :
7730   withval=$with_jdk_variant;
7731 fi
7732 
7733 
7734 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7735     JDK_VARIANT="normal"
7736 else
7737     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7738 fi
7739 
7740 
7741 
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7743 $as_echo "$JDK_VARIANT" >&6; }
7744 
7745 
7746 
7747 ###############################################################################
7748 #
7749 # Check which variants of the JVM that we want to build.
7750 # Currently we have:
7751 #    server: normal interpreter and a tiered C1/C2 compiler
7752 #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7753 #    minimal1: reduced form of client with optional VM services and features stripped out
7754 #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7755 #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7756 #    zero: no machine code interpreter, no compiler
7757 #    zeroshark: zero interpreter and shark/llvm compiler backend
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7759 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7760 
7761 # Check whether --with-jvm-variants was given.
7762 if test "${with_jvm_variants+set}" = set; then :
7763   withval=$with_jvm_variants;
7764 fi
7765 
7766 
7767 if test "x$with_jvm_variants" = x; then
7768      with_jvm_variants="server"
7769 fi
7770 
7771 JVM_VARIANTS=",$with_jvm_variants,"
7772 TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7773 
7774 if test "x$TEST_VARIANTS" != "x,"; then
7775    as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7776 fi
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7778 $as_echo "$with_jvm_variants" >&6; }
7779 
7780 JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7781 JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7782 JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7783 JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7784 JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7785 JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7786 
7787 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7788     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7789         as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7790     fi
7791 fi
7792 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7793     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7794         as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7795     fi
7796 fi
7797 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7798     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7799         as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7800     fi
7801 fi
7802 
7803 # Replace the commas with AND for use in the build directory name.
7804 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7805 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/'`
7806 if test "x$COUNT_VARIANTS" != "x,1"; then
7807     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7808 else
7809     BUILDING_MULTIPLE_JVM_VARIANTS=no
7810 fi
7811 
7812 
7813 
7814 
7815 
7816 
7817 
7818 
7819 
7820 INCLUDE_SA=true
7821 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7822     INCLUDE_SA=false
7823 fi
7824 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7825     INCLUDE_SA=false
7826 fi
7827 
7828 
7829 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7830    MACOSX_UNIVERSAL="true"
7831 fi
7832 
7833 
7834 
7835 
7836 
7837 ###############################################################################
7838 #
7839 # Set the debug level
7840 #    release: no debug information, all optimizations, no asserts.
7841 #    fastdebug: debug information (-g), all optimizations, all asserts
7842 #    slowdebug: debug information (-g), no optimizations, all asserts
7843 #
7844 DEBUG_LEVEL="release"
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7846 $as_echo_n "checking which debug level to use... " >&6; }
7847 # Check whether --enable-debug was given.
7848 if test "${enable_debug+set}" = set; then :
7849   enableval=$enable_debug;
7850         ENABLE_DEBUG="${enableval}"
7851         DEBUG_LEVEL="fastdebug"
7852 
7853 else
7854   ENABLE_DEBUG="no"
7855 fi
7856 
7857 
7858 
7859 # Check whether --with-debug-level was given.
7860 if test "${with_debug_level+set}" = set; then :
7861   withval=$with_debug_level;
7862         DEBUG_LEVEL="${withval}"
7863         if test "x$ENABLE_DEBUG" = xyes; then
7864                         as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7865         fi
7866 
7867 fi
7868 
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7870 $as_echo "$DEBUG_LEVEL" >&6; }
7871 
7872 if test "x$DEBUG_LEVEL" != xrelease && \
7873    test "x$DEBUG_LEVEL" != xfastdebug && \
7874    test "x$DEBUG_LEVEL" != xslowdebug; then
7875    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7876 fi
7877 
7878 
7879 ###############################################################################
7880 #
7881 # Setup legacy vars/targets and new vars to deal with different debug levels.
7882 #
7883 
7884 case $DEBUG_LEVEL in
7885       release )
7886           VARIANT="OPT"
7887           FASTDEBUG="false"
7888           DEBUG_CLASSFILES="false"
7889           BUILD_VARIANT_RELEASE=""
7890           HOTSPOT_DEBUG_LEVEL="product"
7891           HOTSPOT_EXPORT="product"
7892            ;;
7893       fastdebug )
7894           VARIANT="DBG"
7895           FASTDEBUG="true"
7896           DEBUG_CLASSFILES="true"
7897           BUILD_VARIANT_RELEASE="-fastdebug"
7898           HOTSPOT_DEBUG_LEVEL="fastdebug"
7899           HOTSPOT_EXPORT="fastdebug"
7900            ;;
7901       slowdebug )
7902           VARIANT="DBG"
7903           FASTDEBUG="false"
7904           DEBUG_CLASSFILES="true"
7905           BUILD_VARIANT_RELEASE="-debug"
7906           HOTSPOT_DEBUG_LEVEL="jvmg"
7907           HOTSPOT_EXPORT="debug"
7908            ;;
7909 esac
7910 
7911 #####
7912 # Generate the legacy makefile targets for hotspot.
7913 # The hotspot api for selecting the build artifacts, really, needs to be improved.
7914 # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7915 # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7916 # But until then ...
7917 HOTSPOT_TARGET=""
7918 
7919 if test "x$JVM_VARIANT_SERVER" = xtrue; then
7920     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7921 fi
7922 
7923 if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7924     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7925 fi
7926 
7927 if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7928     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7929 fi
7930 
7931 if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7932     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7933 fi
7934 
7935 if test "x$JVM_VARIANT_ZERO" = xtrue; then
7936     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7937 fi
7938 
7939 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7940     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7941 fi
7942 
7943 HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7944 
7945 # On Macosx universal binaries are produced, but they only contain
7946 # 64 bit intel. This invalidates control of which jvms are built
7947 # from configure, but only server is valid anyway. Fix this
7948 # when hotspot makefiles are rewritten.
7949 if test "x$MACOSX_UNIVERSAL" = xtrue; then
7950     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7951 fi
7952 
7953 #####
7954 
7955 
7956 
7957 
7958 
7959 
7960 
7961 
7962 # With basic setup done, call the custom early hook.
7963 
7964 
7965 # To properly create a configuration name, we need to have the OpenJDK target
7966 # and options (variants and debug level) parsed.
7967 
7968 
7969 
7970 # Check whether --with-conf-name was given.
7971 if test "${with_conf_name+set}" = set; then :
7972   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7973 fi
7974 
7975 
7976 # Test from where we are running configure, in or outside of src root.
7977 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
7978         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
7979         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7980     # We are running configure from the src root.
7981     # Create a default ./build/target-variant-debuglevel output root.
7982     if test "x${CONF_NAME}" = x; then
7983         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7984     fi
7985     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7986     $MKDIR -p "$OUTPUT_ROOT"
7987     if test ! -d "$OUTPUT_ROOT"; then
7988         as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7989     fi
7990 else
7991     # We are running configure from outside of the src dir.
7992     # Then use the current directory as output dir!
7993     # If configuration is situated in normal build directory, just use the build
7994     # directory name as configuration name, otherwise use the complete path.
7995     if test "x${CONF_NAME}" = x; then
7996         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7997     fi
7998     OUTPUT_ROOT="$CURDIR"
7999 
8000     # WARNING: This might be a bad thing to do. You need to be sure you want to
8001     # have a configuration in this directory. Do some sanity checks!
8002 
8003     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8004       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8005       # other files
8006       files_present=`$LS $OUTPUT_ROOT`
8007       # Configure has already touched config.log and confdefs.h in the current dir when this check
8008       # is performed.
8009       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8010                                              | $TR -d '\n'`
8011       if test "x$filtered_files" != x; then
8012         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8013 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8014         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8015 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8016         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8017 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8018         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8019 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8020         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8021 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8022         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8023 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8024         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8025 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8026         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8027       fi
8028     fi
8029 fi
8030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8031 $as_echo_n "checking what configuration name to use... " >&6; }
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8033 $as_echo "$CONF_NAME" >&6; }
8034 
8035 
8036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8037 
8038   # Input might be given as Windows format, start by converting to
8039   # unix format.
8040   path="$OUTPUT_ROOT"
8041   new_path=`$CYGPATH -u "$path"`
8042 
8043   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8044   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8045   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8046   # "foo.exe" is OK but "foo" is an error.
8047   #
8048   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8049   # It is also a way to make sure we got the proper file name for the real test later on.
8050   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8051   if test "x$test_shortpath" = x; then
8052     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8053 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8054     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8055   fi
8056 
8057   # Call helper function which possibly converts this using DOS-style short mode.
8058   # If so, the updated path is stored in $new_path.
8059 
8060   input_path="$new_path"
8061   # Check if we need to convert this using DOS-style short mode. If the path
8062   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8063   # take no chances and rewrite it.
8064   # Note: m4 eats our [], so we need to use [ and ] instead.
8065   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8066   if test "x$has_forbidden_chars" != x; then
8067     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8068     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8069     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8070     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8071       # Going to short mode and back again did indeed matter. Since short mode is
8072       # case insensitive, let's make it lowercase to improve readability.
8073       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8074       # Now convert it back to Unix-stile (cygpath)
8075       input_path=`$CYGPATH -u "$shortmode_path"`
8076       new_path="$input_path"
8077     fi
8078   fi
8079 
8080   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8081   if test "x$test_cygdrive_prefix" = x; then
8082     # As a simple fix, exclude /usr/bin since it's not a real path.
8083     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8084       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8085       # a path prefixed by /cygdrive for fixpath to work.
8086       new_path="$CYGWIN_ROOT_PATH$input_path"
8087     fi
8088   fi
8089 
8090 
8091   if test "x$path" != "x$new_path"; then
8092     OUTPUT_ROOT="$new_path"
8093     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8094 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8095   fi
8096 
8097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8098 
8099   path="$OUTPUT_ROOT"
8100   has_colon=`$ECHO $path | $GREP ^.:`
8101   new_path="$path"
8102   if test "x$has_colon" = x; then
8103     # Not in mixed or Windows style, start by that.
8104     new_path=`cmd //c echo $path`
8105   fi
8106 
8107 
8108   input_path="$new_path"
8109   # Check if we need to convert this using DOS-style short mode. If the path
8110   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8111   # take no chances and rewrite it.
8112   # Note: m4 eats our [], so we need to use [ and ] instead.
8113   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8114   if test "x$has_forbidden_chars" != x; then
8115     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8116     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8117   fi
8118 
8119 
8120   windows_path="$new_path"
8121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8122     unix_path=`$CYGPATH -u "$windows_path"`
8123     new_path="$unix_path"
8124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8126     new_path="$unix_path"
8127   fi
8128 
8129   if test "x$path" != "x$new_path"; then
8130     OUTPUT_ROOT="$new_path"
8131     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8132 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8133   fi
8134 
8135   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8136   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8137 
8138   else
8139     # We're on a posix platform. Hooray! :)
8140     path="$OUTPUT_ROOT"
8141     has_space=`$ECHO "$path" | $GREP " "`
8142     if test "x$has_space" != x; then
8143       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8144 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8145       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8146     fi
8147 
8148     # Use eval to expand a potential ~
8149     eval path="$path"
8150     if test ! -f "$path" && test ! -d "$path"; then
8151       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8152     fi
8153 
8154     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8155   fi
8156 
8157 
8158 SPEC=$OUTPUT_ROOT/spec.gmk
8159 
8160 CONF_NAME=$CONF_NAME
8161 
8162 OUTPUT_ROOT=$OUTPUT_ROOT
8163 
8164 
8165 # Most of the probed defines are put into config.h
8166 ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8167 
8168 # The spec.gmk file contains all variables for the make system.
8169 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8170 
8171 # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8172 ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8173 
8174 # The bootcycle-spec.gmk file contains support for boot cycle builds.
8175 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8176 
8177 # The compare.sh is used to compare the build output to other builds.
8178 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8179 
8180 # Spec.sh is currently used by compare-objects.sh
8181 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8182 
8183 # The generated Makefile knows where the spec.gmk is and where the source is.
8184 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8185 # which will look for generated configurations
8186 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8187 
8188 
8189 # Save the arguments given to us
8190 echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8191 
8192 
8193 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8194 
8195     for ac_prog in apt-get yum port pkgutil pkgadd
8196 do
8197   # Extract the first word of "$ac_prog", so it can be a program name with args.
8198 set dummy $ac_prog; ac_word=$2
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8200 $as_echo_n "checking for $ac_word... " >&6; }
8201 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8202   $as_echo_n "(cached) " >&6
8203 else
8204   if test -n "$PKGHANDLER"; then
8205   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8206 else
8207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8208 for as_dir in $PATH
8209 do
8210   IFS=$as_save_IFS
8211   test -z "$as_dir" && as_dir=.
8212     for ac_exec_ext in '' $ac_executable_extensions; do
8213   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8214     ac_cv_prog_PKGHANDLER="$ac_prog"
8215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8216     break 2
8217   fi
8218 done
8219   done
8220 IFS=$as_save_IFS
8221 
8222 fi
8223 fi
8224 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8225 if test -n "$PKGHANDLER"; then
8226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8227 $as_echo "$PKGHANDLER" >&6; }
8228 else
8229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8230 $as_echo "no" >&6; }
8231 fi
8232 
8233 
8234   test -n "$PKGHANDLER" && break
8235 done
8236 
8237 
8238 
8239 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8240 
8241 
8242   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8243   if test "x$MAKE" != x; then
8244     # User has supplied a make, test it.
8245     if test ! -f "$MAKE"; then
8246       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8247     fi
8248 
8249   MAKE_CANDIDATE=""$MAKE""
8250   DESCRIPTION="user supplied MAKE=$MAKE"
8251   if test "x$MAKE_CANDIDATE" != x; then
8252     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8253 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8254     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8255     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8256     if test "x$IS_GNU_MAKE" = x; then
8257       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8258 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8259     else
8260       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8261       if test "x$IS_MODERN_MAKE" = x; then
8262         { $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
8263 $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;}
8264       else
8265         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8266           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8267             MAKE_EXPECTED_ENV='cygwin'
8268           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8269             MAKE_EXPECTED_ENV='msys'
8270           else
8271             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8272           fi
8273           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8274           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8275         else
8276           # Not relevant for non-Windows
8277           IS_MAKE_CORRECT_ENV=true
8278         fi
8279         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8280           { $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
8281 $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;}
8282         else
8283           FOUND_MAKE=$MAKE_CANDIDATE
8284 
8285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8286 
8287   # First separate the path from the arguments. This will split at the first
8288   # space.
8289   complete="$FOUND_MAKE"
8290   path="${complete%% *}"
8291   tmp="$complete EOL"
8292   arguments="${tmp#* }"
8293 
8294   # Input might be given as Windows format, start by converting to
8295   # unix format.
8296   new_path=`$CYGPATH -u "$path"`
8297 
8298   # Now try to locate executable using which
8299   new_path=`$WHICH "$new_path" 2> /dev/null`
8300   # bat and cmd files are not always considered executable in cygwin causing which
8301   # to not find them
8302   if test "x$new_path" = x \
8303            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8304            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8305     new_path=`$CYGPATH -u "$path"`
8306   fi
8307   if test "x$new_path" = x; then
8308     # Oops. Which didn't find the executable.
8309     # The splitting of arguments from the executable at a space might have been incorrect,
8310     # since paths with space are more likely in Windows. Give it another try with the whole
8311     # argument.
8312     path="$complete"
8313     arguments="EOL"
8314     new_path=`$CYGPATH -u "$path"`
8315     new_path=`$WHICH "$new_path" 2> /dev/null`
8316     # bat and cmd files are not always considered executable in cygwin causing which
8317     # to not find them
8318     if test "x$new_path" = x \
8319              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8320              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8321       new_path=`$CYGPATH -u "$path"`
8322     fi
8323     if test "x$new_path" = x; then
8324       # It's still not found. Now this is an unrecoverable error.
8325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8326 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8327       has_space=`$ECHO "$complete" | $GREP " "`
8328       if test "x$has_space" != x; then
8329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8331       fi
8332       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8333     fi
8334   fi
8335 
8336   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8337   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8338   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8339   # "foo.exe" is OK but "foo" is an error.
8340   #
8341   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8342   # It is also a way to make sure we got the proper file name for the real test later on.
8343   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8344   if test "x$test_shortpath" = x; then
8345     # Short path failed, file does not exist as specified.
8346     # Try adding .exe or .cmd
8347     if test -f "${new_path}.exe"; then
8348        input_to_shortpath="${new_path}.exe"
8349     elif test -f "${new_path}.cmd"; then
8350        input_to_shortpath="${new_path}.cmd"
8351     else
8352       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8353 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8354       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8355 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8356       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8357     fi
8358   else
8359     input_to_shortpath="$new_path"
8360   fi
8361 
8362   # Call helper function which possibly converts this using DOS-style short mode.
8363   # If so, the updated path is stored in $new_path.
8364   new_path="$input_to_shortpath"
8365 
8366   input_path="$input_to_shortpath"
8367   # Check if we need to convert this using DOS-style short mode. If the path
8368   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8369   # take no chances and rewrite it.
8370   # Note: m4 eats our [], so we need to use [ and ] instead.
8371   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8372   if test "x$has_forbidden_chars" != x; then
8373     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8374     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8375     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8376     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8377       # Going to short mode and back again did indeed matter. Since short mode is
8378       # case insensitive, let's make it lowercase to improve readability.
8379       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8380       # Now convert it back to Unix-stile (cygpath)
8381       input_path=`$CYGPATH -u "$shortmode_path"`
8382       new_path="$input_path"
8383     fi
8384   fi
8385 
8386   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8387   if test "x$test_cygdrive_prefix" = x; then
8388     # As a simple fix, exclude /usr/bin since it's not a real path.
8389     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8390       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8391       # a path prefixed by /cygdrive for fixpath to work.
8392       new_path="$CYGWIN_ROOT_PATH$input_path"
8393     fi
8394   fi
8395 
8396   # remove trailing .exe if any
8397   new_path="${new_path/%.exe/}"
8398 
8399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8400 
8401   # First separate the path from the arguments. This will split at the first
8402   # space.
8403   complete="$FOUND_MAKE"
8404   path="${complete%% *}"
8405   tmp="$complete EOL"
8406   arguments="${tmp#* }"
8407 
8408   # Input might be given as Windows format, start by converting to
8409   # unix format.
8410   new_path="$path"
8411 
8412   windows_path="$new_path"
8413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8414     unix_path=`$CYGPATH -u "$windows_path"`
8415     new_path="$unix_path"
8416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8418     new_path="$unix_path"
8419   fi
8420 
8421 
8422   # Now try to locate executable using which
8423   new_path=`$WHICH "$new_path" 2> /dev/null`
8424 
8425   if test "x$new_path" = x; then
8426     # Oops. Which didn't find the executable.
8427     # The splitting of arguments from the executable at a space might have been incorrect,
8428     # since paths with space are more likely in Windows. Give it another try with the whole
8429     # argument.
8430     path="$complete"
8431     arguments="EOL"
8432     new_path="$path"
8433 
8434   windows_path="$new_path"
8435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8436     unix_path=`$CYGPATH -u "$windows_path"`
8437     new_path="$unix_path"
8438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8440     new_path="$unix_path"
8441   fi
8442 
8443 
8444     new_path=`$WHICH "$new_path" 2> /dev/null`
8445 
8446     if test "x$new_path" = x; then
8447       # It's still not found. Now this is an unrecoverable error.
8448       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8449 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8450       has_space=`$ECHO "$complete" | $GREP " "`
8451       if test "x$has_space" != x; then
8452         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8453 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8454       fi
8455       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8456     fi
8457   fi
8458 
8459   # Now new_path has a complete unix path to the binary
8460   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8461     # Keep paths in /bin as-is, but remove trailing .exe if any
8462     new_path="${new_path/%.exe/}"
8463     # Do not save /bin paths to all_fixpath_prefixes!
8464   else
8465     # Not in mixed or Windows style, start by that.
8466     new_path=`cmd //c echo $new_path`
8467 
8468   input_path="$new_path"
8469   # Check if we need to convert this using DOS-style short mode. If the path
8470   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8471   # take no chances and rewrite it.
8472   # Note: m4 eats our [], so we need to use [ and ] instead.
8473   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8474   if test "x$has_forbidden_chars" != x; then
8475     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8476     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8477   fi
8478 
8479     # Output is in $new_path
8480 
8481   windows_path="$new_path"
8482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8483     unix_path=`$CYGPATH -u "$windows_path"`
8484     new_path="$unix_path"
8485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8487     new_path="$unix_path"
8488   fi
8489 
8490     # remove trailing .exe if any
8491     new_path="${new_path/%.exe/}"
8492 
8493     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8494     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8495   fi
8496 
8497   else
8498     # We're on a posix platform. Hooray! :)
8499     # First separate the path from the arguments. This will split at the first
8500     # space.
8501     complete="$FOUND_MAKE"
8502     path="${complete%% *}"
8503     tmp="$complete EOL"
8504     arguments="${tmp#* }"
8505 
8506     # Cannot rely on the command "which" here since it doesn't always work.
8507     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8508     if test -z "$is_absolute_path"; then
8509       # Path to executable is not absolute. Find it.
8510       IFS_save="$IFS"
8511       IFS=:
8512       for p in $PATH; do
8513         if test -f "$p/$path" && test -x "$p/$path"; then
8514           new_path="$p/$path"
8515           break
8516         fi
8517       done
8518       IFS="$IFS_save"
8519     else
8520       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8521 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8522       new_path="$path"
8523     fi
8524 
8525     if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
8531 $as_echo "$as_me: This might be caused by spaces in the path, 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       # Now join together the path and the arguments once again
8538       if test "x$arguments" != xEOL; then
8539         new_complete="$new_path ${arguments% *}"
8540       else
8541         new_complete="$new_path"
8542       fi
8543 
8544   if test "x$complete" != "x$new_complete"; then
8545       FOUND_MAKE="$new_complete"
8546       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8547 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8548     fi
8549 
8550         fi
8551       fi
8552     fi
8553   fi
8554 
8555     if test "x$FOUND_MAKE" = x; then
8556       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8557     fi
8558   else
8559     # Try our hardest to locate a correct version of GNU make
8560     for ac_prog in gmake
8561 do
8562   # Extract the first word of "$ac_prog", so it can be a program name with args.
8563 set dummy $ac_prog; ac_word=$2
8564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8565 $as_echo_n "checking for $ac_word... " >&6; }
8566 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8567   $as_echo_n "(cached) " >&6
8568 else
8569   case $CHECK_GMAKE in
8570   [\\/]* | ?:[\\/]*)
8571   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8572   ;;
8573   *)
8574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8575 for as_dir in $PATH
8576 do
8577   IFS=$as_save_IFS
8578   test -z "$as_dir" && as_dir=.
8579     for ac_exec_ext in '' $ac_executable_extensions; do
8580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8581     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8583     break 2
8584   fi
8585 done
8586   done
8587 IFS=$as_save_IFS
8588 
8589   ;;
8590 esac
8591 fi
8592 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8593 if test -n "$CHECK_GMAKE"; then
8594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8595 $as_echo "$CHECK_GMAKE" >&6; }
8596 else
8597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8598 $as_echo "no" >&6; }
8599 fi
8600 
8601 
8602   test -n "$CHECK_GMAKE" && break
8603 done
8604 
8605 
8606   MAKE_CANDIDATE=""$CHECK_GMAKE""
8607   DESCRIPTION="gmake in PATH"
8608   if test "x$MAKE_CANDIDATE" != x; then
8609     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8610 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8611     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8612     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8613     if test "x$IS_GNU_MAKE" = x; then
8614       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8615 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8616     else
8617       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8618       if test "x$IS_MODERN_MAKE" = x; then
8619         { $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
8620 $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;}
8621       else
8622         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8623           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8624             MAKE_EXPECTED_ENV='cygwin'
8625           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8626             MAKE_EXPECTED_ENV='msys'
8627           else
8628             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8629           fi
8630           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8631           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8632         else
8633           # Not relevant for non-Windows
8634           IS_MAKE_CORRECT_ENV=true
8635         fi
8636         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8637           { $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
8638 $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;}
8639         else
8640           FOUND_MAKE=$MAKE_CANDIDATE
8641 
8642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8643 
8644   # First separate the path from the arguments. This will split at the first
8645   # space.
8646   complete="$FOUND_MAKE"
8647   path="${complete%% *}"
8648   tmp="$complete EOL"
8649   arguments="${tmp#* }"
8650 
8651   # Input might be given as Windows format, start by converting to
8652   # unix format.
8653   new_path=`$CYGPATH -u "$path"`
8654 
8655   # Now try to locate executable using which
8656   new_path=`$WHICH "$new_path" 2> /dev/null`
8657   # bat and cmd files are not always considered executable in cygwin causing which
8658   # to not find them
8659   if test "x$new_path" = x \
8660            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8661            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8662     new_path=`$CYGPATH -u "$path"`
8663   fi
8664   if test "x$new_path" = x; then
8665     # Oops. Which didn't find the executable.
8666     # The splitting of arguments from the executable at a space might have been incorrect,
8667     # since paths with space are more likely in Windows. Give it another try with the whole
8668     # argument.
8669     path="$complete"
8670     arguments="EOL"
8671     new_path=`$CYGPATH -u "$path"`
8672     new_path=`$WHICH "$new_path" 2> /dev/null`
8673     # bat and cmd files are not always considered executable in cygwin causing which
8674     # to not find them
8675     if test "x$new_path" = x \
8676              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8677              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8678       new_path=`$CYGPATH -u "$path"`
8679     fi
8680     if test "x$new_path" = x; then
8681       # It's still not found. Now this is an unrecoverable error.
8682       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8683 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8684       has_space=`$ECHO "$complete" | $GREP " "`
8685       if test "x$has_space" != x; then
8686         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8687 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8688       fi
8689       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8690     fi
8691   fi
8692 
8693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8696   # "foo.exe" is OK but "foo" is an error.
8697   #
8698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8699   # It is also a way to make sure we got the proper file name for the real test later on.
8700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8701   if test "x$test_shortpath" = x; then
8702     # Short path failed, file does not exist as specified.
8703     # Try adding .exe or .cmd
8704     if test -f "${new_path}.exe"; then
8705        input_to_shortpath="${new_path}.exe"
8706     elif test -f "${new_path}.cmd"; then
8707        input_to_shortpath="${new_path}.cmd"
8708     else
8709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8710 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8711       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8712 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8713       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8714     fi
8715   else
8716     input_to_shortpath="$new_path"
8717   fi
8718 
8719   # Call helper function which possibly converts this using DOS-style short mode.
8720   # If so, the updated path is stored in $new_path.
8721   new_path="$input_to_shortpath"
8722 
8723   input_path="$input_to_shortpath"
8724   # Check if we need to convert this using DOS-style short mode. If the path
8725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8726   # take no chances and rewrite it.
8727   # Note: m4 eats our [], so we need to use [ and ] instead.
8728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8729   if test "x$has_forbidden_chars" != x; then
8730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8734       # Going to short mode and back again did indeed matter. Since short mode is
8735       # case insensitive, let's make it lowercase to improve readability.
8736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8737       # Now convert it back to Unix-stile (cygpath)
8738       input_path=`$CYGPATH -u "$shortmode_path"`
8739       new_path="$input_path"
8740     fi
8741   fi
8742 
8743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8744   if test "x$test_cygdrive_prefix" = x; then
8745     # As a simple fix, exclude /usr/bin since it's not a real path.
8746     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8748       # a path prefixed by /cygdrive for fixpath to work.
8749       new_path="$CYGWIN_ROOT_PATH$input_path"
8750     fi
8751   fi
8752 
8753   # remove trailing .exe if any
8754   new_path="${new_path/%.exe/}"
8755 
8756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8757 
8758   # First separate the path from the arguments. This will split at the first
8759   # space.
8760   complete="$FOUND_MAKE"
8761   path="${complete%% *}"
8762   tmp="$complete EOL"
8763   arguments="${tmp#* }"
8764 
8765   # Input might be given as Windows format, start by converting to
8766   # unix format.
8767   new_path="$path"
8768 
8769   windows_path="$new_path"
8770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8771     unix_path=`$CYGPATH -u "$windows_path"`
8772     new_path="$unix_path"
8773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8775     new_path="$unix_path"
8776   fi
8777 
8778 
8779   # Now try to locate executable using which
8780   new_path=`$WHICH "$new_path" 2> /dev/null`
8781 
8782   if test "x$new_path" = x; then
8783     # Oops. Which didn't find the executable.
8784     # The splitting of arguments from the executable at a space might have been incorrect,
8785     # since paths with space are more likely in Windows. Give it another try with the whole
8786     # argument.
8787     path="$complete"
8788     arguments="EOL"
8789     new_path="$path"
8790 
8791   windows_path="$new_path"
8792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8793     unix_path=`$CYGPATH -u "$windows_path"`
8794     new_path="$unix_path"
8795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8797     new_path="$unix_path"
8798   fi
8799 
8800 
8801     new_path=`$WHICH "$new_path" 2> /dev/null`
8802 
8803     if test "x$new_path" = x; then
8804       # It's still not found. Now this is an unrecoverable error.
8805       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8806 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8807       has_space=`$ECHO "$complete" | $GREP " "`
8808       if test "x$has_space" != x; then
8809         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8810 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8811       fi
8812       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8813     fi
8814   fi
8815 
8816   # Now new_path has a complete unix path to the binary
8817   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8818     # Keep paths in /bin as-is, but remove trailing .exe if any
8819     new_path="${new_path/%.exe/}"
8820     # Do not save /bin paths to all_fixpath_prefixes!
8821   else
8822     # Not in mixed or Windows style, start by that.
8823     new_path=`cmd //c echo $new_path`
8824 
8825   input_path="$new_path"
8826   # Check if we need to convert this using DOS-style short mode. If the path
8827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8828   # take no chances and rewrite it.
8829   # Note: m4 eats our [], so we need to use [ and ] instead.
8830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8831   if test "x$has_forbidden_chars" != x; then
8832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8833     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8834   fi
8835 
8836     # Output is in $new_path
8837 
8838   windows_path="$new_path"
8839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8840     unix_path=`$CYGPATH -u "$windows_path"`
8841     new_path="$unix_path"
8842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8844     new_path="$unix_path"
8845   fi
8846 
8847     # remove trailing .exe if any
8848     new_path="${new_path/%.exe/}"
8849 
8850     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8851     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8852   fi
8853 
8854   else
8855     # We're on a posix platform. Hooray! :)
8856     # First separate the path from the arguments. This will split at the first
8857     # space.
8858     complete="$FOUND_MAKE"
8859     path="${complete%% *}"
8860     tmp="$complete EOL"
8861     arguments="${tmp#* }"
8862 
8863     # Cannot rely on the command "which" here since it doesn't always work.
8864     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8865     if test -z "$is_absolute_path"; then
8866       # Path to executable is not absolute. Find it.
8867       IFS_save="$IFS"
8868       IFS=:
8869       for p in $PATH; do
8870         if test -f "$p/$path" && test -x "$p/$path"; then
8871           new_path="$p/$path"
8872           break
8873         fi
8874       done
8875       IFS="$IFS_save"
8876     else
8877       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8878 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8879       new_path="$path"
8880     fi
8881 
8882     if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
8888 $as_echo "$as_me: This might be caused by spaces in the path, 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       # Now join together the path and the arguments once again
8895       if test "x$arguments" != xEOL; then
8896         new_complete="$new_path ${arguments% *}"
8897       else
8898         new_complete="$new_path"
8899       fi
8900 
8901   if test "x$complete" != "x$new_complete"; then
8902       FOUND_MAKE="$new_complete"
8903       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8904 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8905     fi
8906 
8907         fi
8908       fi
8909     fi
8910   fi
8911 
8912 
8913     if test "x$FOUND_MAKE" = x; then
8914       for ac_prog in make
8915 do
8916   # Extract the first word of "$ac_prog", so it can be a program name with args.
8917 set dummy $ac_prog; ac_word=$2
8918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8919 $as_echo_n "checking for $ac_word... " >&6; }
8920 if ${ac_cv_path_CHECK_MAKE+:} false; then :
8921   $as_echo_n "(cached) " >&6
8922 else
8923   case $CHECK_MAKE in
8924   [\\/]* | ?:[\\/]*)
8925   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8926   ;;
8927   *)
8928   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8929 for as_dir in $PATH
8930 do
8931   IFS=$as_save_IFS
8932   test -z "$as_dir" && as_dir=.
8933     for ac_exec_ext in '' $ac_executable_extensions; do
8934   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8935     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8936     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8937     break 2
8938   fi
8939 done
8940   done
8941 IFS=$as_save_IFS
8942 
8943   ;;
8944 esac
8945 fi
8946 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8947 if test -n "$CHECK_MAKE"; then
8948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8949 $as_echo "$CHECK_MAKE" >&6; }
8950 else
8951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8952 $as_echo "no" >&6; }
8953 fi
8954 
8955 
8956   test -n "$CHECK_MAKE" && break
8957 done
8958 
8959 
8960   MAKE_CANDIDATE=""$CHECK_MAKE""
8961   DESCRIPTION="make in PATH"
8962   if test "x$MAKE_CANDIDATE" != x; then
8963     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8964 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8965     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8966     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8967     if test "x$IS_GNU_MAKE" = x; then
8968       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8969 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8970     else
8971       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8972       if test "x$IS_MODERN_MAKE" = x; then
8973         { $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
8974 $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;}
8975       else
8976         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8977           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8978             MAKE_EXPECTED_ENV='cygwin'
8979           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8980             MAKE_EXPECTED_ENV='msys'
8981           else
8982             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8983           fi
8984           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8985           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8986         else
8987           # Not relevant for non-Windows
8988           IS_MAKE_CORRECT_ENV=true
8989         fi
8990         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8991           { $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
8992 $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;}
8993         else
8994           FOUND_MAKE=$MAKE_CANDIDATE
8995 
8996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8997 
8998   # First separate the path from the arguments. This will split at the first
8999   # space.
9000   complete="$FOUND_MAKE"
9001   path="${complete%% *}"
9002   tmp="$complete EOL"
9003   arguments="${tmp#* }"
9004 
9005   # Input might be given as Windows format, start by converting to
9006   # unix format.
9007   new_path=`$CYGPATH -u "$path"`
9008 
9009   # Now try to locate executable using which
9010   new_path=`$WHICH "$new_path" 2> /dev/null`
9011   # bat and cmd files are not always considered executable in cygwin causing which
9012   # to not find them
9013   if test "x$new_path" = x \
9014            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9015            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9016     new_path=`$CYGPATH -u "$path"`
9017   fi
9018   if test "x$new_path" = x; then
9019     # Oops. Which didn't find the executable.
9020     # The splitting of arguments from the executable at a space might have been incorrect,
9021     # since paths with space are more likely in Windows. Give it another try with the whole
9022     # argument.
9023     path="$complete"
9024     arguments="EOL"
9025     new_path=`$CYGPATH -u "$path"`
9026     new_path=`$WHICH "$new_path" 2> /dev/null`
9027     # bat and cmd files are not always considered executable in cygwin causing which
9028     # to not find them
9029     if test "x$new_path" = x \
9030              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9031              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9032       new_path=`$CYGPATH -u "$path"`
9033     fi
9034     if test "x$new_path" = x; then
9035       # It's still not found. Now this is an unrecoverable error.
9036       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9037 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9038       has_space=`$ECHO "$complete" | $GREP " "`
9039       if test "x$has_space" != x; then
9040         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9041 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9042       fi
9043       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9044     fi
9045   fi
9046 
9047   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9048   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9049   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9050   # "foo.exe" is OK but "foo" is an error.
9051   #
9052   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9053   # It is also a way to make sure we got the proper file name for the real test later on.
9054   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9055   if test "x$test_shortpath" = x; then
9056     # Short path failed, file does not exist as specified.
9057     # Try adding .exe or .cmd
9058     if test -f "${new_path}.exe"; then
9059        input_to_shortpath="${new_path}.exe"
9060     elif test -f "${new_path}.cmd"; then
9061        input_to_shortpath="${new_path}.cmd"
9062     else
9063       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9064 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9065       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9066 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9067       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9068     fi
9069   else
9070     input_to_shortpath="$new_path"
9071   fi
9072 
9073   # Call helper function which possibly converts this using DOS-style short mode.
9074   # If so, the updated path is stored in $new_path.
9075   new_path="$input_to_shortpath"
9076 
9077   input_path="$input_to_shortpath"
9078   # Check if we need to convert this using DOS-style short mode. If the path
9079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9080   # take no chances and rewrite it.
9081   # Note: m4 eats our [], so we need to use [ and ] instead.
9082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9083   if test "x$has_forbidden_chars" != x; then
9084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9085     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9086     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9087     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9088       # Going to short mode and back again did indeed matter. Since short mode is
9089       # case insensitive, let's make it lowercase to improve readability.
9090       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9091       # Now convert it back to Unix-stile (cygpath)
9092       input_path=`$CYGPATH -u "$shortmode_path"`
9093       new_path="$input_path"
9094     fi
9095   fi
9096 
9097   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9098   if test "x$test_cygdrive_prefix" = x; then
9099     # As a simple fix, exclude /usr/bin since it's not a real path.
9100     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9101       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9102       # a path prefixed by /cygdrive for fixpath to work.
9103       new_path="$CYGWIN_ROOT_PATH$input_path"
9104     fi
9105   fi
9106 
9107   # remove trailing .exe if any
9108   new_path="${new_path/%.exe/}"
9109 
9110   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9111 
9112   # First separate the path from the arguments. This will split at the first
9113   # space.
9114   complete="$FOUND_MAKE"
9115   path="${complete%% *}"
9116   tmp="$complete EOL"
9117   arguments="${tmp#* }"
9118 
9119   # Input might be given as Windows format, start by converting to
9120   # unix format.
9121   new_path="$path"
9122 
9123   windows_path="$new_path"
9124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9125     unix_path=`$CYGPATH -u "$windows_path"`
9126     new_path="$unix_path"
9127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9129     new_path="$unix_path"
9130   fi
9131 
9132 
9133   # Now try to locate executable using which
9134   new_path=`$WHICH "$new_path" 2> /dev/null`
9135 
9136   if test "x$new_path" = x; then
9137     # Oops. Which didn't find the executable.
9138     # The splitting of arguments from the executable at a space might have been incorrect,
9139     # since paths with space are more likely in Windows. Give it another try with the whole
9140     # argument.
9141     path="$complete"
9142     arguments="EOL"
9143     new_path="$path"
9144 
9145   windows_path="$new_path"
9146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9147     unix_path=`$CYGPATH -u "$windows_path"`
9148     new_path="$unix_path"
9149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9151     new_path="$unix_path"
9152   fi
9153 
9154 
9155     new_path=`$WHICH "$new_path" 2> /dev/null`
9156 
9157     if test "x$new_path" = x; then
9158       # It's still not found. Now this is an unrecoverable error.
9159       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9160 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9161       has_space=`$ECHO "$complete" | $GREP " "`
9162       if test "x$has_space" != x; then
9163         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9164 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9165       fi
9166       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9167     fi
9168   fi
9169 
9170   # Now new_path has a complete unix path to the binary
9171   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9172     # Keep paths in /bin as-is, but remove trailing .exe if any
9173     new_path="${new_path/%.exe/}"
9174     # Do not save /bin paths to all_fixpath_prefixes!
9175   else
9176     # Not in mixed or Windows style, start by that.
9177     new_path=`cmd //c echo $new_path`
9178 
9179   input_path="$new_path"
9180   # Check if we need to convert this using DOS-style short mode. If the path
9181   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9182   # take no chances and rewrite it.
9183   # Note: m4 eats our [], so we need to use [ and ] instead.
9184   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9185   if test "x$has_forbidden_chars" != x; then
9186     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9187     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9188   fi
9189 
9190     # Output is in $new_path
9191 
9192   windows_path="$new_path"
9193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9194     unix_path=`$CYGPATH -u "$windows_path"`
9195     new_path="$unix_path"
9196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9198     new_path="$unix_path"
9199   fi
9200 
9201     # remove trailing .exe if any
9202     new_path="${new_path/%.exe/}"
9203 
9204     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9205     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9206   fi
9207 
9208   else
9209     # We're on a posix platform. Hooray! :)
9210     # First separate the path from the arguments. This will split at the first
9211     # space.
9212     complete="$FOUND_MAKE"
9213     path="${complete%% *}"
9214     tmp="$complete EOL"
9215     arguments="${tmp#* }"
9216 
9217     # Cannot rely on the command "which" here since it doesn't always work.
9218     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9219     if test -z "$is_absolute_path"; then
9220       # Path to executable is not absolute. Find it.
9221       IFS_save="$IFS"
9222       IFS=:
9223       for p in $PATH; do
9224         if test -f "$p/$path" && test -x "$p/$path"; then
9225           new_path="$p/$path"
9226           break
9227         fi
9228       done
9229       IFS="$IFS_save"
9230     else
9231       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9232 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9233       new_path="$path"
9234     fi
9235 
9236     if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
9242 $as_echo "$as_me: This might be caused by spaces in the path, 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       # Now join together the path and the arguments once again
9249       if test "x$arguments" != xEOL; then
9250         new_complete="$new_path ${arguments% *}"
9251       else
9252         new_complete="$new_path"
9253       fi
9254 
9255   if test "x$complete" != "x$new_complete"; then
9256       FOUND_MAKE="$new_complete"
9257       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9258 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9259     fi
9260 
9261         fi
9262       fi
9263     fi
9264   fi
9265 
9266     fi
9267 
9268     if test "x$FOUND_MAKE" = x; then
9269       if test "x$TOOLS_DIR" != x; then
9270         # We have a tools-dir, check that as well before giving up.
9271         OLD_PATH=$PATH
9272         PATH=$TOOLS_DIR:$PATH
9273         for ac_prog in gmake
9274 do
9275   # Extract the first word of "$ac_prog", so it can be a program name with args.
9276 set dummy $ac_prog; ac_word=$2
9277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9278 $as_echo_n "checking for $ac_word... " >&6; }
9279 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9280   $as_echo_n "(cached) " >&6
9281 else
9282   case $CHECK_TOOLSDIR_GMAKE in
9283   [\\/]* | ?:[\\/]*)
9284   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9285   ;;
9286   *)
9287   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9288 for as_dir in $PATH
9289 do
9290   IFS=$as_save_IFS
9291   test -z "$as_dir" && as_dir=.
9292     for ac_exec_ext in '' $ac_executable_extensions; do
9293   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9294     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9295     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9296     break 2
9297   fi
9298 done
9299   done
9300 IFS=$as_save_IFS
9301 
9302   ;;
9303 esac
9304 fi
9305 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9306 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9308 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9309 else
9310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9311 $as_echo "no" >&6; }
9312 fi
9313 
9314 
9315   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9316 done
9317 
9318 
9319   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9320   DESCRIPTION="gmake in tools-dir"
9321   if test "x$MAKE_CANDIDATE" != x; then
9322     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9323 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9324     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9325     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9326     if test "x$IS_GNU_MAKE" = x; then
9327       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9328 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9329     else
9330       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9331       if test "x$IS_MODERN_MAKE" = x; then
9332         { $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
9333 $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;}
9334       else
9335         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9336           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9337             MAKE_EXPECTED_ENV='cygwin'
9338           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9339             MAKE_EXPECTED_ENV='msys'
9340           else
9341             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9342           fi
9343           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9344           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9345         else
9346           # Not relevant for non-Windows
9347           IS_MAKE_CORRECT_ENV=true
9348         fi
9349         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9350           { $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
9351 $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;}
9352         else
9353           FOUND_MAKE=$MAKE_CANDIDATE
9354 
9355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9356 
9357   # First separate the path from the arguments. This will split at the first
9358   # space.
9359   complete="$FOUND_MAKE"
9360   path="${complete%% *}"
9361   tmp="$complete EOL"
9362   arguments="${tmp#* }"
9363 
9364   # Input might be given as Windows format, start by converting to
9365   # unix format.
9366   new_path=`$CYGPATH -u "$path"`
9367 
9368   # Now try to locate executable using which
9369   new_path=`$WHICH "$new_path" 2> /dev/null`
9370   # bat and cmd files are not always considered executable in cygwin causing which
9371   # to not find them
9372   if test "x$new_path" = x \
9373            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9374            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9375     new_path=`$CYGPATH -u "$path"`
9376   fi
9377   if test "x$new_path" = x; then
9378     # Oops. Which didn't find the executable.
9379     # The splitting of arguments from the executable at a space might have been incorrect,
9380     # since paths with space are more likely in Windows. Give it another try with the whole
9381     # argument.
9382     path="$complete"
9383     arguments="EOL"
9384     new_path=`$CYGPATH -u "$path"`
9385     new_path=`$WHICH "$new_path" 2> /dev/null`
9386     # bat and cmd files are not always considered executable in cygwin causing which
9387     # to not find them
9388     if test "x$new_path" = x \
9389              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9390              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9391       new_path=`$CYGPATH -u "$path"`
9392     fi
9393     if test "x$new_path" = x; then
9394       # It's still not found. Now this is an unrecoverable error.
9395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9396 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9397       has_space=`$ECHO "$complete" | $GREP " "`
9398       if test "x$has_space" != x; then
9399         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9400 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9401       fi
9402       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9403     fi
9404   fi
9405 
9406   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9407   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9408   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9409   # "foo.exe" is OK but "foo" is an error.
9410   #
9411   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9412   # It is also a way to make sure we got the proper file name for the real test later on.
9413   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9414   if test "x$test_shortpath" = x; then
9415     # Short path failed, file does not exist as specified.
9416     # Try adding .exe or .cmd
9417     if test -f "${new_path}.exe"; then
9418        input_to_shortpath="${new_path}.exe"
9419     elif test -f "${new_path}.cmd"; then
9420        input_to_shortpath="${new_path}.cmd"
9421     else
9422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9423 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9424       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9425 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9426       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9427     fi
9428   else
9429     input_to_shortpath="$new_path"
9430   fi
9431 
9432   # Call helper function which possibly converts this using DOS-style short mode.
9433   # If so, the updated path is stored in $new_path.
9434   new_path="$input_to_shortpath"
9435 
9436   input_path="$input_to_shortpath"
9437   # Check if we need to convert this using DOS-style short mode. If the path
9438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9439   # take no chances and rewrite it.
9440   # Note: m4 eats our [], so we need to use [ and ] instead.
9441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9442   if test "x$has_forbidden_chars" != x; then
9443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9444     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9445     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9446     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9447       # Going to short mode and back again did indeed matter. Since short mode is
9448       # case insensitive, let's make it lowercase to improve readability.
9449       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9450       # Now convert it back to Unix-stile (cygpath)
9451       input_path=`$CYGPATH -u "$shortmode_path"`
9452       new_path="$input_path"
9453     fi
9454   fi
9455 
9456   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9457   if test "x$test_cygdrive_prefix" = x; then
9458     # As a simple fix, exclude /usr/bin since it's not a real path.
9459     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9460       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9461       # a path prefixed by /cygdrive for fixpath to work.
9462       new_path="$CYGWIN_ROOT_PATH$input_path"
9463     fi
9464   fi
9465 
9466   # remove trailing .exe if any
9467   new_path="${new_path/%.exe/}"
9468 
9469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9470 
9471   # First separate the path from the arguments. This will split at the first
9472   # space.
9473   complete="$FOUND_MAKE"
9474   path="${complete%% *}"
9475   tmp="$complete EOL"
9476   arguments="${tmp#* }"
9477 
9478   # Input might be given as Windows format, start by converting to
9479   # unix format.
9480   new_path="$path"
9481 
9482   windows_path="$new_path"
9483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9484     unix_path=`$CYGPATH -u "$windows_path"`
9485     new_path="$unix_path"
9486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9488     new_path="$unix_path"
9489   fi
9490 
9491 
9492   # Now try to locate executable using which
9493   new_path=`$WHICH "$new_path" 2> /dev/null`
9494 
9495   if test "x$new_path" = x; then
9496     # Oops. Which didn't find the executable.
9497     # The splitting of arguments from the executable at a space might have been incorrect,
9498     # since paths with space are more likely in Windows. Give it another try with the whole
9499     # argument.
9500     path="$complete"
9501     arguments="EOL"
9502     new_path="$path"
9503 
9504   windows_path="$new_path"
9505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9506     unix_path=`$CYGPATH -u "$windows_path"`
9507     new_path="$unix_path"
9508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9510     new_path="$unix_path"
9511   fi
9512 
9513 
9514     new_path=`$WHICH "$new_path" 2> /dev/null`
9515 
9516     if test "x$new_path" = x; then
9517       # It's still not found. Now this is an unrecoverable error.
9518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9519 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9520       has_space=`$ECHO "$complete" | $GREP " "`
9521       if test "x$has_space" != x; then
9522         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9523 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9524       fi
9525       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9526     fi
9527   fi
9528 
9529   # Now new_path has a complete unix path to the binary
9530   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9531     # Keep paths in /bin as-is, but remove trailing .exe if any
9532     new_path="${new_path/%.exe/}"
9533     # Do not save /bin paths to all_fixpath_prefixes!
9534   else
9535     # Not in mixed or Windows style, start by that.
9536     new_path=`cmd //c echo $new_path`
9537 
9538   input_path="$new_path"
9539   # Check if we need to convert this using DOS-style short mode. If the path
9540   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9541   # take no chances and rewrite it.
9542   # Note: m4 eats our [], so we need to use [ and ] instead.
9543   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9544   if test "x$has_forbidden_chars" != x; then
9545     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9546     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9547   fi
9548 
9549     # Output is in $new_path
9550 
9551   windows_path="$new_path"
9552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9553     unix_path=`$CYGPATH -u "$windows_path"`
9554     new_path="$unix_path"
9555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9557     new_path="$unix_path"
9558   fi
9559 
9560     # remove trailing .exe if any
9561     new_path="${new_path/%.exe/}"
9562 
9563     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9564     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9565   fi
9566 
9567   else
9568     # We're on a posix platform. Hooray! :)
9569     # First separate the path from the arguments. This will split at the first
9570     # space.
9571     complete="$FOUND_MAKE"
9572     path="${complete%% *}"
9573     tmp="$complete EOL"
9574     arguments="${tmp#* }"
9575 
9576     # Cannot rely on the command "which" here since it doesn't always work.
9577     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9578     if test -z "$is_absolute_path"; then
9579       # Path to executable is not absolute. Find it.
9580       IFS_save="$IFS"
9581       IFS=:
9582       for p in $PATH; do
9583         if test -f "$p/$path" && test -x "$p/$path"; then
9584           new_path="$p/$path"
9585           break
9586         fi
9587       done
9588       IFS="$IFS_save"
9589     else
9590       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9591 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9592       new_path="$path"
9593     fi
9594 
9595     if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
9601 $as_echo "$as_me: This might be caused by spaces in the path, 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       # Now join together the path and the arguments once again
9608       if test "x$arguments" != xEOL; then
9609         new_complete="$new_path ${arguments% *}"
9610       else
9611         new_complete="$new_path"
9612       fi
9613 
9614   if test "x$complete" != "x$new_complete"; then
9615       FOUND_MAKE="$new_complete"
9616       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9617 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9618     fi
9619 
9620         fi
9621       fi
9622     fi
9623   fi
9624 
9625         if test "x$FOUND_MAKE" = x; then
9626           for ac_prog in make
9627 do
9628   # Extract the first word of "$ac_prog", so it can be a program name with args.
9629 set dummy $ac_prog; ac_word=$2
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631 $as_echo_n "checking for $ac_word... " >&6; }
9632 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9633   $as_echo_n "(cached) " >&6
9634 else
9635   case $CHECK_TOOLSDIR_MAKE in
9636   [\\/]* | ?:[\\/]*)
9637   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9638   ;;
9639   *)
9640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641 for as_dir in $PATH
9642 do
9643   IFS=$as_save_IFS
9644   test -z "$as_dir" && as_dir=.
9645     for ac_exec_ext in '' $ac_executable_extensions; do
9646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9647     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9649     break 2
9650   fi
9651 done
9652   done
9653 IFS=$as_save_IFS
9654 
9655   ;;
9656 esac
9657 fi
9658 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9659 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9661 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9662 else
9663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664 $as_echo "no" >&6; }
9665 fi
9666 
9667 
9668   test -n "$CHECK_TOOLSDIR_MAKE" && break
9669 done
9670 
9671 
9672   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9673   DESCRIPTION="make in tools-dir"
9674   if test "x$MAKE_CANDIDATE" != x; then
9675     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9676 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9677     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9678     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9679     if test "x$IS_GNU_MAKE" = x; then
9680       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9681 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9682     else
9683       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9684       if test "x$IS_MODERN_MAKE" = x; then
9685         { $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
9686 $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;}
9687       else
9688         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9689           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9690             MAKE_EXPECTED_ENV='cygwin'
9691           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9692             MAKE_EXPECTED_ENV='msys'
9693           else
9694             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9695           fi
9696           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9697           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9698         else
9699           # Not relevant for non-Windows
9700           IS_MAKE_CORRECT_ENV=true
9701         fi
9702         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9703           { $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
9704 $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;}
9705         else
9706           FOUND_MAKE=$MAKE_CANDIDATE
9707 
9708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9709 
9710   # First separate the path from the arguments. This will split at the first
9711   # space.
9712   complete="$FOUND_MAKE"
9713   path="${complete%% *}"
9714   tmp="$complete EOL"
9715   arguments="${tmp#* }"
9716 
9717   # Input might be given as Windows format, start by converting to
9718   # unix format.
9719   new_path=`$CYGPATH -u "$path"`
9720 
9721   # Now try to locate executable using which
9722   new_path=`$WHICH "$new_path" 2> /dev/null`
9723   # bat and cmd files are not always considered executable in cygwin causing which
9724   # to not find them
9725   if test "x$new_path" = x \
9726            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9727            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9728     new_path=`$CYGPATH -u "$path"`
9729   fi
9730   if test "x$new_path" = x; then
9731     # Oops. Which didn't find the executable.
9732     # The splitting of arguments from the executable at a space might have been incorrect,
9733     # since paths with space are more likely in Windows. Give it another try with the whole
9734     # argument.
9735     path="$complete"
9736     arguments="EOL"
9737     new_path=`$CYGPATH -u "$path"`
9738     new_path=`$WHICH "$new_path" 2> /dev/null`
9739     # bat and cmd files are not always considered executable in cygwin causing which
9740     # to not find them
9741     if test "x$new_path" = x \
9742              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9743              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9744       new_path=`$CYGPATH -u "$path"`
9745     fi
9746     if test "x$new_path" = x; then
9747       # It's still not found. Now this is an unrecoverable error.
9748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9749 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9750       has_space=`$ECHO "$complete" | $GREP " "`
9751       if test "x$has_space" != x; then
9752         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9753 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9754       fi
9755       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9756     fi
9757   fi
9758 
9759   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9760   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9761   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9762   # "foo.exe" is OK but "foo" is an error.
9763   #
9764   # This test is therefore slightly more accurate than "test -f" to check for file precense.
9765   # It is also a way to make sure we got the proper file name for the real test later on.
9766   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9767   if test "x$test_shortpath" = x; then
9768     # Short path failed, file does not exist as specified.
9769     # Try adding .exe or .cmd
9770     if test -f "${new_path}.exe"; then
9771        input_to_shortpath="${new_path}.exe"
9772     elif test -f "${new_path}.cmd"; then
9773        input_to_shortpath="${new_path}.cmd"
9774     else
9775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9776 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9777       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9778 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9779       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9780     fi
9781   else
9782     input_to_shortpath="$new_path"
9783   fi
9784 
9785   # Call helper function which possibly converts this using DOS-style short mode.
9786   # If so, the updated path is stored in $new_path.
9787   new_path="$input_to_shortpath"
9788 
9789   input_path="$input_to_shortpath"
9790   # Check if we need to convert this using DOS-style short mode. If the path
9791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9792   # take no chances and rewrite it.
9793   # Note: m4 eats our [], so we need to use [ and ] instead.
9794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9795   if test "x$has_forbidden_chars" != x; then
9796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9797     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9798     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9799     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9800       # Going to short mode and back again did indeed matter. Since short mode is
9801       # case insensitive, let's make it lowercase to improve readability.
9802       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9803       # Now convert it back to Unix-stile (cygpath)
9804       input_path=`$CYGPATH -u "$shortmode_path"`
9805       new_path="$input_path"
9806     fi
9807   fi
9808 
9809   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9810   if test "x$test_cygdrive_prefix" = x; then
9811     # As a simple fix, exclude /usr/bin since it's not a real path.
9812     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9813       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9814       # a path prefixed by /cygdrive for fixpath to work.
9815       new_path="$CYGWIN_ROOT_PATH$input_path"
9816     fi
9817   fi
9818 
9819   # remove trailing .exe if any
9820   new_path="${new_path/%.exe/}"
9821 
9822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9823 
9824   # First separate the path from the arguments. This will split at the first
9825   # space.
9826   complete="$FOUND_MAKE"
9827   path="${complete%% *}"
9828   tmp="$complete EOL"
9829   arguments="${tmp#* }"
9830 
9831   # Input might be given as Windows format, start by converting to
9832   # unix format.
9833   new_path="$path"
9834 
9835   windows_path="$new_path"
9836   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9837     unix_path=`$CYGPATH -u "$windows_path"`
9838     new_path="$unix_path"
9839   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9840     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9841     new_path="$unix_path"
9842   fi
9843 
9844 
9845   # Now try to locate executable using which
9846   new_path=`$WHICH "$new_path" 2> /dev/null`
9847 
9848   if test "x$new_path" = x; then
9849     # Oops. Which didn't find the executable.
9850     # The splitting of arguments from the executable at a space might have been incorrect,
9851     # since paths with space are more likely in Windows. Give it another try with the whole
9852     # argument.
9853     path="$complete"
9854     arguments="EOL"
9855     new_path="$path"
9856 
9857   windows_path="$new_path"
9858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9859     unix_path=`$CYGPATH -u "$windows_path"`
9860     new_path="$unix_path"
9861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9862     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9863     new_path="$unix_path"
9864   fi
9865 
9866 
9867     new_path=`$WHICH "$new_path" 2> /dev/null`
9868 
9869     if test "x$new_path" = x; then
9870       # It's still not found. Now this is an unrecoverable error.
9871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9872 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9873       has_space=`$ECHO "$complete" | $GREP " "`
9874       if test "x$has_space" != x; then
9875         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9876 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9877       fi
9878       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9879     fi
9880   fi
9881 
9882   # Now new_path has a complete unix path to the binary
9883   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9884     # Keep paths in /bin as-is, but remove trailing .exe if any
9885     new_path="${new_path/%.exe/}"
9886     # Do not save /bin paths to all_fixpath_prefixes!
9887   else
9888     # Not in mixed or Windows style, start by that.
9889     new_path=`cmd //c echo $new_path`
9890 
9891   input_path="$new_path"
9892   # Check if we need to convert this using DOS-style short mode. If the path
9893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9894   # take no chances and rewrite it.
9895   # Note: m4 eats our [], so we need to use [ and ] instead.
9896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9897   if test "x$has_forbidden_chars" != x; then
9898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9899     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9900   fi
9901 
9902     # Output is in $new_path
9903 
9904   windows_path="$new_path"
9905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9906     unix_path=`$CYGPATH -u "$windows_path"`
9907     new_path="$unix_path"
9908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9910     new_path="$unix_path"
9911   fi
9912 
9913     # remove trailing .exe if any
9914     new_path="${new_path/%.exe/}"
9915 
9916     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9917     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9918   fi
9919 
9920   else
9921     # We're on a posix platform. Hooray! :)
9922     # First separate the path from the arguments. This will split at the first
9923     # space.
9924     complete="$FOUND_MAKE"
9925     path="${complete%% *}"
9926     tmp="$complete EOL"
9927     arguments="${tmp#* }"
9928 
9929     # Cannot rely on the command "which" here since it doesn't always work.
9930     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9931     if test -z "$is_absolute_path"; then
9932       # Path to executable is not absolute. Find it.
9933       IFS_save="$IFS"
9934       IFS=:
9935       for p in $PATH; do
9936         if test -f "$p/$path" && test -x "$p/$path"; then
9937           new_path="$p/$path"
9938           break
9939         fi
9940       done
9941       IFS="$IFS_save"
9942     else
9943       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9944 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9945       new_path="$path"
9946     fi
9947 
9948     if test "x$new_path" = x; then
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}: This might be caused by spaces in the path, which is not allowed." >&5
9954 $as_echo "$as_me: This might be caused by spaces in the path, 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       # Now join together the path and the arguments once again
9961       if test "x$arguments" != xEOL; then
9962         new_complete="$new_path ${arguments% *}"
9963       else
9964         new_complete="$new_path"
9965       fi
9966 
9967   if test "x$complete" != "x$new_complete"; then
9968       FOUND_MAKE="$new_complete"
9969       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9970 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9971     fi
9972 
9973         fi
9974       fi
9975     fi
9976   fi
9977 
9978         fi
9979         PATH=$OLD_PATH
9980       fi
9981     fi
9982 
9983     if test "x$FOUND_MAKE" = x; then
9984       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
9985     fi
9986   fi
9987 
9988   MAKE=$FOUND_MAKE
9989 
9990   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9991 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9992 
9993 
9994 
9995     # Test if find supports -delete
9996     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9997 $as_echo_n "checking if find supports -delete... " >&6; }
9998     FIND_DELETE="-delete"
9999 
10000     DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10001 
10002     echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10003 
10004     TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10005     if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10006         # No, it does not.
10007         rm $DELETEDIR/TestIfFindSupportsDelete
10008         FIND_DELETE="-exec rm \{\} \+"
10009         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10010 $as_echo "no" >&6; }
10011     else
10012         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10013 $as_echo "yes" >&6; }
10014     fi
10015     rmdir $DELETEDIR
10016 
10017 
10018 
10019 # These tools might not be installed by default,
10020 # need hint on how to install them.
10021 
10022     for ac_prog in unzip
10023 do
10024   # Extract the first word of "$ac_prog", so it can be a program name with args.
10025 set dummy $ac_prog; ac_word=$2
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027 $as_echo_n "checking for $ac_word... " >&6; }
10028 if ${ac_cv_path_UNZIP+:} false; then :
10029   $as_echo_n "(cached) " >&6
10030 else
10031   case $UNZIP in
10032   [\\/]* | ?:[\\/]*)
10033   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10034   ;;
10035   *)
10036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037 for as_dir in $PATH
10038 do
10039   IFS=$as_save_IFS
10040   test -z "$as_dir" && as_dir=.
10041     for ac_exec_ext in '' $ac_executable_extensions; do
10042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045     break 2
10046   fi
10047 done
10048   done
10049 IFS=$as_save_IFS
10050 
10051   ;;
10052 esac
10053 fi
10054 UNZIP=$ac_cv_path_UNZIP
10055 if test -n "$UNZIP"; then
10056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10057 $as_echo "$UNZIP" >&6; }
10058 else
10059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060 $as_echo "no" >&6; }
10061 fi
10062 
10063 
10064   test -n "$UNZIP" && break
10065 done
10066 
10067 
10068     if test "x$UNZIP" = x; then
10069         if test "xunzip" = x; then
10070           PROG_NAME=unzip
10071         else
10072           PROG_NAME=unzip
10073         fi
10074         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10075 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10076         as_fn_error $? "Cannot continue" "$LINENO" 5
10077     fi
10078 
10079 
10080 
10081     for ac_prog in zip
10082 do
10083   # Extract the first word of "$ac_prog", so it can be a program name with args.
10084 set dummy $ac_prog; ac_word=$2
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10086 $as_echo_n "checking for $ac_word... " >&6; }
10087 if ${ac_cv_path_ZIP+:} false; then :
10088   $as_echo_n "(cached) " >&6
10089 else
10090   case $ZIP in
10091   [\\/]* | ?:[\\/]*)
10092   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10093   ;;
10094   *)
10095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10096 for as_dir in $PATH
10097 do
10098   IFS=$as_save_IFS
10099   test -z "$as_dir" && as_dir=.
10100     for ac_exec_ext in '' $ac_executable_extensions; do
10101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10102     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10104     break 2
10105   fi
10106 done
10107   done
10108 IFS=$as_save_IFS
10109 
10110   ;;
10111 esac
10112 fi
10113 ZIP=$ac_cv_path_ZIP
10114 if test -n "$ZIP"; then
10115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10116 $as_echo "$ZIP" >&6; }
10117 else
10118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10119 $as_echo "no" >&6; }
10120 fi
10121 
10122 
10123   test -n "$ZIP" && break
10124 done
10125 
10126 
10127     if test "x$ZIP" = x; then
10128         if test "xzip" = x; then
10129           PROG_NAME=zip
10130         else
10131           PROG_NAME=zip
10132         fi
10133         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10134 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10135         as_fn_error $? "Cannot continue" "$LINENO" 5
10136     fi
10137 
10138 
10139 
10140 # Non-required basic tools
10141 
10142 # Extract the first word of "ldd", so it can be a program name with args.
10143 set dummy ldd; ac_word=$2
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10145 $as_echo_n "checking for $ac_word... " >&6; }
10146 if ${ac_cv_path_LDD+:} false; then :
10147   $as_echo_n "(cached) " >&6
10148 else
10149   case $LDD in
10150   [\\/]* | ?:[\\/]*)
10151   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10152   ;;
10153   *)
10154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10155 for as_dir in $PATH
10156 do
10157   IFS=$as_save_IFS
10158   test -z "$as_dir" && as_dir=.
10159     for ac_exec_ext in '' $ac_executable_extensions; do
10160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10161     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10163     break 2
10164   fi
10165 done
10166   done
10167 IFS=$as_save_IFS
10168 
10169   ;;
10170 esac
10171 fi
10172 LDD=$ac_cv_path_LDD
10173 if test -n "$LDD"; then
10174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10175 $as_echo "$LDD" >&6; }
10176 else
10177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178 $as_echo "no" >&6; }
10179 fi
10180 
10181 
10182 if test "x$LDD" = "x"; then
10183     # List shared lib dependencies is used for
10184     # debug output and checking for forbidden dependencies.
10185     # We can build without it.
10186     LDD="true"
10187 fi
10188 # Extract the first word of "otool", so it can be a program name with args.
10189 set dummy otool; ac_word=$2
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10191 $as_echo_n "checking for $ac_word... " >&6; }
10192 if ${ac_cv_path_OTOOL+:} false; then :
10193   $as_echo_n "(cached) " >&6
10194 else
10195   case $OTOOL in
10196   [\\/]* | ?:[\\/]*)
10197   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10198   ;;
10199   *)
10200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10201 for as_dir in $PATH
10202 do
10203   IFS=$as_save_IFS
10204   test -z "$as_dir" && as_dir=.
10205     for ac_exec_ext in '' $ac_executable_extensions; do
10206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10207     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10209     break 2
10210   fi
10211 done
10212   done
10213 IFS=$as_save_IFS
10214 
10215   ;;
10216 esac
10217 fi
10218 OTOOL=$ac_cv_path_OTOOL
10219 if test -n "$OTOOL"; then
10220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10221 $as_echo "$OTOOL" >&6; }
10222 else
10223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10224 $as_echo "no" >&6; }
10225 fi
10226 
10227 
10228 if test "x$OTOOL" = "x"; then
10229    OTOOL="true"
10230 fi
10231 for ac_prog in readelf greadelf
10232 do
10233   # Extract the first word of "$ac_prog", so it can be a program name with args.
10234 set dummy $ac_prog; ac_word=$2
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10236 $as_echo_n "checking for $ac_word... " >&6; }
10237 if ${ac_cv_path_READELF+:} false; then :
10238   $as_echo_n "(cached) " >&6
10239 else
10240   case $READELF in
10241   [\\/]* | ?:[\\/]*)
10242   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10243   ;;
10244   *)
10245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10246 for as_dir in $PATH
10247 do
10248   IFS=$as_save_IFS
10249   test -z "$as_dir" && as_dir=.
10250     for ac_exec_ext in '' $ac_executable_extensions; do
10251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10252     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10254     break 2
10255   fi
10256 done
10257   done
10258 IFS=$as_save_IFS
10259 
10260   ;;
10261 esac
10262 fi
10263 READELF=$ac_cv_path_READELF
10264 if test -n "$READELF"; then
10265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10266 $as_echo "$READELF" >&6; }
10267 else
10268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10269 $as_echo "no" >&6; }
10270 fi
10271 
10272 
10273   test -n "$READELF" && break
10274 done
10275 
10276 # Extract the first word of "hg", so it can be a program name with args.
10277 set dummy hg; ac_word=$2
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10279 $as_echo_n "checking for $ac_word... " >&6; }
10280 if ${ac_cv_path_HG+:} false; then :
10281   $as_echo_n "(cached) " >&6
10282 else
10283   case $HG in
10284   [\\/]* | ?:[\\/]*)
10285   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10286   ;;
10287   *)
10288   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10289 for as_dir in $PATH
10290 do
10291   IFS=$as_save_IFS
10292   test -z "$as_dir" && as_dir=.
10293     for ac_exec_ext in '' $ac_executable_extensions; do
10294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10295     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10297     break 2
10298   fi
10299 done
10300   done
10301 IFS=$as_save_IFS
10302 
10303   ;;
10304 esac
10305 fi
10306 HG=$ac_cv_path_HG
10307 if test -n "$HG"; then
10308   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10309 $as_echo "$HG" >&6; }
10310 else
10311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312 $as_echo "no" >&6; }
10313 fi
10314 
10315 
10316 # Extract the first word of "stat", so it can be a program name with args.
10317 set dummy stat; ac_word=$2
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10319 $as_echo_n "checking for $ac_word... " >&6; }
10320 if ${ac_cv_path_STAT+:} false; then :
10321   $as_echo_n "(cached) " >&6
10322 else
10323   case $STAT in
10324   [\\/]* | ?:[\\/]*)
10325   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10326   ;;
10327   *)
10328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10329 for as_dir in $PATH
10330 do
10331   IFS=$as_save_IFS
10332   test -z "$as_dir" && as_dir=.
10333     for ac_exec_ext in '' $ac_executable_extensions; do
10334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10335     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10337     break 2
10338   fi
10339 done
10340   done
10341 IFS=$as_save_IFS
10342 
10343   ;;
10344 esac
10345 fi
10346 STAT=$ac_cv_path_STAT
10347 if test -n "$STAT"; then
10348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10349 $as_echo "$STAT" >&6; }
10350 else
10351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10352 $as_echo "no" >&6; }
10353 fi
10354 
10355 
10356 # Extract the first word of "time", so it can be a program name with args.
10357 set dummy time; ac_word=$2
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10359 $as_echo_n "checking for $ac_word... " >&6; }
10360 if ${ac_cv_path_TIME+:} false; then :
10361   $as_echo_n "(cached) " >&6
10362 else
10363   case $TIME in
10364   [\\/]* | ?:[\\/]*)
10365   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10366   ;;
10367   *)
10368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10369 for as_dir in $PATH
10370 do
10371   IFS=$as_save_IFS
10372   test -z "$as_dir" && as_dir=.
10373     for ac_exec_ext in '' $ac_executable_extensions; do
10374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10375     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10377     break 2
10378   fi
10379 done
10380   done
10381 IFS=$as_save_IFS
10382 
10383   ;;
10384 esac
10385 fi
10386 TIME=$ac_cv_path_TIME
10387 if test -n "$TIME"; then
10388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10389 $as_echo "$TIME" >&6; }
10390 else
10391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392 $as_echo "no" >&6; }
10393 fi
10394 
10395 
10396 # Check if it's GNU time
10397 IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10398 if test "x$IS_GNU_TIME" != x; then
10399   IS_GNU_TIME=yes
10400 else
10401   IS_GNU_TIME=no
10402 fi
10403 
10404 
10405 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10406 
10407     for ac_prog in comm
10408 do
10409   # Extract the first word of "$ac_prog", so it can be a program name with args.
10410 set dummy $ac_prog; ac_word=$2
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412 $as_echo_n "checking for $ac_word... " >&6; }
10413 if ${ac_cv_path_COMM+:} false; then :
10414   $as_echo_n "(cached) " >&6
10415 else
10416   case $COMM in
10417   [\\/]* | ?:[\\/]*)
10418   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10419   ;;
10420   *)
10421   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422 for as_dir in $PATH
10423 do
10424   IFS=$as_save_IFS
10425   test -z "$as_dir" && as_dir=.
10426     for ac_exec_ext in '' $ac_executable_extensions; do
10427   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10429     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430     break 2
10431   fi
10432 done
10433   done
10434 IFS=$as_save_IFS
10435 
10436   ;;
10437 esac
10438 fi
10439 COMM=$ac_cv_path_COMM
10440 if test -n "$COMM"; then
10441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10442 $as_echo "$COMM" >&6; }
10443 else
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445 $as_echo "no" >&6; }
10446 fi
10447 
10448 
10449   test -n "$COMM" && break
10450 done
10451 
10452 
10453     if test "x$COMM" = x; then
10454         if test "xcomm" = x; then
10455           PROG_NAME=comm
10456         else
10457           PROG_NAME=comm
10458         fi
10459         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10460 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10461         as_fn_error $? "Cannot continue" "$LINENO" 5
10462     fi
10463 
10464 
10465 fi
10466 
10467 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10468 
10469     for ac_prog in xattr
10470 do
10471   # Extract the first word of "$ac_prog", so it can be a program name with args.
10472 set dummy $ac_prog; ac_word=$2
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10474 $as_echo_n "checking for $ac_word... " >&6; }
10475 if ${ac_cv_path_XATTR+:} false; then :
10476   $as_echo_n "(cached) " >&6
10477 else
10478   case $XATTR in
10479   [\\/]* | ?:[\\/]*)
10480   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10481   ;;
10482   *)
10483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10484 for as_dir in $PATH
10485 do
10486   IFS=$as_save_IFS
10487   test -z "$as_dir" && as_dir=.
10488     for ac_exec_ext in '' $ac_executable_extensions; do
10489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10490     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10492     break 2
10493   fi
10494 done
10495   done
10496 IFS=$as_save_IFS
10497 
10498   ;;
10499 esac
10500 fi
10501 XATTR=$ac_cv_path_XATTR
10502 if test -n "$XATTR"; then
10503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10504 $as_echo "$XATTR" >&6; }
10505 else
10506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507 $as_echo "no" >&6; }
10508 fi
10509 
10510 
10511   test -n "$XATTR" && break
10512 done
10513 
10514 
10515     if test "x$XATTR" = x; then
10516         if test "xxattr" = x; then
10517           PROG_NAME=xattr
10518         else
10519           PROG_NAME=xattr
10520         fi
10521         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10522 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10523         as_fn_error $? "Cannot continue" "$LINENO" 5
10524     fi
10525 
10526 
10527   # Extract the first word of "codesign", so it can be a program name with args.
10528 set dummy codesign; ac_word=$2
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530 $as_echo_n "checking for $ac_word... " >&6; }
10531 if ${ac_cv_path_CODESIGN+:} false; then :
10532   $as_echo_n "(cached) " >&6
10533 else
10534   case $CODESIGN in
10535   [\\/]* | ?:[\\/]*)
10536   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10537   ;;
10538   *)
10539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540 for as_dir in $PATH
10541 do
10542   IFS=$as_save_IFS
10543   test -z "$as_dir" && as_dir=.
10544     for ac_exec_ext in '' $ac_executable_extensions; do
10545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548     break 2
10549   fi
10550 done
10551   done
10552 IFS=$as_save_IFS
10553 
10554   ;;
10555 esac
10556 fi
10557 CODESIGN=$ac_cv_path_CODESIGN
10558 if test -n "$CODESIGN"; then
10559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10560 $as_echo "$CODESIGN" >&6; }
10561 else
10562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563 $as_echo "no" >&6; }
10564 fi
10565 
10566 
10567   if test "x$CODESIGN" != "x"; then
10568     # Verify that the openjdk_codesign certificate is present
10569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10570 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10571     rm -f codesign-testfile
10572     touch codesign-testfile
10573     codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10574     rm -f codesign-testfile
10575     if test "x$CODESIGN" = x; then
10576       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577 $as_echo "no" >&6; }
10578     else
10579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10580 $as_echo "yes" >&6; }
10581     fi
10582   fi
10583 fi
10584 
10585 
10586 # Check if pkg-config is available.
10587 
10588 
10589 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10590         if test -n "$ac_tool_prefix"; then
10591   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10592 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594 $as_echo_n "checking for $ac_word... " >&6; }
10595 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10596   $as_echo_n "(cached) " >&6
10597 else
10598   case $PKG_CONFIG in
10599   [\\/]* | ?:[\\/]*)
10600   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10601   ;;
10602   *)
10603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604 for as_dir in $PATH
10605 do
10606   IFS=$as_save_IFS
10607   test -z "$as_dir" && as_dir=.
10608     for ac_exec_ext in '' $ac_executable_extensions; do
10609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10610     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612     break 2
10613   fi
10614 done
10615   done
10616 IFS=$as_save_IFS
10617 
10618   ;;
10619 esac
10620 fi
10621 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10622 if test -n "$PKG_CONFIG"; then
10623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10624 $as_echo "$PKG_CONFIG" >&6; }
10625 else
10626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627 $as_echo "no" >&6; }
10628 fi
10629 
10630 
10631 fi
10632 if test -z "$ac_cv_path_PKG_CONFIG"; then
10633   ac_pt_PKG_CONFIG=$PKG_CONFIG
10634   # Extract the first word of "pkg-config", so it can be a program name with args.
10635 set dummy pkg-config; ac_word=$2
10636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10637 $as_echo_n "checking for $ac_word... " >&6; }
10638 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10639   $as_echo_n "(cached) " >&6
10640 else
10641   case $ac_pt_PKG_CONFIG in
10642   [\\/]* | ?:[\\/]*)
10643   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10644   ;;
10645   *)
10646   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10647 for as_dir in $PATH
10648 do
10649   IFS=$as_save_IFS
10650   test -z "$as_dir" && as_dir=.
10651     for ac_exec_ext in '' $ac_executable_extensions; do
10652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10653     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10655     break 2
10656   fi
10657 done
10658   done
10659 IFS=$as_save_IFS
10660 
10661   ;;
10662 esac
10663 fi
10664 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10665 if test -n "$ac_pt_PKG_CONFIG"; then
10666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10667 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10668 else
10669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670 $as_echo "no" >&6; }
10671 fi
10672 
10673   if test "x$ac_pt_PKG_CONFIG" = x; then
10674     PKG_CONFIG=""
10675   else
10676     case $cross_compiling:$ac_tool_warned in
10677 yes:)
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10679 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10680 ac_tool_warned=yes ;;
10681 esac
10682     PKG_CONFIG=$ac_pt_PKG_CONFIG
10683   fi
10684 else
10685   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10686 fi
10687 
10688 fi
10689 if test -n "$PKG_CONFIG"; then
10690         _pkg_min_version=0.9.0
10691         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10692 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10693         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10694                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10695 $as_echo "yes" >&6; }
10696         else
10697                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10698 $as_echo "no" >&6; }
10699                 PKG_CONFIG=""
10700         fi
10701 
10702 fi
10703 
10704 # After basic tools have been setup, we can check build os specific details.
10705 
10706 ###############################################################################
10707 
10708 # Note that this is the build platform OS version!
10709 
10710 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10711 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10712 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10713 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10714 
10715 
10716 
10717 
10718 
10719 # Setup builddeps, for automatic downloading of tools we need.
10720 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10721 # boot-jdk setup, but we need to have basic tools setup first.
10722 
10723 
10724 # Check whether --with-builddeps-conf was given.
10725 if test "${with_builddeps_conf+set}" = set; then :
10726   withval=$with_builddeps_conf;
10727 fi
10728 
10729 
10730 
10731 # Check whether --with-builddeps-server was given.
10732 if test "${with_builddeps_server+set}" = set; then :
10733   withval=$with_builddeps_server;
10734 fi
10735 
10736 
10737 
10738 # Check whether --with-builddeps-dir was given.
10739 if test "${with_builddeps_dir+set}" = set; then :
10740   withval=$with_builddeps_dir;
10741 else
10742   with_builddeps_dir=/localhome/builddeps
10743 fi
10744 
10745 
10746 
10747 # Check whether --with-builddeps-group was given.
10748 if test "${with_builddeps_group+set}" = set; then :
10749   withval=$with_builddeps_group;
10750 fi
10751 
10752 
10753 
10754 
10755     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10756         if test "x$with_builddeps_conf" != x; then
10757             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10758 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10759             builddepsfile=$with_builddeps_conf
10760             if test -s $builddepsfile; then
10761                 . $builddepsfile
10762                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10763 $as_echo "loaded!" >&6; }
10764             else
10765                as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10766            fi
10767         else
10768             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10769 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10770             builddepsfile=`mktemp`
10771             touch $builddepsfile
10772             # Put all found confs into a single file.
10773             find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10774             # Source the file to acquire the variables
10775             if test -s $builddepsfile; then
10776                 . $builddepsfile
10777                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10778 $as_echo "found at least one!" >&6; }
10779             else
10780                as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10781            fi
10782         fi
10783         # Create build and target names that use _ instead of "-" and ".".
10784         # This is necessary to use them in variable names.
10785         build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10786         target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10787         # Extract rewrite information for build and target
10788         eval rewritten_build=\${REWRITE_${build_var}}
10789         if test "x$rewritten_build" = x; then
10790             rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10791             echo Build stays the same $rewritten_build
10792         else
10793             echo Rewriting build for builddeps into $rewritten_build
10794         fi
10795         eval rewritten_target=\${REWRITE_${target_var}}
10796         if test "x$rewritten_target" = x; then
10797             rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10798             echo Target stays the same $rewritten_target
10799         else
10800             echo Rewriting target for builddeps into $rewritten_target
10801         fi
10802         rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10803         rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10804     fi
10805     for ac_prog in 7z unzip
10806 do
10807   # Extract the first word of "$ac_prog", so it can be a program name with args.
10808 set dummy $ac_prog; ac_word=$2
10809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10810 $as_echo_n "checking for $ac_word... " >&6; }
10811 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10812   $as_echo_n "(cached) " >&6
10813 else
10814   if test -n "$BDEPS_UNZIP"; then
10815   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10816 else
10817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10818 for as_dir in $PATH
10819 do
10820   IFS=$as_save_IFS
10821   test -z "$as_dir" && as_dir=.
10822     for ac_exec_ext in '' $ac_executable_extensions; do
10823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10824     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10826     break 2
10827   fi
10828 done
10829   done
10830 IFS=$as_save_IFS
10831 
10832 fi
10833 fi
10834 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10835 if test -n "$BDEPS_UNZIP"; then
10836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10837 $as_echo "$BDEPS_UNZIP" >&6; }
10838 else
10839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10840 $as_echo "no" >&6; }
10841 fi
10842 
10843 
10844   test -n "$BDEPS_UNZIP" && break
10845 done
10846 
10847     if test "x$BDEPS_UNZIP" = x7z; then
10848         BDEPS_UNZIP="7z x"
10849     fi
10850 
10851     for ac_prog in wget lftp ftp
10852 do
10853   # Extract the first word of "$ac_prog", so it can be a program name with args.
10854 set dummy $ac_prog; ac_word=$2
10855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856 $as_echo_n "checking for $ac_word... " >&6; }
10857 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
10858   $as_echo_n "(cached) " >&6
10859 else
10860   if test -n "$BDEPS_FTP"; then
10861   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10862 else
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_prog_BDEPS_FTP="$ac_prog"
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 fi
10879 fi
10880 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10881 if test -n "$BDEPS_FTP"; then
10882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10883 $as_echo "$BDEPS_FTP" >&6; }
10884 else
10885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10886 $as_echo "no" >&6; }
10887 fi
10888 
10889 
10890   test -n "$BDEPS_FTP" && break
10891 done
10892 
10893 
10894 
10895 ###############################################################################
10896 #
10897 # Determine OpenJDK variants, options and version numbers.
10898 #
10899 ###############################################################################
10900 
10901 # We need build & target for this.
10902 
10903 
10904 ###############################################################################
10905 #
10906 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
10907 # We always build headless support.
10908 #
10909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10910 $as_echo_n "checking headful support... " >&6; }
10911 # Check whether --enable-headful was given.
10912 if test "${enable_headful+set}" = set; then :
10913   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10914 else
10915   SUPPORT_HEADFUL=yes
10916 fi
10917 
10918 
10919 SUPPORT_HEADLESS=yes
10920 BUILD_HEADLESS="BUILD_HEADLESS:=true"
10921 
10922 if test "x$SUPPORT_HEADFUL" = xyes; then
10923     # We are building both headful and headless.
10924     headful_msg="inlude support for both headful and headless"
10925 fi
10926 
10927 if test "x$SUPPORT_HEADFUL" = xno; then
10928     # Thus we are building headless only.
10929     BUILD_HEADLESS="BUILD_HEADLESS:=true"
10930     headful_msg="headless only"
10931 fi
10932 
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10934 $as_echo "$headful_msg" >&6; }
10935 
10936 
10937 
10938 
10939 
10940 # Control wether Hotspot runs Queens test after build.
10941 # Check whether --enable-hotspot-test-in-build was given.
10942 if test "${enable_hotspot_test_in_build+set}" = set; then :
10943   enableval=$enable_hotspot_test_in_build;
10944 else
10945   enable_hotspot_test_in_build=no
10946 fi
10947 
10948 if test "x$enable_hotspot_test_in_build" = "xyes"; then
10949     TEST_IN_BUILD=true
10950 else
10951     TEST_IN_BUILD=false
10952 fi
10953 
10954 
10955 ###############################################################################
10956 #
10957 # Choose cacerts source file
10958 #
10959 
10960 # Check whether --with-cacerts-file was given.
10961 if test "${with_cacerts_file+set}" = set; then :
10962   withval=$with_cacerts_file;
10963 fi
10964 
10965 if test "x$with_cacerts_file" != x; then
10966     CACERTS_FILE=$with_cacerts_file
10967 else
10968     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10969 fi
10970 
10971 
10972 ###############################################################################
10973 #
10974 # Enable or disable unlimited crypto
10975 #
10976 # Check whether --enable-unlimited-crypto was given.
10977 if test "${enable_unlimited_crypto+set}" = set; then :
10978   enableval=$enable_unlimited_crypto;
10979 else
10980   enable_unlimited_crypto=no
10981 fi
10982 
10983 if test "x$enable_unlimited_crypto" = "xyes"; then
10984     UNLIMITED_CRYPTO=true
10985 else
10986     UNLIMITED_CRYPTO=false
10987 fi
10988 
10989 
10990 ###############################################################################
10991 #
10992 # Enable or disable the elliptic curve crypto implementation
10993 #
10994 
10995 
10996 ###############################################################################
10997 #
10998 # Compress jars
10999 #
11000 COMPRESS_JARS=false
11001 
11002 
11003 
11004 
11005 # Source the version numbers
11006 . $AUTOCONF_DIR/version-numbers
11007 
11008 # Get the settings from parameters
11009 
11010 # Check whether --with-milestone was given.
11011 if test "${with_milestone+set}" = set; then :
11012   withval=$with_milestone;
11013 fi
11014 
11015 if test "x$with_milestone" = xyes; then
11016   as_fn_error $? "Milestone must have a value" "$LINENO" 5
11017 elif test "x$with_milestone" != x; then
11018     MILESTONE="$with_milestone"
11019 fi
11020 if test "x$MILESTONE" = x; then
11021   MILESTONE=internal
11022 fi
11023 
11024 
11025 # Check whether --with-update-version was given.
11026 if test "${with_update_version+set}" = set; then :
11027   withval=$with_update_version;
11028 fi
11029 
11030 if test "x$with_update_version" = xyes; then
11031   as_fn_error $? "Update version must have a value" "$LINENO" 5
11032 elif test "x$with_update_version" != x; then
11033   JDK_UPDATE_VERSION="$with_update_version"
11034 fi
11035 
11036 
11037 # Check whether --with-build-number was given.
11038 if test "${with_build_number+set}" = set; then :
11039   withval=$with_build_number;
11040 fi
11041 
11042 if test "x$with_build_number" = xyes; then
11043   as_fn_error $? "Build number must have a value" "$LINENO" 5
11044 elif test "x$with_build_number" != x; then
11045   JDK_BUILD_NUMBER="$with_build_number"
11046 fi
11047 if test "x$JDK_BUILD_NUMBER" = x; then
11048   JDK_BUILD_NUMBER=b00
11049 fi
11050 
11051 
11052 # Check whether --with-user-release-suffix was given.
11053 if test "${with_user_release_suffix+set}" = set; then :
11054   withval=$with_user_release_suffix;
11055 fi
11056 
11057 if test "x$with_user_release_suffix" = xyes; then
11058   as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11059 elif test "x$with_user_release_suffix" != x; then
11060   USER_RELEASE_SUFFIX="$with_user_release_suffix"
11061 else
11062   BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11063   # Avoid [:alnum:] since it depends on the locale.
11064   CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
11065   USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11066 fi
11067 
11068 
11069 # Now set the JDK version, milestone, build number etc.
11070 
11071 
11072 
11073 
11074 
11075 
11076 
11077 
11078 
11079 
11080 
11081 
11082 
11083 
11084 COPYRIGHT_YEAR=`date +'%Y'`
11085 
11086 
11087 if test "x$JDK_UPDATE_VERSION" != x; then
11088   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11089 else
11090   JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11091 fi
11092 
11093 
11094 COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11095 
11096 
11097 
11098 ###############################################################################
11099 #
11100 # Setup BootJDK, used to bootstrap the build.
11101 #
11102 ###############################################################################
11103 
11104 
11105 BOOT_JDK_FOUND=no
11106 
11107 # Check whether --with-boot-jdk was given.
11108 if test "${with_boot_jdk+set}" = set; then :
11109   withval=$with_boot_jdk;
11110 fi
11111 
11112 
11113 # We look for the Boot JDK through various means, going from more certain to
11114 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11115 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11116 # must check if this is indeed valid; otherwise we'll continue looking.
11117 
11118 # Test: Is bootjdk explicitely set by command line arguments?
11119 
11120   if test "x$BOOT_JDK_FOUND" = xno; then
11121     # Now execute the test
11122 
11123 if test "x$with_boot_jdk" != x; then
11124     BOOT_JDK=$with_boot_jdk
11125     BOOT_JDK_FOUND=maybe
11126     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11127 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11128 fi
11129 
11130 
11131     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11132     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11133       # Do we have a bin/java?
11134       if test ! -x "$BOOT_JDK/bin/java"; then
11135         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11136 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11137         BOOT_JDK_FOUND=no
11138       else
11139         # Do we have a bin/javac?
11140         if test ! -x "$BOOT_JDK/bin/javac"; then
11141           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11142 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11143           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11144 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11145           BOOT_JDK_FOUND=no
11146         else
11147           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11148           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11149             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11150 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11151             BOOT_JDK_FOUND=no
11152           else
11153             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11154             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11155 
11156             # Extra M4 quote needed to protect [] in grep expression.
11157             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11158             if test "x$FOUND_VERSION_78" = x; then
11159               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11161               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11162 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11163               BOOT_JDK_FOUND=no
11164             else
11165               # We're done! :-)
11166               BOOT_JDK_FOUND=yes
11167 
11168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11169 
11170   # Input might be given as Windows format, start by converting to
11171   # unix format.
11172   path="$BOOT_JDK"
11173   new_path=`$CYGPATH -u "$path"`
11174 
11175   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11176   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11177   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11178   # "foo.exe" is OK but "foo" is an error.
11179   #
11180   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11181   # It is also a way to make sure we got the proper file name for the real test later on.
11182   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11183   if test "x$test_shortpath" = x; then
11184     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11185 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11186     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11187   fi
11188 
11189   # Call helper function which possibly converts this using DOS-style short mode.
11190   # If so, the updated path is stored in $new_path.
11191 
11192   input_path="$new_path"
11193   # Check if we need to convert this using DOS-style short mode. If the path
11194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11195   # take no chances and rewrite it.
11196   # Note: m4 eats our [], so we need to use [ and ] instead.
11197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11198   if test "x$has_forbidden_chars" != x; then
11199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11203       # Going to short mode and back again did indeed matter. Since short mode is
11204       # case insensitive, let's make it lowercase to improve readability.
11205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11206       # Now convert it back to Unix-stile (cygpath)
11207       input_path=`$CYGPATH -u "$shortmode_path"`
11208       new_path="$input_path"
11209     fi
11210   fi
11211 
11212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11213   if test "x$test_cygdrive_prefix" = x; then
11214     # As a simple fix, exclude /usr/bin since it's not a real path.
11215     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11217       # a path prefixed by /cygdrive for fixpath to work.
11218       new_path="$CYGWIN_ROOT_PATH$input_path"
11219     fi
11220   fi
11221 
11222 
11223   if test "x$path" != "x$new_path"; then
11224     BOOT_JDK="$new_path"
11225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11226 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11227   fi
11228 
11229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11230 
11231   path="$BOOT_JDK"
11232   has_colon=`$ECHO $path | $GREP ^.:`
11233   new_path="$path"
11234   if test "x$has_colon" = x; then
11235     # Not in mixed or Windows style, start by that.
11236     new_path=`cmd //c echo $path`
11237   fi
11238 
11239 
11240   input_path="$new_path"
11241   # Check if we need to convert this using DOS-style short mode. If the path
11242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11243   # take no chances and rewrite it.
11244   # Note: m4 eats our [], so we need to use [ and ] instead.
11245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11246   if test "x$has_forbidden_chars" != x; then
11247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11248     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11249   fi
11250 
11251 
11252   windows_path="$new_path"
11253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11254     unix_path=`$CYGPATH -u "$windows_path"`
11255     new_path="$unix_path"
11256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11258     new_path="$unix_path"
11259   fi
11260 
11261   if test "x$path" != "x$new_path"; then
11262     BOOT_JDK="$new_path"
11263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11264 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11265   fi
11266 
11267   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11268   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11269 
11270   else
11271     # We're on a posix platform. Hooray! :)
11272     path="$BOOT_JDK"
11273     has_space=`$ECHO "$path" | $GREP " "`
11274     if test "x$has_space" != x; then
11275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11276 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11277       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11278     fi
11279 
11280     # Use eval to expand a potential ~
11281     eval path="$path"
11282     if test ! -f "$path" && test ! -d "$path"; then
11283       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11284     fi
11285 
11286     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11287   fi
11288 
11289               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11290 $as_echo_n "checking for Boot JDK... " >&6; }
11291               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11292 $as_echo "$BOOT_JDK" >&6; }
11293               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11294 $as_echo_n "checking Boot JDK version... " >&6; }
11295               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11296               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11297 $as_echo "$BOOT_JDK_VERSION" >&6; }
11298             fi # end check jdk version
11299           fi # end check rt.jar
11300         fi # end check javac
11301       fi # end check java
11302     fi # end check boot jdk found
11303   fi
11304 
11305 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11306   # Having specified an argument which is incorrect will produce an instant failure;
11307   # we should not go on looking
11308   as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11309 fi
11310 
11311 # Test: Is bootjdk available from builddeps?
11312 
11313   if test "x$BOOT_JDK_FOUND" = xno; then
11314     # Now execute the test
11315 
11316 
11317 
11318     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11319         # Source the builddeps file again, to make sure it uses the latest variables!
11320         . $builddepsfile
11321         # Look for a target and build machine specific resource!
11322         eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11323         if test "x$resource" = x; then
11324             # Ok, lets instead look for a target specific resource
11325             eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11326         fi
11327         if test "x$resource" = x; then
11328             # Ok, lets instead look for a build specific resource
11329             eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11330         fi
11331         if test "x$resource" = x; then
11332             # Ok, lets instead look for a generic resource
11333             # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11334             resource=${builddep_bootjdk}
11335         fi
11336         if test "x$resource" != x; then
11337             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11338 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11339             # If the resource in the builddeps.conf file is an existing directory,
11340             # for example /java/linux/cups
11341             if test -d ${resource}; then
11342                depdir=${resource}
11343             else
11344 
11345 # bootjdk is for example mymodule
11346 # $resource is for example libs/general/libmymod_1_2_3.zip
11347 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11348 # $with_builddeps_dir is for example /localhome/builddeps
11349 # depdir is the name of the variable into which we store the depdir, eg MYMOD
11350 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11351 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11352     filename=`basename $resource`
11353     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11354     filebase=${filename%%.*}
11355     extension=${filename#*.}
11356     installdir=$with_builddeps_dir/$filebase
11357     if test ! -f $installdir/$filename.unpacked; then
11358         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11359 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11360         if test ! -d $installdir; then
11361             mkdir -p $installdir
11362         fi
11363         if test ! -d $installdir; then
11364             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11365         fi
11366         tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11367         touch $tmpfile
11368         if test ! -f $tmpfile; then
11369             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11370         fi
11371 
11372     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11373     # $tmpfile is the local file name for the downloaded file.
11374     VALID_TOOL=no
11375     if test "x$BDEPS_FTP" = xwget; then
11376        VALID_TOOL=yes
11377        wget -O $tmpfile $with_builddeps_server/$resource
11378     fi
11379     if test "x$BDEPS_FTP" = xlftp; then
11380        VALID_TOOL=yes
11381        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11382     fi
11383     if test "x$BDEPS_FTP" = xftp; then
11384         VALID_TOOL=yes
11385         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11386         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11387         FTPUSERPWD=${FTPSERVER%%@*}
11388         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11389             FTPUSER=${userpwd%%:*}
11390             FTPPWD=${userpwd#*@}
11391             FTPSERVER=${FTPSERVER#*@}
11392         else
11393             FTPUSER=ftp
11394             FTPPWD=ftp
11395         fi
11396         # the "pass" command does not work on some
11397         # ftp clients (read ftp.exe) but if it works,
11398         # passive mode is better!
11399         (\
11400             echo "user $FTPUSER $FTPPWD"        ;\
11401             echo "pass"                         ;\
11402             echo "bin"                          ;\
11403             echo "get $FTPPATH $tmpfile"              ;\
11404         ) | ftp -in $FTPSERVER
11405     fi
11406     if test "x$VALID_TOOL" != xyes; then
11407        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11408     fi
11409 
11410         mv $tmpfile $installdir/$filename
11411         if test ! -s $installdir/$filename; then
11412             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11413         fi
11414         case "$extension" in
11415             zip)  echo "Unzipping $installdir/$filename..."
11416                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11417             ;;
11418             tar.gz) echo "Untaring $installdir/$filename..."
11419                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11420             ;;
11421             tgz) echo "Untaring $installdir/$filename..."
11422                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11423             ;;
11424             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11425             ;;
11426         esac
11427     fi
11428     if test -f $installdir/$filename.unpacked; then
11429         depdir=$installdir
11430     fi
11431 
11432             fi
11433             # Source the builddeps file again, because in the previous command, the depdir
11434             # was updated to point at the current build dependency install directory.
11435             . $builddepsfile
11436             # Now extract variables from the builddeps.conf files.
11437             theroot=${builddep_bootjdk_ROOT}
11438             thecflags=${builddep_bootjdk_CFLAGS}
11439             thelibs=${builddep_bootjdk_LIBS}
11440             if test "x$depdir" = x; then
11441                 as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11442             fi
11443             BOOT_JDK=$depdir
11444             if test "x$theroot" != x; then
11445                BOOT_JDK="$theroot"
11446             fi
11447             if test "x$thecflags" != x; then
11448                BOOT_JDK_CFLAGS="$thecflags"
11449             fi
11450             if test "x$thelibs" != x; then
11451                BOOT_JDK_LIBS="$thelibs"
11452             fi
11453             BOOT_JDK_FOUND=maybe
11454             else BOOT_JDK_FOUND=no
11455 
11456         fi
11457         else BOOT_JDK_FOUND=no
11458 
11459     fi
11460 
11461 
11462 
11463     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11464     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11465       # Do we have a bin/java?
11466       if test ! -x "$BOOT_JDK/bin/java"; then
11467         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11468 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11469         BOOT_JDK_FOUND=no
11470       else
11471         # Do we have a bin/javac?
11472         if test ! -x "$BOOT_JDK/bin/javac"; then
11473           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11475           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11476 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11477           BOOT_JDK_FOUND=no
11478         else
11479           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11480           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11481             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11482 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11483             BOOT_JDK_FOUND=no
11484           else
11485             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11486             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11487 
11488             # Extra M4 quote needed to protect [] in grep expression.
11489             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11490             if test "x$FOUND_VERSION_78" = x; then
11491               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11492 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11493               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11494 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11495               BOOT_JDK_FOUND=no
11496             else
11497               # We're done! :-)
11498               BOOT_JDK_FOUND=yes
11499 
11500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11501 
11502   # Input might be given as Windows format, start by converting to
11503   # unix format.
11504   path="$BOOT_JDK"
11505   new_path=`$CYGPATH -u "$path"`
11506 
11507   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11508   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11509   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11510   # "foo.exe" is OK but "foo" is an error.
11511   #
11512   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11513   # It is also a way to make sure we got the proper file name for the real test later on.
11514   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11515   if test "x$test_shortpath" = x; then
11516     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11517 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11518     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11519   fi
11520 
11521   # Call helper function which possibly converts this using DOS-style short mode.
11522   # If so, the updated path is stored in $new_path.
11523 
11524   input_path="$new_path"
11525   # Check if we need to convert this using DOS-style short mode. If the path
11526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11527   # take no chances and rewrite it.
11528   # Note: m4 eats our [], so we need to use [ and ] instead.
11529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11530   if test "x$has_forbidden_chars" != x; then
11531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11532     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11533     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11534     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11535       # Going to short mode and back again did indeed matter. Since short mode is
11536       # case insensitive, let's make it lowercase to improve readability.
11537       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11538       # Now convert it back to Unix-stile (cygpath)
11539       input_path=`$CYGPATH -u "$shortmode_path"`
11540       new_path="$input_path"
11541     fi
11542   fi
11543 
11544   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11545   if test "x$test_cygdrive_prefix" = x; then
11546     # As a simple fix, exclude /usr/bin since it's not a real path.
11547     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11548       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11549       # a path prefixed by /cygdrive for fixpath to work.
11550       new_path="$CYGWIN_ROOT_PATH$input_path"
11551     fi
11552   fi
11553 
11554 
11555   if test "x$path" != "x$new_path"; then
11556     BOOT_JDK="$new_path"
11557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11559   fi
11560 
11561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11562 
11563   path="$BOOT_JDK"
11564   has_colon=`$ECHO $path | $GREP ^.:`
11565   new_path="$path"
11566   if test "x$has_colon" = x; then
11567     # Not in mixed or Windows style, start by that.
11568     new_path=`cmd //c echo $path`
11569   fi
11570 
11571 
11572   input_path="$new_path"
11573   # Check if we need to convert this using DOS-style short mode. If the path
11574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11575   # take no chances and rewrite it.
11576   # Note: m4 eats our [], so we need to use [ and ] instead.
11577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11578   if test "x$has_forbidden_chars" != x; then
11579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11580     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11581   fi
11582 
11583 
11584   windows_path="$new_path"
11585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11586     unix_path=`$CYGPATH -u "$windows_path"`
11587     new_path="$unix_path"
11588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11590     new_path="$unix_path"
11591   fi
11592 
11593   if test "x$path" != "x$new_path"; then
11594     BOOT_JDK="$new_path"
11595     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11596 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11597   fi
11598 
11599   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11600   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11601 
11602   else
11603     # We're on a posix platform. Hooray! :)
11604     path="$BOOT_JDK"
11605     has_space=`$ECHO "$path" | $GREP " "`
11606     if test "x$has_space" != x; then
11607       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11608 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11609       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11610     fi
11611 
11612     # Use eval to expand a potential ~
11613     eval path="$path"
11614     if test ! -f "$path" && test ! -d "$path"; then
11615       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11616     fi
11617 
11618     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11619   fi
11620 
11621               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11622 $as_echo_n "checking for Boot JDK... " >&6; }
11623               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11624 $as_echo "$BOOT_JDK" >&6; }
11625               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11626 $as_echo_n "checking Boot JDK version... " >&6; }
11627               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11628               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11629 $as_echo "$BOOT_JDK_VERSION" >&6; }
11630             fi # end check jdk version
11631           fi # end check rt.jar
11632         fi # end check javac
11633       fi # end check java
11634     fi # end check boot jdk found
11635   fi
11636 
11637 
11638 # Test: Is $JAVA_HOME set?
11639 
11640   if test "x$BOOT_JDK_FOUND" = xno; then
11641     # Now execute the test
11642 
11643     if test "x$JAVA_HOME" != x; then
11644         JAVA_HOME_PROCESSED="$JAVA_HOME"
11645 
11646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11647 
11648   # Input might be given as Windows format, start by converting to
11649   # unix format.
11650   path="$JAVA_HOME_PROCESSED"
11651   new_path=`$CYGPATH -u "$path"`
11652 
11653   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11654   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11655   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11656   # "foo.exe" is OK but "foo" is an error.
11657   #
11658   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11659   # It is also a way to make sure we got the proper file name for the real test later on.
11660   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11661   if test "x$test_shortpath" = x; then
11662     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11663 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11664     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11665   fi
11666 
11667   # Call helper function which possibly converts this using DOS-style short mode.
11668   # If so, the updated path is stored in $new_path.
11669 
11670   input_path="$new_path"
11671   # Check if we need to convert this using DOS-style short mode. If the path
11672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11673   # take no chances and rewrite it.
11674   # Note: m4 eats our [], so we need to use [ and ] instead.
11675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11676   if test "x$has_forbidden_chars" != x; then
11677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11678     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11679     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11680     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11681       # Going to short mode and back again did indeed matter. Since short mode is
11682       # case insensitive, let's make it lowercase to improve readability.
11683       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11684       # Now convert it back to Unix-stile (cygpath)
11685       input_path=`$CYGPATH -u "$shortmode_path"`
11686       new_path="$input_path"
11687     fi
11688   fi
11689 
11690   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11691   if test "x$test_cygdrive_prefix" = x; then
11692     # As a simple fix, exclude /usr/bin since it's not a real path.
11693     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11694       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11695       # a path prefixed by /cygdrive for fixpath to work.
11696       new_path="$CYGWIN_ROOT_PATH$input_path"
11697     fi
11698   fi
11699 
11700 
11701   if test "x$path" != "x$new_path"; then
11702     JAVA_HOME_PROCESSED="$new_path"
11703     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11704 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11705   fi
11706 
11707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11708 
11709   path="$JAVA_HOME_PROCESSED"
11710   has_colon=`$ECHO $path | $GREP ^.:`
11711   new_path="$path"
11712   if test "x$has_colon" = x; then
11713     # Not in mixed or Windows style, start by that.
11714     new_path=`cmd //c echo $path`
11715   fi
11716 
11717 
11718   input_path="$new_path"
11719   # Check if we need to convert this using DOS-style short mode. If the path
11720   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11721   # take no chances and rewrite it.
11722   # Note: m4 eats our [], so we need to use [ and ] instead.
11723   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11724   if test "x$has_forbidden_chars" != x; then
11725     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11726     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11727   fi
11728 
11729 
11730   windows_path="$new_path"
11731   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11732     unix_path=`$CYGPATH -u "$windows_path"`
11733     new_path="$unix_path"
11734   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11735     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11736     new_path="$unix_path"
11737   fi
11738 
11739   if test "x$path" != "x$new_path"; then
11740     JAVA_HOME_PROCESSED="$new_path"
11741     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11742 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11743   fi
11744 
11745   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11746   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11747 
11748   else
11749     # We're on a posix platform. Hooray! :)
11750     path="$JAVA_HOME_PROCESSED"
11751     has_space=`$ECHO "$path" | $GREP " "`
11752     if test "x$has_space" != x; then
11753       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11754 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11755       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11756     fi
11757 
11758     # Use eval to expand a potential ~
11759     eval path="$path"
11760     if test ! -f "$path" && test ! -d "$path"; then
11761       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11762     fi
11763 
11764     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11765   fi
11766 
11767         if test ! -d "$JAVA_HOME_PROCESSED"; then
11768             { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11769 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11770         else
11771           # Aha, the user has set a JAVA_HOME
11772           # let us use that as the Boot JDK.
11773           BOOT_JDK="$JAVA_HOME_PROCESSED"
11774           BOOT_JDK_FOUND=maybe
11775           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11776 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11777         fi
11778     fi
11779 
11780 
11781     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11782     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11783       # Do we have a bin/java?
11784       if test ! -x "$BOOT_JDK/bin/java"; then
11785         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11786 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11787         BOOT_JDK_FOUND=no
11788       else
11789         # Do we have a bin/javac?
11790         if test ! -x "$BOOT_JDK/bin/javac"; then
11791           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11792 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11793           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11794 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11795           BOOT_JDK_FOUND=no
11796         else
11797           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11798           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11799             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11801             BOOT_JDK_FOUND=no
11802           else
11803             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11804             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11805 
11806             # Extra M4 quote needed to protect [] in grep expression.
11807             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11808             if test "x$FOUND_VERSION_78" = x; then
11809               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11811               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11812 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11813               BOOT_JDK_FOUND=no
11814             else
11815               # We're done! :-)
11816               BOOT_JDK_FOUND=yes
11817 
11818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11819 
11820   # Input might be given as Windows format, start by converting to
11821   # unix format.
11822   path="$BOOT_JDK"
11823   new_path=`$CYGPATH -u "$path"`
11824 
11825   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11826   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11827   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11828   # "foo.exe" is OK but "foo" is an error.
11829   #
11830   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11831   # It is also a way to make sure we got the proper file name for the real test later on.
11832   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11833   if test "x$test_shortpath" = x; then
11834     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11835 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11836     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11837   fi
11838 
11839   # Call helper function which possibly converts this using DOS-style short mode.
11840   # If so, the updated path is stored in $new_path.
11841 
11842   input_path="$new_path"
11843   # Check if we need to convert this using DOS-style short mode. If the path
11844   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11845   # take no chances and rewrite it.
11846   # Note: m4 eats our [], so we need to use [ and ] instead.
11847   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11848   if test "x$has_forbidden_chars" != x; then
11849     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11850     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11851     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11852     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11853       # Going to short mode and back again did indeed matter. Since short mode is
11854       # case insensitive, let's make it lowercase to improve readability.
11855       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11856       # Now convert it back to Unix-stile (cygpath)
11857       input_path=`$CYGPATH -u "$shortmode_path"`
11858       new_path="$input_path"
11859     fi
11860   fi
11861 
11862   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11863   if test "x$test_cygdrive_prefix" = x; then
11864     # As a simple fix, exclude /usr/bin since it's not a real path.
11865     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11866       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11867       # a path prefixed by /cygdrive for fixpath to work.
11868       new_path="$CYGWIN_ROOT_PATH$input_path"
11869     fi
11870   fi
11871 
11872 
11873   if test "x$path" != "x$new_path"; then
11874     BOOT_JDK="$new_path"
11875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11877   fi
11878 
11879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11880 
11881   path="$BOOT_JDK"
11882   has_colon=`$ECHO $path | $GREP ^.:`
11883   new_path="$path"
11884   if test "x$has_colon" = x; then
11885     # Not in mixed or Windows style, start by that.
11886     new_path=`cmd //c echo $path`
11887   fi
11888 
11889 
11890   input_path="$new_path"
11891   # Check if we need to convert this using DOS-style short mode. If the path
11892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11893   # take no chances and rewrite it.
11894   # Note: m4 eats our [], so we need to use [ and ] instead.
11895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11896   if test "x$has_forbidden_chars" != x; then
11897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11898     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11899   fi
11900 
11901 
11902   windows_path="$new_path"
11903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11904     unix_path=`$CYGPATH -u "$windows_path"`
11905     new_path="$unix_path"
11906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11908     new_path="$unix_path"
11909   fi
11910 
11911   if test "x$path" != "x$new_path"; then
11912     BOOT_JDK="$new_path"
11913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11914 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11915   fi
11916 
11917   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11918   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11919 
11920   else
11921     # We're on a posix platform. Hooray! :)
11922     path="$BOOT_JDK"
11923     has_space=`$ECHO "$path" | $GREP " "`
11924     if test "x$has_space" != x; then
11925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11926 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11927       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11928     fi
11929 
11930     # Use eval to expand a potential ~
11931     eval path="$path"
11932     if test ! -f "$path" && test ! -d "$path"; then
11933       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11934     fi
11935 
11936     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11937   fi
11938 
11939               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11940 $as_echo_n "checking for Boot JDK... " >&6; }
11941               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11942 $as_echo "$BOOT_JDK" >&6; }
11943               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11944 $as_echo_n "checking Boot JDK version... " >&6; }
11945               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11946               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11947 $as_echo "$BOOT_JDK_VERSION" >&6; }
11948             fi # end check jdk version
11949           fi # end check rt.jar
11950         fi # end check javac
11951       fi # end check java
11952     fi # end check boot jdk found
11953   fi
11954 
11955 
11956 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11957 
11958   if test "x$BOOT_JDK_FOUND" = xno; then
11959     # Now execute the test
11960 
11961     if test -x /usr/libexec/java_home; then
11962         BOOT_JDK=`/usr/libexec/java_home`
11963         BOOT_JDK_FOUND=maybe
11964         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11965 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11966     fi
11967 
11968 
11969     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11970     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11971       # Do we have a bin/java?
11972       if test ! -x "$BOOT_JDK/bin/java"; then
11973         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11974 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11975         BOOT_JDK_FOUND=no
11976       else
11977         # Do we have a bin/javac?
11978         if test ! -x "$BOOT_JDK/bin/javac"; then
11979           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11980 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11981           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11982 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11983           BOOT_JDK_FOUND=no
11984         else
11985           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11986           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11987             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11988 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11989             BOOT_JDK_FOUND=no
11990           else
11991             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11992             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11993 
11994             # Extra M4 quote needed to protect [] in grep expression.
11995             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11996             if test "x$FOUND_VERSION_78" = x; then
11997               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11999               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12000 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12001               BOOT_JDK_FOUND=no
12002             else
12003               # We're done! :-)
12004               BOOT_JDK_FOUND=yes
12005 
12006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12007 
12008   # Input might be given as Windows format, start by converting to
12009   # unix format.
12010   path="$BOOT_JDK"
12011   new_path=`$CYGPATH -u "$path"`
12012 
12013   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12014   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12015   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12016   # "foo.exe" is OK but "foo" is an error.
12017   #
12018   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12019   # It is also a way to make sure we got the proper file name for the real test later on.
12020   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12021   if test "x$test_shortpath" = x; then
12022     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12023 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12024     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12025   fi
12026 
12027   # Call helper function which possibly converts this using DOS-style short mode.
12028   # If so, the updated path is stored in $new_path.
12029 
12030   input_path="$new_path"
12031   # Check if we need to convert this using DOS-style short mode. If the path
12032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12033   # take no chances and rewrite it.
12034   # Note: m4 eats our [], so we need to use [ and ] instead.
12035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12036   if test "x$has_forbidden_chars" != x; then
12037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12041       # Going to short mode and back again did indeed matter. Since short mode is
12042       # case insensitive, let's make it lowercase to improve readability.
12043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12044       # Now convert it back to Unix-stile (cygpath)
12045       input_path=`$CYGPATH -u "$shortmode_path"`
12046       new_path="$input_path"
12047     fi
12048   fi
12049 
12050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12051   if test "x$test_cygdrive_prefix" = x; then
12052     # As a simple fix, exclude /usr/bin since it's not a real path.
12053     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12055       # a path prefixed by /cygdrive for fixpath to work.
12056       new_path="$CYGWIN_ROOT_PATH$input_path"
12057     fi
12058   fi
12059 
12060 
12061   if test "x$path" != "x$new_path"; then
12062     BOOT_JDK="$new_path"
12063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12064 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12065   fi
12066 
12067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12068 
12069   path="$BOOT_JDK"
12070   has_colon=`$ECHO $path | $GREP ^.:`
12071   new_path="$path"
12072   if test "x$has_colon" = x; then
12073     # Not in mixed or Windows style, start by that.
12074     new_path=`cmd //c echo $path`
12075   fi
12076 
12077 
12078   input_path="$new_path"
12079   # Check if we need to convert this using DOS-style short mode. If the path
12080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12081   # take no chances and rewrite it.
12082   # Note: m4 eats our [], so we need to use [ and ] instead.
12083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12084   if test "x$has_forbidden_chars" != x; then
12085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12087   fi
12088 
12089 
12090   windows_path="$new_path"
12091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12092     unix_path=`$CYGPATH -u "$windows_path"`
12093     new_path="$unix_path"
12094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12096     new_path="$unix_path"
12097   fi
12098 
12099   if test "x$path" != "x$new_path"; then
12100     BOOT_JDK="$new_path"
12101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12102 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12103   fi
12104 
12105   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12106   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12107 
12108   else
12109     # We're on a posix platform. Hooray! :)
12110     path="$BOOT_JDK"
12111     has_space=`$ECHO "$path" | $GREP " "`
12112     if test "x$has_space" != x; then
12113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12114 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12115       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12116     fi
12117 
12118     # Use eval to expand a potential ~
12119     eval path="$path"
12120     if test ! -f "$path" && test ! -d "$path"; then
12121       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12122     fi
12123 
12124     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12125   fi
12126 
12127               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12128 $as_echo_n "checking for Boot JDK... " >&6; }
12129               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12130 $as_echo "$BOOT_JDK" >&6; }
12131               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12132 $as_echo_n "checking Boot JDK version... " >&6; }
12133               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12134               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12135 $as_echo "$BOOT_JDK_VERSION" >&6; }
12136             fi # end check jdk version
12137           fi # end check rt.jar
12138         fi # end check javac
12139       fi # end check java
12140     fi # end check boot jdk found
12141   fi
12142 
12143 
12144 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12145 
12146   if test "x$BOOT_JDK_FOUND" = xno; then
12147     # Now execute the test
12148 
12149     # Extract the first word of "javac", so it can be a program name with args.
12150 set dummy javac; ac_word=$2
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12152 $as_echo_n "checking for $ac_word... " >&6; }
12153 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12154   $as_echo_n "(cached) " >&6
12155 else
12156   case $JAVAC_CHECK in
12157   [\\/]* | ?:[\\/]*)
12158   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12159   ;;
12160   *)
12161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12162 for as_dir in $PATH
12163 do
12164   IFS=$as_save_IFS
12165   test -z "$as_dir" && as_dir=.
12166     for ac_exec_ext in '' $ac_executable_extensions; do
12167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12168     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12170     break 2
12171   fi
12172 done
12173   done
12174 IFS=$as_save_IFS
12175 
12176   ;;
12177 esac
12178 fi
12179 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12180 if test -n "$JAVAC_CHECK"; then
12181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12182 $as_echo "$JAVAC_CHECK" >&6; }
12183 else
12184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12185 $as_echo "no" >&6; }
12186 fi
12187 
12188 
12189     # Extract the first word of "java", so it can be a program name with args.
12190 set dummy java; ac_word=$2
12191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12192 $as_echo_n "checking for $ac_word... " >&6; }
12193 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12194   $as_echo_n "(cached) " >&6
12195 else
12196   case $JAVA_CHECK in
12197   [\\/]* | ?:[\\/]*)
12198   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12199   ;;
12200   *)
12201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12202 for as_dir in $PATH
12203 do
12204   IFS=$as_save_IFS
12205   test -z "$as_dir" && as_dir=.
12206     for ac_exec_ext in '' $ac_executable_extensions; do
12207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12208     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12210     break 2
12211   fi
12212 done
12213   done
12214 IFS=$as_save_IFS
12215 
12216   ;;
12217 esac
12218 fi
12219 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12220 if test -n "$JAVA_CHECK"; then
12221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12222 $as_echo "$JAVA_CHECK" >&6; }
12223 else
12224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12225 $as_echo "no" >&6; }
12226 fi
12227 
12228 
12229     BINARY="$JAVAC_CHECK"
12230     if test "x$JAVAC_CHECK" = x; then
12231         BINARY="$JAVA_CHECK"
12232     fi
12233     if test "x$BINARY" != x; then
12234         # So there is a java(c) binary, it might be part of a JDK.
12235         # Lets find the JDK/JRE directory by following symbolic links.
12236         # Linux/GNU systems often have links from /usr/bin/java to
12237         # /etc/alternatives/java to the real JDK binary.
12238 
12239     if test "x$OPENJDK_BUILD_OS" != xwindows; then
12240         # Follow a chain of symbolic links. Use readlink
12241         # where it exists, else fall back to horribly
12242         # complicated shell code.
12243         if test "x$READLINK_TESTED" != yes; then
12244             # On MacOSX there is a readlink tool with a different
12245             # purpose than the GNU readlink tool. Check the found readlink.
12246             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12247             if test "x$ISGNU" = x; then
12248                  # A readlink that we do not know how to use.
12249                  # Are there other non-GNU readlinks out there?
12250                  READLINK_TESTED=yes
12251                  READLINK=
12252             fi
12253         fi
12254 
12255         if test "x$READLINK" != x; then
12256             BINARY=`$READLINK -f $BINARY`
12257         else
12258             # Save the current directory for restoring afterwards
12259             STARTDIR=$PWD
12260             COUNTER=0
12261             sym_link_dir=`$DIRNAME $BINARY`
12262             sym_link_file=`$BASENAME $BINARY`
12263             cd $sym_link_dir
12264             # Use -P flag to resolve symlinks in directories.
12265             cd `$THEPWDCMD -P`
12266             sym_link_dir=`$THEPWDCMD -P`
12267             # Resolve file symlinks
12268             while test $COUNTER -lt 20; do
12269                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12270                 if test "x$ISLINK" == x; then
12271                     # This is not a symbolic link! We are done!
12272                     break
12273                 fi
12274                 # Again resolve directory symlinks since the target of the just found
12275                 # link could be in a different directory
12276                 cd `$DIRNAME $ISLINK`
12277                 sym_link_dir=`$THEPWDCMD -P`
12278                 sym_link_file=`$BASENAME $ISLINK`
12279                 let COUNTER=COUNTER+1
12280             done
12281             cd $STARTDIR
12282             BINARY=$sym_link_dir/$sym_link_file
12283         fi
12284     fi
12285 
12286         BOOT_JDK=`dirname "$BINARY"`
12287         BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12288         if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12289             # Looks like we found ourselves an JDK
12290             BOOT_JDK_FOUND=maybe
12291             { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12292 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12293         fi
12294     fi
12295 
12296 
12297     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12298     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12299       # Do we have a bin/java?
12300       if test ! -x "$BOOT_JDK/bin/java"; then
12301         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12302 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12303         BOOT_JDK_FOUND=no
12304       else
12305         # Do we have a bin/javac?
12306         if test ! -x "$BOOT_JDK/bin/javac"; then
12307           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12308 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12309           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12310 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12311           BOOT_JDK_FOUND=no
12312         else
12313           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12314           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12315             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12317             BOOT_JDK_FOUND=no
12318           else
12319             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12320             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12321 
12322             # Extra M4 quote needed to protect [] in grep expression.
12323             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12324             if test "x$FOUND_VERSION_78" = x; then
12325               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12326 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12327               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12328 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12329               BOOT_JDK_FOUND=no
12330             else
12331               # We're done! :-)
12332               BOOT_JDK_FOUND=yes
12333 
12334   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12335 
12336   # Input might be given as Windows format, start by converting to
12337   # unix format.
12338   path="$BOOT_JDK"
12339   new_path=`$CYGPATH -u "$path"`
12340 
12341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12344   # "foo.exe" is OK but "foo" is an error.
12345   #
12346   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12347   # It is also a way to make sure we got the proper file name for the real test later on.
12348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12349   if test "x$test_shortpath" = x; then
12350     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12351 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12352     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12353   fi
12354 
12355   # Call helper function which possibly converts this using DOS-style short mode.
12356   # If so, the updated path is stored in $new_path.
12357 
12358   input_path="$new_path"
12359   # Check if we need to convert this using DOS-style short mode. If the path
12360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12361   # take no chances and rewrite it.
12362   # Note: m4 eats our [], so we need to use [ and ] instead.
12363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12364   if test "x$has_forbidden_chars" != x; then
12365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12366     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12367     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12368     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12369       # Going to short mode and back again did indeed matter. Since short mode is
12370       # case insensitive, let's make it lowercase to improve readability.
12371       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12372       # Now convert it back to Unix-stile (cygpath)
12373       input_path=`$CYGPATH -u "$shortmode_path"`
12374       new_path="$input_path"
12375     fi
12376   fi
12377 
12378   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12379   if test "x$test_cygdrive_prefix" = x; then
12380     # As a simple fix, exclude /usr/bin since it's not a real path.
12381     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12382       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12383       # a path prefixed by /cygdrive for fixpath to work.
12384       new_path="$CYGWIN_ROOT_PATH$input_path"
12385     fi
12386   fi
12387 
12388 
12389   if test "x$path" != "x$new_path"; then
12390     BOOT_JDK="$new_path"
12391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12392 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12393   fi
12394 
12395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12396 
12397   path="$BOOT_JDK"
12398   has_colon=`$ECHO $path | $GREP ^.:`
12399   new_path="$path"
12400   if test "x$has_colon" = x; then
12401     # Not in mixed or Windows style, start by that.
12402     new_path=`cmd //c echo $path`
12403   fi
12404 
12405 
12406   input_path="$new_path"
12407   # Check if we need to convert this using DOS-style short mode. If the path
12408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12409   # take no chances and rewrite it.
12410   # Note: m4 eats our [], so we need to use [ and ] instead.
12411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12412   if test "x$has_forbidden_chars" != x; then
12413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12414     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12415   fi
12416 
12417 
12418   windows_path="$new_path"
12419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12420     unix_path=`$CYGPATH -u "$windows_path"`
12421     new_path="$unix_path"
12422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12424     new_path="$unix_path"
12425   fi
12426 
12427   if test "x$path" != "x$new_path"; then
12428     BOOT_JDK="$new_path"
12429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12430 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12431   fi
12432 
12433   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12434   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12435 
12436   else
12437     # We're on a posix platform. Hooray! :)
12438     path="$BOOT_JDK"
12439     has_space=`$ECHO "$path" | $GREP " "`
12440     if test "x$has_space" != x; then
12441       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12442 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12443       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12444     fi
12445 
12446     # Use eval to expand a potential ~
12447     eval path="$path"
12448     if test ! -f "$path" && test ! -d "$path"; then
12449       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12450     fi
12451 
12452     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12453   fi
12454 
12455               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12456 $as_echo_n "checking for Boot JDK... " >&6; }
12457               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12458 $as_echo "$BOOT_JDK" >&6; }
12459               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12460 $as_echo_n "checking Boot JDK version... " >&6; }
12461               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12462               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12463 $as_echo "$BOOT_JDK_VERSION" >&6; }
12464             fi # end check jdk version
12465           fi # end check rt.jar
12466         fi # end check javac
12467       fi # end check java
12468     fi # end check boot jdk found
12469   fi
12470 
12471 
12472 # Test: Is there a JDK installed in default, well-known locations?
12473 
12474   if test "x$BOOT_JDK_FOUND" = xno; then
12475     # Now execute the test
12476 
12477   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12478 
12479   if test "x$BOOT_JDK_FOUND" = xno; then
12480     # Now execute the test
12481 
12482   if test "x$ProgramW6432" != x; then
12483     VIRTUAL_DIR="$ProgramW6432/Java"
12484 
12485   windows_path="$VIRTUAL_DIR"
12486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12487     unix_path=`$CYGPATH -u "$windows_path"`
12488     VIRTUAL_DIR="$unix_path"
12489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12491     VIRTUAL_DIR="$unix_path"
12492   fi
12493 
12494 
12495   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12496   BOOT_JDK_SUFFIX=""
12497   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12498   if test "x$ALL_JDKS_FOUND" != x; then
12499     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12500 
12501   if test "x$BOOT_JDK_FOUND" = xno; then
12502     # Now execute the test
12503 
12504         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12505         if test -d "$BOOT_JDK"; then
12506           BOOT_JDK_FOUND=maybe
12507           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12508 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12509         fi
12510 
12511 
12512     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12513     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12514       # Do we have a bin/java?
12515       if test ! -x "$BOOT_JDK/bin/java"; then
12516         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12517 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12518         BOOT_JDK_FOUND=no
12519       else
12520         # Do we have a bin/javac?
12521         if test ! -x "$BOOT_JDK/bin/javac"; then
12522           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12523 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12524           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12525 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12526           BOOT_JDK_FOUND=no
12527         else
12528           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12529           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12530             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12531 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12532             BOOT_JDK_FOUND=no
12533           else
12534             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12535             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12536 
12537             # Extra M4 quote needed to protect [] in grep expression.
12538             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12539             if test "x$FOUND_VERSION_78" = x; then
12540               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12541 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12542               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12543 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12544               BOOT_JDK_FOUND=no
12545             else
12546               # We're done! :-)
12547               BOOT_JDK_FOUND=yes
12548 
12549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12550 
12551   # Input might be given as Windows format, start by converting to
12552   # unix format.
12553   path="$BOOT_JDK"
12554   new_path=`$CYGPATH -u "$path"`
12555 
12556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12559   # "foo.exe" is OK but "foo" is an error.
12560   #
12561   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12562   # It is also a way to make sure we got the proper file name for the real test later on.
12563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12564   if test "x$test_shortpath" = x; then
12565     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12566 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12567     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12568   fi
12569 
12570   # Call helper function which possibly converts this using DOS-style short mode.
12571   # If so, the updated path is stored in $new_path.
12572 
12573   input_path="$new_path"
12574   # Check if we need to convert this using DOS-style short mode. If the path
12575   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12576   # take no chances and rewrite it.
12577   # Note: m4 eats our [], so we need to use [ and ] instead.
12578   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12579   if test "x$has_forbidden_chars" != x; then
12580     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12581     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12582     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12583     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12584       # Going to short mode and back again did indeed matter. Since short mode is
12585       # case insensitive, let's make it lowercase to improve readability.
12586       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12587       # Now convert it back to Unix-stile (cygpath)
12588       input_path=`$CYGPATH -u "$shortmode_path"`
12589       new_path="$input_path"
12590     fi
12591   fi
12592 
12593   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12594   if test "x$test_cygdrive_prefix" = x; then
12595     # As a simple fix, exclude /usr/bin since it's not a real path.
12596     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12597       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12598       # a path prefixed by /cygdrive for fixpath to work.
12599       new_path="$CYGWIN_ROOT_PATH$input_path"
12600     fi
12601   fi
12602 
12603 
12604   if test "x$path" != "x$new_path"; then
12605     BOOT_JDK="$new_path"
12606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12607 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12608   fi
12609 
12610   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12611 
12612   path="$BOOT_JDK"
12613   has_colon=`$ECHO $path | $GREP ^.:`
12614   new_path="$path"
12615   if test "x$has_colon" = x; then
12616     # Not in mixed or Windows style, start by that.
12617     new_path=`cmd //c echo $path`
12618   fi
12619 
12620 
12621   input_path="$new_path"
12622   # Check if we need to convert this using DOS-style short mode. If the path
12623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12624   # take no chances and rewrite it.
12625   # Note: m4 eats our [], so we need to use [ and ] instead.
12626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12627   if test "x$has_forbidden_chars" != x; then
12628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12629     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12630   fi
12631 
12632 
12633   windows_path="$new_path"
12634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12635     unix_path=`$CYGPATH -u "$windows_path"`
12636     new_path="$unix_path"
12637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12639     new_path="$unix_path"
12640   fi
12641 
12642   if test "x$path" != "x$new_path"; then
12643     BOOT_JDK="$new_path"
12644     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12645 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12646   fi
12647 
12648   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12649   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12650 
12651   else
12652     # We're on a posix platform. Hooray! :)
12653     path="$BOOT_JDK"
12654     has_space=`$ECHO "$path" | $GREP " "`
12655     if test "x$has_space" != x; then
12656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12657 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12658       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12659     fi
12660 
12661     # Use eval to expand a potential ~
12662     eval path="$path"
12663     if test ! -f "$path" && test ! -d "$path"; then
12664       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12665     fi
12666 
12667     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12668   fi
12669 
12670               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12671 $as_echo_n "checking for Boot JDK... " >&6; }
12672               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12673 $as_echo "$BOOT_JDK" >&6; }
12674               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12675 $as_echo_n "checking Boot JDK version... " >&6; }
12676               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12677               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12678 $as_echo "$BOOT_JDK_VERSION" >&6; }
12679             fi # end check jdk version
12680           fi # end check rt.jar
12681         fi # end check javac
12682       fi # end check java
12683     fi # end check boot jdk found
12684   fi
12685 
12686     done
12687   fi
12688 
12689   fi
12690 
12691 
12692     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12693     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12694       # Do we have a bin/java?
12695       if test ! -x "$BOOT_JDK/bin/java"; then
12696         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12697 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12698         BOOT_JDK_FOUND=no
12699       else
12700         # Do we have a bin/javac?
12701         if test ! -x "$BOOT_JDK/bin/javac"; then
12702           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12704           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12705 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12706           BOOT_JDK_FOUND=no
12707         else
12708           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12709           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12710             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12712             BOOT_JDK_FOUND=no
12713           else
12714             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12715             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12716 
12717             # Extra M4 quote needed to protect [] in grep expression.
12718             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12719             if test "x$FOUND_VERSION_78" = x; then
12720               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12721 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12722               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12723 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12724               BOOT_JDK_FOUND=no
12725             else
12726               # We're done! :-)
12727               BOOT_JDK_FOUND=yes
12728 
12729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12730 
12731   # Input might be given as Windows format, start by converting to
12732   # unix format.
12733   path="$BOOT_JDK"
12734   new_path=`$CYGPATH -u "$path"`
12735 
12736   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12737   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12738   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12739   # "foo.exe" is OK but "foo" is an error.
12740   #
12741   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12742   # It is also a way to make sure we got the proper file name for the real test later on.
12743   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12744   if test "x$test_shortpath" = x; then
12745     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12746 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12747     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12748   fi
12749 
12750   # Call helper function which possibly converts this using DOS-style short mode.
12751   # If so, the updated path is stored in $new_path.
12752 
12753   input_path="$new_path"
12754   # Check if we need to convert this using DOS-style short mode. If the path
12755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12756   # take no chances and rewrite it.
12757   # Note: m4 eats our [], so we need to use [ and ] instead.
12758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12759   if test "x$has_forbidden_chars" != x; then
12760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12761     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12762     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12763     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12764       # Going to short mode and back again did indeed matter. Since short mode is
12765       # case insensitive, let's make it lowercase to improve readability.
12766       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12767       # Now convert it back to Unix-stile (cygpath)
12768       input_path=`$CYGPATH -u "$shortmode_path"`
12769       new_path="$input_path"
12770     fi
12771   fi
12772 
12773   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12774   if test "x$test_cygdrive_prefix" = x; then
12775     # As a simple fix, exclude /usr/bin since it's not a real path.
12776     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12777       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12778       # a path prefixed by /cygdrive for fixpath to work.
12779       new_path="$CYGWIN_ROOT_PATH$input_path"
12780     fi
12781   fi
12782 
12783 
12784   if test "x$path" != "x$new_path"; then
12785     BOOT_JDK="$new_path"
12786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12787 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12788   fi
12789 
12790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12791 
12792   path="$BOOT_JDK"
12793   has_colon=`$ECHO $path | $GREP ^.:`
12794   new_path="$path"
12795   if test "x$has_colon" = x; then
12796     # Not in mixed or Windows style, start by that.
12797     new_path=`cmd //c echo $path`
12798   fi
12799 
12800 
12801   input_path="$new_path"
12802   # Check if we need to convert this using DOS-style short mode. If the path
12803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12804   # take no chances and rewrite it.
12805   # Note: m4 eats our [], so we need to use [ and ] instead.
12806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12807   if test "x$has_forbidden_chars" != x; then
12808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12809     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12810   fi
12811 
12812 
12813   windows_path="$new_path"
12814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12815     unix_path=`$CYGPATH -u "$windows_path"`
12816     new_path="$unix_path"
12817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12819     new_path="$unix_path"
12820   fi
12821 
12822   if test "x$path" != "x$new_path"; then
12823     BOOT_JDK="$new_path"
12824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12825 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12826   fi
12827 
12828   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12829   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12830 
12831   else
12832     # We're on a posix platform. Hooray! :)
12833     path="$BOOT_JDK"
12834     has_space=`$ECHO "$path" | $GREP " "`
12835     if test "x$has_space" != x; then
12836       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12837 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12838       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12839     fi
12840 
12841     # Use eval to expand a potential ~
12842     eval path="$path"
12843     if test ! -f "$path" && test ! -d "$path"; then
12844       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12845     fi
12846 
12847     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12848   fi
12849 
12850               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12851 $as_echo_n "checking for Boot JDK... " >&6; }
12852               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12853 $as_echo "$BOOT_JDK" >&6; }
12854               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12855 $as_echo_n "checking Boot JDK version... " >&6; }
12856               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12857               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12858 $as_echo "$BOOT_JDK_VERSION" >&6; }
12859             fi # end check jdk version
12860           fi # end check rt.jar
12861         fi # end check javac
12862       fi # end check java
12863     fi # end check boot jdk found
12864   fi
12865 
12866 
12867   if test "x$BOOT_JDK_FOUND" = xno; then
12868     # Now execute the test
12869 
12870   if test "x$PROGRAMW6432" != x; then
12871     VIRTUAL_DIR="$PROGRAMW6432/Java"
12872 
12873   windows_path="$VIRTUAL_DIR"
12874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12875     unix_path=`$CYGPATH -u "$windows_path"`
12876     VIRTUAL_DIR="$unix_path"
12877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12879     VIRTUAL_DIR="$unix_path"
12880   fi
12881 
12882 
12883   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12884   BOOT_JDK_SUFFIX=""
12885   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12886   if test "x$ALL_JDKS_FOUND" != x; then
12887     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12888 
12889   if test "x$BOOT_JDK_FOUND" = xno; then
12890     # Now execute the test
12891 
12892         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12893         if test -d "$BOOT_JDK"; then
12894           BOOT_JDK_FOUND=maybe
12895           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12896 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12897         fi
12898 
12899 
12900     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12901     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12902       # Do we have a bin/java?
12903       if test ! -x "$BOOT_JDK/bin/java"; then
12904         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12905 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12906         BOOT_JDK_FOUND=no
12907       else
12908         # Do we have a bin/javac?
12909         if test ! -x "$BOOT_JDK/bin/javac"; then
12910           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12912           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12913 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12914           BOOT_JDK_FOUND=no
12915         else
12916           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12917           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12918             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12919 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12920             BOOT_JDK_FOUND=no
12921           else
12922             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12923             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12924 
12925             # Extra M4 quote needed to protect [] in grep expression.
12926             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12927             if test "x$FOUND_VERSION_78" = x; then
12928               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12929 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12930               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12931 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12932               BOOT_JDK_FOUND=no
12933             else
12934               # We're done! :-)
12935               BOOT_JDK_FOUND=yes
12936 
12937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12938 
12939   # Input might be given as Windows format, start by converting to
12940   # unix format.
12941   path="$BOOT_JDK"
12942   new_path=`$CYGPATH -u "$path"`
12943 
12944   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12945   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12946   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12947   # "foo.exe" is OK but "foo" is an error.
12948   #
12949   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12950   # It is also a way to make sure we got the proper file name for the real test later on.
12951   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12952   if test "x$test_shortpath" = x; then
12953     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12954 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12955     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12956   fi
12957 
12958   # Call helper function which possibly converts this using DOS-style short mode.
12959   # If so, the updated path is stored in $new_path.
12960 
12961   input_path="$new_path"
12962   # Check if we need to convert this using DOS-style short mode. If the path
12963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12964   # take no chances and rewrite it.
12965   # Note: m4 eats our [], so we need to use [ and ] instead.
12966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12967   if test "x$has_forbidden_chars" != x; then
12968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12969     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12970     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12971     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12972       # Going to short mode and back again did indeed matter. Since short mode is
12973       # case insensitive, let's make it lowercase to improve readability.
12974       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12975       # Now convert it back to Unix-stile (cygpath)
12976       input_path=`$CYGPATH -u "$shortmode_path"`
12977       new_path="$input_path"
12978     fi
12979   fi
12980 
12981   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12982   if test "x$test_cygdrive_prefix" = x; then
12983     # As a simple fix, exclude /usr/bin since it's not a real path.
12984     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12985       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12986       # a path prefixed by /cygdrive for fixpath to work.
12987       new_path="$CYGWIN_ROOT_PATH$input_path"
12988     fi
12989   fi
12990 
12991 
12992   if test "x$path" != "x$new_path"; then
12993     BOOT_JDK="$new_path"
12994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12995 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12996   fi
12997 
12998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12999 
13000   path="$BOOT_JDK"
13001   has_colon=`$ECHO $path | $GREP ^.:`
13002   new_path="$path"
13003   if test "x$has_colon" = x; then
13004     # Not in mixed or Windows style, start by that.
13005     new_path=`cmd //c echo $path`
13006   fi
13007 
13008 
13009   input_path="$new_path"
13010   # Check if we need to convert this using DOS-style short mode. If the path
13011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13012   # take no chances and rewrite it.
13013   # Note: m4 eats our [], so we need to use [ and ] instead.
13014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13015   if test "x$has_forbidden_chars" != x; then
13016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13017     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13018   fi
13019 
13020 
13021   windows_path="$new_path"
13022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13023     unix_path=`$CYGPATH -u "$windows_path"`
13024     new_path="$unix_path"
13025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13027     new_path="$unix_path"
13028   fi
13029 
13030   if test "x$path" != "x$new_path"; then
13031     BOOT_JDK="$new_path"
13032     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13033 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13034   fi
13035 
13036   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13037   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13038 
13039   else
13040     # We're on a posix platform. Hooray! :)
13041     path="$BOOT_JDK"
13042     has_space=`$ECHO "$path" | $GREP " "`
13043     if test "x$has_space" != x; then
13044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13045 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13046       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13047     fi
13048 
13049     # Use eval to expand a potential ~
13050     eval path="$path"
13051     if test ! -f "$path" && test ! -d "$path"; then
13052       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13053     fi
13054 
13055     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13056   fi
13057 
13058               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13059 $as_echo_n "checking for Boot JDK... " >&6; }
13060               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13061 $as_echo "$BOOT_JDK" >&6; }
13062               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13063 $as_echo_n "checking Boot JDK version... " >&6; }
13064               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13065               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13066 $as_echo "$BOOT_JDK_VERSION" >&6; }
13067             fi # end check jdk version
13068           fi # end check rt.jar
13069         fi # end check javac
13070       fi # end check java
13071     fi # end check boot jdk found
13072   fi
13073 
13074     done
13075   fi
13076 
13077   fi
13078 
13079 
13080     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13081     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13082       # Do we have a bin/java?
13083       if test ! -x "$BOOT_JDK/bin/java"; then
13084         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13085 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13086         BOOT_JDK_FOUND=no
13087       else
13088         # Do we have a bin/javac?
13089         if test ! -x "$BOOT_JDK/bin/javac"; then
13090           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13092           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13093 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13094           BOOT_JDK_FOUND=no
13095         else
13096           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13097           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13098             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13099 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13100             BOOT_JDK_FOUND=no
13101           else
13102             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13103             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13104 
13105             # Extra M4 quote needed to protect [] in grep expression.
13106             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13107             if test "x$FOUND_VERSION_78" = x; then
13108               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13109 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13110               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13111 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13112               BOOT_JDK_FOUND=no
13113             else
13114               # We're done! :-)
13115               BOOT_JDK_FOUND=yes
13116 
13117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13118 
13119   # Input might be given as Windows format, start by converting to
13120   # unix format.
13121   path="$BOOT_JDK"
13122   new_path=`$CYGPATH -u "$path"`
13123 
13124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13127   # "foo.exe" is OK but "foo" is an error.
13128   #
13129   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13130   # It is also a way to make sure we got the proper file name for the real test later on.
13131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13132   if test "x$test_shortpath" = x; then
13133     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13134 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13135     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13136   fi
13137 
13138   # Call helper function which possibly converts this using DOS-style short mode.
13139   # If so, the updated path is stored in $new_path.
13140 
13141   input_path="$new_path"
13142   # Check if we need to convert this using DOS-style short mode. If the path
13143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13144   # take no chances and rewrite it.
13145   # Note: m4 eats our [], so we need to use [ and ] instead.
13146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13147   if test "x$has_forbidden_chars" != x; then
13148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13152       # Going to short mode and back again did indeed matter. Since short mode is
13153       # case insensitive, let's make it lowercase to improve readability.
13154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13155       # Now convert it back to Unix-stile (cygpath)
13156       input_path=`$CYGPATH -u "$shortmode_path"`
13157       new_path="$input_path"
13158     fi
13159   fi
13160 
13161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13162   if test "x$test_cygdrive_prefix" = x; then
13163     # As a simple fix, exclude /usr/bin since it's not a real path.
13164     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13166       # a path prefixed by /cygdrive for fixpath to work.
13167       new_path="$CYGWIN_ROOT_PATH$input_path"
13168     fi
13169   fi
13170 
13171 
13172   if test "x$path" != "x$new_path"; then
13173     BOOT_JDK="$new_path"
13174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13175 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13176   fi
13177 
13178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13179 
13180   path="$BOOT_JDK"
13181   has_colon=`$ECHO $path | $GREP ^.:`
13182   new_path="$path"
13183   if test "x$has_colon" = x; then
13184     # Not in mixed or Windows style, start by that.
13185     new_path=`cmd //c echo $path`
13186   fi
13187 
13188 
13189   input_path="$new_path"
13190   # Check if we need to convert this using DOS-style short mode. If the path
13191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13192   # take no chances and rewrite it.
13193   # Note: m4 eats our [], so we need to use [ and ] instead.
13194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13195   if test "x$has_forbidden_chars" != x; then
13196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13197     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13198   fi
13199 
13200 
13201   windows_path="$new_path"
13202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13203     unix_path=`$CYGPATH -u "$windows_path"`
13204     new_path="$unix_path"
13205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13207     new_path="$unix_path"
13208   fi
13209 
13210   if test "x$path" != "x$new_path"; then
13211     BOOT_JDK="$new_path"
13212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13213 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13214   fi
13215 
13216   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13217   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13218 
13219   else
13220     # We're on a posix platform. Hooray! :)
13221     path="$BOOT_JDK"
13222     has_space=`$ECHO "$path" | $GREP " "`
13223     if test "x$has_space" != x; then
13224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13226       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13227     fi
13228 
13229     # Use eval to expand a potential ~
13230     eval path="$path"
13231     if test ! -f "$path" && test ! -d "$path"; then
13232       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13233     fi
13234 
13235     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13236   fi
13237 
13238               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13239 $as_echo_n "checking for Boot JDK... " >&6; }
13240               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13241 $as_echo "$BOOT_JDK" >&6; }
13242               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13243 $as_echo_n "checking Boot JDK version... " >&6; }
13244               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13245               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13246 $as_echo "$BOOT_JDK_VERSION" >&6; }
13247             fi # end check jdk version
13248           fi # end check rt.jar
13249         fi # end check javac
13250       fi # end check java
13251     fi # end check boot jdk found
13252   fi
13253 
13254 
13255   if test "x$BOOT_JDK_FOUND" = xno; then
13256     # Now execute the test
13257 
13258   if test "x$PROGRAMFILES" != x; then
13259     VIRTUAL_DIR="$PROGRAMFILES/Java"
13260 
13261   windows_path="$VIRTUAL_DIR"
13262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13263     unix_path=`$CYGPATH -u "$windows_path"`
13264     VIRTUAL_DIR="$unix_path"
13265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13267     VIRTUAL_DIR="$unix_path"
13268   fi
13269 
13270 
13271   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13272   BOOT_JDK_SUFFIX=""
13273   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13274   if test "x$ALL_JDKS_FOUND" != x; then
13275     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13276 
13277   if test "x$BOOT_JDK_FOUND" = xno; then
13278     # Now execute the test
13279 
13280         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13281         if test -d "$BOOT_JDK"; then
13282           BOOT_JDK_FOUND=maybe
13283           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13284 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13285         fi
13286 
13287 
13288     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13289     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13290       # Do we have a bin/java?
13291       if test ! -x "$BOOT_JDK/bin/java"; then
13292         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13293 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13294         BOOT_JDK_FOUND=no
13295       else
13296         # Do we have a bin/javac?
13297         if test ! -x "$BOOT_JDK/bin/javac"; then
13298           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13300           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13301 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13302           BOOT_JDK_FOUND=no
13303         else
13304           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13305           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13306             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13307 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13308             BOOT_JDK_FOUND=no
13309           else
13310             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13311             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13312 
13313             # Extra M4 quote needed to protect [] in grep expression.
13314             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13315             if test "x$FOUND_VERSION_78" = x; then
13316               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13317 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13318               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13319 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13320               BOOT_JDK_FOUND=no
13321             else
13322               # We're done! :-)
13323               BOOT_JDK_FOUND=yes
13324 
13325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13326 
13327   # Input might be given as Windows format, start by converting to
13328   # unix format.
13329   path="$BOOT_JDK"
13330   new_path=`$CYGPATH -u "$path"`
13331 
13332   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13333   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13334   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13335   # "foo.exe" is OK but "foo" is an error.
13336   #
13337   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13338   # It is also a way to make sure we got the proper file name for the real test later on.
13339   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13340   if test "x$test_shortpath" = x; then
13341     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13342 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13343     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13344   fi
13345 
13346   # Call helper function which possibly converts this using DOS-style short mode.
13347   # If so, the updated path is stored in $new_path.
13348 
13349   input_path="$new_path"
13350   # Check if we need to convert this using DOS-style short mode. If the path
13351   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13352   # take no chances and rewrite it.
13353   # Note: m4 eats our [], so we need to use [ and ] instead.
13354   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13355   if test "x$has_forbidden_chars" != x; then
13356     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13357     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13358     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13359     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13360       # Going to short mode and back again did indeed matter. Since short mode is
13361       # case insensitive, let's make it lowercase to improve readability.
13362       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13363       # Now convert it back to Unix-stile (cygpath)
13364       input_path=`$CYGPATH -u "$shortmode_path"`
13365       new_path="$input_path"
13366     fi
13367   fi
13368 
13369   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13370   if test "x$test_cygdrive_prefix" = x; then
13371     # As a simple fix, exclude /usr/bin since it's not a real path.
13372     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13373       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13374       # a path prefixed by /cygdrive for fixpath to work.
13375       new_path="$CYGWIN_ROOT_PATH$input_path"
13376     fi
13377   fi
13378 
13379 
13380   if test "x$path" != "x$new_path"; then
13381     BOOT_JDK="$new_path"
13382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13383 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13384   fi
13385 
13386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13387 
13388   path="$BOOT_JDK"
13389   has_colon=`$ECHO $path | $GREP ^.:`
13390   new_path="$path"
13391   if test "x$has_colon" = x; then
13392     # Not in mixed or Windows style, start by that.
13393     new_path=`cmd //c echo $path`
13394   fi
13395 
13396 
13397   input_path="$new_path"
13398   # Check if we need to convert this using DOS-style short mode. If the path
13399   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13400   # take no chances and rewrite it.
13401   # Note: m4 eats our [], so we need to use [ and ] instead.
13402   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13403   if test "x$has_forbidden_chars" != x; then
13404     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13405     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13406   fi
13407 
13408 
13409   windows_path="$new_path"
13410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13411     unix_path=`$CYGPATH -u "$windows_path"`
13412     new_path="$unix_path"
13413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13415     new_path="$unix_path"
13416   fi
13417 
13418   if test "x$path" != "x$new_path"; then
13419     BOOT_JDK="$new_path"
13420     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13421 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13422   fi
13423 
13424   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13425   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13426 
13427   else
13428     # We're on a posix platform. Hooray! :)
13429     path="$BOOT_JDK"
13430     has_space=`$ECHO "$path" | $GREP " "`
13431     if test "x$has_space" != x; then
13432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13433 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13434       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13435     fi
13436 
13437     # Use eval to expand a potential ~
13438     eval path="$path"
13439     if test ! -f "$path" && test ! -d "$path"; then
13440       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13441     fi
13442 
13443     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13444   fi
13445 
13446               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13447 $as_echo_n "checking for Boot JDK... " >&6; }
13448               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13449 $as_echo "$BOOT_JDK" >&6; }
13450               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13451 $as_echo_n "checking Boot JDK version... " >&6; }
13452               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13453               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13454 $as_echo "$BOOT_JDK_VERSION" >&6; }
13455             fi # end check jdk version
13456           fi # end check rt.jar
13457         fi # end check javac
13458       fi # end check java
13459     fi # end check boot jdk found
13460   fi
13461 
13462     done
13463   fi
13464 
13465   fi
13466 
13467 
13468     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13469     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13470       # Do we have a bin/java?
13471       if test ! -x "$BOOT_JDK/bin/java"; then
13472         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13473 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13474         BOOT_JDK_FOUND=no
13475       else
13476         # Do we have a bin/javac?
13477         if test ! -x "$BOOT_JDK/bin/javac"; then
13478           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13480           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13481 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13482           BOOT_JDK_FOUND=no
13483         else
13484           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13485           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13486             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13487 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13488             BOOT_JDK_FOUND=no
13489           else
13490             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13491             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13492 
13493             # Extra M4 quote needed to protect [] in grep expression.
13494             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13495             if test "x$FOUND_VERSION_78" = x; then
13496               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13497 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13498               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13499 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13500               BOOT_JDK_FOUND=no
13501             else
13502               # We're done! :-)
13503               BOOT_JDK_FOUND=yes
13504 
13505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13506 
13507   # Input might be given as Windows format, start by converting to
13508   # unix format.
13509   path="$BOOT_JDK"
13510   new_path=`$CYGPATH -u "$path"`
13511 
13512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13515   # "foo.exe" is OK but "foo" is an error.
13516   #
13517   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13518   # It is also a way to make sure we got the proper file name for the real test later on.
13519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13520   if test "x$test_shortpath" = x; then
13521     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13522 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13523     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13524   fi
13525 
13526   # Call helper function which possibly converts this using DOS-style short mode.
13527   # If so, the updated path is stored in $new_path.
13528 
13529   input_path="$new_path"
13530   # Check if we need to convert this using DOS-style short mode. If the path
13531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13532   # take no chances and rewrite it.
13533   # Note: m4 eats our [], so we need to use [ and ] instead.
13534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13535   if test "x$has_forbidden_chars" != x; then
13536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13537     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13538     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13539     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13540       # Going to short mode and back again did indeed matter. Since short mode is
13541       # case insensitive, let's make it lowercase to improve readability.
13542       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13543       # Now convert it back to Unix-stile (cygpath)
13544       input_path=`$CYGPATH -u "$shortmode_path"`
13545       new_path="$input_path"
13546     fi
13547   fi
13548 
13549   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13550   if test "x$test_cygdrive_prefix" = x; then
13551     # As a simple fix, exclude /usr/bin since it's not a real path.
13552     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13553       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13554       # a path prefixed by /cygdrive for fixpath to work.
13555       new_path="$CYGWIN_ROOT_PATH$input_path"
13556     fi
13557   fi
13558 
13559 
13560   if test "x$path" != "x$new_path"; then
13561     BOOT_JDK="$new_path"
13562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13563 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13564   fi
13565 
13566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13567 
13568   path="$BOOT_JDK"
13569   has_colon=`$ECHO $path | $GREP ^.:`
13570   new_path="$path"
13571   if test "x$has_colon" = x; then
13572     # Not in mixed or Windows style, start by that.
13573     new_path=`cmd //c echo $path`
13574   fi
13575 
13576 
13577   input_path="$new_path"
13578   # Check if we need to convert this using DOS-style short mode. If the path
13579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13580   # take no chances and rewrite it.
13581   # Note: m4 eats our [], so we need to use [ and ] instead.
13582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13583   if test "x$has_forbidden_chars" != x; then
13584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13585     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13586   fi
13587 
13588 
13589   windows_path="$new_path"
13590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13591     unix_path=`$CYGPATH -u "$windows_path"`
13592     new_path="$unix_path"
13593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13595     new_path="$unix_path"
13596   fi
13597 
13598   if test "x$path" != "x$new_path"; then
13599     BOOT_JDK="$new_path"
13600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13601 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13602   fi
13603 
13604   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13605   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13606 
13607   else
13608     # We're on a posix platform. Hooray! :)
13609     path="$BOOT_JDK"
13610     has_space=`$ECHO "$path" | $GREP " "`
13611     if test "x$has_space" != x; then
13612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13613 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13614       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13615     fi
13616 
13617     # Use eval to expand a potential ~
13618     eval path="$path"
13619     if test ! -f "$path" && test ! -d "$path"; then
13620       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13621     fi
13622 
13623     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13624   fi
13625 
13626               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13627 $as_echo_n "checking for Boot JDK... " >&6; }
13628               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13629 $as_echo "$BOOT_JDK" >&6; }
13630               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13631 $as_echo_n "checking Boot JDK version... " >&6; }
13632               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13633               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13634 $as_echo "$BOOT_JDK_VERSION" >&6; }
13635             fi # end check jdk version
13636           fi # end check rt.jar
13637         fi # end check javac
13638       fi # end check java
13639     fi # end check boot jdk found
13640   fi
13641 
13642 
13643   if test "x$BOOT_JDK_FOUND" = xno; then
13644     # Now execute the test
13645 
13646   if test "x$ProgramFiles" != x; then
13647     VIRTUAL_DIR="$ProgramFiles/Java"
13648 
13649   windows_path="$VIRTUAL_DIR"
13650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13651     unix_path=`$CYGPATH -u "$windows_path"`
13652     VIRTUAL_DIR="$unix_path"
13653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13655     VIRTUAL_DIR="$unix_path"
13656   fi
13657 
13658 
13659   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13660   BOOT_JDK_SUFFIX=""
13661   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13662   if test "x$ALL_JDKS_FOUND" != x; then
13663     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13664 
13665   if test "x$BOOT_JDK_FOUND" = xno; then
13666     # Now execute the test
13667 
13668         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13669         if test -d "$BOOT_JDK"; then
13670           BOOT_JDK_FOUND=maybe
13671           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13672 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13673         fi
13674 
13675 
13676     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13677     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13678       # Do we have a bin/java?
13679       if test ! -x "$BOOT_JDK/bin/java"; then
13680         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13681 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13682         BOOT_JDK_FOUND=no
13683       else
13684         # Do we have a bin/javac?
13685         if test ! -x "$BOOT_JDK/bin/javac"; then
13686           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13688           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13689 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13690           BOOT_JDK_FOUND=no
13691         else
13692           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13693           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13694             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13695 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13696             BOOT_JDK_FOUND=no
13697           else
13698             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13699             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13700 
13701             # Extra M4 quote needed to protect [] in grep expression.
13702             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13703             if test "x$FOUND_VERSION_78" = x; then
13704               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13705 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13706               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13707 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13708               BOOT_JDK_FOUND=no
13709             else
13710               # We're done! :-)
13711               BOOT_JDK_FOUND=yes
13712 
13713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13714 
13715   # Input might be given as Windows format, start by converting to
13716   # unix format.
13717   path="$BOOT_JDK"
13718   new_path=`$CYGPATH -u "$path"`
13719 
13720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13723   # "foo.exe" is OK but "foo" is an error.
13724   #
13725   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13726   # It is also a way to make sure we got the proper file name for the real test later on.
13727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13728   if test "x$test_shortpath" = x; then
13729     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13730 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13731     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13732   fi
13733 
13734   # Call helper function which possibly converts this using DOS-style short mode.
13735   # If so, the updated path is stored in $new_path.
13736 
13737   input_path="$new_path"
13738   # Check if we need to convert this using DOS-style short mode. If the path
13739   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13740   # take no chances and rewrite it.
13741   # Note: m4 eats our [], so we need to use [ and ] instead.
13742   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13743   if test "x$has_forbidden_chars" != x; then
13744     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13745     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13746     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13747     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13748       # Going to short mode and back again did indeed matter. Since short mode is
13749       # case insensitive, let's make it lowercase to improve readability.
13750       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13751       # Now convert it back to Unix-stile (cygpath)
13752       input_path=`$CYGPATH -u "$shortmode_path"`
13753       new_path="$input_path"
13754     fi
13755   fi
13756 
13757   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13758   if test "x$test_cygdrive_prefix" = x; then
13759     # As a simple fix, exclude /usr/bin since it's not a real path.
13760     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13761       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13762       # a path prefixed by /cygdrive for fixpath to work.
13763       new_path="$CYGWIN_ROOT_PATH$input_path"
13764     fi
13765   fi
13766 
13767 
13768   if test "x$path" != "x$new_path"; then
13769     BOOT_JDK="$new_path"
13770     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13771 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13772   fi
13773 
13774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13775 
13776   path="$BOOT_JDK"
13777   has_colon=`$ECHO $path | $GREP ^.:`
13778   new_path="$path"
13779   if test "x$has_colon" = x; then
13780     # Not in mixed or Windows style, start by that.
13781     new_path=`cmd //c echo $path`
13782   fi
13783 
13784 
13785   input_path="$new_path"
13786   # Check if we need to convert this using DOS-style short mode. If the path
13787   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13788   # take no chances and rewrite it.
13789   # Note: m4 eats our [], so we need to use [ and ] instead.
13790   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13791   if test "x$has_forbidden_chars" != x; then
13792     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13793     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13794   fi
13795 
13796 
13797   windows_path="$new_path"
13798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13799     unix_path=`$CYGPATH -u "$windows_path"`
13800     new_path="$unix_path"
13801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13803     new_path="$unix_path"
13804   fi
13805 
13806   if test "x$path" != "x$new_path"; then
13807     BOOT_JDK="$new_path"
13808     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13809 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13810   fi
13811 
13812   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13813   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13814 
13815   else
13816     # We're on a posix platform. Hooray! :)
13817     path="$BOOT_JDK"
13818     has_space=`$ECHO "$path" | $GREP " "`
13819     if test "x$has_space" != x; then
13820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13821 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13822       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13823     fi
13824 
13825     # Use eval to expand a potential ~
13826     eval path="$path"
13827     if test ! -f "$path" && test ! -d "$path"; then
13828       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13829     fi
13830 
13831     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13832   fi
13833 
13834               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13835 $as_echo_n "checking for Boot JDK... " >&6; }
13836               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13837 $as_echo "$BOOT_JDK" >&6; }
13838               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13839 $as_echo_n "checking Boot JDK version... " >&6; }
13840               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13841               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13842 $as_echo "$BOOT_JDK_VERSION" >&6; }
13843             fi # end check jdk version
13844           fi # end check rt.jar
13845         fi # end check javac
13846       fi # end check java
13847     fi # end check boot jdk found
13848   fi
13849 
13850     done
13851   fi
13852 
13853   fi
13854 
13855 
13856     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13857     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13858       # Do we have a bin/java?
13859       if test ! -x "$BOOT_JDK/bin/java"; then
13860         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13861 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13862         BOOT_JDK_FOUND=no
13863       else
13864         # Do we have a bin/javac?
13865         if test ! -x "$BOOT_JDK/bin/javac"; then
13866           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13868           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13869 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13870           BOOT_JDK_FOUND=no
13871         else
13872           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13873           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13874             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13875 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13876             BOOT_JDK_FOUND=no
13877           else
13878             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13879             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13880 
13881             # Extra M4 quote needed to protect [] in grep expression.
13882             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13883             if test "x$FOUND_VERSION_78" = x; then
13884               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13885 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13886               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13887 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13888               BOOT_JDK_FOUND=no
13889             else
13890               # We're done! :-)
13891               BOOT_JDK_FOUND=yes
13892 
13893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13894 
13895   # Input might be given as Windows format, start by converting to
13896   # unix format.
13897   path="$BOOT_JDK"
13898   new_path=`$CYGPATH -u "$path"`
13899 
13900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13903   # "foo.exe" is OK but "foo" is an error.
13904   #
13905   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13906   # It is also a way to make sure we got the proper file name for the real test later on.
13907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13908   if test "x$test_shortpath" = x; then
13909     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13910 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13911     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13912   fi
13913 
13914   # Call helper function which possibly converts this using DOS-style short mode.
13915   # If so, the updated path is stored in $new_path.
13916 
13917   input_path="$new_path"
13918   # Check if we need to convert this using DOS-style short mode. If the path
13919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13920   # take no chances and rewrite it.
13921   # Note: m4 eats our [], so we need to use [ and ] instead.
13922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13923   if test "x$has_forbidden_chars" != x; then
13924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13925     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13926     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13927     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13928       # Going to short mode and back again did indeed matter. Since short mode is
13929       # case insensitive, let's make it lowercase to improve readability.
13930       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13931       # Now convert it back to Unix-stile (cygpath)
13932       input_path=`$CYGPATH -u "$shortmode_path"`
13933       new_path="$input_path"
13934     fi
13935   fi
13936 
13937   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13938   if test "x$test_cygdrive_prefix" = x; then
13939     # As a simple fix, exclude /usr/bin since it's not a real path.
13940     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13941       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13942       # a path prefixed by /cygdrive for fixpath to work.
13943       new_path="$CYGWIN_ROOT_PATH$input_path"
13944     fi
13945   fi
13946 
13947 
13948   if test "x$path" != "x$new_path"; then
13949     BOOT_JDK="$new_path"
13950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13952   fi
13953 
13954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13955 
13956   path="$BOOT_JDK"
13957   has_colon=`$ECHO $path | $GREP ^.:`
13958   new_path="$path"
13959   if test "x$has_colon" = x; then
13960     # Not in mixed or Windows style, start by that.
13961     new_path=`cmd //c echo $path`
13962   fi
13963 
13964 
13965   input_path="$new_path"
13966   # Check if we need to convert this using DOS-style short mode. If the path
13967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13968   # take no chances and rewrite it.
13969   # Note: m4 eats our [], so we need to use [ and ] instead.
13970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13971   if test "x$has_forbidden_chars" != x; then
13972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13974   fi
13975 
13976 
13977   windows_path="$new_path"
13978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979     unix_path=`$CYGPATH -u "$windows_path"`
13980     new_path="$unix_path"
13981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13983     new_path="$unix_path"
13984   fi
13985 
13986   if test "x$path" != "x$new_path"; then
13987     BOOT_JDK="$new_path"
13988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13989 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13990   fi
13991 
13992   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13993   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13994 
13995   else
13996     # We're on a posix platform. Hooray! :)
13997     path="$BOOT_JDK"
13998     has_space=`$ECHO "$path" | $GREP " "`
13999     if test "x$has_space" != x; then
14000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14001 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14002       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14003     fi
14004 
14005     # Use eval to expand a potential ~
14006     eval path="$path"
14007     if test ! -f "$path" && test ! -d "$path"; then
14008       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14009     fi
14010 
14011     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14012   fi
14013 
14014               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14015 $as_echo_n "checking for Boot JDK... " >&6; }
14016               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14017 $as_echo "$BOOT_JDK" >&6; }
14018               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14019 $as_echo_n "checking Boot JDK version... " >&6; }
14020               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14021               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14022 $as_echo "$BOOT_JDK_VERSION" >&6; }
14023             fi # end check jdk version
14024           fi # end check rt.jar
14025         fi # end check javac
14026       fi # end check java
14027     fi # end check boot jdk found
14028   fi
14029 
14030 
14031   if test "x$BOOT_JDK_FOUND" = xno; then
14032     # Now execute the test
14033 
14034   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14035   BOOT_JDK_SUFFIX=""
14036   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14037   if test "x$ALL_JDKS_FOUND" != x; then
14038     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14039 
14040   if test "x$BOOT_JDK_FOUND" = xno; then
14041     # Now execute the test
14042 
14043         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14044         if test -d "$BOOT_JDK"; then
14045           BOOT_JDK_FOUND=maybe
14046           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14047 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14048         fi
14049 
14050 
14051     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14052     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14053       # Do we have a bin/java?
14054       if test ! -x "$BOOT_JDK/bin/java"; then
14055         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14057         BOOT_JDK_FOUND=no
14058       else
14059         # Do we have a bin/javac?
14060         if test ! -x "$BOOT_JDK/bin/javac"; then
14061           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14063           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14064 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14065           BOOT_JDK_FOUND=no
14066         else
14067           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14068           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14069             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14070 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14071             BOOT_JDK_FOUND=no
14072           else
14073             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14074             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14075 
14076             # Extra M4 quote needed to protect [] in grep expression.
14077             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14078             if test "x$FOUND_VERSION_78" = x; then
14079               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14081               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14082 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14083               BOOT_JDK_FOUND=no
14084             else
14085               # We're done! :-)
14086               BOOT_JDK_FOUND=yes
14087 
14088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14089 
14090   # Input might be given as Windows format, start by converting to
14091   # unix format.
14092   path="$BOOT_JDK"
14093   new_path=`$CYGPATH -u "$path"`
14094 
14095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14098   # "foo.exe" is OK but "foo" is an error.
14099   #
14100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14101   # It is also a way to make sure we got the proper file name for the real test later on.
14102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14103   if test "x$test_shortpath" = x; then
14104     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14105 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14106     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14107   fi
14108 
14109   # Call helper function which possibly converts this using DOS-style short mode.
14110   # If so, the updated path is stored in $new_path.
14111 
14112   input_path="$new_path"
14113   # Check if we need to convert this using DOS-style short mode. If the path
14114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14115   # take no chances and rewrite it.
14116   # Note: m4 eats our [], so we need to use [ and ] instead.
14117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14118   if test "x$has_forbidden_chars" != x; then
14119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14123       # Going to short mode and back again did indeed matter. Since short mode is
14124       # case insensitive, let's make it lowercase to improve readability.
14125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14126       # Now convert it back to Unix-stile (cygpath)
14127       input_path=`$CYGPATH -u "$shortmode_path"`
14128       new_path="$input_path"
14129     fi
14130   fi
14131 
14132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14133   if test "x$test_cygdrive_prefix" = x; then
14134     # As a simple fix, exclude /usr/bin since it's not a real path.
14135     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14137       # a path prefixed by /cygdrive for fixpath to work.
14138       new_path="$CYGWIN_ROOT_PATH$input_path"
14139     fi
14140   fi
14141 
14142 
14143   if test "x$path" != "x$new_path"; then
14144     BOOT_JDK="$new_path"
14145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14146 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14147   fi
14148 
14149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14150 
14151   path="$BOOT_JDK"
14152   has_colon=`$ECHO $path | $GREP ^.:`
14153   new_path="$path"
14154   if test "x$has_colon" = x; then
14155     # Not in mixed or Windows style, start by that.
14156     new_path=`cmd //c echo $path`
14157   fi
14158 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14169   fi
14170 
14171 
14172   windows_path="$new_path"
14173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14174     unix_path=`$CYGPATH -u "$windows_path"`
14175     new_path="$unix_path"
14176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14178     new_path="$unix_path"
14179   fi
14180 
14181   if test "x$path" != "x$new_path"; then
14182     BOOT_JDK="$new_path"
14183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14184 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14185   fi
14186 
14187   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14188   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14189 
14190   else
14191     # We're on a posix platform. Hooray! :)
14192     path="$BOOT_JDK"
14193     has_space=`$ECHO "$path" | $GREP " "`
14194     if test "x$has_space" != x; then
14195       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14196 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14197       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14198     fi
14199 
14200     # Use eval to expand a potential ~
14201     eval path="$path"
14202     if test ! -f "$path" && test ! -d "$path"; then
14203       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14204     fi
14205 
14206     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14207   fi
14208 
14209               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14210 $as_echo_n "checking for Boot JDK... " >&6; }
14211               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14212 $as_echo "$BOOT_JDK" >&6; }
14213               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14214 $as_echo_n "checking Boot JDK version... " >&6; }
14215               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14216               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14217 $as_echo "$BOOT_JDK_VERSION" >&6; }
14218             fi # end check jdk version
14219           fi # end check rt.jar
14220         fi # end check javac
14221       fi # end check java
14222     fi # end check boot jdk found
14223   fi
14224 
14225     done
14226   fi
14227 
14228 
14229     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14230     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14231       # Do we have a bin/java?
14232       if test ! -x "$BOOT_JDK/bin/java"; then
14233         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14234 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14235         BOOT_JDK_FOUND=no
14236       else
14237         # Do we have a bin/javac?
14238         if test ! -x "$BOOT_JDK/bin/javac"; then
14239           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14241           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14242 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14243           BOOT_JDK_FOUND=no
14244         else
14245           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14246           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14247             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14248 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14249             BOOT_JDK_FOUND=no
14250           else
14251             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14252             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14253 
14254             # Extra M4 quote needed to protect [] in grep expression.
14255             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14256             if test "x$FOUND_VERSION_78" = x; then
14257               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14259               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14260 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14261               BOOT_JDK_FOUND=no
14262             else
14263               # We're done! :-)
14264               BOOT_JDK_FOUND=yes
14265 
14266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14267 
14268   # Input might be given as Windows format, start by converting to
14269   # unix format.
14270   path="$BOOT_JDK"
14271   new_path=`$CYGPATH -u "$path"`
14272 
14273   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14274   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14275   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14276   # "foo.exe" is OK but "foo" is an error.
14277   #
14278   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14279   # It is also a way to make sure we got the proper file name for the real test later on.
14280   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14281   if test "x$test_shortpath" = x; then
14282     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14283 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14284     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14285   fi
14286 
14287   # Call helper function which possibly converts this using DOS-style short mode.
14288   # If so, the updated path is stored in $new_path.
14289 
14290   input_path="$new_path"
14291   # Check if we need to convert this using DOS-style short mode. If the path
14292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14293   # take no chances and rewrite it.
14294   # Note: m4 eats our [], so we need to use [ and ] instead.
14295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14296   if test "x$has_forbidden_chars" != x; then
14297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14298     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14299     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14300     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14301       # Going to short mode and back again did indeed matter. Since short mode is
14302       # case insensitive, let's make it lowercase to improve readability.
14303       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14304       # Now convert it back to Unix-stile (cygpath)
14305       input_path=`$CYGPATH -u "$shortmode_path"`
14306       new_path="$input_path"
14307     fi
14308   fi
14309 
14310   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14311   if test "x$test_cygdrive_prefix" = x; then
14312     # As a simple fix, exclude /usr/bin since it's not a real path.
14313     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14314       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14315       # a path prefixed by /cygdrive for fixpath to work.
14316       new_path="$CYGWIN_ROOT_PATH$input_path"
14317     fi
14318   fi
14319 
14320 
14321   if test "x$path" != "x$new_path"; then
14322     BOOT_JDK="$new_path"
14323     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14324 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14325   fi
14326 
14327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14328 
14329   path="$BOOT_JDK"
14330   has_colon=`$ECHO $path | $GREP ^.:`
14331   new_path="$path"
14332   if test "x$has_colon" = x; then
14333     # Not in mixed or Windows style, start by that.
14334     new_path=`cmd //c echo $path`
14335   fi
14336 
14337 
14338   input_path="$new_path"
14339   # Check if we need to convert this using DOS-style short mode. If the path
14340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14341   # take no chances and rewrite it.
14342   # Note: m4 eats our [], so we need to use [ and ] instead.
14343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14344   if test "x$has_forbidden_chars" != x; then
14345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14346     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14347   fi
14348 
14349 
14350   windows_path="$new_path"
14351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14352     unix_path=`$CYGPATH -u "$windows_path"`
14353     new_path="$unix_path"
14354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14356     new_path="$unix_path"
14357   fi
14358 
14359   if test "x$path" != "x$new_path"; then
14360     BOOT_JDK="$new_path"
14361     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14362 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14363   fi
14364 
14365   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14366   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14367 
14368   else
14369     # We're on a posix platform. Hooray! :)
14370     path="$BOOT_JDK"
14371     has_space=`$ECHO "$path" | $GREP " "`
14372     if test "x$has_space" != x; then
14373       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14374 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14375       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14376     fi
14377 
14378     # Use eval to expand a potential ~
14379     eval path="$path"
14380     if test ! -f "$path" && test ! -d "$path"; then
14381       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14382     fi
14383 
14384     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14385   fi
14386 
14387               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14388 $as_echo_n "checking for Boot JDK... " >&6; }
14389               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14390 $as_echo "$BOOT_JDK" >&6; }
14391               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14392 $as_echo_n "checking Boot JDK version... " >&6; }
14393               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14394               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14395 $as_echo "$BOOT_JDK_VERSION" >&6; }
14396             fi # end check jdk version
14397           fi # end check rt.jar
14398         fi # end check javac
14399       fi # end check java
14400     fi # end check boot jdk found
14401   fi
14402 
14403   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14404 
14405   if test "x$BOOT_JDK_FOUND" = xno; then
14406     # Now execute the test
14407 
14408   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14409   BOOT_JDK_SUFFIX="/Contents/Home"
14410   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14411   if test "x$ALL_JDKS_FOUND" != x; then
14412     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14413 
14414   if test "x$BOOT_JDK_FOUND" = xno; then
14415     # Now execute the test
14416 
14417         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14418         if test -d "$BOOT_JDK"; then
14419           BOOT_JDK_FOUND=maybe
14420           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14421 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14422         fi
14423 
14424 
14425     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14426     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14427       # Do we have a bin/java?
14428       if test ! -x "$BOOT_JDK/bin/java"; then
14429         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14430 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14431         BOOT_JDK_FOUND=no
14432       else
14433         # Do we have a bin/javac?
14434         if test ! -x "$BOOT_JDK/bin/javac"; then
14435           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14436 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14437           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14438 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14439           BOOT_JDK_FOUND=no
14440         else
14441           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14442           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14443             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14445             BOOT_JDK_FOUND=no
14446           else
14447             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14448             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14449 
14450             # Extra M4 quote needed to protect [] in grep expression.
14451             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14452             if test "x$FOUND_VERSION_78" = x; then
14453               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14454 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14455               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14456 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14457               BOOT_JDK_FOUND=no
14458             else
14459               # We're done! :-)
14460               BOOT_JDK_FOUND=yes
14461 
14462   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14463 
14464   # Input might be given as Windows format, start by converting to
14465   # unix format.
14466   path="$BOOT_JDK"
14467   new_path=`$CYGPATH -u "$path"`
14468 
14469   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14470   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14471   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14472   # "foo.exe" is OK but "foo" is an error.
14473   #
14474   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14475   # It is also a way to make sure we got the proper file name for the real test later on.
14476   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14477   if test "x$test_shortpath" = x; then
14478     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14479 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14480     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14481   fi
14482 
14483   # Call helper function which possibly converts this using DOS-style short mode.
14484   # If so, the updated path is stored in $new_path.
14485 
14486   input_path="$new_path"
14487   # Check if we need to convert this using DOS-style short mode. If the path
14488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14489   # take no chances and rewrite it.
14490   # Note: m4 eats our [], so we need to use [ and ] instead.
14491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14492   if test "x$has_forbidden_chars" != x; then
14493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14497       # Going to short mode and back again did indeed matter. Since short mode is
14498       # case insensitive, let's make it lowercase to improve readability.
14499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14500       # Now convert it back to Unix-stile (cygpath)
14501       input_path=`$CYGPATH -u "$shortmode_path"`
14502       new_path="$input_path"
14503     fi
14504   fi
14505 
14506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14507   if test "x$test_cygdrive_prefix" = x; then
14508     # As a simple fix, exclude /usr/bin since it's not a real path.
14509     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14511       # a path prefixed by /cygdrive for fixpath to work.
14512       new_path="$CYGWIN_ROOT_PATH$input_path"
14513     fi
14514   fi
14515 
14516 
14517   if test "x$path" != "x$new_path"; then
14518     BOOT_JDK="$new_path"
14519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14520 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14521   fi
14522 
14523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14524 
14525   path="$BOOT_JDK"
14526   has_colon=`$ECHO $path | $GREP ^.:`
14527   new_path="$path"
14528   if test "x$has_colon" = x; then
14529     # Not in mixed or Windows style, start by that.
14530     new_path=`cmd //c echo $path`
14531   fi
14532 
14533 
14534   input_path="$new_path"
14535   # Check if we need to convert this using DOS-style short mode. If the path
14536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14537   # take no chances and rewrite it.
14538   # Note: m4 eats our [], so we need to use [ and ] instead.
14539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14540   if test "x$has_forbidden_chars" != x; then
14541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14542     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14543   fi
14544 
14545 
14546   windows_path="$new_path"
14547   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14548     unix_path=`$CYGPATH -u "$windows_path"`
14549     new_path="$unix_path"
14550   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14551     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14552     new_path="$unix_path"
14553   fi
14554 
14555   if test "x$path" != "x$new_path"; then
14556     BOOT_JDK="$new_path"
14557     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14558 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14559   fi
14560 
14561   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14562   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14563 
14564   else
14565     # We're on a posix platform. Hooray! :)
14566     path="$BOOT_JDK"
14567     has_space=`$ECHO "$path" | $GREP " "`
14568     if test "x$has_space" != x; then
14569       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14570 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14571       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14572     fi
14573 
14574     # Use eval to expand a potential ~
14575     eval path="$path"
14576     if test ! -f "$path" && test ! -d "$path"; then
14577       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14578     fi
14579 
14580     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14581   fi
14582 
14583               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14584 $as_echo_n "checking for Boot JDK... " >&6; }
14585               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14586 $as_echo "$BOOT_JDK" >&6; }
14587               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14588 $as_echo_n "checking Boot JDK version... " >&6; }
14589               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14590               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14591 $as_echo "$BOOT_JDK_VERSION" >&6; }
14592             fi # end check jdk version
14593           fi # end check rt.jar
14594         fi # end check javac
14595       fi # end check java
14596     fi # end check boot jdk found
14597   fi
14598 
14599     done
14600   fi
14601 
14602 
14603     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14604     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14605       # Do we have a bin/java?
14606       if test ! -x "$BOOT_JDK/bin/java"; then
14607         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14609         BOOT_JDK_FOUND=no
14610       else
14611         # Do we have a bin/javac?
14612         if test ! -x "$BOOT_JDK/bin/javac"; then
14613           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14614 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14615           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14616 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14617           BOOT_JDK_FOUND=no
14618         else
14619           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14620           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14621             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14622 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14623             BOOT_JDK_FOUND=no
14624           else
14625             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14626             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14627 
14628             # Extra M4 quote needed to protect [] in grep expression.
14629             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14630             if test "x$FOUND_VERSION_78" = x; then
14631               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14632 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14633               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14634 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14635               BOOT_JDK_FOUND=no
14636             else
14637               # We're done! :-)
14638               BOOT_JDK_FOUND=yes
14639 
14640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14641 
14642   # Input might be given as Windows format, start by converting to
14643   # unix format.
14644   path="$BOOT_JDK"
14645   new_path=`$CYGPATH -u "$path"`
14646 
14647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14650   # "foo.exe" is OK but "foo" is an error.
14651   #
14652   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14653   # It is also a way to make sure we got the proper file name for the real test later on.
14654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14655   if test "x$test_shortpath" = x; then
14656     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14657 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14658     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14659   fi
14660 
14661   # Call helper function which possibly converts this using DOS-style short mode.
14662   # If so, the updated path is stored in $new_path.
14663 
14664   input_path="$new_path"
14665   # Check if we need to convert this using DOS-style short mode. If the path
14666   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14667   # take no chances and rewrite it.
14668   # Note: m4 eats our [], so we need to use [ and ] instead.
14669   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14670   if test "x$has_forbidden_chars" != x; then
14671     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14672     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14673     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14674     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14675       # Going to short mode and back again did indeed matter. Since short mode is
14676       # case insensitive, let's make it lowercase to improve readability.
14677       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14678       # Now convert it back to Unix-stile (cygpath)
14679       input_path=`$CYGPATH -u "$shortmode_path"`
14680       new_path="$input_path"
14681     fi
14682   fi
14683 
14684   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14685   if test "x$test_cygdrive_prefix" = x; then
14686     # As a simple fix, exclude /usr/bin since it's not a real path.
14687     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14688       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14689       # a path prefixed by /cygdrive for fixpath to work.
14690       new_path="$CYGWIN_ROOT_PATH$input_path"
14691     fi
14692   fi
14693 
14694 
14695   if test "x$path" != "x$new_path"; then
14696     BOOT_JDK="$new_path"
14697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14698 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14699   fi
14700 
14701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14702 
14703   path="$BOOT_JDK"
14704   has_colon=`$ECHO $path | $GREP ^.:`
14705   new_path="$path"
14706   if test "x$has_colon" = x; then
14707     # Not in mixed or Windows style, start by that.
14708     new_path=`cmd //c echo $path`
14709   fi
14710 
14711 
14712   input_path="$new_path"
14713   # Check if we need to convert this using DOS-style short mode. If the path
14714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14715   # take no chances and rewrite it.
14716   # Note: m4 eats our [], so we need to use [ and ] instead.
14717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14718   if test "x$has_forbidden_chars" != x; then
14719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14721   fi
14722 
14723 
14724   windows_path="$new_path"
14725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14726     unix_path=`$CYGPATH -u "$windows_path"`
14727     new_path="$unix_path"
14728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14730     new_path="$unix_path"
14731   fi
14732 
14733   if test "x$path" != "x$new_path"; then
14734     BOOT_JDK="$new_path"
14735     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14736 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14737   fi
14738 
14739   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14740   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14741 
14742   else
14743     # We're on a posix platform. Hooray! :)
14744     path="$BOOT_JDK"
14745     has_space=`$ECHO "$path" | $GREP " "`
14746     if test "x$has_space" != x; then
14747       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14748 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14749       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14750     fi
14751 
14752     # Use eval to expand a potential ~
14753     eval path="$path"
14754     if test ! -f "$path" && test ! -d "$path"; then
14755       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14756     fi
14757 
14758     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14759   fi
14760 
14761               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14762 $as_echo_n "checking for Boot JDK... " >&6; }
14763               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14764 $as_echo "$BOOT_JDK" >&6; }
14765               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14766 $as_echo_n "checking Boot JDK version... " >&6; }
14767               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14768               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14769 $as_echo "$BOOT_JDK_VERSION" >&6; }
14770             fi # end check jdk version
14771           fi # end check rt.jar
14772         fi # end check javac
14773       fi # end check java
14774     fi # end check boot jdk found
14775   fi
14776 
14777 
14778   if test "x$BOOT_JDK_FOUND" = xno; then
14779     # Now execute the test
14780 
14781   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14782   BOOT_JDK_SUFFIX="/Contents/Home"
14783   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14784   if test "x$ALL_JDKS_FOUND" != x; then
14785     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14786 
14787   if test "x$BOOT_JDK_FOUND" = xno; then
14788     # Now execute the test
14789 
14790         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14791         if test -d "$BOOT_JDK"; then
14792           BOOT_JDK_FOUND=maybe
14793           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14794 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14795         fi
14796 
14797 
14798     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14799     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14800       # Do we have a bin/java?
14801       if test ! -x "$BOOT_JDK/bin/java"; then
14802         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14804         BOOT_JDK_FOUND=no
14805       else
14806         # Do we have a bin/javac?
14807         if test ! -x "$BOOT_JDK/bin/javac"; then
14808           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14809 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14810           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14811 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14812           BOOT_JDK_FOUND=no
14813         else
14814           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14815           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14816             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14817 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14818             BOOT_JDK_FOUND=no
14819           else
14820             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14821             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14822 
14823             # Extra M4 quote needed to protect [] in grep expression.
14824             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14825             if test "x$FOUND_VERSION_78" = x; then
14826               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14828               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14829 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14830               BOOT_JDK_FOUND=no
14831             else
14832               # We're done! :-)
14833               BOOT_JDK_FOUND=yes
14834 
14835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14836 
14837   # Input might be given as Windows format, start by converting to
14838   # unix format.
14839   path="$BOOT_JDK"
14840   new_path=`$CYGPATH -u "$path"`
14841 
14842   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14843   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14844   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14845   # "foo.exe" is OK but "foo" is an error.
14846   #
14847   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14848   # It is also a way to make sure we got the proper file name for the real test later on.
14849   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14850   if test "x$test_shortpath" = x; then
14851     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14852 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14853     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14854   fi
14855 
14856   # Call helper function which possibly converts this using DOS-style short mode.
14857   # If so, the updated path is stored in $new_path.
14858 
14859   input_path="$new_path"
14860   # Check if we need to convert this using DOS-style short mode. If the path
14861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14862   # take no chances and rewrite it.
14863   # Note: m4 eats our [], so we need to use [ and ] instead.
14864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14865   if test "x$has_forbidden_chars" != x; then
14866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14867     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14868     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14869     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14870       # Going to short mode and back again did indeed matter. Since short mode is
14871       # case insensitive, let's make it lowercase to improve readability.
14872       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14873       # Now convert it back to Unix-stile (cygpath)
14874       input_path=`$CYGPATH -u "$shortmode_path"`
14875       new_path="$input_path"
14876     fi
14877   fi
14878 
14879   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14880   if test "x$test_cygdrive_prefix" = x; then
14881     # As a simple fix, exclude /usr/bin since it's not a real path.
14882     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14883       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14884       # a path prefixed by /cygdrive for fixpath to work.
14885       new_path="$CYGWIN_ROOT_PATH$input_path"
14886     fi
14887   fi
14888 
14889 
14890   if test "x$path" != "x$new_path"; then
14891     BOOT_JDK="$new_path"
14892     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14893 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14894   fi
14895 
14896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14897 
14898   path="$BOOT_JDK"
14899   has_colon=`$ECHO $path | $GREP ^.:`
14900   new_path="$path"
14901   if test "x$has_colon" = x; then
14902     # Not in mixed or Windows style, start by that.
14903     new_path=`cmd //c echo $path`
14904   fi
14905 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14916   fi
14917 
14918 
14919   windows_path="$new_path"
14920   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14921     unix_path=`$CYGPATH -u "$windows_path"`
14922     new_path="$unix_path"
14923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14924     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14925     new_path="$unix_path"
14926   fi
14927 
14928   if test "x$path" != "x$new_path"; then
14929     BOOT_JDK="$new_path"
14930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14931 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14932   fi
14933 
14934   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14935   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14936 
14937   else
14938     # We're on a posix platform. Hooray! :)
14939     path="$BOOT_JDK"
14940     has_space=`$ECHO "$path" | $GREP " "`
14941     if test "x$has_space" != x; then
14942       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14943 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14944       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14945     fi
14946 
14947     # Use eval to expand a potential ~
14948     eval path="$path"
14949     if test ! -f "$path" && test ! -d "$path"; then
14950       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14951     fi
14952 
14953     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14954   fi
14955 
14956               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14957 $as_echo_n "checking for Boot JDK... " >&6; }
14958               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14959 $as_echo "$BOOT_JDK" >&6; }
14960               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14961 $as_echo_n "checking Boot JDK version... " >&6; }
14962               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14963               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14964 $as_echo "$BOOT_JDK_VERSION" >&6; }
14965             fi # end check jdk version
14966           fi # end check rt.jar
14967         fi # end check javac
14968       fi # end check java
14969     fi # end check boot jdk found
14970   fi
14971 
14972     done
14973   fi
14974 
14975 
14976     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14977     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14978       # Do we have a bin/java?
14979       if test ! -x "$BOOT_JDK/bin/java"; then
14980         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14982         BOOT_JDK_FOUND=no
14983       else
14984         # Do we have a bin/javac?
14985         if test ! -x "$BOOT_JDK/bin/javac"; then
14986           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14987 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14988           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14989 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14990           BOOT_JDK_FOUND=no
14991         else
14992           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14993           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14994             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14995 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14996             BOOT_JDK_FOUND=no
14997           else
14998             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14999             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15000 
15001             # Extra M4 quote needed to protect [] in grep expression.
15002             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15003             if test "x$FOUND_VERSION_78" = x; then
15004               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15005 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15006               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15007 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15008               BOOT_JDK_FOUND=no
15009             else
15010               # We're done! :-)
15011               BOOT_JDK_FOUND=yes
15012 
15013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15014 
15015   # Input might be given as Windows format, start by converting to
15016   # unix format.
15017   path="$BOOT_JDK"
15018   new_path=`$CYGPATH -u "$path"`
15019 
15020   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15021   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15022   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15023   # "foo.exe" is OK but "foo" is an error.
15024   #
15025   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15026   # It is also a way to make sure we got the proper file name for the real test later on.
15027   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15028   if test "x$test_shortpath" = x; then
15029     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15030 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15031     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15032   fi
15033 
15034   # Call helper function which possibly converts this using DOS-style short mode.
15035   # If so, the updated path is stored in $new_path.
15036 
15037   input_path="$new_path"
15038   # Check if we need to convert this using DOS-style short mode. If the path
15039   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15040   # take no chances and rewrite it.
15041   # Note: m4 eats our [], so we need to use [ and ] instead.
15042   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15043   if test "x$has_forbidden_chars" != x; then
15044     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15045     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15046     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15047     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15048       # Going to short mode and back again did indeed matter. Since short mode is
15049       # case insensitive, let's make it lowercase to improve readability.
15050       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15051       # Now convert it back to Unix-stile (cygpath)
15052       input_path=`$CYGPATH -u "$shortmode_path"`
15053       new_path="$input_path"
15054     fi
15055   fi
15056 
15057   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15058   if test "x$test_cygdrive_prefix" = x; then
15059     # As a simple fix, exclude /usr/bin since it's not a real path.
15060     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15061       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15062       # a path prefixed by /cygdrive for fixpath to work.
15063       new_path="$CYGWIN_ROOT_PATH$input_path"
15064     fi
15065   fi
15066 
15067 
15068   if test "x$path" != "x$new_path"; then
15069     BOOT_JDK="$new_path"
15070     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15071 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15072   fi
15073 
15074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15075 
15076   path="$BOOT_JDK"
15077   has_colon=`$ECHO $path | $GREP ^.:`
15078   new_path="$path"
15079   if test "x$has_colon" = x; then
15080     # Not in mixed or Windows style, start by that.
15081     new_path=`cmd //c echo $path`
15082   fi
15083 
15084 
15085   input_path="$new_path"
15086   # Check if we need to convert this using DOS-style short mode. If the path
15087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15088   # take no chances and rewrite it.
15089   # Note: m4 eats our [], so we need to use [ and ] instead.
15090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15091   if test "x$has_forbidden_chars" != x; then
15092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15093     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15094   fi
15095 
15096 
15097   windows_path="$new_path"
15098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15099     unix_path=`$CYGPATH -u "$windows_path"`
15100     new_path="$unix_path"
15101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15103     new_path="$unix_path"
15104   fi
15105 
15106   if test "x$path" != "x$new_path"; then
15107     BOOT_JDK="$new_path"
15108     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15109 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15110   fi
15111 
15112   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15113   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15114 
15115   else
15116     # We're on a posix platform. Hooray! :)
15117     path="$BOOT_JDK"
15118     has_space=`$ECHO "$path" | $GREP " "`
15119     if test "x$has_space" != x; then
15120       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15121 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15122       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15123     fi
15124 
15125     # Use eval to expand a potential ~
15126     eval path="$path"
15127     if test ! -f "$path" && test ! -d "$path"; then
15128       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15129     fi
15130 
15131     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15132   fi
15133 
15134               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15135 $as_echo_n "checking for Boot JDK... " >&6; }
15136               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15137 $as_echo "$BOOT_JDK" >&6; }
15138               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15139 $as_echo_n "checking Boot JDK version... " >&6; }
15140               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15141               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15142 $as_echo "$BOOT_JDK_VERSION" >&6; }
15143             fi # end check jdk version
15144           fi # end check rt.jar
15145         fi # end check javac
15146       fi # end check java
15147     fi # end check boot jdk found
15148   fi
15149 
15150   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15151 
15152   if test "x$BOOT_JDK_FOUND" = xno; then
15153     # Now execute the test
15154 
15155   BOOT_JDK_PREFIX="/usr/lib/jvm"
15156   BOOT_JDK_SUFFIX=""
15157   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15158   if test "x$ALL_JDKS_FOUND" != x; then
15159     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15160 
15161   if test "x$BOOT_JDK_FOUND" = xno; then
15162     # Now execute the test
15163 
15164         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15165         if test -d "$BOOT_JDK"; then
15166           BOOT_JDK_FOUND=maybe
15167           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15168 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15169         fi
15170 
15171 
15172     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15173     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15174       # Do we have a bin/java?
15175       if test ! -x "$BOOT_JDK/bin/java"; then
15176         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15177 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15178         BOOT_JDK_FOUND=no
15179       else
15180         # Do we have a bin/javac?
15181         if test ! -x "$BOOT_JDK/bin/javac"; then
15182           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15183 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15184           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15185 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15186           BOOT_JDK_FOUND=no
15187         else
15188           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15189           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15190             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15192             BOOT_JDK_FOUND=no
15193           else
15194             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15195             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15196 
15197             # Extra M4 quote needed to protect [] in grep expression.
15198             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15199             if test "x$FOUND_VERSION_78" = x; then
15200               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15201 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15202               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15203 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15204               BOOT_JDK_FOUND=no
15205             else
15206               # We're done! :-)
15207               BOOT_JDK_FOUND=yes
15208 
15209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15210 
15211   # Input might be given as Windows format, start by converting to
15212   # unix format.
15213   path="$BOOT_JDK"
15214   new_path=`$CYGPATH -u "$path"`
15215 
15216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15219   # "foo.exe" is OK but "foo" is an error.
15220   #
15221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15222   # It is also a way to make sure we got the proper file name for the real test later on.
15223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15224   if test "x$test_shortpath" = x; then
15225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15227     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15228   fi
15229 
15230   # Call helper function which possibly converts this using DOS-style short mode.
15231   # If so, the updated path is stored in $new_path.
15232 
15233   input_path="$new_path"
15234   # Check if we need to convert this using DOS-style short mode. If the path
15235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15236   # take no chances and rewrite it.
15237   # Note: m4 eats our [], so we need to use [ and ] instead.
15238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15239   if test "x$has_forbidden_chars" != x; then
15240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15244       # Going to short mode and back again did indeed matter. Since short mode is
15245       # case insensitive, let's make it lowercase to improve readability.
15246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15247       # Now convert it back to Unix-stile (cygpath)
15248       input_path=`$CYGPATH -u "$shortmode_path"`
15249       new_path="$input_path"
15250     fi
15251   fi
15252 
15253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15254   if test "x$test_cygdrive_prefix" = x; then
15255     # As a simple fix, exclude /usr/bin since it's not a real path.
15256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15258       # a path prefixed by /cygdrive for fixpath to work.
15259       new_path="$CYGWIN_ROOT_PATH$input_path"
15260     fi
15261   fi
15262 
15263 
15264   if test "x$path" != "x$new_path"; then
15265     BOOT_JDK="$new_path"
15266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15267 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15268   fi
15269 
15270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15271 
15272   path="$BOOT_JDK"
15273   has_colon=`$ECHO $path | $GREP ^.:`
15274   new_path="$path"
15275   if test "x$has_colon" = x; then
15276     # Not in mixed or Windows style, start by that.
15277     new_path=`cmd //c echo $path`
15278   fi
15279 
15280 
15281   input_path="$new_path"
15282   # Check if we need to convert this using DOS-style short mode. If the path
15283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15284   # take no chances and rewrite it.
15285   # Note: m4 eats our [], so we need to use [ and ] instead.
15286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15287   if test "x$has_forbidden_chars" != x; then
15288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15290   fi
15291 
15292 
15293   windows_path="$new_path"
15294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15295     unix_path=`$CYGPATH -u "$windows_path"`
15296     new_path="$unix_path"
15297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15299     new_path="$unix_path"
15300   fi
15301 
15302   if test "x$path" != "x$new_path"; then
15303     BOOT_JDK="$new_path"
15304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15305 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15306   fi
15307 
15308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15310 
15311   else
15312     # We're on a posix platform. Hooray! :)
15313     path="$BOOT_JDK"
15314     has_space=`$ECHO "$path" | $GREP " "`
15315     if test "x$has_space" != x; then
15316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15317 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15318       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15319     fi
15320 
15321     # Use eval to expand a potential ~
15322     eval path="$path"
15323     if test ! -f "$path" && test ! -d "$path"; then
15324       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15325     fi
15326 
15327     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15328   fi
15329 
15330               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15331 $as_echo_n "checking for Boot JDK... " >&6; }
15332               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15333 $as_echo "$BOOT_JDK" >&6; }
15334               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15335 $as_echo_n "checking Boot JDK version... " >&6; }
15336               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15337               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15338 $as_echo "$BOOT_JDK_VERSION" >&6; }
15339             fi # end check jdk version
15340           fi # end check rt.jar
15341         fi # end check javac
15342       fi # end check java
15343     fi # end check boot jdk found
15344   fi
15345 
15346     done
15347   fi
15348 
15349 
15350     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15351     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15352       # Do we have a bin/java?
15353       if test ! -x "$BOOT_JDK/bin/java"; then
15354         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15356         BOOT_JDK_FOUND=no
15357       else
15358         # Do we have a bin/javac?
15359         if test ! -x "$BOOT_JDK/bin/javac"; then
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15361 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15362           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15363 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15364           BOOT_JDK_FOUND=no
15365         else
15366           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15367           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15368             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15370             BOOT_JDK_FOUND=no
15371           else
15372             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15373             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15374 
15375             # Extra M4 quote needed to protect [] in grep expression.
15376             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15377             if test "x$FOUND_VERSION_78" = x; then
15378               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15379 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15380               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15381 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15382               BOOT_JDK_FOUND=no
15383             else
15384               # We're done! :-)
15385               BOOT_JDK_FOUND=yes
15386 
15387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15388 
15389   # Input might be given as Windows format, start by converting to
15390   # unix format.
15391   path="$BOOT_JDK"
15392   new_path=`$CYGPATH -u "$path"`
15393 
15394   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15395   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15396   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15397   # "foo.exe" is OK but "foo" is an error.
15398   #
15399   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15400   # It is also a way to make sure we got the proper file name for the real test later on.
15401   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15402   if test "x$test_shortpath" = x; then
15403     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15404 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15405     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15406   fi
15407 
15408   # Call helper function which possibly converts this using DOS-style short mode.
15409   # If so, the updated path is stored in $new_path.
15410 
15411   input_path="$new_path"
15412   # Check if we need to convert this using DOS-style short mode. If the path
15413   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15414   # take no chances and rewrite it.
15415   # Note: m4 eats our [], so we need to use [ and ] instead.
15416   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15417   if test "x$has_forbidden_chars" != x; then
15418     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15419     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15420     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15421     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15422       # Going to short mode and back again did indeed matter. Since short mode is
15423       # case insensitive, let's make it lowercase to improve readability.
15424       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15425       # Now convert it back to Unix-stile (cygpath)
15426       input_path=`$CYGPATH -u "$shortmode_path"`
15427       new_path="$input_path"
15428     fi
15429   fi
15430 
15431   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15432   if test "x$test_cygdrive_prefix" = x; then
15433     # As a simple fix, exclude /usr/bin since it's not a real path.
15434     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15435       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15436       # a path prefixed by /cygdrive for fixpath to work.
15437       new_path="$CYGWIN_ROOT_PATH$input_path"
15438     fi
15439   fi
15440 
15441 
15442   if test "x$path" != "x$new_path"; then
15443     BOOT_JDK="$new_path"
15444     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15445 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15446   fi
15447 
15448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15449 
15450   path="$BOOT_JDK"
15451   has_colon=`$ECHO $path | $GREP ^.:`
15452   new_path="$path"
15453   if test "x$has_colon" = x; then
15454     # Not in mixed or Windows style, start by that.
15455     new_path=`cmd //c echo $path`
15456   fi
15457 
15458 
15459   input_path="$new_path"
15460   # Check if we need to convert this using DOS-style short mode. If the path
15461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15462   # take no chances and rewrite it.
15463   # Note: m4 eats our [], so we need to use [ and ] instead.
15464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15465   if test "x$has_forbidden_chars" != x; then
15466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15468   fi
15469 
15470 
15471   windows_path="$new_path"
15472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15473     unix_path=`$CYGPATH -u "$windows_path"`
15474     new_path="$unix_path"
15475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15477     new_path="$unix_path"
15478   fi
15479 
15480   if test "x$path" != "x$new_path"; then
15481     BOOT_JDK="$new_path"
15482     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15483 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15484   fi
15485 
15486   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15487   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15488 
15489   else
15490     # We're on a posix platform. Hooray! :)
15491     path="$BOOT_JDK"
15492     has_space=`$ECHO "$path" | $GREP " "`
15493     if test "x$has_space" != x; then
15494       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15495 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15496       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15497     fi
15498 
15499     # Use eval to expand a potential ~
15500     eval path="$path"
15501     if test ! -f "$path" && test ! -d "$path"; then
15502       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15503     fi
15504 
15505     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15506   fi
15507 
15508               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15509 $as_echo_n "checking for Boot JDK... " >&6; }
15510               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15511 $as_echo "$BOOT_JDK" >&6; }
15512               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15513 $as_echo_n "checking Boot JDK version... " >&6; }
15514               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15515               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15516 $as_echo "$BOOT_JDK_VERSION" >&6; }
15517             fi # end check jdk version
15518           fi # end check rt.jar
15519         fi # end check javac
15520       fi # end check java
15521     fi # end check boot jdk found
15522   fi
15523 
15524   fi
15525 
15526 
15527     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15528     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15529       # Do we have a bin/java?
15530       if test ! -x "$BOOT_JDK/bin/java"; then
15531         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15533         BOOT_JDK_FOUND=no
15534       else
15535         # Do we have a bin/javac?
15536         if test ! -x "$BOOT_JDK/bin/javac"; then
15537           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15538 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15539           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15540 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15541           BOOT_JDK_FOUND=no
15542         else
15543           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15544           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15545             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15546 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15547             BOOT_JDK_FOUND=no
15548           else
15549             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15550             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15551 
15552             # Extra M4 quote needed to protect [] in grep expression.
15553             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15554             if test "x$FOUND_VERSION_78" = x; then
15555               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15556 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15557               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15558 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15559               BOOT_JDK_FOUND=no
15560             else
15561               # We're done! :-)
15562               BOOT_JDK_FOUND=yes
15563 
15564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15565 
15566   # Input might be given as Windows format, start by converting to
15567   # unix format.
15568   path="$BOOT_JDK"
15569   new_path=`$CYGPATH -u "$path"`
15570 
15571   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15572   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15573   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15574   # "foo.exe" is OK but "foo" is an error.
15575   #
15576   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15577   # It is also a way to make sure we got the proper file name for the real test later on.
15578   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15579   if test "x$test_shortpath" = x; then
15580     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15581 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15582     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15583   fi
15584 
15585   # Call helper function which possibly converts this using DOS-style short mode.
15586   # If so, the updated path is stored in $new_path.
15587 
15588   input_path="$new_path"
15589   # Check if we need to convert this using DOS-style short mode. If the path
15590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15591   # take no chances and rewrite it.
15592   # Note: m4 eats our [], so we need to use [ and ] instead.
15593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15594   if test "x$has_forbidden_chars" != x; then
15595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15596     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15597     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15598     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15599       # Going to short mode and back again did indeed matter. Since short mode is
15600       # case insensitive, let's make it lowercase to improve readability.
15601       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15602       # Now convert it back to Unix-stile (cygpath)
15603       input_path=`$CYGPATH -u "$shortmode_path"`
15604       new_path="$input_path"
15605     fi
15606   fi
15607 
15608   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15609   if test "x$test_cygdrive_prefix" = x; then
15610     # As a simple fix, exclude /usr/bin since it's not a real path.
15611     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15612       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15613       # a path prefixed by /cygdrive for fixpath to work.
15614       new_path="$CYGWIN_ROOT_PATH$input_path"
15615     fi
15616   fi
15617 
15618 
15619   if test "x$path" != "x$new_path"; then
15620     BOOT_JDK="$new_path"
15621     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15622 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15623   fi
15624 
15625   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15626 
15627   path="$BOOT_JDK"
15628   has_colon=`$ECHO $path | $GREP ^.:`
15629   new_path="$path"
15630   if test "x$has_colon" = x; then
15631     # Not in mixed or Windows style, start by that.
15632     new_path=`cmd //c echo $path`
15633   fi
15634 
15635 
15636   input_path="$new_path"
15637   # Check if we need to convert this using DOS-style short mode. If the path
15638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15639   # take no chances and rewrite it.
15640   # Note: m4 eats our [], so we need to use [ and ] instead.
15641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15642   if test "x$has_forbidden_chars" != x; then
15643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15644     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15645   fi
15646 
15647 
15648   windows_path="$new_path"
15649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15650     unix_path=`$CYGPATH -u "$windows_path"`
15651     new_path="$unix_path"
15652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15654     new_path="$unix_path"
15655   fi
15656 
15657   if test "x$path" != "x$new_path"; then
15658     BOOT_JDK="$new_path"
15659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15660 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15661   fi
15662 
15663   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15664   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15665 
15666   else
15667     # We're on a posix platform. Hooray! :)
15668     path="$BOOT_JDK"
15669     has_space=`$ECHO "$path" | $GREP " "`
15670     if test "x$has_space" != x; then
15671       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15672 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15673       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15674     fi
15675 
15676     # Use eval to expand a potential ~
15677     eval path="$path"
15678     if test ! -f "$path" && test ! -d "$path"; then
15679       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15680     fi
15681 
15682     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15683   fi
15684 
15685               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15686 $as_echo_n "checking for Boot JDK... " >&6; }
15687               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15688 $as_echo "$BOOT_JDK" >&6; }
15689               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15690 $as_echo_n "checking Boot JDK version... " >&6; }
15691               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15692               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15693 $as_echo "$BOOT_JDK_VERSION" >&6; }
15694             fi # end check jdk version
15695           fi # end check rt.jar
15696         fi # end check javac
15697       fi # end check java
15698     fi # end check boot jdk found
15699   fi
15700 
15701 
15702 # If we haven't found anything yet, we've truly lost. Give up.
15703 if test "x$BOOT_JDK_FOUND" = xno; then
15704 
15705     # Print a helpful message on how to acquire the necessary build dependency.
15706     # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15707     MISSING_DEPENDENCY=openjdk
15708     PKGHANDLER_COMMAND=
15709 
15710     case $PKGHANDLER in
15711         apt-get)
15712                 apt_help     $MISSING_DEPENDENCY ;;
15713     yum)
15714                 yum_help     $MISSING_DEPENDENCY ;;
15715         port)
15716                 port_help    $MISSING_DEPENDENCY ;;
15717         pkgutil)
15718                 pkgutil_help $MISSING_DEPENDENCY ;;
15719         pkgadd)
15720                 pkgadd_help  $MISSING_DEPENDENCY ;;
15721     * )
15722       break ;;
15723     esac
15724 
15725     if test "x$PKGHANDLER_COMMAND" != x; then
15726         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15727     fi
15728 
15729   { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15730 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15731   { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15732 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15733   as_fn_error $? "Cannot continue" "$LINENO" 5
15734 fi
15735 
15736 # Setup proper paths for what we found
15737 BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15738 if test ! -f "$BOOT_RTJAR"; then
15739     # On MacOSX it is called classes.jar
15740     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15741     if test -f "$BOOT_RTJAR"; then
15742       # Remove the ..
15743       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15744     fi
15745 fi
15746 BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15747 BOOT_JDK="$BOOT_JDK"
15748 
15749 
15750 
15751 
15752 # Setup tools from the Boot JDK.
15753 
15754   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15755 $as_echo_n "checking for java in Boot JDK... " >&6; }
15756   JAVA=$BOOT_JDK/bin/java
15757   if test ! -x $JAVA; then
15758       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15759 $as_echo "not found" >&6; }
15760       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15761 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15762       as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15763   fi
15764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15765 $as_echo "ok" >&6; }
15766 
15767 
15768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15769 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15770   JAVAC=$BOOT_JDK/bin/javac
15771   if test ! -x $JAVAC; then
15772       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15773 $as_echo "not found" >&6; }
15774       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15775 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15776       as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15777   fi
15778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15779 $as_echo "ok" >&6; }
15780 
15781 
15782   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15783 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15784   JAVAH=$BOOT_JDK/bin/javah
15785   if test ! -x $JAVAH; then
15786       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15787 $as_echo "not found" >&6; }
15788       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15789 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15790       as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15791   fi
15792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15793 $as_echo "ok" >&6; }
15794 
15795 
15796   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15797 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15798   JAVAP=$BOOT_JDK/bin/javap
15799   if test ! -x $JAVAP; then
15800       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15801 $as_echo "not found" >&6; }
15802       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15803 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15804       as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15805   fi
15806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15807 $as_echo "ok" >&6; }
15808 
15809 
15810   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15811 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15812   JAR=$BOOT_JDK/bin/jar
15813   if test ! -x $JAR; then
15814       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15815 $as_echo "not found" >&6; }
15816       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15817 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15818       as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15819   fi
15820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15821 $as_echo "ok" >&6; }
15822 
15823 
15824   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15825 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
15826   RMIC=$BOOT_JDK/bin/rmic
15827   if test ! -x $RMIC; then
15828       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15829 $as_echo "not found" >&6; }
15830       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15831 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15832       as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15833   fi
15834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15835 $as_echo "ok" >&6; }
15836 
15837 
15838   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15839 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15840   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15841   if test ! -x $NATIVE2ASCII; then
15842       { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15843 $as_echo "not found" >&6; }
15844       { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15845 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15846       as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15847   fi
15848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15849 $as_echo "ok" >&6; }
15850 
15851 
15852 # Finally, set some other options...
15853 
15854 # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15855 BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15856 
15857 
15858 
15859 
15860 ##############################################################################
15861 #
15862 # Specify options for anything that is run with the Boot JDK.
15863 #
15864 
15865 # Check whether --with-boot-jdk-jvmargs was given.
15866 if test "${with_boot_jdk_jvmargs+set}" = set; then :
15867   withval=$with_boot_jdk_jvmargs;
15868 fi
15869 
15870 
15871 if test "x$with_boot_jdk_jvmargs" = x; then
15872     # Not all JVM:s accept the same arguments on the command line.
15873     # OpenJDK specific increase in thread stack for JDK build,
15874     # well more specifically, when running javac.
15875     if test "x$BUILD_NUM_BITS" = x32; then
15876        STACK_SIZE=768
15877     else
15878        # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15879        # since 64-bit pointers are pushed on the stach. Apparently, we need
15880        # to increase the stack space when javacing the JDK....
15881        STACK_SIZE=1536
15882     fi
15883 
15884     # Minimum amount of heap memory.
15885 
15886     $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15887     $ECHO "Command: $JAVA -Xms64M -version" >&5
15888     OUTPUT=`$JAVA -Xms64M -version 2>&1`
15889     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15890     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15891     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15892         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15893         JVM_ARG_OK=true
15894     else
15895         $ECHO "Arg failed:" >&5
15896         $ECHO "$OUTPUT" >&5
15897         JVM_ARG_OK=false
15898     fi
15899 
15900     if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15901         # Why does macosx need more heap? Its the huge JDK batch.
15902 
15903     $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15904     $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15905     OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15906     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15907     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15908     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15909         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15910         JVM_ARG_OK=true
15911     else
15912         $ECHO "Arg failed:" >&5
15913         $ECHO "$OUTPUT" >&5
15914         JVM_ARG_OK=false
15915     fi
15916 
15917     else
15918 
15919     $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15920     $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15921     OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15922     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15923     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15924     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15925         boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15926         JVM_ARG_OK=true
15927     else
15928         $ECHO "Arg failed:" >&5
15929         $ECHO "$OUTPUT" >&5
15930         JVM_ARG_OK=false
15931     fi
15932 
15933     fi
15934     # When is adding -client something that speeds up the JVM?
15935     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15936 
15937     $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15938     $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15939     OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15940     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15941     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15942     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15943         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15944         JVM_ARG_OK=true
15945     else
15946         $ECHO "Arg failed:" >&5
15947         $ECHO "$OUTPUT" >&5
15948         JVM_ARG_OK=false
15949     fi
15950 
15951 
15952     $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15953     $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15954     OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15955     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15956     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15957     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15958         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15959         JVM_ARG_OK=true
15960     else
15961         $ECHO "Arg failed:" >&5
15962         $ECHO "$OUTPUT" >&5
15963         JVM_ARG_OK=false
15964     fi
15965 
15966 
15967     $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15968     $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15969     OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15970     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15971     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15972     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15973         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15974         JVM_ARG_OK=true
15975     else
15976         $ECHO "Arg failed:" >&5
15977         $ECHO "$OUTPUT" >&5
15978         JVM_ARG_OK=false
15979     fi
15980 
15981     # Disable special log output when a debug build is used as Boot JDK...
15982 
15983     $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15984     $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15985     OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15986     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15987     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15988     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15989         boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15990         JVM_ARG_OK=true
15991     else
15992         $ECHO "Arg failed:" >&5
15993         $ECHO "$OUTPUT" >&5
15994         JVM_ARG_OK=false
15995     fi
15996 
15997 fi
15998 
15999 BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16000 
16001 
16002 
16003 ###############################################################################
16004 #
16005 # Configure the sources to use. We can add or override individual directories.
16006 #
16007 ###############################################################################
16008 
16009 
16010 
16011 # Where are the sources. Any of these can be overridden
16012 # using --with-override-corba and the likes.
16013 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16014 CORBA_TOPDIR="$SRC_ROOT/corba"
16015 JAXP_TOPDIR="$SRC_ROOT/jaxp"
16016 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16017 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16018 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16019 JDK_TOPDIR="$SRC_ROOT/jdk"
16020 
16021 
16022 
16023 
16024 
16025 
16026 
16027 
16028 
16029 
16030 ###############################################################################
16031 #
16032 # Pickup additional source for a component from outside of the source root
16033 # or override source for a component.
16034 #
16035 
16036 # Check whether --with-add-source-root was given.
16037 if test "${with_add_source_root+set}" = set; then :
16038   withval=$with_add_source_root;
16039 fi
16040 
16041 
16042 
16043 # Check whether --with-override-source-root was given.
16044 if test "${with_override_source_root+set}" = set; then :
16045   withval=$with_override_source_root;
16046 fi
16047 
16048 
16049 
16050 # Check whether --with-adds-and-overrides was given.
16051 if test "${with_adds_and_overrides+set}" = set; then :
16052   withval=$with_adds_and_overrides;
16053 fi
16054 
16055 
16056 if test "x$with_adds_and_overrides" != x; then
16057     with_add_source_root="$with_adds_and_overrides/adds"
16058     with_override_source_root="$with_adds_and_overrides/overrides"
16059 fi
16060 
16061 if test "x$with_add_source_root" != x; then
16062     if ! test -d $with_add_source_root; then
16063        as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16064     fi
16065     CURDIR="$PWD"
16066     cd "$with_add_source_root"
16067     ADD_SRC_ROOT="`pwd`"
16068     cd "$CURDIR"
16069     # Verify that the addon source root does not have any root makefiles.
16070     # If it does, then it is usually an error, prevent this.
16071     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16072        test -f $with_add_source_root/langtools/make/Makefile; then
16073         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
16074     fi
16075     if test -f $with_add_source_root/corba/makefiles/Makefile || \
16076        test -f $with_add_source_root/corba/make/Makefile; then
16077         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
16078     fi
16079     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16080        test -f $with_add_source_root/jaxp/make/Makefile; then
16081         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
16082     fi
16083     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16084        test -f $with_add_source_root/jaxws/make/Makefile; then
16085         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
16086     fi
16087     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16088        test -f $with_add_source_root/hotspot/make/Makefile; then
16089         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
16090     fi
16091     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16092        test -f $with_add_source_root/jdk/make/Makefile; then
16093         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
16094     fi
16095 fi
16096 
16097 
16098 if test "x$with_override_source_root" != x; then
16099     if ! test -d $with_override_source_root; then
16100        as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16101     fi
16102     CURDIR="$PWD"
16103     cd "$with_override_source_root"
16104     OVERRIDE_SRC_ROOT="`pwd`"
16105     cd "$CURDIR"
16106     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16107        test -f $with_override_source_root/langtools/make/Makefile; then
16108         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
16109     fi
16110     if test -f $with_override_source_root/corba/makefiles/Makefile || \
16111        test -f $with_override_source_root/corba/make/Makefile; then
16112         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
16113     fi
16114     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16115        test -f $with_override_source_root/jaxp/make/Makefile; then
16116         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
16117     fi
16118     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16119        test -f $with_override_source_root/jaxws/make/Makefile; then
16120         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
16121     fi
16122     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16123        test -f $with_override_source_root/hotspot/make/Makefile; then
16124         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
16125     fi
16126     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16127        test -f $with_override_source_root/jdk/make/Makefile; then
16128         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
16129     fi
16130 fi
16131 
16132 
16133 ###############################################################################
16134 #
16135 # Override a repo completely, this is used for example when you have 3 small
16136 # development sandboxes of the langtools sources and want to avoid having 3 full
16137 # OpenJDK sources checked out on disk.
16138 #
16139 # Assuming that the 3 langtools sandboxes are located here:
16140 # /home/fredrik/sandbox1/langtools
16141 # /home/fredrik/sandbox2/langtools
16142 # /home/fredrik/sandbox3/langtools
16143 #
16144 # From the source root you create build subdirs manually:
16145 #     mkdir -p build1 build2 build3
16146 # in each build directory run:
16147 #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16148 #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16149 #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16150 #
16151 
16152 
16153 # Check whether --with-override-langtools was given.
16154 if test "${with_override_langtools+set}" = set; then :
16155   withval=$with_override_langtools;
16156 fi
16157 
16158 
16159 
16160 # Check whether --with-override-corba was given.
16161 if test "${with_override_corba+set}" = set; then :
16162   withval=$with_override_corba;
16163 fi
16164 
16165 
16166 
16167 # Check whether --with-override-jaxp was given.
16168 if test "${with_override_jaxp+set}" = set; then :
16169   withval=$with_override_jaxp;
16170 fi
16171 
16172 
16173 
16174 # Check whether --with-override-jaxws was given.
16175 if test "${with_override_jaxws+set}" = set; then :
16176   withval=$with_override_jaxws;
16177 fi
16178 
16179 
16180 
16181 # Check whether --with-override-hotspot was given.
16182 if test "${with_override_hotspot+set}" = set; then :
16183   withval=$with_override_hotspot;
16184 fi
16185 
16186 
16187 
16188 # Check whether --with-override-jdk was given.
16189 if test "${with_override_jdk+set}" = set; then :
16190   withval=$with_override_jdk;
16191 fi
16192 
16193 
16194 if test "x$with_override_langtools" != x; then
16195     CURDIR="$PWD"
16196     cd "$with_override_langtools"
16197     LANGTOOLS_TOPDIR="`pwd`"
16198     cd "$CURDIR"
16199     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16200         as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16201     fi
16202     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16203 $as_echo_n "checking if langtools should be overridden... " >&6; }
16204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16205 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16206 fi
16207 if test "x$with_override_corba" != x; then
16208     CURDIR="$PWD"
16209     cd "$with_override_corba"
16210     CORBA_TOPDIR="`pwd`"
16211     cd "$CURDIR"
16212     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16213         as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16214     fi
16215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16216 $as_echo_n "checking if corba should be overridden... " >&6; }
16217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16218 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16219 fi
16220 if test "x$with_override_jaxp" != x; then
16221     CURDIR="$PWD"
16222     cd "$with_override_jaxp"
16223     JAXP_TOPDIR="`pwd`"
16224     cd "$CURDIR"
16225     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16226         as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16227     fi
16228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16229 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16231 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16232 fi
16233 if test "x$with_override_jaxws" != x; then
16234     CURDIR="$PWD"
16235     cd "$with_override_jaxws"
16236     JAXWS_TOPDIR="`pwd`"
16237     cd "$CURDIR"
16238     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16239         as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16240     fi
16241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16242 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16244 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16245 fi
16246 if test "x$with_override_hotspot" != x; then
16247     CURDIR="$PWD"
16248     cd "$with_override_hotspot"
16249     HOTSPOT_TOPDIR="`pwd`"
16250     cd "$CURDIR"
16251     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16252        ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16253         as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16254     fi
16255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16256 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16258 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16259 fi
16260 if test "x$with_override_nashorn" != x; then
16261     CURDIR="$PWD"
16262     cd "$with_override_nashorn"
16263     NASHORN_TOPDIR="`pwd`"
16264     cd "$CURDIR"
16265     if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16266         as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16267     fi
16268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16269 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16271 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16272 fi
16273 if test "x$with_override_jdk" != x; then
16274     CURDIR="$PWD"
16275     cd "$with_override_jdk"
16276     JDK_TOPDIR="`pwd`"
16277     cd "$CURDIR"
16278     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16279         as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16280     fi
16281     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16282 $as_echo_n "checking if JDK should be overridden... " >&6; }
16283     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16284 $as_echo "yes with $JDK_TOPDIR" >&6; }
16285 fi
16286 
16287 
16288 
16289 BUILD_OUTPUT="$OUTPUT_ROOT"
16290 
16291 
16292 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16293 BUILD_HOTSPOT=true
16294 
16295 
16296 
16297 # Check whether --with-import-hotspot was given.
16298 if test "${with_import_hotspot+set}" = set; then :
16299   withval=$with_import_hotspot;
16300 fi
16301 
16302 if test "x$with_import_hotspot" != x; then
16303     CURDIR="$PWD"
16304     cd "$with_import_hotspot"
16305     HOTSPOT_DIST="`pwd`"
16306     cd "$CURDIR"
16307     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16308         as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16309     fi
16310     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16311 $as_echo_n "checking if hotspot should be imported... " >&6; }
16312     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16313 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16314     BUILD_HOTSPOT=false
16315 fi
16316 
16317 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16318 
16319 
16320 ###############################################################################
16321 #
16322 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16323 # cross-compilation aware.
16324 #
16325 ###############################################################################
16326 
16327 
16328 ###############################################################################
16329 #
16330 # Configure the development tool paths and potential sysroot.
16331 #
16332 ac_ext=cpp
16333 ac_cpp='$CXXCPP $CPPFLAGS'
16334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16337 
16338 
16339 # The option used to specify the target .o,.a or .so file.
16340 # When compiling, how to specify the to be created object file.
16341 CC_OUT_OPTION='-o$(SPACE)'
16342 # When linking, how to specify the to be created executable.
16343 EXE_OUT_OPTION='-o$(SPACE)'
16344 # When linking, how to specify the to be created dynamically linkable library.
16345 LD_OUT_OPTION='-o$(SPACE)'
16346 # When archiving, how to specify the to be create static archive for object files.
16347 AR_OUT_OPTION='rcs$(SPACE)'
16348 
16349 
16350 
16351 
16352 
16353 # Locate the actual tools
16354 
16355 
16356 # Check whether --with-jtreg was given.
16357 if test "${with_jtreg+set}" = set; then :
16358   withval=$with_jtreg;
16359 else
16360   with_jtreg=no
16361 fi
16362 
16363 
16364   if test "x$with_jtreg" = xno; then
16365     # jtreg disabled
16366     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16367 $as_echo_n "checking for jtreg... " >&6; }
16368     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16369 $as_echo "no" >&6; }
16370   else
16371     if test "x$with_jtreg" != xyes; then
16372       # with path specified.
16373       JT_HOME="$with_jtreg"
16374     fi
16375 
16376     if test "x$JT_HOME" != x; then
16377       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16378 $as_echo_n "checking for jtreg... " >&6; }
16379 
16380       # use JT_HOME enviroment var.
16381 
16382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16383 
16384   # Input might be given as Windows format, start by converting to
16385   # unix format.
16386   path="$JT_HOME"
16387   new_path=`$CYGPATH -u "$path"`
16388 
16389   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16390   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16391   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16392   # "foo.exe" is OK but "foo" is an error.
16393   #
16394   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16395   # It is also a way to make sure we got the proper file name for the real test later on.
16396   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16397   if test "x$test_shortpath" = x; then
16398     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16399 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16400     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16401   fi
16402 
16403   # Call helper function which possibly converts this using DOS-style short mode.
16404   # If so, the updated path is stored in $new_path.
16405 
16406   input_path="$new_path"
16407   # Check if we need to convert this using DOS-style short mode. If the path
16408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16409   # take no chances and rewrite it.
16410   # Note: m4 eats our [], so we need to use [ and ] instead.
16411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16412   if test "x$has_forbidden_chars" != x; then
16413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16414     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16415     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16416     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16417       # Going to short mode and back again did indeed matter. Since short mode is
16418       # case insensitive, let's make it lowercase to improve readability.
16419       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16420       # Now convert it back to Unix-stile (cygpath)
16421       input_path=`$CYGPATH -u "$shortmode_path"`
16422       new_path="$input_path"
16423     fi
16424   fi
16425 
16426   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16427   if test "x$test_cygdrive_prefix" = x; then
16428     # As a simple fix, exclude /usr/bin since it's not a real path.
16429     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16430       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16431       # a path prefixed by /cygdrive for fixpath to work.
16432       new_path="$CYGWIN_ROOT_PATH$input_path"
16433     fi
16434   fi
16435 
16436 
16437   if test "x$path" != "x$new_path"; then
16438     JT_HOME="$new_path"
16439     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16440 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16441   fi
16442 
16443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16444 
16445   path="$JT_HOME"
16446   has_colon=`$ECHO $path | $GREP ^.:`
16447   new_path="$path"
16448   if test "x$has_colon" = x; then
16449     # Not in mixed or Windows style, start by that.
16450     new_path=`cmd //c echo $path`
16451   fi
16452 
16453 
16454   input_path="$new_path"
16455   # Check if we need to convert this using DOS-style short mode. If the path
16456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16457   # take no chances and rewrite it.
16458   # Note: m4 eats our [], so we need to use [ and ] instead.
16459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16460   if test "x$has_forbidden_chars" != x; then
16461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16462     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16463   fi
16464 
16465 
16466   windows_path="$new_path"
16467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16468     unix_path=`$CYGPATH -u "$windows_path"`
16469     new_path="$unix_path"
16470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16472     new_path="$unix_path"
16473   fi
16474 
16475   if test "x$path" != "x$new_path"; then
16476     JT_HOME="$new_path"
16477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16478 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16479   fi
16480 
16481   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16482   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16483 
16484   else
16485     # We're on a posix platform. Hooray! :)
16486     path="$JT_HOME"
16487     has_space=`$ECHO "$path" | $GREP " "`
16488     if test "x$has_space" != x; then
16489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16490 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16491       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16492     fi
16493 
16494     # Use eval to expand a potential ~
16495     eval path="$path"
16496     if test ! -f "$path" && test ! -d "$path"; then
16497       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16498     fi
16499 
16500     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16501   fi
16502 
16503 
16504       # jtreg win32 script works for everybody
16505       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16506 
16507       if test ! -f "$JTREGEXE"; then
16508         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16509       fi
16510 
16511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16512 $as_echo "$JTREGEXE" >&6; }
16513     else
16514       # try to find jtreg on path
16515 
16516     for ac_prog in jtreg
16517 do
16518   # Extract the first word of "$ac_prog", so it can be a program name with args.
16519 set dummy $ac_prog; ac_word=$2
16520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16521 $as_echo_n "checking for $ac_word... " >&6; }
16522 if ${ac_cv_path_JTREGEXE+:} false; then :
16523   $as_echo_n "(cached) " >&6
16524 else
16525   case $JTREGEXE in
16526   [\\/]* | ?:[\\/]*)
16527   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16528   ;;
16529   *)
16530   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16531 for as_dir in $PATH
16532 do
16533   IFS=$as_save_IFS
16534   test -z "$as_dir" && as_dir=.
16535     for ac_exec_ext in '' $ac_executable_extensions; do
16536   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16537     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16538     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16539     break 2
16540   fi
16541 done
16542   done
16543 IFS=$as_save_IFS
16544 
16545   ;;
16546 esac
16547 fi
16548 JTREGEXE=$ac_cv_path_JTREGEXE
16549 if test -n "$JTREGEXE"; then
16550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16551 $as_echo "$JTREGEXE" >&6; }
16552 else
16553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16554 $as_echo "no" >&6; }
16555 fi
16556 
16557 
16558   test -n "$JTREGEXE" && break
16559 done
16560 
16561 
16562     if test "x$JTREGEXE" = x; then
16563         if test "xjtreg" = x; then
16564           PROG_NAME=jtregexe
16565         else
16566           PROG_NAME=jtreg
16567         fi
16568         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16569 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16570         as_fn_error $? "Cannot continue" "$LINENO" 5
16571     fi
16572 
16573 
16574       JT_HOME="`$DIRNAME $JTREGEXE`"
16575     fi
16576   fi
16577 
16578 
16579 
16580 
16581 
16582 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16583 
16584   # Store path to cygwin link.exe to help excluding it when searching for
16585   # VS linker. This must be done before changing the PATH when looking for VS.
16586   # Extract the first word of "link", so it can be a program name with args.
16587 set dummy link; ac_word=$2
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16589 $as_echo_n "checking for $ac_word... " >&6; }
16590 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16591   $as_echo_n "(cached) " >&6
16592 else
16593   case $CYGWIN_LINK in
16594   [\\/]* | ?:[\\/]*)
16595   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16596   ;;
16597   *)
16598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16599 for as_dir in $PATH
16600 do
16601   IFS=$as_save_IFS
16602   test -z "$as_dir" && as_dir=.
16603     for ac_exec_ext in '' $ac_executable_extensions; do
16604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16605     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16607     break 2
16608   fi
16609 done
16610   done
16611 IFS=$as_save_IFS
16612 
16613   ;;
16614 esac
16615 fi
16616 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16617 if test -n "$CYGWIN_LINK"; then
16618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16619 $as_echo "$CYGWIN_LINK" >&6; }
16620 else
16621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16622 $as_echo "no" >&6; }
16623 fi
16624 
16625 
16626   if test "x$CYGWIN_LINK" != x; then
16627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16628 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16629     "$CYGWIN_LINK" --version > /dev/null
16630     if test $? -eq 0 ; then
16631       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16632 $as_echo "yes" >&6; }
16633     else
16634       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16635 $as_echo "no" >&6; }
16636       # This might be the VS linker. Don't exclude it later on.
16637       CYGWIN_LINK=""
16638     fi
16639   fi
16640 
16641   # First-hand choice is to locate and run the vsvars bat file.
16642 
16643   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16644     VCVARSFILE="vc/bin/vcvars32.bat"
16645   else
16646     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16647   fi
16648 
16649   VS_ENV_CMD=""
16650   VS_ENV_ARGS=""
16651   if test "x$with_toolsdir" != x; then
16652 
16653   if test "x$VS_ENV_CMD" = x; then
16654     VS100BASE="$with_toolsdir/../.."
16655     METHOD="--with-tools-dir"
16656 
16657   windows_path="$VS100BASE"
16658   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16659     unix_path=`$CYGPATH -u "$windows_path"`
16660     VS100BASE="$unix_path"
16661   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16662     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16663     VS100BASE="$unix_path"
16664   fi
16665 
16666     if test -d "$VS100BASE"; then
16667       if test -f "$VS100BASE/$VCVARSFILE"; then
16668         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16669 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16670         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16671       else
16672         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16673 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16674         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16675 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16676       fi
16677     fi
16678   fi
16679 
16680   fi
16681 
16682   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16683     # Having specified an argument which is incorrect will produce an instant failure;
16684     # we should not go on looking
16685     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16686 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16687     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16688 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16689     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16690   fi
16691 
16692   if test "x$VS100COMNTOOLS" != x; then
16693 
16694   if test "x$VS_ENV_CMD" = x; then
16695     VS100BASE="$VS100COMNTOOLS/../.."
16696     METHOD="VS100COMNTOOLS variable"
16697 
16698   windows_path="$VS100BASE"
16699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16700     unix_path=`$CYGPATH -u "$windows_path"`
16701     VS100BASE="$unix_path"
16702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16704     VS100BASE="$unix_path"
16705   fi
16706 
16707     if test -d "$VS100BASE"; then
16708       if test -f "$VS100BASE/$VCVARSFILE"; then
16709         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16710 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16711         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16712       else
16713         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16714 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16715         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16716 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16717       fi
16718     fi
16719   fi
16720 
16721   fi
16722   if test "x$PROGRAMFILES" != x; then
16723 
16724   if test "x$VS_ENV_CMD" = x; then
16725     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16726     METHOD="well-known name"
16727 
16728   windows_path="$VS100BASE"
16729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16730     unix_path=`$CYGPATH -u "$windows_path"`
16731     VS100BASE="$unix_path"
16732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16734     VS100BASE="$unix_path"
16735   fi
16736 
16737     if test -d "$VS100BASE"; then
16738       if test -f "$VS100BASE/$VCVARSFILE"; then
16739         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16740 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16741         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16742       else
16743         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16744 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16745         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16746 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16747       fi
16748     fi
16749   fi
16750 
16751   fi
16752 
16753   if test "x$VS_ENV_CMD" = x; then
16754     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16755     METHOD="well-known name"
16756 
16757   windows_path="$VS100BASE"
16758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16759     unix_path=`$CYGPATH -u "$windows_path"`
16760     VS100BASE="$unix_path"
16761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16763     VS100BASE="$unix_path"
16764   fi
16765 
16766     if test -d "$VS100BASE"; then
16767       if test -f "$VS100BASE/$VCVARSFILE"; then
16768         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16769 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16770         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16771       else
16772         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16773 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16774         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16775 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16776       fi
16777     fi
16778   fi
16779 
16780 
16781   if test "x$VS_ENV_CMD" = x; then
16782     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16783     METHOD="well-known name"
16784 
16785   windows_path="$VS100BASE"
16786   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16787     unix_path=`$CYGPATH -u "$windows_path"`
16788     VS100BASE="$unix_path"
16789   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16790     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16791     VS100BASE="$unix_path"
16792   fi
16793 
16794     if test -d "$VS100BASE"; then
16795       if test -f "$VS100BASE/$VCVARSFILE"; then
16796         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16797 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16798         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16799       else
16800         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16801 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16802         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16803 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16804       fi
16805     fi
16806   fi
16807 
16808 
16809   if test "x$ProgramW6432" != x; then
16810 
16811   if test "x$VS_ENV_CMD" = x; then
16812     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16813     METHOD="well-known name"
16814 
16815   windows_path="$WIN_SDK_BASE"
16816   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16817     unix_path=`$CYGPATH -u "$windows_path"`
16818     WIN_SDK_BASE="$unix_path"
16819   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16820     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16821     WIN_SDK_BASE="$unix_path"
16822   fi
16823 
16824     if test -d "$WIN_SDK_BASE"; then
16825       # There have been cases of partial or broken SDK installations. A missing
16826       # lib dir is not going to work.
16827       if test ! -d "$WIN_SDK_BASE/../lib"; then
16828         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16829 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16830         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16831 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16832       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16833         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16834 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16835         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16836         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16837           VS_ENV_ARGS="/x86"
16838         else
16839           VS_ENV_ARGS="/x64"
16840         fi
16841       else
16842         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16843 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16844         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16845 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16846       fi
16847     fi
16848   fi
16849 
16850   fi
16851   if test "x$PROGRAMW6432" != x; then
16852 
16853   if test "x$VS_ENV_CMD" = x; then
16854     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16855     METHOD="well-known name"
16856 
16857   windows_path="$WIN_SDK_BASE"
16858   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16859     unix_path=`$CYGPATH -u "$windows_path"`
16860     WIN_SDK_BASE="$unix_path"
16861   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16862     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16863     WIN_SDK_BASE="$unix_path"
16864   fi
16865 
16866     if test -d "$WIN_SDK_BASE"; then
16867       # There have been cases of partial or broken SDK installations. A missing
16868       # lib dir is not going to work.
16869       if test ! -d "$WIN_SDK_BASE/../lib"; then
16870         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16871 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16872         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16873 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16874       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16875         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16876 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16877         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16878         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16879           VS_ENV_ARGS="/x86"
16880         else
16881           VS_ENV_ARGS="/x64"
16882         fi
16883       else
16884         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16885 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16886         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16887 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16888       fi
16889     fi
16890   fi
16891 
16892   fi
16893   if test "x$PROGRAMFILES" != x; then
16894 
16895   if test "x$VS_ENV_CMD" = x; then
16896     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16897     METHOD="well-known name"
16898 
16899   windows_path="$WIN_SDK_BASE"
16900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16901     unix_path=`$CYGPATH -u "$windows_path"`
16902     WIN_SDK_BASE="$unix_path"
16903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16905     WIN_SDK_BASE="$unix_path"
16906   fi
16907 
16908     if test -d "$WIN_SDK_BASE"; then
16909       # There have been cases of partial or broken SDK installations. A missing
16910       # lib dir is not going to work.
16911       if test ! -d "$WIN_SDK_BASE/../lib"; then
16912         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16913 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16914         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16915 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16916       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16917         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16918 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16919         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16920         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16921           VS_ENV_ARGS="/x86"
16922         else
16923           VS_ENV_ARGS="/x64"
16924         fi
16925       else
16926         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16927 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16928         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16929 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16930       fi
16931     fi
16932   fi
16933 
16934   fi
16935 
16936   if test "x$VS_ENV_CMD" = x; then
16937     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16938     METHOD="well-known name"
16939 
16940   windows_path="$WIN_SDK_BASE"
16941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16942     unix_path=`$CYGPATH -u "$windows_path"`
16943     WIN_SDK_BASE="$unix_path"
16944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16946     WIN_SDK_BASE="$unix_path"
16947   fi
16948 
16949     if test -d "$WIN_SDK_BASE"; then
16950       # There have been cases of partial or broken SDK installations. A missing
16951       # lib dir is not going to work.
16952       if test ! -d "$WIN_SDK_BASE/../lib"; then
16953         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16954 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16955         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16956 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16957       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16958         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16959 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16960         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16961         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16962           VS_ENV_ARGS="/x86"
16963         else
16964           VS_ENV_ARGS="/x64"
16965         fi
16966       else
16967         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16968 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16969         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16970 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16971       fi
16972     fi
16973   fi
16974 
16975 
16976   if test "x$VS_ENV_CMD" = x; then
16977     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16978     METHOD="well-known name"
16979 
16980   windows_path="$WIN_SDK_BASE"
16981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16982     unix_path=`$CYGPATH -u "$windows_path"`
16983     WIN_SDK_BASE="$unix_path"
16984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16986     WIN_SDK_BASE="$unix_path"
16987   fi
16988 
16989     if test -d "$WIN_SDK_BASE"; then
16990       # There have been cases of partial or broken SDK installations. A missing
16991       # lib dir is not going to work.
16992       if test ! -d "$WIN_SDK_BASE/../lib"; then
16993         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16994 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16995         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16996 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16997       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16998         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16999 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17000         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17001         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17002           VS_ENV_ARGS="/x86"
17003         else
17004           VS_ENV_ARGS="/x64"
17005         fi
17006       else
17007         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17008 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17009         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17010 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17011       fi
17012     fi
17013   fi
17014 
17015 
17016   if test "x$VS_ENV_CMD" != x; then
17017     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17018 
17019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17020 
17021   # First separate the path from the arguments. This will split at the first
17022   # space.
17023   complete="$VS_ENV_CMD"
17024   path="${complete%% *}"
17025   tmp="$complete EOL"
17026   arguments="${tmp#* }"
17027 
17028   # Input might be given as Windows format, start by converting to
17029   # unix format.
17030   new_path=`$CYGPATH -u "$path"`
17031 
17032   # Now try to locate executable using which
17033   new_path=`$WHICH "$new_path" 2> /dev/null`
17034   # bat and cmd files are not always considered executable in cygwin causing which
17035   # to not find them
17036   if test "x$new_path" = x \
17037            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17038            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17039     new_path=`$CYGPATH -u "$path"`
17040   fi
17041   if test "x$new_path" = x; then
17042     # Oops. Which didn't find the executable.
17043     # The splitting of arguments from the executable at a space might have been incorrect,
17044     # since paths with space are more likely in Windows. Give it another try with the whole
17045     # argument.
17046     path="$complete"
17047     arguments="EOL"
17048     new_path=`$CYGPATH -u "$path"`
17049     new_path=`$WHICH "$new_path" 2> /dev/null`
17050     # bat and cmd files are not always considered executable in cygwin causing which
17051     # to not find them
17052     if test "x$new_path" = x \
17053              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17054              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17055       new_path=`$CYGPATH -u "$path"`
17056     fi
17057     if test "x$new_path" = x; then
17058       # It's still not found. Now this is an unrecoverable error.
17059       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17060 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17061       has_space=`$ECHO "$complete" | $GREP " "`
17062       if test "x$has_space" != x; then
17063         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17064 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17065       fi
17066       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17067     fi
17068   fi
17069 
17070   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17071   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17072   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17073   # "foo.exe" is OK but "foo" is an error.
17074   #
17075   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17076   # It is also a way to make sure we got the proper file name for the real test later on.
17077   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17078   if test "x$test_shortpath" = x; then
17079     # Short path failed, file does not exist as specified.
17080     # Try adding .exe or .cmd
17081     if test -f "${new_path}.exe"; then
17082        input_to_shortpath="${new_path}.exe"
17083     elif test -f "${new_path}.cmd"; then
17084        input_to_shortpath="${new_path}.cmd"
17085     else
17086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17087 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17088       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17089 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17090       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17091     fi
17092   else
17093     input_to_shortpath="$new_path"
17094   fi
17095 
17096   # Call helper function which possibly converts this using DOS-style short mode.
17097   # If so, the updated path is stored in $new_path.
17098   new_path="$input_to_shortpath"
17099 
17100   input_path="$input_to_shortpath"
17101   # Check if we need to convert this using DOS-style short mode. If the path
17102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17103   # take no chances and rewrite it.
17104   # Note: m4 eats our [], so we need to use [ and ] instead.
17105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17106   if test "x$has_forbidden_chars" != x; then
17107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17111       # Going to short mode and back again did indeed matter. Since short mode is
17112       # case insensitive, let's make it lowercase to improve readability.
17113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17114       # Now convert it back to Unix-stile (cygpath)
17115       input_path=`$CYGPATH -u "$shortmode_path"`
17116       new_path="$input_path"
17117     fi
17118   fi
17119 
17120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17121   if test "x$test_cygdrive_prefix" = x; then
17122     # As a simple fix, exclude /usr/bin since it's not a real path.
17123     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17125       # a path prefixed by /cygdrive for fixpath to work.
17126       new_path="$CYGWIN_ROOT_PATH$input_path"
17127     fi
17128   fi
17129 
17130   # remove trailing .exe if any
17131   new_path="${new_path/%.exe/}"
17132 
17133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17134 
17135   # First separate the path from the arguments. This will split at the first
17136   # space.
17137   complete="$VS_ENV_CMD"
17138   path="${complete%% *}"
17139   tmp="$complete EOL"
17140   arguments="${tmp#* }"
17141 
17142   # Input might be given as Windows format, start by converting to
17143   # unix format.
17144   new_path="$path"
17145 
17146   windows_path="$new_path"
17147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17148     unix_path=`$CYGPATH -u "$windows_path"`
17149     new_path="$unix_path"
17150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17152     new_path="$unix_path"
17153   fi
17154 
17155 
17156   # Now try to locate executable using which
17157   new_path=`$WHICH "$new_path" 2> /dev/null`
17158 
17159   if test "x$new_path" = x; then
17160     # Oops. Which didn't find the executable.
17161     # The splitting of arguments from the executable at a space might have been incorrect,
17162     # since paths with space are more likely in Windows. Give it another try with the whole
17163     # argument.
17164     path="$complete"
17165     arguments="EOL"
17166     new_path="$path"
17167 
17168   windows_path="$new_path"
17169   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17170     unix_path=`$CYGPATH -u "$windows_path"`
17171     new_path="$unix_path"
17172   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17173     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17174     new_path="$unix_path"
17175   fi
17176 
17177 
17178     new_path=`$WHICH "$new_path" 2> /dev/null`
17179 
17180     if test "x$new_path" = x; then
17181       # It's still not found. Now this is an unrecoverable error.
17182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17183 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17184       has_space=`$ECHO "$complete" | $GREP " "`
17185       if test "x$has_space" != x; then
17186         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17187 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17188       fi
17189       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17190     fi
17191   fi
17192 
17193   # Now new_path has a complete unix path to the binary
17194   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17195     # Keep paths in /bin as-is, but remove trailing .exe if any
17196     new_path="${new_path/%.exe/}"
17197     # Do not save /bin paths to all_fixpath_prefixes!
17198   else
17199     # Not in mixed or Windows style, start by that.
17200     new_path=`cmd //c echo $new_path`
17201 
17202   input_path="$new_path"
17203   # Check if we need to convert this using DOS-style short mode. If the path
17204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17205   # take no chances and rewrite it.
17206   # Note: m4 eats our [], so we need to use [ and ] instead.
17207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17208   if test "x$has_forbidden_chars" != x; then
17209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17211   fi
17212 
17213     # Output is in $new_path
17214 
17215   windows_path="$new_path"
17216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17217     unix_path=`$CYGPATH -u "$windows_path"`
17218     new_path="$unix_path"
17219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17221     new_path="$unix_path"
17222   fi
17223 
17224     # remove trailing .exe if any
17225     new_path="${new_path/%.exe/}"
17226 
17227     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17228     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17229   fi
17230 
17231   else
17232     # We're on a posix platform. Hooray! :)
17233     # First separate the path from the arguments. This will split at the first
17234     # space.
17235     complete="$VS_ENV_CMD"
17236     path="${complete%% *}"
17237     tmp="$complete EOL"
17238     arguments="${tmp#* }"
17239 
17240     # Cannot rely on the command "which" here since it doesn't always work.
17241     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17242     if test -z "$is_absolute_path"; then
17243       # Path to executable is not absolute. Find it.
17244       IFS_save="$IFS"
17245       IFS=:
17246       for p in $PATH; do
17247         if test -f "$p/$path" && test -x "$p/$path"; then
17248           new_path="$p/$path"
17249           break
17250         fi
17251       done
17252       IFS="$IFS_save"
17253     else
17254       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17255 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17256       new_path="$path"
17257     fi
17258 
17259     if test "x$new_path" = x; then
17260         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17261 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17262         has_space=`$ECHO "$complete" | $GREP " "`
17263         if test "x$has_space" != x; then
17264           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17265 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17266         fi
17267         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17268       fi
17269   fi
17270 
17271       # Now join together the path and the arguments once again
17272       if test "x$arguments" != xEOL; then
17273         new_complete="$new_path ${arguments% *}"
17274       else
17275         new_complete="$new_path"
17276       fi
17277 
17278   if test "x$complete" != "x$new_complete"; then
17279       VS_ENV_CMD="$new_complete"
17280       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17281 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17282     fi
17283 
17284 
17285     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17286     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17287 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17288     cd $OUTPUT_ROOT
17289     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17290     # to autoconf standards.
17291 
17292     #----
17293 
17294     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17295     # but calculate the difference in Cygwin environment before/after running it and then
17296     # apply the diff.
17297 
17298     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17299       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17300       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17301       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17302     else
17303       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17304       _dosbash=`cmd //c echo \`which bash\``
17305     fi
17306 
17307     # generate the set of exported vars before/after the vs10 setup
17308     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17309     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17310     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17311     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17312 
17313     # Now execute the newly created bat file.
17314     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17315     cmd /c localdevenvtmp.bat | cat
17316 
17317     # apply the diff (less some non-vs10 vars named by "!")
17318     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17319     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17320     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17321 
17322     # cleanup
17323     $RM localdevenvtmp*
17324     #----
17325     cd $CURDIR
17326     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17327       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17328 $as_echo "no" >&6; }
17329       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17330 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17331       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17332 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17333       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17334 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17335       as_fn_error $? "Cannot continue" "$LINENO" 5
17336     fi
17337 
17338     # Now set all paths and other env variables. This will allow the rest of
17339     # the configure script to find and run the compiler in the proper way.
17340     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17341 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17342     . $OUTPUT_ROOT/localdevenv.sh
17343   else
17344     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17345     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17346 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17347   fi
17348 
17349   # At this point, we should have corrent variables in the environment, or we can't continue.
17350   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17351 $as_echo_n "checking for Visual Studio variables... " >&6; }
17352 
17353   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17354     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17355       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17356 $as_echo "present but broken" >&6; }
17357       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17358     else
17359       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17360 $as_echo "ok" >&6; }
17361       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17362       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17363       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17364       # Remove any paths containing # (typically F#) as that messes up make
17365       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17366       VS_PATH="$PATH"
17367 
17368 
17369 
17370     fi
17371   else
17372     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17373 $as_echo "not found" >&6; }
17374 
17375     if test "x$VS_ENV_CMD" = x; then
17376       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17377 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17378       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17379 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17380     else
17381       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17382 $as_echo "$as_me: Running the extraction script failed." >&6;}
17383     fi
17384     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17385 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17386     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17387 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17388     as_fn_error $? "Cannot continue" "$LINENO" 5
17389   fi
17390 
17391   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17392 $as_echo_n "checking for msvcr100.dll... " >&6; }
17393 
17394 # Check whether --with-msvcr-dll was given.
17395 if test "${with_msvcr_dll+set}" = set; then :
17396   withval=$with_msvcr_dll;
17397 fi
17398 
17399   if test "x$with_msvcr_dll" != x; then
17400     MSVCR_DLL="$with_msvcr_dll"
17401   else
17402     if test "x$VCINSTALLDIR" != x; then
17403       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17404         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17405       else
17406         MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17407         if test "x$MSVCR_DLL" = x; then
17408           MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17409         fi
17410       fi
17411       if test "x$MSVCR_DLL" != x; then
17412         { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17413 $as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17414       else
17415         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17416 $as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17417       fi
17418     fi
17419     # Try some fallback alternatives
17420     if test "x$MSVCR_DLL" = x; then
17421       # If visual studio express is installed, there is usually one with the debugger
17422       if test "x$VS100COMNTOOLS" != x; then
17423         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17424           MSVCR_DLL=`find "$VS100COMNTOOLS/.." -name msvcr100.dll | grep -i x64 | head --lines 1`
17425           { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&5
17426 $as_echo "$as_me: msvcr100.dll found in $VS100COMNTOOLS..: $VS100COMNTOOLS.." >&6;}
17427         fi
17428       fi
17429     fi
17430     if test "x$MSVCR_DLL" = x; then
17431       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17432         # Fallback for 32bit builds, look in the windows directory.
17433         if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17434           { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17435 $as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17436           MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17437         fi
17438       fi
17439     fi
17440   fi
17441   if test "x$MSVCR_DLL" = x; then
17442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17443 $as_echo "no" >&6; }
17444     as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17445   fi
17446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17447 $as_echo "$MSVCR_DLL" >&6; }
17448 
17449   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17450 
17451   # Input might be given as Windows format, start by converting to
17452   # unix format.
17453   path="$MSVCR_DLL"
17454   new_path=`$CYGPATH -u "$path"`
17455 
17456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17459   # "foo.exe" is OK but "foo" is an error.
17460   #
17461   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17462   # It is also a way to make sure we got the proper file name for the real test later on.
17463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17464   if test "x$test_shortpath" = x; then
17465     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17466 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17467     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17468   fi
17469 
17470   # Call helper function which possibly converts this using DOS-style short mode.
17471   # If so, the updated path is stored in $new_path.
17472 
17473   input_path="$new_path"
17474   # Check if we need to convert this using DOS-style short mode. If the path
17475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17476   # take no chances and rewrite it.
17477   # Note: m4 eats our [], so we need to use [ and ] instead.
17478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17479   if test "x$has_forbidden_chars" != x; then
17480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17481     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17482     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17483     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17484       # Going to short mode and back again did indeed matter. Since short mode is
17485       # case insensitive, let's make it lowercase to improve readability.
17486       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17487       # Now convert it back to Unix-stile (cygpath)
17488       input_path=`$CYGPATH -u "$shortmode_path"`
17489       new_path="$input_path"
17490     fi
17491   fi
17492 
17493   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17494   if test "x$test_cygdrive_prefix" = x; then
17495     # As a simple fix, exclude /usr/bin since it's not a real path.
17496     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17497       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17498       # a path prefixed by /cygdrive for fixpath to work.
17499       new_path="$CYGWIN_ROOT_PATH$input_path"
17500     fi
17501   fi
17502 
17503 
17504   if test "x$path" != "x$new_path"; then
17505     MSVCR_DLL="$new_path"
17506     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17507 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17508   fi
17509 
17510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17511 
17512   path="$MSVCR_DLL"
17513   has_colon=`$ECHO $path | $GREP ^.:`
17514   new_path="$path"
17515   if test "x$has_colon" = x; then
17516     # Not in mixed or Windows style, start by that.
17517     new_path=`cmd //c echo $path`
17518   fi
17519 
17520 
17521   input_path="$new_path"
17522   # Check if we need to convert this using DOS-style short mode. If the path
17523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17524   # take no chances and rewrite it.
17525   # Note: m4 eats our [], so we need to use [ and ] instead.
17526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17527   if test "x$has_forbidden_chars" != x; then
17528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17529     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17530   fi
17531 
17532 
17533   windows_path="$new_path"
17534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17535     unix_path=`$CYGPATH -u "$windows_path"`
17536     new_path="$unix_path"
17537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17539     new_path="$unix_path"
17540   fi
17541 
17542   if test "x$path" != "x$new_path"; then
17543     MSVCR_DLL="$new_path"
17544     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17545 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17546   fi
17547 
17548   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17549   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17550 
17551   else
17552     # We're on a posix platform. Hooray! :)
17553     path="$MSVCR_DLL"
17554     has_space=`$ECHO "$path" | $GREP " "`
17555     if test "x$has_space" != x; then
17556       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17557 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17558       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17559     fi
17560 
17561     # Use eval to expand a potential ~
17562     eval path="$path"
17563     if test ! -f "$path" && test ! -d "$path"; then
17564       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17565     fi
17566 
17567     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
17568   fi
17569 
17570 
17571 fi
17572 
17573 
17574 
17575 # If --build AND --host is set, then the configure script will find any
17576 # cross compilation tools in the PATH. Cross compilation tools
17577 # follows the cross compilation standard where they are prefixed with ${host}.
17578 # For example the binary i686-sun-solaris2.10-gcc
17579 # will cross compile for i686-sun-solaris2.10
17580 # If neither of build and host is not set, then build=host and the
17581 # default compiler found in the path will be used.
17582 # Setting only --host, does not seem to be really supported.
17583 # Please set both --build and --host if you want to cross compile.
17584 
17585 if test "x$COMPILE_TYPE" = "xcross"; then
17586     # Now we to find a C/C++ compiler that can build executables for the build
17587     # platform. We can't use the AC_PROG_CC macro, since it can only be used
17588     # once. Also, we need to do this before adding a tools dir to the path,
17589     # otherwise we might pick up cross-compilers which don't use standard naming.
17590     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17591     # to wait until they are properly discovered.
17592     for ac_prog in cl cc gcc
17593 do
17594   # Extract the first word of "$ac_prog", so it can be a program name with args.
17595 set dummy $ac_prog; ac_word=$2
17596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17597 $as_echo_n "checking for $ac_word... " >&6; }
17598 if ${ac_cv_path_BUILD_CC+:} false; then :
17599   $as_echo_n "(cached) " >&6
17600 else
17601   case $BUILD_CC in
17602   [\\/]* | ?:[\\/]*)
17603   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17604   ;;
17605   *)
17606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17607 for as_dir in $PATH
17608 do
17609   IFS=$as_save_IFS
17610   test -z "$as_dir" && as_dir=.
17611     for ac_exec_ext in '' $ac_executable_extensions; do
17612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17613     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17615     break 2
17616   fi
17617 done
17618   done
17619 IFS=$as_save_IFS
17620 
17621   ;;
17622 esac
17623 fi
17624 BUILD_CC=$ac_cv_path_BUILD_CC
17625 if test -n "$BUILD_CC"; then
17626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17627 $as_echo "$BUILD_CC" >&6; }
17628 else
17629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17630 $as_echo "no" >&6; }
17631 fi
17632 
17633 
17634   test -n "$BUILD_CC" && break
17635 done
17636 
17637 
17638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17639 
17640   # First separate the path from the arguments. This will split at the first
17641   # space.
17642   complete="$BUILD_CC"
17643   path="${complete%% *}"
17644   tmp="$complete EOL"
17645   arguments="${tmp#* }"
17646 
17647   # Input might be given as Windows format, start by converting to
17648   # unix format.
17649   new_path=`$CYGPATH -u "$path"`
17650 
17651   # Now try to locate executable using which
17652   new_path=`$WHICH "$new_path" 2> /dev/null`
17653   # bat and cmd files are not always considered executable in cygwin causing which
17654   # to not find them
17655   if test "x$new_path" = x \
17656            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17657            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17658     new_path=`$CYGPATH -u "$path"`
17659   fi
17660   if test "x$new_path" = x; then
17661     # Oops. Which didn't find the executable.
17662     # The splitting of arguments from the executable at a space might have been incorrect,
17663     # since paths with space are more likely in Windows. Give it another try with the whole
17664     # argument.
17665     path="$complete"
17666     arguments="EOL"
17667     new_path=`$CYGPATH -u "$path"`
17668     new_path=`$WHICH "$new_path" 2> /dev/null`
17669     # bat and cmd files are not always considered executable in cygwin causing which
17670     # to not find them
17671     if test "x$new_path" = x \
17672              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17673              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17674       new_path=`$CYGPATH -u "$path"`
17675     fi
17676     if test "x$new_path" = x; then
17677       # It's still not found. Now this is an unrecoverable error.
17678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17679 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17680       has_space=`$ECHO "$complete" | $GREP " "`
17681       if test "x$has_space" != x; then
17682         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17683 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17684       fi
17685       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17686     fi
17687   fi
17688 
17689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17692   # "foo.exe" is OK but "foo" is an error.
17693   #
17694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17695   # It is also a way to make sure we got the proper file name for the real test later on.
17696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17697   if test "x$test_shortpath" = x; then
17698     # Short path failed, file does not exist as specified.
17699     # Try adding .exe or .cmd
17700     if test -f "${new_path}.exe"; then
17701        input_to_shortpath="${new_path}.exe"
17702     elif test -f "${new_path}.cmd"; then
17703        input_to_shortpath="${new_path}.cmd"
17704     else
17705       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17706 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17707       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17708 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17709       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17710     fi
17711   else
17712     input_to_shortpath="$new_path"
17713   fi
17714 
17715   # Call helper function which possibly converts this using DOS-style short mode.
17716   # If so, the updated path is stored in $new_path.
17717   new_path="$input_to_shortpath"
17718 
17719   input_path="$input_to_shortpath"
17720   # Check if we need to convert this using DOS-style short mode. If the path
17721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17722   # take no chances and rewrite it.
17723   # Note: m4 eats our [], so we need to use [ and ] instead.
17724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17725   if test "x$has_forbidden_chars" != x; then
17726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17727     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17728     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17729     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17730       # Going to short mode and back again did indeed matter. Since short mode is
17731       # case insensitive, let's make it lowercase to improve readability.
17732       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17733       # Now convert it back to Unix-stile (cygpath)
17734       input_path=`$CYGPATH -u "$shortmode_path"`
17735       new_path="$input_path"
17736     fi
17737   fi
17738 
17739   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17740   if test "x$test_cygdrive_prefix" = x; then
17741     # As a simple fix, exclude /usr/bin since it's not a real path.
17742     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17743       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17744       # a path prefixed by /cygdrive for fixpath to work.
17745       new_path="$CYGWIN_ROOT_PATH$input_path"
17746     fi
17747   fi
17748 
17749   # remove trailing .exe if any
17750   new_path="${new_path/%.exe/}"
17751 
17752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17753 
17754   # First separate the path from the arguments. This will split at the first
17755   # space.
17756   complete="$BUILD_CC"
17757   path="${complete%% *}"
17758   tmp="$complete EOL"
17759   arguments="${tmp#* }"
17760 
17761   # Input might be given as Windows format, start by converting to
17762   # unix format.
17763   new_path="$path"
17764 
17765   windows_path="$new_path"
17766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17767     unix_path=`$CYGPATH -u "$windows_path"`
17768     new_path="$unix_path"
17769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17771     new_path="$unix_path"
17772   fi
17773 
17774 
17775   # Now try to locate executable using which
17776   new_path=`$WHICH "$new_path" 2> /dev/null`
17777 
17778   if test "x$new_path" = x; then
17779     # Oops. Which didn't find the executable.
17780     # The splitting of arguments from the executable at a space might have been incorrect,
17781     # since paths with space are more likely in Windows. Give it another try with the whole
17782     # argument.
17783     path="$complete"
17784     arguments="EOL"
17785     new_path="$path"
17786 
17787   windows_path="$new_path"
17788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789     unix_path=`$CYGPATH -u "$windows_path"`
17790     new_path="$unix_path"
17791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17793     new_path="$unix_path"
17794   fi
17795 
17796 
17797     new_path=`$WHICH "$new_path" 2> /dev/null`
17798 
17799     if test "x$new_path" = x; then
17800       # It's still not found. Now this is an unrecoverable error.
17801       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17802 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17803       has_space=`$ECHO "$complete" | $GREP " "`
17804       if test "x$has_space" != x; then
17805         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17806 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17807       fi
17808       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17809     fi
17810   fi
17811 
17812   # Now new_path has a complete unix path to the binary
17813   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17814     # Keep paths in /bin as-is, but remove trailing .exe if any
17815     new_path="${new_path/%.exe/}"
17816     # Do not save /bin paths to all_fixpath_prefixes!
17817   else
17818     # Not in mixed or Windows style, start by that.
17819     new_path=`cmd //c echo $new_path`
17820 
17821   input_path="$new_path"
17822   # Check if we need to convert this using DOS-style short mode. If the path
17823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17824   # take no chances and rewrite it.
17825   # Note: m4 eats our [], so we need to use [ and ] instead.
17826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17827   if test "x$has_forbidden_chars" != x; then
17828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17829     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17830   fi
17831 
17832     # Output is in $new_path
17833 
17834   windows_path="$new_path"
17835   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17836     unix_path=`$CYGPATH -u "$windows_path"`
17837     new_path="$unix_path"
17838   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17839     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17840     new_path="$unix_path"
17841   fi
17842 
17843     # remove trailing .exe if any
17844     new_path="${new_path/%.exe/}"
17845 
17846     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17847     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17848   fi
17849 
17850   else
17851     # We're on a posix platform. Hooray! :)
17852     # First separate the path from the arguments. This will split at the first
17853     # space.
17854     complete="$BUILD_CC"
17855     path="${complete%% *}"
17856     tmp="$complete EOL"
17857     arguments="${tmp#* }"
17858 
17859     # Cannot rely on the command "which" here since it doesn't always work.
17860     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17861     if test -z "$is_absolute_path"; then
17862       # Path to executable is not absolute. Find it.
17863       IFS_save="$IFS"
17864       IFS=:
17865       for p in $PATH; do
17866         if test -f "$p/$path" && test -x "$p/$path"; then
17867           new_path="$p/$path"
17868           break
17869         fi
17870       done
17871       IFS="$IFS_save"
17872     else
17873       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17874 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17875       new_path="$path"
17876     fi
17877 
17878     if test "x$new_path" = x; then
17879         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17880 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17881         has_space=`$ECHO "$complete" | $GREP " "`
17882         if test "x$has_space" != x; then
17883           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17884 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17885         fi
17886         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17887       fi
17888   fi
17889 
17890       # Now join together the path and the arguments once again
17891       if test "x$arguments" != xEOL; then
17892         new_complete="$new_path ${arguments% *}"
17893       else
17894         new_complete="$new_path"
17895       fi
17896 
17897   if test "x$complete" != "x$new_complete"; then
17898       BUILD_CC="$new_complete"
17899       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17900 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17901     fi
17902 
17903     for ac_prog in cl CC g++
17904 do
17905   # Extract the first word of "$ac_prog", so it can be a program name with args.
17906 set dummy $ac_prog; ac_word=$2
17907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17908 $as_echo_n "checking for $ac_word... " >&6; }
17909 if ${ac_cv_path_BUILD_CXX+:} false; then :
17910   $as_echo_n "(cached) " >&6
17911 else
17912   case $BUILD_CXX in
17913   [\\/]* | ?:[\\/]*)
17914   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17915   ;;
17916   *)
17917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17918 for as_dir in $PATH
17919 do
17920   IFS=$as_save_IFS
17921   test -z "$as_dir" && as_dir=.
17922     for ac_exec_ext in '' $ac_executable_extensions; do
17923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17924     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17926     break 2
17927   fi
17928 done
17929   done
17930 IFS=$as_save_IFS
17931 
17932   ;;
17933 esac
17934 fi
17935 BUILD_CXX=$ac_cv_path_BUILD_CXX
17936 if test -n "$BUILD_CXX"; then
17937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17938 $as_echo "$BUILD_CXX" >&6; }
17939 else
17940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17941 $as_echo "no" >&6; }
17942 fi
17943 
17944 
17945   test -n "$BUILD_CXX" && break
17946 done
17947 
17948 
17949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17950 
17951   # First separate the path from the arguments. This will split at the first
17952   # space.
17953   complete="$BUILD_CXX"
17954   path="${complete%% *}"
17955   tmp="$complete EOL"
17956   arguments="${tmp#* }"
17957 
17958   # Input might be given as Windows format, start by converting to
17959   # unix format.
17960   new_path=`$CYGPATH -u "$path"`
17961 
17962   # Now try to locate executable using which
17963   new_path=`$WHICH "$new_path" 2> /dev/null`
17964   # bat and cmd files are not always considered executable in cygwin causing which
17965   # to not find them
17966   if test "x$new_path" = x \
17967            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17968            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17969     new_path=`$CYGPATH -u "$path"`
17970   fi
17971   if test "x$new_path" = x; then
17972     # Oops. Which didn't find the executable.
17973     # The splitting of arguments from the executable at a space might have been incorrect,
17974     # since paths with space are more likely in Windows. Give it another try with the whole
17975     # argument.
17976     path="$complete"
17977     arguments="EOL"
17978     new_path=`$CYGPATH -u "$path"`
17979     new_path=`$WHICH "$new_path" 2> /dev/null`
17980     # bat and cmd files are not always considered executable in cygwin causing which
17981     # to not find them
17982     if test "x$new_path" = x \
17983              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17984              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17985       new_path=`$CYGPATH -u "$path"`
17986     fi
17987     if test "x$new_path" = x; then
17988       # It's still not found. Now this is an unrecoverable error.
17989       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17990 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17991       has_space=`$ECHO "$complete" | $GREP " "`
17992       if test "x$has_space" != x; then
17993         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17994 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17995       fi
17996       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17997     fi
17998   fi
17999 
18000   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18001   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18002   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18003   # "foo.exe" is OK but "foo" is an error.
18004   #
18005   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18006   # It is also a way to make sure we got the proper file name for the real test later on.
18007   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18008   if test "x$test_shortpath" = x; then
18009     # Short path failed, file does not exist as specified.
18010     # Try adding .exe or .cmd
18011     if test -f "${new_path}.exe"; then
18012        input_to_shortpath="${new_path}.exe"
18013     elif test -f "${new_path}.cmd"; then
18014        input_to_shortpath="${new_path}.cmd"
18015     else
18016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18017 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18018       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18019 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18020       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18021     fi
18022   else
18023     input_to_shortpath="$new_path"
18024   fi
18025 
18026   # Call helper function which possibly converts this using DOS-style short mode.
18027   # If so, the updated path is stored in $new_path.
18028   new_path="$input_to_shortpath"
18029 
18030   input_path="$input_to_shortpath"
18031   # Check if we need to convert this using DOS-style short mode. If the path
18032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18033   # take no chances and rewrite it.
18034   # Note: m4 eats our [], so we need to use [ and ] instead.
18035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18036   if test "x$has_forbidden_chars" != x; then
18037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18041       # Going to short mode and back again did indeed matter. Since short mode is
18042       # case insensitive, let's make it lowercase to improve readability.
18043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18044       # Now convert it back to Unix-stile (cygpath)
18045       input_path=`$CYGPATH -u "$shortmode_path"`
18046       new_path="$input_path"
18047     fi
18048   fi
18049 
18050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18051   if test "x$test_cygdrive_prefix" = x; then
18052     # As a simple fix, exclude /usr/bin since it's not a real path.
18053     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18055       # a path prefixed by /cygdrive for fixpath to work.
18056       new_path="$CYGWIN_ROOT_PATH$input_path"
18057     fi
18058   fi
18059 
18060   # remove trailing .exe if any
18061   new_path="${new_path/%.exe/}"
18062 
18063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18064 
18065   # First separate the path from the arguments. This will split at the first
18066   # space.
18067   complete="$BUILD_CXX"
18068   path="${complete%% *}"
18069   tmp="$complete EOL"
18070   arguments="${tmp#* }"
18071 
18072   # Input might be given as Windows format, start by converting to
18073   # unix format.
18074   new_path="$path"
18075 
18076   windows_path="$new_path"
18077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18078     unix_path=`$CYGPATH -u "$windows_path"`
18079     new_path="$unix_path"
18080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18082     new_path="$unix_path"
18083   fi
18084 
18085 
18086   # Now try to locate executable using which
18087   new_path=`$WHICH "$new_path" 2> /dev/null`
18088 
18089   if test "x$new_path" = x; then
18090     # Oops. Which didn't find the executable.
18091     # The splitting of arguments from the executable at a space might have been incorrect,
18092     # since paths with space are more likely in Windows. Give it another try with the whole
18093     # argument.
18094     path="$complete"
18095     arguments="EOL"
18096     new_path="$path"
18097 
18098   windows_path="$new_path"
18099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18100     unix_path=`$CYGPATH -u "$windows_path"`
18101     new_path="$unix_path"
18102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18104     new_path="$unix_path"
18105   fi
18106 
18107 
18108     new_path=`$WHICH "$new_path" 2> /dev/null`
18109 
18110     if test "x$new_path" = x; then
18111       # It's still not found. Now this is an unrecoverable error.
18112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18113 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18114       has_space=`$ECHO "$complete" | $GREP " "`
18115       if test "x$has_space" != x; then
18116         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18117 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18118       fi
18119       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18120     fi
18121   fi
18122 
18123   # Now new_path has a complete unix path to the binary
18124   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18125     # Keep paths in /bin as-is, but remove trailing .exe if any
18126     new_path="${new_path/%.exe/}"
18127     # Do not save /bin paths to all_fixpath_prefixes!
18128   else
18129     # Not in mixed or Windows style, start by that.
18130     new_path=`cmd //c echo $new_path`
18131 
18132   input_path="$new_path"
18133   # Check if we need to convert this using DOS-style short mode. If the path
18134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18135   # take no chances and rewrite it.
18136   # Note: m4 eats our [], so we need to use [ and ] instead.
18137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18138   if test "x$has_forbidden_chars" != x; then
18139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18140     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18141   fi
18142 
18143     # Output is in $new_path
18144 
18145   windows_path="$new_path"
18146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18147     unix_path=`$CYGPATH -u "$windows_path"`
18148     new_path="$unix_path"
18149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18151     new_path="$unix_path"
18152   fi
18153 
18154     # remove trailing .exe if any
18155     new_path="${new_path/%.exe/}"
18156 
18157     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18158     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18159   fi
18160 
18161   else
18162     # We're on a posix platform. Hooray! :)
18163     # First separate the path from the arguments. This will split at the first
18164     # space.
18165     complete="$BUILD_CXX"
18166     path="${complete%% *}"
18167     tmp="$complete EOL"
18168     arguments="${tmp#* }"
18169 
18170     # Cannot rely on the command "which" here since it doesn't always work.
18171     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18172     if test -z "$is_absolute_path"; then
18173       # Path to executable is not absolute. Find it.
18174       IFS_save="$IFS"
18175       IFS=:
18176       for p in $PATH; do
18177         if test -f "$p/$path" && test -x "$p/$path"; then
18178           new_path="$p/$path"
18179           break
18180         fi
18181       done
18182       IFS="$IFS_save"
18183     else
18184       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18185 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18186       new_path="$path"
18187     fi
18188 
18189     if test "x$new_path" = x; then
18190         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18191 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18192         has_space=`$ECHO "$complete" | $GREP " "`
18193         if test "x$has_space" != x; then
18194           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18195 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18196         fi
18197         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18198       fi
18199   fi
18200 
18201       # Now join together the path and the arguments once again
18202       if test "x$arguments" != xEOL; then
18203         new_complete="$new_path ${arguments% *}"
18204       else
18205         new_complete="$new_path"
18206       fi
18207 
18208   if test "x$complete" != "x$new_complete"; then
18209       BUILD_CXX="$new_complete"
18210       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18211 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18212     fi
18213 
18214     # Extract the first word of "ld", so it can be a program name with args.
18215 set dummy ld; ac_word=$2
18216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18217 $as_echo_n "checking for $ac_word... " >&6; }
18218 if ${ac_cv_path_BUILD_LD+:} false; then :
18219   $as_echo_n "(cached) " >&6
18220 else
18221   case $BUILD_LD in
18222   [\\/]* | ?:[\\/]*)
18223   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18224   ;;
18225   *)
18226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18227 for as_dir in $PATH
18228 do
18229   IFS=$as_save_IFS
18230   test -z "$as_dir" && as_dir=.
18231     for ac_exec_ext in '' $ac_executable_extensions; do
18232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18233     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18235     break 2
18236   fi
18237 done
18238   done
18239 IFS=$as_save_IFS
18240 
18241   ;;
18242 esac
18243 fi
18244 BUILD_LD=$ac_cv_path_BUILD_LD
18245 if test -n "$BUILD_LD"; then
18246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18247 $as_echo "$BUILD_LD" >&6; }
18248 else
18249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18250 $as_echo "no" >&6; }
18251 fi
18252 
18253 
18254 
18255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18256 
18257   # First separate the path from the arguments. This will split at the first
18258   # space.
18259   complete="$BUILD_LD"
18260   path="${complete%% *}"
18261   tmp="$complete EOL"
18262   arguments="${tmp#* }"
18263 
18264   # Input might be given as Windows format, start by converting to
18265   # unix format.
18266   new_path=`$CYGPATH -u "$path"`
18267 
18268   # Now try to locate executable using which
18269   new_path=`$WHICH "$new_path" 2> /dev/null`
18270   # bat and cmd files are not always considered executable in cygwin causing which
18271   # to not find them
18272   if test "x$new_path" = x \
18273            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18274            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18275     new_path=`$CYGPATH -u "$path"`
18276   fi
18277   if test "x$new_path" = x; then
18278     # Oops. Which didn't find the executable.
18279     # The splitting of arguments from the executable at a space might have been incorrect,
18280     # since paths with space are more likely in Windows. Give it another try with the whole
18281     # argument.
18282     path="$complete"
18283     arguments="EOL"
18284     new_path=`$CYGPATH -u "$path"`
18285     new_path=`$WHICH "$new_path" 2> /dev/null`
18286     # bat and cmd files are not always considered executable in cygwin causing which
18287     # to not find them
18288     if test "x$new_path" = x \
18289              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18290              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18291       new_path=`$CYGPATH -u "$path"`
18292     fi
18293     if test "x$new_path" = x; then
18294       # It's still not found. Now this is an unrecoverable error.
18295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18296 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18297       has_space=`$ECHO "$complete" | $GREP " "`
18298       if test "x$has_space" != x; then
18299         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18301       fi
18302       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18303     fi
18304   fi
18305 
18306   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18307   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18308   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18309   # "foo.exe" is OK but "foo" is an error.
18310   #
18311   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18312   # It is also a way to make sure we got the proper file name for the real test later on.
18313   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18314   if test "x$test_shortpath" = x; then
18315     # Short path failed, file does not exist as specified.
18316     # Try adding .exe or .cmd
18317     if test -f "${new_path}.exe"; then
18318        input_to_shortpath="${new_path}.exe"
18319     elif test -f "${new_path}.cmd"; then
18320        input_to_shortpath="${new_path}.cmd"
18321     else
18322       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18323 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18324       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18325 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18326       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18327     fi
18328   else
18329     input_to_shortpath="$new_path"
18330   fi
18331 
18332   # Call helper function which possibly converts this using DOS-style short mode.
18333   # If so, the updated path is stored in $new_path.
18334   new_path="$input_to_shortpath"
18335 
18336   input_path="$input_to_shortpath"
18337   # Check if we need to convert this using DOS-style short mode. If the path
18338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18339   # take no chances and rewrite it.
18340   # Note: m4 eats our [], so we need to use [ and ] instead.
18341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18342   if test "x$has_forbidden_chars" != x; then
18343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18344     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18345     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18346     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18347       # Going to short mode and back again did indeed matter. Since short mode is
18348       # case insensitive, let's make it lowercase to improve readability.
18349       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18350       # Now convert it back to Unix-stile (cygpath)
18351       input_path=`$CYGPATH -u "$shortmode_path"`
18352       new_path="$input_path"
18353     fi
18354   fi
18355 
18356   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18357   if test "x$test_cygdrive_prefix" = x; then
18358     # As a simple fix, exclude /usr/bin since it's not a real path.
18359     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18360       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18361       # a path prefixed by /cygdrive for fixpath to work.
18362       new_path="$CYGWIN_ROOT_PATH$input_path"
18363     fi
18364   fi
18365 
18366   # remove trailing .exe if any
18367   new_path="${new_path/%.exe/}"
18368 
18369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18370 
18371   # First separate the path from the arguments. This will split at the first
18372   # space.
18373   complete="$BUILD_LD"
18374   path="${complete%% *}"
18375   tmp="$complete EOL"
18376   arguments="${tmp#* }"
18377 
18378   # Input might be given as Windows format, start by converting to
18379   # unix format.
18380   new_path="$path"
18381 
18382   windows_path="$new_path"
18383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18384     unix_path=`$CYGPATH -u "$windows_path"`
18385     new_path="$unix_path"
18386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18388     new_path="$unix_path"
18389   fi
18390 
18391 
18392   # Now try to locate executable using which
18393   new_path=`$WHICH "$new_path" 2> /dev/null`
18394 
18395   if test "x$new_path" = x; then
18396     # Oops. Which didn't find the executable.
18397     # The splitting of arguments from the executable at a space might have been incorrect,
18398     # since paths with space are more likely in Windows. Give it another try with the whole
18399     # argument.
18400     path="$complete"
18401     arguments="EOL"
18402     new_path="$path"
18403 
18404   windows_path="$new_path"
18405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18406     unix_path=`$CYGPATH -u "$windows_path"`
18407     new_path="$unix_path"
18408   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18409     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18410     new_path="$unix_path"
18411   fi
18412 
18413 
18414     new_path=`$WHICH "$new_path" 2> /dev/null`
18415 
18416     if test "x$new_path" = x; then
18417       # It's still not found. Now this is an unrecoverable error.
18418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18419 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18420       has_space=`$ECHO "$complete" | $GREP " "`
18421       if test "x$has_space" != x; then
18422         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18424       fi
18425       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18426     fi
18427   fi
18428 
18429   # Now new_path has a complete unix path to the binary
18430   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18431     # Keep paths in /bin as-is, but remove trailing .exe if any
18432     new_path="${new_path/%.exe/}"
18433     # Do not save /bin paths to all_fixpath_prefixes!
18434   else
18435     # Not in mixed or Windows style, start by that.
18436     new_path=`cmd //c echo $new_path`
18437 
18438   input_path="$new_path"
18439   # Check if we need to convert this using DOS-style short mode. If the path
18440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18441   # take no chances and rewrite it.
18442   # Note: m4 eats our [], so we need to use [ and ] instead.
18443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18444   if test "x$has_forbidden_chars" != x; then
18445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18446     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18447   fi
18448 
18449     # Output is in $new_path
18450 
18451   windows_path="$new_path"
18452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18453     unix_path=`$CYGPATH -u "$windows_path"`
18454     new_path="$unix_path"
18455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18457     new_path="$unix_path"
18458   fi
18459 
18460     # remove trailing .exe if any
18461     new_path="${new_path/%.exe/}"
18462 
18463     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18464     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18465   fi
18466 
18467   else
18468     # We're on a posix platform. Hooray! :)
18469     # First separate the path from the arguments. This will split at the first
18470     # space.
18471     complete="$BUILD_LD"
18472     path="${complete%% *}"
18473     tmp="$complete EOL"
18474     arguments="${tmp#* }"
18475 
18476     # Cannot rely on the command "which" here since it doesn't always work.
18477     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18478     if test -z "$is_absolute_path"; then
18479       # Path to executable is not absolute. Find it.
18480       IFS_save="$IFS"
18481       IFS=:
18482       for p in $PATH; do
18483         if test -f "$p/$path" && test -x "$p/$path"; then
18484           new_path="$p/$path"
18485           break
18486         fi
18487       done
18488       IFS="$IFS_save"
18489     else
18490       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18491 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18492       new_path="$path"
18493     fi
18494 
18495     if test "x$new_path" = x; then
18496         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18497 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18498         has_space=`$ECHO "$complete" | $GREP " "`
18499         if test "x$has_space" != x; then
18500           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18501 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18502         fi
18503         as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18504       fi
18505   fi
18506 
18507       # Now join together the path and the arguments once again
18508       if test "x$arguments" != xEOL; then
18509         new_complete="$new_path ${arguments% *}"
18510       else
18511         new_complete="$new_path"
18512       fi
18513 
18514   if test "x$complete" != "x$new_complete"; then
18515       BUILD_LD="$new_complete"
18516       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18517 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18518     fi
18519 
18520 fi
18521 
18522 
18523 
18524 
18525 # If a devkit is found on the builddeps server, then prepend its path to the
18526 # PATH variable. If there are cross compilers available in the devkit, these
18527 # will be found by AC_PROG_CC et al.
18528 DEVKIT=
18529 
18530 
18531     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18532         # Source the builddeps file again, to make sure it uses the latest variables!
18533         . $builddepsfile
18534         # Look for a target and build machine specific resource!
18535         eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18536         if test "x$resource" = x; then
18537             # Ok, lets instead look for a target specific resource
18538             eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18539         fi
18540         if test "x$resource" = x; then
18541             # Ok, lets instead look for a build specific resource
18542             eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18543         fi
18544         if test "x$resource" = x; then
18545             # Ok, lets instead look for a generic resource
18546             # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18547             resource=${builddep_devkit}
18548         fi
18549         if test "x$resource" != x; then
18550             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18551 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18552             # If the resource in the builddeps.conf file is an existing directory,
18553             # for example /java/linux/cups
18554             if test -d ${resource}; then
18555                depdir=${resource}
18556             else
18557 
18558 # devkit is for example mymodule
18559 # $resource is for example libs/general/libmymod_1_2_3.zip
18560 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18561 # $with_builddeps_dir is for example /localhome/builddeps
18562 # depdir is the name of the variable into which we store the depdir, eg MYMOD
18563 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18564 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18565     filename=`basename $resource`
18566     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18567     filebase=${filename%%.*}
18568     extension=${filename#*.}
18569     installdir=$with_builddeps_dir/$filebase
18570     if test ! -f $installdir/$filename.unpacked; then
18571         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18572 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18573         if test ! -d $installdir; then
18574             mkdir -p $installdir
18575         fi
18576         if test ! -d $installdir; then
18577             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18578         fi
18579         tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18580         touch $tmpfile
18581         if test ! -f $tmpfile; then
18582             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18583         fi
18584 
18585     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18586     # $tmpfile is the local file name for the downloaded file.
18587     VALID_TOOL=no
18588     if test "x$BDEPS_FTP" = xwget; then
18589        VALID_TOOL=yes
18590        wget -O $tmpfile $with_builddeps_server/$resource
18591     fi
18592     if test "x$BDEPS_FTP" = xlftp; then
18593        VALID_TOOL=yes
18594        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18595     fi
18596     if test "x$BDEPS_FTP" = xftp; then
18597         VALID_TOOL=yes
18598         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18599         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18600         FTPUSERPWD=${FTPSERVER%%@*}
18601         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18602             FTPUSER=${userpwd%%:*}
18603             FTPPWD=${userpwd#*@}
18604             FTPSERVER=${FTPSERVER#*@}
18605         else
18606             FTPUSER=ftp
18607             FTPPWD=ftp
18608         fi
18609         # the "pass" command does not work on some
18610         # ftp clients (read ftp.exe) but if it works,
18611         # passive mode is better!
18612         (\
18613             echo "user $FTPUSER $FTPPWD"        ;\
18614             echo "pass"                         ;\
18615             echo "bin"                          ;\
18616             echo "get $FTPPATH $tmpfile"              ;\
18617         ) | ftp -in $FTPSERVER
18618     fi
18619     if test "x$VALID_TOOL" != xyes; then
18620        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18621     fi
18622 
18623         mv $tmpfile $installdir/$filename
18624         if test ! -s $installdir/$filename; then
18625             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18626         fi
18627         case "$extension" in
18628             zip)  echo "Unzipping $installdir/$filename..."
18629                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18630             ;;
18631             tar.gz) echo "Untaring $installdir/$filename..."
18632                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18633             ;;
18634             tgz) echo "Untaring $installdir/$filename..."
18635                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18636             ;;
18637             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18638             ;;
18639         esac
18640     fi
18641     if test -f $installdir/$filename.unpacked; then
18642         depdir=$installdir
18643     fi
18644 
18645             fi
18646             # Source the builddeps file again, because in the previous command, the depdir
18647             # was updated to point at the current build dependency install directory.
18648             . $builddepsfile
18649             # Now extract variables from the builddeps.conf files.
18650             theroot=${builddep_devkit_ROOT}
18651             thecflags=${builddep_devkit_CFLAGS}
18652             thelibs=${builddep_devkit_LIBS}
18653             if test "x$depdir" = x; then
18654                 as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18655             fi
18656             DEVKIT=$depdir
18657             if test "x$theroot" != x; then
18658                DEVKIT="$theroot"
18659             fi
18660             if test "x$thecflags" != x; then
18661                DEVKIT_CFLAGS="$thecflags"
18662             fi
18663             if test "x$thelibs" != x; then
18664                DEVKIT_LIBS="$thelibs"
18665             fi
18666             # Found devkit
18667                      PATH="$DEVKIT/bin:$PATH"
18668                      SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18669                      if test "x$x_includes" = "xNONE"; then
18670                          x_includes="$SYS_ROOT/usr/include/X11"
18671                      fi
18672                      if test "x$x_libraries" = "xNONE"; then
18673                          x_libraries="$SYS_ROOT/usr/lib"
18674                      fi
18675 
18676 
18677         fi
18678 
18679     fi
18680 
18681 
18682 # Store the CFLAGS etal passed to the configure script.
18683 ORG_CFLAGS="$CFLAGS"
18684 ORG_CXXFLAGS="$CXXFLAGS"
18685 ORG_OBJCFLAGS="$OBJCFLAGS"
18686 
18687 # autoconf magic only relies on PATH, so update it if tools dir is specified
18688 OLD_PATH="$PATH"
18689 if test "x$TOOLS_DIR" != x; then
18690   PATH=$TOOLS_DIR:$PATH
18691 fi
18692 
18693 
18694 ### Locate C compiler (CC)
18695 
18696 # On windows, only cl.exe is supported.
18697 # On Solaris, cc is preferred to gcc.
18698 # Elsewhere, gcc is preferred to cc.
18699 
18700 if test "x$CC" != x; then
18701   COMPILER_CHECK_LIST="$CC"
18702 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18703   COMPILER_CHECK_LIST="cl"
18704 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18705   COMPILER_CHECK_LIST="cc gcc"
18706 else
18707   COMPILER_CHECK_LIST="gcc cc"
18708 fi
18709 
18710 
18711   COMPILER_NAME=C
18712 
18713   CC=
18714   # If TOOLS_DIR is set, check for all compiler names in there first
18715   # before checking the rest of the PATH.
18716   if test -n "$TOOLS_DIR"; then
18717     PATH_save="$PATH"
18718     PATH="$TOOLS_DIR"
18719     for ac_prog in $COMPILER_CHECK_LIST
18720 do
18721   # Extract the first word of "$ac_prog", so it can be a program name with args.
18722 set dummy $ac_prog; ac_word=$2
18723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18724 $as_echo_n "checking for $ac_word... " >&6; }
18725 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
18726   $as_echo_n "(cached) " >&6
18727 else
18728   case $TOOLS_DIR_CC in
18729   [\\/]* | ?:[\\/]*)
18730   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18731   ;;
18732   *)
18733   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18734 for as_dir in $PATH
18735 do
18736   IFS=$as_save_IFS
18737   test -z "$as_dir" && as_dir=.
18738     for ac_exec_ext in '' $ac_executable_extensions; do
18739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18740     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18742     break 2
18743   fi
18744 done
18745   done
18746 IFS=$as_save_IFS
18747 
18748   ;;
18749 esac
18750 fi
18751 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18752 if test -n "$TOOLS_DIR_CC"; then
18753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18754 $as_echo "$TOOLS_DIR_CC" >&6; }
18755 else
18756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18757 $as_echo "no" >&6; }
18758 fi
18759 
18760 
18761   test -n "$TOOLS_DIR_CC" && break
18762 done
18763 
18764     CC=$TOOLS_DIR_CC
18765     PATH="$PATH_save"
18766   fi
18767 
18768   # AC_PATH_PROGS can't be run multiple times with the same variable,
18769   # so create a new name for this run.
18770   if test "x$CC" = x; then
18771     for ac_prog in $COMPILER_CHECK_LIST
18772 do
18773   # Extract the first word of "$ac_prog", so it can be a program name with args.
18774 set dummy $ac_prog; ac_word=$2
18775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18776 $as_echo_n "checking for $ac_word... " >&6; }
18777 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
18778   $as_echo_n "(cached) " >&6
18779 else
18780   case $POTENTIAL_CC in
18781   [\\/]* | ?:[\\/]*)
18782   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18783   ;;
18784   *)
18785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18786 for as_dir in $PATH
18787 do
18788   IFS=$as_save_IFS
18789   test -z "$as_dir" && as_dir=.
18790     for ac_exec_ext in '' $ac_executable_extensions; do
18791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18792     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18794     break 2
18795   fi
18796 done
18797   done
18798 IFS=$as_save_IFS
18799 
18800   ;;
18801 esac
18802 fi
18803 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18804 if test -n "$POTENTIAL_CC"; then
18805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18806 $as_echo "$POTENTIAL_CC" >&6; }
18807 else
18808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18809 $as_echo "no" >&6; }
18810 fi
18811 
18812 
18813   test -n "$POTENTIAL_CC" && break
18814 done
18815 
18816     CC=$POTENTIAL_CC
18817   fi
18818 
18819   if test "x$CC" = x; then
18820 
18821     # Print a helpful message on how to acquire the necessary build dependency.
18822     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18823     MISSING_DEPENDENCY=devkit
18824     PKGHANDLER_COMMAND=
18825 
18826     case $PKGHANDLER in
18827         apt-get)
18828                 apt_help     $MISSING_DEPENDENCY ;;
18829     yum)
18830                 yum_help     $MISSING_DEPENDENCY ;;
18831         port)
18832                 port_help    $MISSING_DEPENDENCY ;;
18833         pkgutil)
18834                 pkgutil_help $MISSING_DEPENDENCY ;;
18835         pkgadd)
18836                 pkgadd_help  $MISSING_DEPENDENCY ;;
18837     * )
18838       break ;;
18839     esac
18840 
18841     if test "x$PKGHANDLER_COMMAND" != x; then
18842         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18843     fi
18844 
18845       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18846   fi
18847 
18848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18849 
18850   # First separate the path from the arguments. This will split at the first
18851   # space.
18852   complete="$CC"
18853   path="${complete%% *}"
18854   tmp="$complete EOL"
18855   arguments="${tmp#* }"
18856 
18857   # Input might be given as Windows format, start by converting to
18858   # unix format.
18859   new_path=`$CYGPATH -u "$path"`
18860 
18861   # Now try to locate executable using which
18862   new_path=`$WHICH "$new_path" 2> /dev/null`
18863   # bat and cmd files are not always considered executable in cygwin causing which
18864   # to not find them
18865   if test "x$new_path" = x \
18866            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18867            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18868     new_path=`$CYGPATH -u "$path"`
18869   fi
18870   if test "x$new_path" = x; then
18871     # Oops. Which didn't find the executable.
18872     # The splitting of arguments from the executable at a space might have been incorrect,
18873     # since paths with space are more likely in Windows. Give it another try with the whole
18874     # argument.
18875     path="$complete"
18876     arguments="EOL"
18877     new_path=`$CYGPATH -u "$path"`
18878     new_path=`$WHICH "$new_path" 2> /dev/null`
18879     # bat and cmd files are not always considered executable in cygwin causing which
18880     # to not find them
18881     if test "x$new_path" = x \
18882              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18883              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18884       new_path=`$CYGPATH -u "$path"`
18885     fi
18886     if test "x$new_path" = x; then
18887       # It's still not found. Now this is an unrecoverable error.
18888       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18889 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18890       has_space=`$ECHO "$complete" | $GREP " "`
18891       if test "x$has_space" != x; then
18892         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18893 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18894       fi
18895       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18896     fi
18897   fi
18898 
18899   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18900   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18901   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18902   # "foo.exe" is OK but "foo" is an error.
18903   #
18904   # This test is therefore slightly more accurate than "test -f" to check for file precense.
18905   # It is also a way to make sure we got the proper file name for the real test later on.
18906   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18907   if test "x$test_shortpath" = x; then
18908     # Short path failed, file does not exist as specified.
18909     # Try adding .exe or .cmd
18910     if test -f "${new_path}.exe"; then
18911        input_to_shortpath="${new_path}.exe"
18912     elif test -f "${new_path}.cmd"; then
18913        input_to_shortpath="${new_path}.cmd"
18914     else
18915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18916 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18917       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18918 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18919       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18920     fi
18921   else
18922     input_to_shortpath="$new_path"
18923   fi
18924 
18925   # Call helper function which possibly converts this using DOS-style short mode.
18926   # If so, the updated path is stored in $new_path.
18927   new_path="$input_to_shortpath"
18928 
18929   input_path="$input_to_shortpath"
18930   # Check if we need to convert this using DOS-style short mode. If the path
18931   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18932   # take no chances and rewrite it.
18933   # Note: m4 eats our [], so we need to use [ and ] instead.
18934   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18935   if test "x$has_forbidden_chars" != x; then
18936     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18937     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18938     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18939     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18940       # Going to short mode and back again did indeed matter. Since short mode is
18941       # case insensitive, let's make it lowercase to improve readability.
18942       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18943       # Now convert it back to Unix-stile (cygpath)
18944       input_path=`$CYGPATH -u "$shortmode_path"`
18945       new_path="$input_path"
18946     fi
18947   fi
18948 
18949   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18950   if test "x$test_cygdrive_prefix" = x; then
18951     # As a simple fix, exclude /usr/bin since it's not a real path.
18952     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18953       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18954       # a path prefixed by /cygdrive for fixpath to work.
18955       new_path="$CYGWIN_ROOT_PATH$input_path"
18956     fi
18957   fi
18958 
18959   # remove trailing .exe if any
18960   new_path="${new_path/%.exe/}"
18961 
18962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18963 
18964   # First separate the path from the arguments. This will split at the first
18965   # space.
18966   complete="$CC"
18967   path="${complete%% *}"
18968   tmp="$complete EOL"
18969   arguments="${tmp#* }"
18970 
18971   # Input might be given as Windows format, start by converting to
18972   # unix format.
18973   new_path="$path"
18974 
18975   windows_path="$new_path"
18976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18977     unix_path=`$CYGPATH -u "$windows_path"`
18978     new_path="$unix_path"
18979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18981     new_path="$unix_path"
18982   fi
18983 
18984 
18985   # Now try to locate executable using which
18986   new_path=`$WHICH "$new_path" 2> /dev/null`
18987 
18988   if test "x$new_path" = x; then
18989     # Oops. Which didn't find the executable.
18990     # The splitting of arguments from the executable at a space might have been incorrect,
18991     # since paths with space are more likely in Windows. Give it another try with the whole
18992     # argument.
18993     path="$complete"
18994     arguments="EOL"
18995     new_path="$path"
18996 
18997   windows_path="$new_path"
18998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18999     unix_path=`$CYGPATH -u "$windows_path"`
19000     new_path="$unix_path"
19001   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19002     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19003     new_path="$unix_path"
19004   fi
19005 
19006 
19007     new_path=`$WHICH "$new_path" 2> /dev/null`
19008 
19009     if test "x$new_path" = x; then
19010       # It's still not found. Now this is an unrecoverable error.
19011       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19012 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19013       has_space=`$ECHO "$complete" | $GREP " "`
19014       if test "x$has_space" != x; then
19015         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19016 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19017       fi
19018       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19019     fi
19020   fi
19021 
19022   # Now new_path has a complete unix path to the binary
19023   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19024     # Keep paths in /bin as-is, but remove trailing .exe if any
19025     new_path="${new_path/%.exe/}"
19026     # Do not save /bin paths to all_fixpath_prefixes!
19027   else
19028     # Not in mixed or Windows style, start by that.
19029     new_path=`cmd //c echo $new_path`
19030 
19031   input_path="$new_path"
19032   # Check if we need to convert this using DOS-style short mode. If the path
19033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19034   # take no chances and rewrite it.
19035   # Note: m4 eats our [], so we need to use [ and ] instead.
19036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19037   if test "x$has_forbidden_chars" != x; then
19038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19039     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19040   fi
19041 
19042     # Output is in $new_path
19043 
19044   windows_path="$new_path"
19045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19046     unix_path=`$CYGPATH -u "$windows_path"`
19047     new_path="$unix_path"
19048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19050     new_path="$unix_path"
19051   fi
19052 
19053     # remove trailing .exe if any
19054     new_path="${new_path/%.exe/}"
19055 
19056     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19057     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19058   fi
19059 
19060   else
19061     # We're on a posix platform. Hooray! :)
19062     # First separate the path from the arguments. This will split at the first
19063     # space.
19064     complete="$CC"
19065     path="${complete%% *}"
19066     tmp="$complete EOL"
19067     arguments="${tmp#* }"
19068 
19069     # Cannot rely on the command "which" here since it doesn't always work.
19070     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19071     if test -z "$is_absolute_path"; then
19072       # Path to executable is not absolute. Find it.
19073       IFS_save="$IFS"
19074       IFS=:
19075       for p in $PATH; do
19076         if test -f "$p/$path" && test -x "$p/$path"; then
19077           new_path="$p/$path"
19078           break
19079         fi
19080       done
19081       IFS="$IFS_save"
19082     else
19083       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19084 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19085       new_path="$path"
19086     fi
19087 
19088     if test "x$new_path" = x; then
19089         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19090 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19091         has_space=`$ECHO "$complete" | $GREP " "`
19092         if test "x$has_space" != x; then
19093           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19094 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19095         fi
19096         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19097       fi
19098   fi
19099 
19100       # Now join together the path and the arguments once again
19101       if test "x$arguments" != xEOL; then
19102         new_complete="$new_path ${arguments% *}"
19103       else
19104         new_complete="$new_path"
19105       fi
19106 
19107   if test "x$complete" != "x$new_complete"; then
19108       CC="$new_complete"
19109       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19110 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19111     fi
19112 
19113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19114 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19115   TEST_COMPILER="$CC"
19116 
19117     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19118         # Follow a chain of symbolic links. Use readlink
19119         # where it exists, else fall back to horribly
19120         # complicated shell code.
19121         if test "x$READLINK_TESTED" != yes; then
19122             # On MacOSX there is a readlink tool with a different
19123             # purpose than the GNU readlink tool. Check the found readlink.
19124             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19125             if test "x$ISGNU" = x; then
19126                  # A readlink that we do not know how to use.
19127                  # Are there other non-GNU readlinks out there?
19128                  READLINK_TESTED=yes
19129                  READLINK=
19130             fi
19131         fi
19132 
19133         if test "x$READLINK" != x; then
19134             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19135         else
19136             # Save the current directory for restoring afterwards
19137             STARTDIR=$PWD
19138             COUNTER=0
19139             sym_link_dir=`$DIRNAME $TEST_COMPILER`
19140             sym_link_file=`$BASENAME $TEST_COMPILER`
19141             cd $sym_link_dir
19142             # Use -P flag to resolve symlinks in directories.
19143             cd `$THEPWDCMD -P`
19144             sym_link_dir=`$THEPWDCMD -P`
19145             # Resolve file symlinks
19146             while test $COUNTER -lt 20; do
19147                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19148                 if test "x$ISLINK" == x; then
19149                     # This is not a symbolic link! We are done!
19150                     break
19151                 fi
19152                 # Again resolve directory symlinks since the target of the just found
19153                 # link could be in a different directory
19154                 cd `$DIRNAME $ISLINK`
19155                 sym_link_dir=`$THEPWDCMD -P`
19156                 sym_link_file=`$BASENAME $ISLINK`
19157                 let COUNTER=COUNTER+1
19158             done
19159             cd $STARTDIR
19160             TEST_COMPILER=$sym_link_dir/$sym_link_file
19161         fi
19162     fi
19163 
19164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19165 $as_echo "$TEST_COMPILER" >&6; }
19166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19167 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19168 
19169   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19170   if test "x$COMPILER_BASENAME" = "xccache"; then
19171     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19172 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19173     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19174     # We want to control ccache invocation ourselves, so ignore this cc and try
19175     # searching again.
19176 
19177     # Remove the path to the fake ccache cc from the PATH
19178     RETRY_COMPILER_SAVED_PATH="$PATH"
19179     COMPILER_DIRNAME=`$DIRNAME $CC`
19180     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19181 
19182     # Try again looking for our compiler
19183     if test -n "$ac_tool_prefix"; then
19184   for ac_prog in $COMPILER_CHECK_LIST
19185   do
19186     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19187 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19189 $as_echo_n "checking for $ac_word... " >&6; }
19190 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19191   $as_echo_n "(cached) " >&6
19192 else
19193   if test -n "$PROPER_COMPILER_CC"; then
19194   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19195 else
19196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19197 for as_dir in $PATH
19198 do
19199   IFS=$as_save_IFS
19200   test -z "$as_dir" && as_dir=.
19201     for ac_exec_ext in '' $ac_executable_extensions; do
19202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19203     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19205     break 2
19206   fi
19207 done
19208   done
19209 IFS=$as_save_IFS
19210 
19211 fi
19212 fi
19213 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19214 if test -n "$PROPER_COMPILER_CC"; then
19215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19216 $as_echo "$PROPER_COMPILER_CC" >&6; }
19217 else
19218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19219 $as_echo "no" >&6; }
19220 fi
19221 
19222 
19223     test -n "$PROPER_COMPILER_CC" && break
19224   done
19225 fi
19226 if test -z "$PROPER_COMPILER_CC"; then
19227   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19228   for ac_prog in $COMPILER_CHECK_LIST
19229 do
19230   # Extract the first word of "$ac_prog", so it can be a program name with args.
19231 set dummy $ac_prog; ac_word=$2
19232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19233 $as_echo_n "checking for $ac_word... " >&6; }
19234 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19235   $as_echo_n "(cached) " >&6
19236 else
19237   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19238   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19239 else
19240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19241 for as_dir in $PATH
19242 do
19243   IFS=$as_save_IFS
19244   test -z "$as_dir" && as_dir=.
19245     for ac_exec_ext in '' $ac_executable_extensions; do
19246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19247     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19249     break 2
19250   fi
19251 done
19252   done
19253 IFS=$as_save_IFS
19254 
19255 fi
19256 fi
19257 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19258 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19260 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19261 else
19262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19263 $as_echo "no" >&6; }
19264 fi
19265 
19266 
19267   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19268 done
19269 
19270   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19271     PROPER_COMPILER_CC=""
19272   else
19273     case $cross_compiling:$ac_tool_warned in
19274 yes:)
19275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19276 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19277 ac_tool_warned=yes ;;
19278 esac
19279     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19280   fi
19281 fi
19282 
19283 
19284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19285 
19286   # First separate the path from the arguments. This will split at the first
19287   # space.
19288   complete="$PROPER_COMPILER_CC"
19289   path="${complete%% *}"
19290   tmp="$complete EOL"
19291   arguments="${tmp#* }"
19292 
19293   # Input might be given as Windows format, start by converting to
19294   # unix format.
19295   new_path=`$CYGPATH -u "$path"`
19296 
19297   # Now try to locate executable using which
19298   new_path=`$WHICH "$new_path" 2> /dev/null`
19299   # bat and cmd files are not always considered executable in cygwin causing which
19300   # to not find them
19301   if test "x$new_path" = x \
19302            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19303            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19304     new_path=`$CYGPATH -u "$path"`
19305   fi
19306   if test "x$new_path" = x; then
19307     # Oops. Which didn't find the executable.
19308     # The splitting of arguments from the executable at a space might have been incorrect,
19309     # since paths with space are more likely in Windows. Give it another try with the whole
19310     # argument.
19311     path="$complete"
19312     arguments="EOL"
19313     new_path=`$CYGPATH -u "$path"`
19314     new_path=`$WHICH "$new_path" 2> /dev/null`
19315     # bat and cmd files are not always considered executable in cygwin causing which
19316     # to not find them
19317     if test "x$new_path" = x \
19318              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19319              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19320       new_path=`$CYGPATH -u "$path"`
19321     fi
19322     if test "x$new_path" = x; then
19323       # It's still not found. Now this is an unrecoverable error.
19324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19325 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19326       has_space=`$ECHO "$complete" | $GREP " "`
19327       if test "x$has_space" != x; then
19328         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19329 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19330       fi
19331       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19332     fi
19333   fi
19334 
19335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19338   # "foo.exe" is OK but "foo" is an error.
19339   #
19340   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19341   # It is also a way to make sure we got the proper file name for the real test later on.
19342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19343   if test "x$test_shortpath" = x; then
19344     # Short path failed, file does not exist as specified.
19345     # Try adding .exe or .cmd
19346     if test -f "${new_path}.exe"; then
19347        input_to_shortpath="${new_path}.exe"
19348     elif test -f "${new_path}.cmd"; then
19349        input_to_shortpath="${new_path}.cmd"
19350     else
19351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19352 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19353       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19354 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19355       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19356     fi
19357   else
19358     input_to_shortpath="$new_path"
19359   fi
19360 
19361   # Call helper function which possibly converts this using DOS-style short mode.
19362   # If so, the updated path is stored in $new_path.
19363   new_path="$input_to_shortpath"
19364 
19365   input_path="$input_to_shortpath"
19366   # Check if we need to convert this using DOS-style short mode. If the path
19367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19368   # take no chances and rewrite it.
19369   # Note: m4 eats our [], so we need to use [ and ] instead.
19370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19371   if test "x$has_forbidden_chars" != x; then
19372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19376       # Going to short mode and back again did indeed matter. Since short mode is
19377       # case insensitive, let's make it lowercase to improve readability.
19378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19379       # Now convert it back to Unix-stile (cygpath)
19380       input_path=`$CYGPATH -u "$shortmode_path"`
19381       new_path="$input_path"
19382     fi
19383   fi
19384 
19385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19386   if test "x$test_cygdrive_prefix" = x; then
19387     # As a simple fix, exclude /usr/bin since it's not a real path.
19388     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19390       # a path prefixed by /cygdrive for fixpath to work.
19391       new_path="$CYGWIN_ROOT_PATH$input_path"
19392     fi
19393   fi
19394 
19395   # remove trailing .exe if any
19396   new_path="${new_path/%.exe/}"
19397 
19398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19399 
19400   # First separate the path from the arguments. This will split at the first
19401   # space.
19402   complete="$PROPER_COMPILER_CC"
19403   path="${complete%% *}"
19404   tmp="$complete EOL"
19405   arguments="${tmp#* }"
19406 
19407   # Input might be given as Windows format, start by converting to
19408   # unix format.
19409   new_path="$path"
19410 
19411   windows_path="$new_path"
19412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19413     unix_path=`$CYGPATH -u "$windows_path"`
19414     new_path="$unix_path"
19415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19417     new_path="$unix_path"
19418   fi
19419 
19420 
19421   # Now try to locate executable using which
19422   new_path=`$WHICH "$new_path" 2> /dev/null`
19423 
19424   if test "x$new_path" = x; then
19425     # Oops. Which didn't find the executable.
19426     # The splitting of arguments from the executable at a space might have been incorrect,
19427     # since paths with space are more likely in Windows. Give it another try with the whole
19428     # argument.
19429     path="$complete"
19430     arguments="EOL"
19431     new_path="$path"
19432 
19433   windows_path="$new_path"
19434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19435     unix_path=`$CYGPATH -u "$windows_path"`
19436     new_path="$unix_path"
19437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19439     new_path="$unix_path"
19440   fi
19441 
19442 
19443     new_path=`$WHICH "$new_path" 2> /dev/null`
19444 
19445     if test "x$new_path" = x; then
19446       # It's still not found. Now this is an unrecoverable error.
19447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19448 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19449       has_space=`$ECHO "$complete" | $GREP " "`
19450       if test "x$has_space" != x; then
19451         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19452 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19453       fi
19454       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19455     fi
19456   fi
19457 
19458   # Now new_path has a complete unix path to the binary
19459   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19460     # Keep paths in /bin as-is, but remove trailing .exe if any
19461     new_path="${new_path/%.exe/}"
19462     # Do not save /bin paths to all_fixpath_prefixes!
19463   else
19464     # Not in mixed or Windows style, start by that.
19465     new_path=`cmd //c echo $new_path`
19466 
19467   input_path="$new_path"
19468   # Check if we need to convert this using DOS-style short mode. If the path
19469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19470   # take no chances and rewrite it.
19471   # Note: m4 eats our [], so we need to use [ and ] instead.
19472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19473   if test "x$has_forbidden_chars" != x; then
19474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19476   fi
19477 
19478     # Output is in $new_path
19479 
19480   windows_path="$new_path"
19481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19482     unix_path=`$CYGPATH -u "$windows_path"`
19483     new_path="$unix_path"
19484   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19485     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19486     new_path="$unix_path"
19487   fi
19488 
19489     # remove trailing .exe if any
19490     new_path="${new_path/%.exe/}"
19491 
19492     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19493     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19494   fi
19495 
19496   else
19497     # We're on a posix platform. Hooray! :)
19498     # First separate the path from the arguments. This will split at the first
19499     # space.
19500     complete="$PROPER_COMPILER_CC"
19501     path="${complete%% *}"
19502     tmp="$complete EOL"
19503     arguments="${tmp#* }"
19504 
19505     # Cannot rely on the command "which" here since it doesn't always work.
19506     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19507     if test -z "$is_absolute_path"; then
19508       # Path to executable is not absolute. Find it.
19509       IFS_save="$IFS"
19510       IFS=:
19511       for p in $PATH; do
19512         if test -f "$p/$path" && test -x "$p/$path"; then
19513           new_path="$p/$path"
19514           break
19515         fi
19516       done
19517       IFS="$IFS_save"
19518     else
19519       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19520 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19521       new_path="$path"
19522     fi
19523 
19524     if test "x$new_path" = x; then
19525         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19526 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19527         has_space=`$ECHO "$complete" | $GREP " "`
19528         if test "x$has_space" != x; then
19529           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19530 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19531         fi
19532         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19533       fi
19534   fi
19535 
19536       # Now join together the path and the arguments once again
19537       if test "x$arguments" != xEOL; then
19538         new_complete="$new_path ${arguments% *}"
19539       else
19540         new_complete="$new_path"
19541       fi
19542 
19543   if test "x$complete" != "x$new_complete"; then
19544       PROPER_COMPILER_CC="$new_complete"
19545       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19546 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19547     fi
19548 
19549     PATH="$RETRY_COMPILER_SAVED_PATH"
19550 
19551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19552 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19553 
19554     if test "x$OPENJDK_BUILD_OS" != xwindows; then
19555         # Follow a chain of symbolic links. Use readlink
19556         # where it exists, else fall back to horribly
19557         # complicated shell code.
19558         if test "x$READLINK_TESTED" != yes; then
19559             # On MacOSX there is a readlink tool with a different
19560             # purpose than the GNU readlink tool. Check the found readlink.
19561             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19562             if test "x$ISGNU" = x; then
19563                  # A readlink that we do not know how to use.
19564                  # Are there other non-GNU readlinks out there?
19565                  READLINK_TESTED=yes
19566                  READLINK=
19567             fi
19568         fi
19569 
19570         if test "x$READLINK" != x; then
19571             PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19572         else
19573             # Save the current directory for restoring afterwards
19574             STARTDIR=$PWD
19575             COUNTER=0
19576             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19577             sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19578             cd $sym_link_dir
19579             # Use -P flag to resolve symlinks in directories.
19580             cd `$THEPWDCMD -P`
19581             sym_link_dir=`$THEPWDCMD -P`
19582             # Resolve file symlinks
19583             while test $COUNTER -lt 20; do
19584                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19585                 if test "x$ISLINK" == x; then
19586                     # This is not a symbolic link! We are done!
19587                     break
19588                 fi
19589                 # Again resolve directory symlinks since the target of the just found
19590                 # link could be in a different directory
19591                 cd `$DIRNAME $ISLINK`
19592                 sym_link_dir=`$THEPWDCMD -P`
19593                 sym_link_file=`$BASENAME $ISLINK`
19594                 let COUNTER=COUNTER+1
19595             done
19596             cd $STARTDIR
19597             PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19598         fi
19599     fi
19600 
19601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19602 $as_echo "$PROPER_COMPILER_CC" >&6; }
19603     CC="$PROPER_COMPILER_CC"
19604   else
19605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19606 $as_echo "no, keeping CC" >&6; }
19607     CC="$TEST_COMPILER"
19608   fi
19609 
19610   COMPILER=$CC
19611   COMPILER_NAME=$COMPILER_NAME
19612 
19613   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19614     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19615     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19616     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19617     if test $? -ne 0; then
19618       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19619 
19620       { $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
19621 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19622       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19623 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19624       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19625     else
19626       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19627       COMPILER_VENDOR="Sun Studio"
19628     fi
19629   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19630     # First line typically looks something like:
19631     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19632     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
19633     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19634     COMPILER_VENDOR="Microsoft CL.EXE"
19635     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19636     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19637       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19638         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19639       fi
19640     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19641       if test "x$COMPILER_CPU_TEST" != "xx64"; then
19642         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19643       fi
19644     fi
19645   else
19646     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19647     # Check that this is likely to be GCC.
19648     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19649     if test $? -ne 0; then
19650       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19651 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19652       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19653 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19654       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19655     fi
19656 
19657     # First line typically looks something like:
19658     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19659     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19660     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19661   fi
19662   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19663   CC_VERSION="$COMPILER_VERSION"
19664   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19665   CC_VENDOR="$COMPILER_VENDOR"
19666 
19667   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19668 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19669 
19670 
19671 # Now that we have resolved CC ourself, let autoconf have its go at it
19672 ac_ext=c
19673 ac_cpp='$CPP $CPPFLAGS'
19674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19677 if test -n "$ac_tool_prefix"; then
19678   for ac_prog in $CC
19679   do
19680     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19681 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19683 $as_echo_n "checking for $ac_word... " >&6; }
19684 if ${ac_cv_prog_CC+:} false; then :
19685   $as_echo_n "(cached) " >&6
19686 else
19687   if test -n "$CC"; then
19688   ac_cv_prog_CC="$CC" # Let the user override the test.
19689 else
19690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19691 for as_dir in $PATH
19692 do
19693   IFS=$as_save_IFS
19694   test -z "$as_dir" && as_dir=.
19695     for ac_exec_ext in '' $ac_executable_extensions; do
19696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19697     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19699     break 2
19700   fi
19701 done
19702   done
19703 IFS=$as_save_IFS
19704 
19705 fi
19706 fi
19707 CC=$ac_cv_prog_CC
19708 if test -n "$CC"; then
19709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19710 $as_echo "$CC" >&6; }
19711 else
19712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19713 $as_echo "no" >&6; }
19714 fi
19715 
19716 
19717     test -n "$CC" && break
19718   done
19719 fi
19720 if test -z "$CC"; then
19721   ac_ct_CC=$CC
19722   for ac_prog in $CC
19723 do
19724   # Extract the first word of "$ac_prog", so it can be a program name with args.
19725 set dummy $ac_prog; ac_word=$2
19726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19727 $as_echo_n "checking for $ac_word... " >&6; }
19728 if ${ac_cv_prog_ac_ct_CC+:} false; then :
19729   $as_echo_n "(cached) " >&6
19730 else
19731   if test -n "$ac_ct_CC"; then
19732   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19733 else
19734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19735 for as_dir in $PATH
19736 do
19737   IFS=$as_save_IFS
19738   test -z "$as_dir" && as_dir=.
19739     for ac_exec_ext in '' $ac_executable_extensions; do
19740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19741     ac_cv_prog_ac_ct_CC="$ac_prog"
19742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19743     break 2
19744   fi
19745 done
19746   done
19747 IFS=$as_save_IFS
19748 
19749 fi
19750 fi
19751 ac_ct_CC=$ac_cv_prog_ac_ct_CC
19752 if test -n "$ac_ct_CC"; then
19753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19754 $as_echo "$ac_ct_CC" >&6; }
19755 else
19756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19757 $as_echo "no" >&6; }
19758 fi
19759 
19760 
19761   test -n "$ac_ct_CC" && break
19762 done
19763 
19764   if test "x$ac_ct_CC" = x; then
19765     CC=""
19766   else
19767     case $cross_compiling:$ac_tool_warned in
19768 yes:)
19769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19770 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19771 ac_tool_warned=yes ;;
19772 esac
19773     CC=$ac_ct_CC
19774   fi
19775 fi
19776 
19777 
19778 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19779 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19780 as_fn_error $? "no acceptable C compiler found in \$PATH
19781 See \`config.log' for more details" "$LINENO" 5; }
19782 
19783 # Provide some information about the compiler.
19784 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19785 set X $ac_compile
19786 ac_compiler=$2
19787 for ac_option in --version -v -V -qversion; do
19788   { { ac_try="$ac_compiler $ac_option >&5"
19789 case "(($ac_try" in
19790   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19791   *) ac_try_echo=$ac_try;;
19792 esac
19793 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19794 $as_echo "$ac_try_echo"; } >&5
19795   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19796   ac_status=$?
19797   if test -s conftest.err; then
19798     sed '10a\
19799 ... rest of stderr output deleted ...
19800          10q' conftest.err >conftest.er1
19801     cat conftest.er1 >&5
19802   fi
19803   rm -f conftest.er1 conftest.err
19804   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19805   test $ac_status = 0; }
19806 done
19807 
19808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19809 /* end confdefs.h.  */
19810 
19811 int
19812 main ()
19813 {
19814 
19815   ;
19816   return 0;
19817 }
19818 _ACEOF
19819 ac_clean_files_save=$ac_clean_files
19820 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19821 # Try to create an executable without -o first, disregard a.out.
19822 # It will help us diagnose broken compilers, and finding out an intuition
19823 # of exeext.
19824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19825 $as_echo_n "checking whether the C compiler works... " >&6; }
19826 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19827 
19828 # The possible output files:
19829 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19830 
19831 ac_rmfiles=
19832 for ac_file in $ac_files
19833 do
19834   case $ac_file in
19835     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19836     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19837   esac
19838 done
19839 rm -f $ac_rmfiles
19840 
19841 if { { ac_try="$ac_link_default"
19842 case "(($ac_try" in
19843   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19844   *) ac_try_echo=$ac_try;;
19845 esac
19846 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19847 $as_echo "$ac_try_echo"; } >&5
19848   (eval "$ac_link_default") 2>&5
19849   ac_status=$?
19850   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19851   test $ac_status = 0; }; then :
19852   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19853 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19854 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
19855 # so that the user can short-circuit this test for compilers unknown to
19856 # Autoconf.
19857 for ac_file in $ac_files ''
19858 do
19859   test -f "$ac_file" || continue
19860   case $ac_file in
19861     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19862         ;;
19863     [ab].out )
19864         # We found the default executable, but exeext='' is most
19865         # certainly right.
19866         break;;
19867     *.* )
19868         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19869         then :; else
19870            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19871         fi
19872         # We set ac_cv_exeext here because the later test for it is not
19873         # safe: cross compilers may not add the suffix if given an `-o'
19874         # argument, so we may need to know it at that point already.
19875         # Even if this section looks crufty: it has the advantage of
19876         # actually working.
19877         break;;
19878     * )
19879         break;;
19880   esac
19881 done
19882 test "$ac_cv_exeext" = no && ac_cv_exeext=
19883 
19884 else
19885   ac_file=''
19886 fi
19887 if test -z "$ac_file"; then :
19888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19889 $as_echo "no" >&6; }
19890 $as_echo "$as_me: failed program was:" >&5
19891 sed 's/^/| /' conftest.$ac_ext >&5
19892 
19893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19894 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19895 as_fn_error 77 "C compiler cannot create executables
19896 See \`config.log' for more details" "$LINENO" 5; }
19897 else
19898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19899 $as_echo "yes" >&6; }
19900 fi
19901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19902 $as_echo_n "checking for C compiler default output file name... " >&6; }
19903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19904 $as_echo "$ac_file" >&6; }
19905 ac_exeext=$ac_cv_exeext
19906 
19907 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19908 ac_clean_files=$ac_clean_files_save
19909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19910 $as_echo_n "checking for suffix of executables... " >&6; }
19911 if { { ac_try="$ac_link"
19912 case "(($ac_try" in
19913   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19914   *) ac_try_echo=$ac_try;;
19915 esac
19916 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19917 $as_echo "$ac_try_echo"; } >&5
19918   (eval "$ac_link") 2>&5
19919   ac_status=$?
19920   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19921   test $ac_status = 0; }; then :
19922   # If both `conftest.exe' and `conftest' are `present' (well, observable)
19923 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19924 # work properly (i.e., refer to `conftest.exe'), while it won't with
19925 # `rm'.
19926 for ac_file in conftest.exe conftest conftest.*; do
19927   test -f "$ac_file" || continue
19928   case $ac_file in
19929     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19930     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19931           break;;
19932     * ) break;;
19933   esac
19934 done
19935 else
19936   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19938 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19939 See \`config.log' for more details" "$LINENO" 5; }
19940 fi
19941 rm -f conftest conftest$ac_cv_exeext
19942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19943 $as_echo "$ac_cv_exeext" >&6; }
19944 
19945 rm -f conftest.$ac_ext
19946 EXEEXT=$ac_cv_exeext
19947 ac_exeext=$EXEEXT
19948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19949 /* end confdefs.h.  */
19950 #include <stdio.h>
19951 int
19952 main ()
19953 {
19954 FILE *f = fopen ("conftest.out", "w");
19955  return ferror (f) || fclose (f) != 0;
19956 
19957   ;
19958   return 0;
19959 }
19960 _ACEOF
19961 ac_clean_files="$ac_clean_files conftest.out"
19962 # Check that the compiler produces executables we can run.  If not, either
19963 # the compiler is broken, or we cross compile.
19964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19965 $as_echo_n "checking whether we are cross compiling... " >&6; }
19966 if test "$cross_compiling" != yes; then
19967   { { ac_try="$ac_link"
19968 case "(($ac_try" in
19969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19970   *) ac_try_echo=$ac_try;;
19971 esac
19972 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19973 $as_echo "$ac_try_echo"; } >&5
19974   (eval "$ac_link") 2>&5
19975   ac_status=$?
19976   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19977   test $ac_status = 0; }
19978   if { ac_try='./conftest$ac_cv_exeext'
19979   { { case "(($ac_try" in
19980   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19981   *) ac_try_echo=$ac_try;;
19982 esac
19983 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19984 $as_echo "$ac_try_echo"; } >&5
19985   (eval "$ac_try") 2>&5
19986   ac_status=$?
19987   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19988   test $ac_status = 0; }; }; then
19989     cross_compiling=no
19990   else
19991     if test "$cross_compiling" = maybe; then
19992         cross_compiling=yes
19993     else
19994         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19995 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19996 as_fn_error $? "cannot run C compiled programs.
19997 If you meant to cross compile, use \`--host'.
19998 See \`config.log' for more details" "$LINENO" 5; }
19999     fi
20000   fi
20001 fi
20002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20003 $as_echo "$cross_compiling" >&6; }
20004 
20005 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20006 ac_clean_files=$ac_clean_files_save
20007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20008 $as_echo_n "checking for suffix of object files... " >&6; }
20009 if ${ac_cv_objext+:} false; then :
20010   $as_echo_n "(cached) " >&6
20011 else
20012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20013 /* end confdefs.h.  */
20014 
20015 int
20016 main ()
20017 {
20018 
20019   ;
20020   return 0;
20021 }
20022 _ACEOF
20023 rm -f conftest.o conftest.obj
20024 if { { ac_try="$ac_compile"
20025 case "(($ac_try" in
20026   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20027   *) ac_try_echo=$ac_try;;
20028 esac
20029 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20030 $as_echo "$ac_try_echo"; } >&5
20031   (eval "$ac_compile") 2>&5
20032   ac_status=$?
20033   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20034   test $ac_status = 0; }; then :
20035   for ac_file in conftest.o conftest.obj conftest.*; do
20036   test -f "$ac_file" || continue;
20037   case $ac_file in
20038     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20039     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20040        break;;
20041   esac
20042 done
20043 else
20044   $as_echo "$as_me: failed program was:" >&5
20045 sed 's/^/| /' conftest.$ac_ext >&5
20046 
20047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20048 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20049 as_fn_error $? "cannot compute suffix of object files: cannot compile
20050 See \`config.log' for more details" "$LINENO" 5; }
20051 fi
20052 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20053 fi
20054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20055 $as_echo "$ac_cv_objext" >&6; }
20056 OBJEXT=$ac_cv_objext
20057 ac_objext=$OBJEXT
20058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20059 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20060 if ${ac_cv_c_compiler_gnu+:} false; then :
20061   $as_echo_n "(cached) " >&6
20062 else
20063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20064 /* end confdefs.h.  */
20065 
20066 int
20067 main ()
20068 {
20069 #ifndef __GNUC__
20070        choke me
20071 #endif
20072 
20073   ;
20074   return 0;
20075 }
20076 _ACEOF
20077 if ac_fn_c_try_compile "$LINENO"; then :
20078   ac_compiler_gnu=yes
20079 else
20080   ac_compiler_gnu=no
20081 fi
20082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20083 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20084 
20085 fi
20086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20087 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20088 if test $ac_compiler_gnu = yes; then
20089   GCC=yes
20090 else
20091   GCC=
20092 fi
20093 ac_test_CFLAGS=${CFLAGS+set}
20094 ac_save_CFLAGS=$CFLAGS
20095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20096 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20097 if ${ac_cv_prog_cc_g+:} false; then :
20098   $as_echo_n "(cached) " >&6
20099 else
20100   ac_save_c_werror_flag=$ac_c_werror_flag
20101    ac_c_werror_flag=yes
20102    ac_cv_prog_cc_g=no
20103    CFLAGS="-g"
20104    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20105 /* end confdefs.h.  */
20106 
20107 int
20108 main ()
20109 {
20110 
20111   ;
20112   return 0;
20113 }
20114 _ACEOF
20115 if ac_fn_c_try_compile "$LINENO"; then :
20116   ac_cv_prog_cc_g=yes
20117 else
20118   CFLAGS=""
20119       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20120 /* end confdefs.h.  */
20121 
20122 int
20123 main ()
20124 {
20125 
20126   ;
20127   return 0;
20128 }
20129 _ACEOF
20130 if ac_fn_c_try_compile "$LINENO"; then :
20131 
20132 else
20133   ac_c_werror_flag=$ac_save_c_werror_flag
20134          CFLAGS="-g"
20135          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20136 /* end confdefs.h.  */
20137 
20138 int
20139 main ()
20140 {
20141 
20142   ;
20143   return 0;
20144 }
20145 _ACEOF
20146 if ac_fn_c_try_compile "$LINENO"; then :
20147   ac_cv_prog_cc_g=yes
20148 fi
20149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20150 fi
20151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20152 fi
20153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20154    ac_c_werror_flag=$ac_save_c_werror_flag
20155 fi
20156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20157 $as_echo "$ac_cv_prog_cc_g" >&6; }
20158 if test "$ac_test_CFLAGS" = set; then
20159   CFLAGS=$ac_save_CFLAGS
20160 elif test $ac_cv_prog_cc_g = yes; then
20161   if test "$GCC" = yes; then
20162     CFLAGS="-g -O2"
20163   else
20164     CFLAGS="-g"
20165   fi
20166 else
20167   if test "$GCC" = yes; then
20168     CFLAGS="-O2"
20169   else
20170     CFLAGS=
20171   fi
20172 fi
20173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20174 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20175 if ${ac_cv_prog_cc_c89+:} false; then :
20176   $as_echo_n "(cached) " >&6
20177 else
20178   ac_cv_prog_cc_c89=no
20179 ac_save_CC=$CC
20180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20181 /* end confdefs.h.  */
20182 #include <stdarg.h>
20183 #include <stdio.h>
20184 struct stat;
20185 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20186 struct buf { int x; };
20187 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20188 static char *e (p, i)
20189      char **p;
20190      int i;
20191 {
20192   return p[i];
20193 }
20194 static char *f (char * (*g) (char **, int), char **p, ...)
20195 {
20196   char *s;
20197   va_list v;
20198   va_start (v,p);
20199   s = g (p, va_arg (v,int));
20200   va_end (v);
20201   return s;
20202 }
20203 
20204 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20205    function prototypes and stuff, but not '\xHH' hex character constants.
20206    These don't provoke an error unfortunately, instead are silently treated
20207    as 'x'.  The following induces an error, until -std is added to get
20208    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20209    array size at least.  It's necessary to write '\x00'==0 to get something
20210    that's true only with -std.  */
20211 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20212 
20213 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20214    inside strings and character constants.  */
20215 #define FOO(x) 'x'
20216 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20217 
20218 int test (int i, double x);
20219 struct s1 {int (*f) (int a);};
20220 struct s2 {int (*f) (double a);};
20221 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20222 int argc;
20223 char **argv;
20224 int
20225 main ()
20226 {
20227 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20228   ;
20229   return 0;
20230 }
20231 _ACEOF
20232 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20233         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20234 do
20235   CC="$ac_save_CC $ac_arg"
20236   if ac_fn_c_try_compile "$LINENO"; then :
20237   ac_cv_prog_cc_c89=$ac_arg
20238 fi
20239 rm -f core conftest.err conftest.$ac_objext
20240   test "x$ac_cv_prog_cc_c89" != "xno" && break
20241 done
20242 rm -f conftest.$ac_ext
20243 CC=$ac_save_CC
20244 
20245 fi
20246 # AC_CACHE_VAL
20247 case "x$ac_cv_prog_cc_c89" in
20248   x)
20249     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20250 $as_echo "none needed" >&6; } ;;
20251   xno)
20252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20253 $as_echo "unsupported" >&6; } ;;
20254   *)
20255     CC="$CC $ac_cv_prog_cc_c89"
20256     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20257 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20258 esac
20259 if test "x$ac_cv_prog_cc_c89" != xno; then :
20260 
20261 fi
20262 
20263 ac_ext=cpp
20264 ac_cpp='$CXXCPP $CPPFLAGS'
20265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20268 
20269 
20270 ### Locate C++ compiler (CXX)
20271 
20272 if test "x$CXX" != x; then
20273   COMPILER_CHECK_LIST="$CXX"
20274 elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20275   COMPILER_CHECK_LIST="cl"
20276 elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20277   COMPILER_CHECK_LIST="CC g++"
20278 else
20279   COMPILER_CHECK_LIST="g++ CC"
20280 fi
20281 
20282 
20283   COMPILER_NAME=C++
20284 
20285   CXX=
20286   # If TOOLS_DIR is set, check for all compiler names in there first
20287   # before checking the rest of the PATH.
20288   if test -n "$TOOLS_DIR"; then
20289     PATH_save="$PATH"
20290     PATH="$TOOLS_DIR"
20291     for ac_prog in $COMPILER_CHECK_LIST
20292 do
20293   # Extract the first word of "$ac_prog", so it can be a program name with args.
20294 set dummy $ac_prog; ac_word=$2
20295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20296 $as_echo_n "checking for $ac_word... " >&6; }
20297 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20298   $as_echo_n "(cached) " >&6
20299 else
20300   case $TOOLS_DIR_CXX in
20301   [\\/]* | ?:[\\/]*)
20302   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20303   ;;
20304   *)
20305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20306 for as_dir in $PATH
20307 do
20308   IFS=$as_save_IFS
20309   test -z "$as_dir" && as_dir=.
20310     for ac_exec_ext in '' $ac_executable_extensions; do
20311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20312     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20314     break 2
20315   fi
20316 done
20317   done
20318 IFS=$as_save_IFS
20319 
20320   ;;
20321 esac
20322 fi
20323 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20324 if test -n "$TOOLS_DIR_CXX"; then
20325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20326 $as_echo "$TOOLS_DIR_CXX" >&6; }
20327 else
20328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20329 $as_echo "no" >&6; }
20330 fi
20331 
20332 
20333   test -n "$TOOLS_DIR_CXX" && break
20334 done
20335 
20336     CXX=$TOOLS_DIR_CXX
20337     PATH="$PATH_save"
20338   fi
20339 
20340   # AC_PATH_PROGS can't be run multiple times with the same variable,
20341   # so create a new name for this run.
20342   if test "x$CXX" = x; then
20343     for ac_prog in $COMPILER_CHECK_LIST
20344 do
20345   # Extract the first word of "$ac_prog", so it can be a program name with args.
20346 set dummy $ac_prog; ac_word=$2
20347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20348 $as_echo_n "checking for $ac_word... " >&6; }
20349 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20350   $as_echo_n "(cached) " >&6
20351 else
20352   case $POTENTIAL_CXX in
20353   [\\/]* | ?:[\\/]*)
20354   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20355   ;;
20356   *)
20357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20358 for as_dir in $PATH
20359 do
20360   IFS=$as_save_IFS
20361   test -z "$as_dir" && as_dir=.
20362     for ac_exec_ext in '' $ac_executable_extensions; do
20363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20364     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20366     break 2
20367   fi
20368 done
20369   done
20370 IFS=$as_save_IFS
20371 
20372   ;;
20373 esac
20374 fi
20375 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20376 if test -n "$POTENTIAL_CXX"; then
20377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20378 $as_echo "$POTENTIAL_CXX" >&6; }
20379 else
20380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20381 $as_echo "no" >&6; }
20382 fi
20383 
20384 
20385   test -n "$POTENTIAL_CXX" && break
20386 done
20387 
20388     CXX=$POTENTIAL_CXX
20389   fi
20390 
20391   if test "x$CXX" = x; then
20392 
20393     # Print a helpful message on how to acquire the necessary build dependency.
20394     # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20395     MISSING_DEPENDENCY=devkit
20396     PKGHANDLER_COMMAND=
20397 
20398     case $PKGHANDLER in
20399         apt-get)
20400                 apt_help     $MISSING_DEPENDENCY ;;
20401     yum)
20402                 yum_help     $MISSING_DEPENDENCY ;;
20403         port)
20404                 port_help    $MISSING_DEPENDENCY ;;
20405         pkgutil)
20406                 pkgutil_help $MISSING_DEPENDENCY ;;
20407         pkgadd)
20408                 pkgadd_help  $MISSING_DEPENDENCY ;;
20409     * )
20410       break ;;
20411     esac
20412 
20413     if test "x$PKGHANDLER_COMMAND" != x; then
20414         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20415     fi
20416 
20417       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20418   fi
20419 
20420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20421 
20422   # First separate the path from the arguments. This will split at the first
20423   # space.
20424   complete="$CXX"
20425   path="${complete%% *}"
20426   tmp="$complete EOL"
20427   arguments="${tmp#* }"
20428 
20429   # Input might be given as Windows format, start by converting to
20430   # unix format.
20431   new_path=`$CYGPATH -u "$path"`
20432 
20433   # Now try to locate executable using which
20434   new_path=`$WHICH "$new_path" 2> /dev/null`
20435   # bat and cmd files are not always considered executable in cygwin causing which
20436   # to not find them
20437   if test "x$new_path" = x \
20438            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20439            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20440     new_path=`$CYGPATH -u "$path"`
20441   fi
20442   if test "x$new_path" = x; then
20443     # Oops. Which didn't find the executable.
20444     # The splitting of arguments from the executable at a space might have been incorrect,
20445     # since paths with space are more likely in Windows. Give it another try with the whole
20446     # argument.
20447     path="$complete"
20448     arguments="EOL"
20449     new_path=`$CYGPATH -u "$path"`
20450     new_path=`$WHICH "$new_path" 2> /dev/null`
20451     # bat and cmd files are not always considered executable in cygwin causing which
20452     # to not find them
20453     if test "x$new_path" = x \
20454              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20455              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20456       new_path=`$CYGPATH -u "$path"`
20457     fi
20458     if test "x$new_path" = x; then
20459       # It's still not found. Now this is an unrecoverable error.
20460       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20461 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20462       has_space=`$ECHO "$complete" | $GREP " "`
20463       if test "x$has_space" != x; then
20464         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20465 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20466       fi
20467       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20468     fi
20469   fi
20470 
20471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20474   # "foo.exe" is OK but "foo" is an error.
20475   #
20476   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20477   # It is also a way to make sure we got the proper file name for the real test later on.
20478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20479   if test "x$test_shortpath" = x; then
20480     # Short path failed, file does not exist as specified.
20481     # Try adding .exe or .cmd
20482     if test -f "${new_path}.exe"; then
20483        input_to_shortpath="${new_path}.exe"
20484     elif test -f "${new_path}.cmd"; then
20485        input_to_shortpath="${new_path}.cmd"
20486     else
20487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20488 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20489       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20490 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20491       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20492     fi
20493   else
20494     input_to_shortpath="$new_path"
20495   fi
20496 
20497   # Call helper function which possibly converts this using DOS-style short mode.
20498   # If so, the updated path is stored in $new_path.
20499   new_path="$input_to_shortpath"
20500 
20501   input_path="$input_to_shortpath"
20502   # Check if we need to convert this using DOS-style short mode. If the path
20503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20504   # take no chances and rewrite it.
20505   # Note: m4 eats our [], so we need to use [ and ] instead.
20506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20507   if test "x$has_forbidden_chars" != x; then
20508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20509     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20510     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20511     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20512       # Going to short mode and back again did indeed matter. Since short mode is
20513       # case insensitive, let's make it lowercase to improve readability.
20514       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20515       # Now convert it back to Unix-stile (cygpath)
20516       input_path=`$CYGPATH -u "$shortmode_path"`
20517       new_path="$input_path"
20518     fi
20519   fi
20520 
20521   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20522   if test "x$test_cygdrive_prefix" = x; then
20523     # As a simple fix, exclude /usr/bin since it's not a real path.
20524     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20525       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20526       # a path prefixed by /cygdrive for fixpath to work.
20527       new_path="$CYGWIN_ROOT_PATH$input_path"
20528     fi
20529   fi
20530 
20531   # remove trailing .exe if any
20532   new_path="${new_path/%.exe/}"
20533 
20534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20535 
20536   # First separate the path from the arguments. This will split at the first
20537   # space.
20538   complete="$CXX"
20539   path="${complete%% *}"
20540   tmp="$complete EOL"
20541   arguments="${tmp#* }"
20542 
20543   # Input might be given as Windows format, start by converting to
20544   # unix format.
20545   new_path="$path"
20546 
20547   windows_path="$new_path"
20548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20549     unix_path=`$CYGPATH -u "$windows_path"`
20550     new_path="$unix_path"
20551   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20552     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20553     new_path="$unix_path"
20554   fi
20555 
20556 
20557   # Now try to locate executable using which
20558   new_path=`$WHICH "$new_path" 2> /dev/null`
20559 
20560   if test "x$new_path" = x; then
20561     # Oops. Which didn't find the executable.
20562     # The splitting of arguments from the executable at a space might have been incorrect,
20563     # since paths with space are more likely in Windows. Give it another try with the whole
20564     # argument.
20565     path="$complete"
20566     arguments="EOL"
20567     new_path="$path"
20568 
20569   windows_path="$new_path"
20570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20571     unix_path=`$CYGPATH -u "$windows_path"`
20572     new_path="$unix_path"
20573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20575     new_path="$unix_path"
20576   fi
20577 
20578 
20579     new_path=`$WHICH "$new_path" 2> /dev/null`
20580 
20581     if test "x$new_path" = x; then
20582       # It's still not found. Now this is an unrecoverable error.
20583       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20584 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20585       has_space=`$ECHO "$complete" | $GREP " "`
20586       if test "x$has_space" != x; then
20587         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20588 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20589       fi
20590       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20591     fi
20592   fi
20593 
20594   # Now new_path has a complete unix path to the binary
20595   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20596     # Keep paths in /bin as-is, but remove trailing .exe if any
20597     new_path="${new_path/%.exe/}"
20598     # Do not save /bin paths to all_fixpath_prefixes!
20599   else
20600     # Not in mixed or Windows style, start by that.
20601     new_path=`cmd //c echo $new_path`
20602 
20603   input_path="$new_path"
20604   # Check if we need to convert this using DOS-style short mode. If the path
20605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20606   # take no chances and rewrite it.
20607   # Note: m4 eats our [], so we need to use [ and ] instead.
20608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20609   if test "x$has_forbidden_chars" != x; then
20610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20612   fi
20613 
20614     # Output is in $new_path
20615 
20616   windows_path="$new_path"
20617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20618     unix_path=`$CYGPATH -u "$windows_path"`
20619     new_path="$unix_path"
20620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20622     new_path="$unix_path"
20623   fi
20624 
20625     # remove trailing .exe if any
20626     new_path="${new_path/%.exe/}"
20627 
20628     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20629     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20630   fi
20631 
20632   else
20633     # We're on a posix platform. Hooray! :)
20634     # First separate the path from the arguments. This will split at the first
20635     # space.
20636     complete="$CXX"
20637     path="${complete%% *}"
20638     tmp="$complete EOL"
20639     arguments="${tmp#* }"
20640 
20641     # Cannot rely on the command "which" here since it doesn't always work.
20642     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20643     if test -z "$is_absolute_path"; then
20644       # Path to executable is not absolute. Find it.
20645       IFS_save="$IFS"
20646       IFS=:
20647       for p in $PATH; do
20648         if test -f "$p/$path" && test -x "$p/$path"; then
20649           new_path="$p/$path"
20650           break
20651         fi
20652       done
20653       IFS="$IFS_save"
20654     else
20655       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20656 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20657       new_path="$path"
20658     fi
20659 
20660     if test "x$new_path" = x; then
20661         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20662 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20663         has_space=`$ECHO "$complete" | $GREP " "`
20664         if test "x$has_space" != x; then
20665           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20666 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20667         fi
20668         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20669       fi
20670   fi
20671 
20672       # Now join together the path and the arguments once again
20673       if test "x$arguments" != xEOL; then
20674         new_complete="$new_path ${arguments% *}"
20675       else
20676         new_complete="$new_path"
20677       fi
20678 
20679   if test "x$complete" != "x$new_complete"; then
20680       CXX="$new_complete"
20681       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20682 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20683     fi
20684 
20685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20686 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20687   TEST_COMPILER="$CXX"
20688 
20689     if test "x$OPENJDK_BUILD_OS" != xwindows; then
20690         # Follow a chain of symbolic links. Use readlink
20691         # where it exists, else fall back to horribly
20692         # complicated shell code.
20693         if test "x$READLINK_TESTED" != yes; then
20694             # On MacOSX there is a readlink tool with a different
20695             # purpose than the GNU readlink tool. Check the found readlink.
20696             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20697             if test "x$ISGNU" = x; then
20698                  # A readlink that we do not know how to use.
20699                  # Are there other non-GNU readlinks out there?
20700                  READLINK_TESTED=yes
20701                  READLINK=
20702             fi
20703         fi
20704 
20705         if test "x$READLINK" != x; then
20706             TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20707         else
20708             # Save the current directory for restoring afterwards
20709             STARTDIR=$PWD
20710             COUNTER=0
20711             sym_link_dir=`$DIRNAME $TEST_COMPILER`
20712             sym_link_file=`$BASENAME $TEST_COMPILER`
20713             cd $sym_link_dir
20714             # Use -P flag to resolve symlinks in directories.
20715             cd `$THEPWDCMD -P`
20716             sym_link_dir=`$THEPWDCMD -P`
20717             # Resolve file symlinks
20718             while test $COUNTER -lt 20; do
20719                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20720                 if test "x$ISLINK" == x; then
20721                     # This is not a symbolic link! We are done!
20722                     break
20723                 fi
20724                 # Again resolve directory symlinks since the target of the just found
20725                 # link could be in a different directory
20726                 cd `$DIRNAME $ISLINK`
20727                 sym_link_dir=`$THEPWDCMD -P`
20728                 sym_link_file=`$BASENAME $ISLINK`
20729                 let COUNTER=COUNTER+1
20730             done
20731             cd $STARTDIR
20732             TEST_COMPILER=$sym_link_dir/$sym_link_file
20733         fi
20734     fi
20735 
20736   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20737 $as_echo "$TEST_COMPILER" >&6; }
20738   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20739 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
20740 
20741   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20742   if test "x$COMPILER_BASENAME" = "xccache"; then
20743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20744 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20745     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20746     # We want to control ccache invocation ourselves, so ignore this cc and try
20747     # searching again.
20748 
20749     # Remove the path to the fake ccache cc from the PATH
20750     RETRY_COMPILER_SAVED_PATH="$PATH"
20751     COMPILER_DIRNAME=`$DIRNAME $CXX`
20752     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20753 
20754     # Try again looking for our compiler
20755     if test -n "$ac_tool_prefix"; then
20756   for ac_prog in $COMPILER_CHECK_LIST
20757   do
20758     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20759 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20761 $as_echo_n "checking for $ac_word... " >&6; }
20762 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
20763   $as_echo_n "(cached) " >&6
20764 else
20765   if test -n "$PROPER_COMPILER_CXX"; then
20766   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20767 else
20768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20769 for as_dir in $PATH
20770 do
20771   IFS=$as_save_IFS
20772   test -z "$as_dir" && as_dir=.
20773     for ac_exec_ext in '' $ac_executable_extensions; do
20774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20775     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20777     break 2
20778   fi
20779 done
20780   done
20781 IFS=$as_save_IFS
20782 
20783 fi
20784 fi
20785 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20786 if test -n "$PROPER_COMPILER_CXX"; then
20787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20788 $as_echo "$PROPER_COMPILER_CXX" >&6; }
20789 else
20790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20791 $as_echo "no" >&6; }
20792 fi
20793 
20794 
20795     test -n "$PROPER_COMPILER_CXX" && break
20796   done
20797 fi
20798 if test -z "$PROPER_COMPILER_CXX"; then
20799   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20800   for ac_prog in $COMPILER_CHECK_LIST
20801 do
20802   # Extract the first word of "$ac_prog", so it can be a program name with args.
20803 set dummy $ac_prog; ac_word=$2
20804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20805 $as_echo_n "checking for $ac_word... " >&6; }
20806 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
20807   $as_echo_n "(cached) " >&6
20808 else
20809   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20810   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20811 else
20812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20813 for as_dir in $PATH
20814 do
20815   IFS=$as_save_IFS
20816   test -z "$as_dir" && as_dir=.
20817     for ac_exec_ext in '' $ac_executable_extensions; do
20818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20819     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20821     break 2
20822   fi
20823 done
20824   done
20825 IFS=$as_save_IFS
20826 
20827 fi
20828 fi
20829 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20830 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20832 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20833 else
20834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20835 $as_echo "no" >&6; }
20836 fi
20837 
20838 
20839   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20840 done
20841 
20842   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20843     PROPER_COMPILER_CXX=""
20844   else
20845     case $cross_compiling:$ac_tool_warned in
20846 yes:)
20847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20848 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20849 ac_tool_warned=yes ;;
20850 esac
20851     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20852   fi
20853 fi
20854 
20855 
20856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20857 
20858   # First separate the path from the arguments. This will split at the first
20859   # space.
20860   complete="$PROPER_COMPILER_CXX"
20861   path="${complete%% *}"
20862   tmp="$complete EOL"
20863   arguments="${tmp#* }"
20864 
20865   # Input might be given as Windows format, start by converting to
20866   # unix format.
20867   new_path=`$CYGPATH -u "$path"`
20868 
20869   # Now try to locate executable using which
20870   new_path=`$WHICH "$new_path" 2> /dev/null`
20871   # bat and cmd files are not always considered executable in cygwin causing which
20872   # to not find them
20873   if test "x$new_path" = x \
20874            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20875            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20876     new_path=`$CYGPATH -u "$path"`
20877   fi
20878   if test "x$new_path" = x; then
20879     # Oops. Which didn't find the executable.
20880     # The splitting of arguments from the executable at a space might have been incorrect,
20881     # since paths with space are more likely in Windows. Give it another try with the whole
20882     # argument.
20883     path="$complete"
20884     arguments="EOL"
20885     new_path=`$CYGPATH -u "$path"`
20886     new_path=`$WHICH "$new_path" 2> /dev/null`
20887     # bat and cmd files are not always considered executable in cygwin causing which
20888     # to not find them
20889     if test "x$new_path" = x \
20890              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20891              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20892       new_path=`$CYGPATH -u "$path"`
20893     fi
20894     if test "x$new_path" = x; then
20895       # It's still not found. Now this is an unrecoverable error.
20896       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20897 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20898       has_space=`$ECHO "$complete" | $GREP " "`
20899       if test "x$has_space" != x; then
20900         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20901 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20902       fi
20903       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20904     fi
20905   fi
20906 
20907   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20908   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20909   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20910   # "foo.exe" is OK but "foo" is an error.
20911   #
20912   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20913   # It is also a way to make sure we got the proper file name for the real test later on.
20914   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20915   if test "x$test_shortpath" = x; then
20916     # Short path failed, file does not exist as specified.
20917     # Try adding .exe or .cmd
20918     if test -f "${new_path}.exe"; then
20919        input_to_shortpath="${new_path}.exe"
20920     elif test -f "${new_path}.cmd"; then
20921        input_to_shortpath="${new_path}.cmd"
20922     else
20923       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20924 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20925       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20926 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20927       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20928     fi
20929   else
20930     input_to_shortpath="$new_path"
20931   fi
20932 
20933   # Call helper function which possibly converts this using DOS-style short mode.
20934   # If so, the updated path is stored in $new_path.
20935   new_path="$input_to_shortpath"
20936 
20937   input_path="$input_to_shortpath"
20938   # Check if we need to convert this using DOS-style short mode. If the path
20939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20940   # take no chances and rewrite it.
20941   # Note: m4 eats our [], so we need to use [ and ] instead.
20942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20943   if test "x$has_forbidden_chars" != x; then
20944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20945     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20946     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20947     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20948       # Going to short mode and back again did indeed matter. Since short mode is
20949       # case insensitive, let's make it lowercase to improve readability.
20950       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20951       # Now convert it back to Unix-stile (cygpath)
20952       input_path=`$CYGPATH -u "$shortmode_path"`
20953       new_path="$input_path"
20954     fi
20955   fi
20956 
20957   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20958   if test "x$test_cygdrive_prefix" = x; then
20959     # As a simple fix, exclude /usr/bin since it's not a real path.
20960     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20961       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20962       # a path prefixed by /cygdrive for fixpath to work.
20963       new_path="$CYGWIN_ROOT_PATH$input_path"
20964     fi
20965   fi
20966 
20967   # remove trailing .exe if any
20968   new_path="${new_path/%.exe/}"
20969 
20970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20971 
20972   # First separate the path from the arguments. This will split at the first
20973   # space.
20974   complete="$PROPER_COMPILER_CXX"
20975   path="${complete%% *}"
20976   tmp="$complete EOL"
20977   arguments="${tmp#* }"
20978 
20979   # Input might be given as Windows format, start by converting to
20980   # unix format.
20981   new_path="$path"
20982 
20983   windows_path="$new_path"
20984   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20985     unix_path=`$CYGPATH -u "$windows_path"`
20986     new_path="$unix_path"
20987   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20988     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20989     new_path="$unix_path"
20990   fi
20991 
20992 
20993   # Now try to locate executable using which
20994   new_path=`$WHICH "$new_path" 2> /dev/null`
20995 
20996   if test "x$new_path" = x; then
20997     # Oops. Which didn't find the executable.
20998     # The splitting of arguments from the executable at a space might have been incorrect,
20999     # since paths with space are more likely in Windows. Give it another try with the whole
21000     # argument.
21001     path="$complete"
21002     arguments="EOL"
21003     new_path="$path"
21004 
21005   windows_path="$new_path"
21006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21007     unix_path=`$CYGPATH -u "$windows_path"`
21008     new_path="$unix_path"
21009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21011     new_path="$unix_path"
21012   fi
21013 
21014 
21015     new_path=`$WHICH "$new_path" 2> /dev/null`
21016 
21017     if test "x$new_path" = x; then
21018       # It's still not found. Now this is an unrecoverable error.
21019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21020 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21021       has_space=`$ECHO "$complete" | $GREP " "`
21022       if test "x$has_space" != x; then
21023         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21024 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21025       fi
21026       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21027     fi
21028   fi
21029 
21030   # Now new_path has a complete unix path to the binary
21031   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21032     # Keep paths in /bin as-is, but remove trailing .exe if any
21033     new_path="${new_path/%.exe/}"
21034     # Do not save /bin paths to all_fixpath_prefixes!
21035   else
21036     # Not in mixed or Windows style, start by that.
21037     new_path=`cmd //c echo $new_path`
21038 
21039   input_path="$new_path"
21040   # Check if we need to convert this using DOS-style short mode. If the path
21041   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21042   # take no chances and rewrite it.
21043   # Note: m4 eats our [], so we need to use [ and ] instead.
21044   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21045   if test "x$has_forbidden_chars" != x; then
21046     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21047     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21048   fi
21049 
21050     # Output is in $new_path
21051 
21052   windows_path="$new_path"
21053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21054     unix_path=`$CYGPATH -u "$windows_path"`
21055     new_path="$unix_path"
21056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21058     new_path="$unix_path"
21059   fi
21060 
21061     # remove trailing .exe if any
21062     new_path="${new_path/%.exe/}"
21063 
21064     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21065     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21066   fi
21067 
21068   else
21069     # We're on a posix platform. Hooray! :)
21070     # First separate the path from the arguments. This will split at the first
21071     # space.
21072     complete="$PROPER_COMPILER_CXX"
21073     path="${complete%% *}"
21074     tmp="$complete EOL"
21075     arguments="${tmp#* }"
21076 
21077     # Cannot rely on the command "which" here since it doesn't always work.
21078     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21079     if test -z "$is_absolute_path"; then
21080       # Path to executable is not absolute. Find it.
21081       IFS_save="$IFS"
21082       IFS=:
21083       for p in $PATH; do
21084         if test -f "$p/$path" && test -x "$p/$path"; then
21085           new_path="$p/$path"
21086           break
21087         fi
21088       done
21089       IFS="$IFS_save"
21090     else
21091       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21092 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21093       new_path="$path"
21094     fi
21095 
21096     if test "x$new_path" = x; then
21097         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21098 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21099         has_space=`$ECHO "$complete" | $GREP " "`
21100         if test "x$has_space" != x; then
21101           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21102 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21103         fi
21104         as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21105       fi
21106   fi
21107 
21108       # Now join together the path and the arguments once again
21109       if test "x$arguments" != xEOL; then
21110         new_complete="$new_path ${arguments% *}"
21111       else
21112         new_complete="$new_path"
21113       fi
21114 
21115   if test "x$complete" != "x$new_complete"; then
21116       PROPER_COMPILER_CXX="$new_complete"
21117       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21118 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21119     fi
21120 
21121     PATH="$RETRY_COMPILER_SAVED_PATH"
21122 
21123     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21124 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21125 
21126     if test "x$OPENJDK_BUILD_OS" != xwindows; then
21127         # Follow a chain of symbolic links. Use readlink
21128         # where it exists, else fall back to horribly
21129         # complicated shell code.
21130         if test "x$READLINK_TESTED" != yes; then
21131             # On MacOSX there is a readlink tool with a different
21132             # purpose than the GNU readlink tool. Check the found readlink.
21133             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21134             if test "x$ISGNU" = x; then
21135                  # A readlink that we do not know how to use.
21136                  # Are there other non-GNU readlinks out there?
21137                  READLINK_TESTED=yes
21138                  READLINK=
21139             fi
21140         fi
21141 
21142         if test "x$READLINK" != x; then
21143             PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21144         else
21145             # Save the current directory for restoring afterwards
21146             STARTDIR=$PWD
21147             COUNTER=0
21148             sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21149             sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21150             cd $sym_link_dir
21151             # Use -P flag to resolve symlinks in directories.
21152             cd `$THEPWDCMD -P`
21153             sym_link_dir=`$THEPWDCMD -P`
21154             # Resolve file symlinks
21155             while test $COUNTER -lt 20; do
21156                 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21157                 if test "x$ISLINK" == x; then
21158                     # This is not a symbolic link! We are done!
21159                     break
21160                 fi
21161                 # Again resolve directory symlinks since the target of the just found
21162                 # link could be in a different directory
21163                 cd `$DIRNAME $ISLINK`
21164                 sym_link_dir=`$THEPWDCMD -P`
21165                 sym_link_file=`$BASENAME $ISLINK`
21166                 let COUNTER=COUNTER+1
21167             done
21168             cd $STARTDIR
21169             PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21170         fi
21171     fi
21172 
21173     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21174 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21175     CXX="$PROPER_COMPILER_CXX"
21176   else
21177     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21178 $as_echo "no, keeping CXX" >&6; }
21179     CXX="$TEST_COMPILER"
21180   fi
21181 
21182   COMPILER=$CXX
21183   COMPILER_NAME=$COMPILER_NAME
21184 
21185   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21186     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21187     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21188     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21189     if test $? -ne 0; then
21190       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21191 
21192       { $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
21193 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21194       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21195 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21196       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21197     else
21198       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21199       COMPILER_VENDOR="Sun Studio"
21200     fi
21201   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21202     # First line typically looks something like:
21203     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21204     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21205     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21206     COMPILER_VENDOR="Microsoft CL.EXE"
21207     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21208     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21209       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21210         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21211       fi
21212     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21213       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21214         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21215       fi
21216     fi
21217   else
21218     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21219     # Check that this is likely to be GCC.
21220     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21221     if test $? -ne 0; then
21222       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21223 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21224       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21225 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21226       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21227     fi
21228 
21229     # First line typically looks something like:
21230     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21231     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21232     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21233   fi
21234   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21235   CXX_VERSION="$COMPILER_VERSION"
21236   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21237   CXX_VENDOR="$COMPILER_VENDOR"
21238 
21239   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21240 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21241 
21242 
21243 # Now that we have resolved CXX ourself, let autoconf have its go at it
21244 ac_ext=cpp
21245 ac_cpp='$CXXCPP $CPPFLAGS'
21246 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21247 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21248 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21249 if test -z "$CXX"; then
21250   if test -n "$CCC"; then
21251     CXX=$CCC
21252   else
21253     if test -n "$ac_tool_prefix"; then
21254   for ac_prog in $CXX
21255   do
21256     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21257 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21259 $as_echo_n "checking for $ac_word... " >&6; }
21260 if ${ac_cv_prog_CXX+:} false; then :
21261   $as_echo_n "(cached) " >&6
21262 else
21263   if test -n "$CXX"; then
21264   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21265 else
21266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21267 for as_dir in $PATH
21268 do
21269   IFS=$as_save_IFS
21270   test -z "$as_dir" && as_dir=.
21271     for ac_exec_ext in '' $ac_executable_extensions; do
21272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21273     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21275     break 2
21276   fi
21277 done
21278   done
21279 IFS=$as_save_IFS
21280 
21281 fi
21282 fi
21283 CXX=$ac_cv_prog_CXX
21284 if test -n "$CXX"; then
21285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21286 $as_echo "$CXX" >&6; }
21287 else
21288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21289 $as_echo "no" >&6; }
21290 fi
21291 
21292 
21293     test -n "$CXX" && break
21294   done
21295 fi
21296 if test -z "$CXX"; then
21297   ac_ct_CXX=$CXX
21298   for ac_prog in $CXX
21299 do
21300   # Extract the first word of "$ac_prog", so it can be a program name with args.
21301 set dummy $ac_prog; ac_word=$2
21302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21303 $as_echo_n "checking for $ac_word... " >&6; }
21304 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21305   $as_echo_n "(cached) " >&6
21306 else
21307   if test -n "$ac_ct_CXX"; then
21308   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21309 else
21310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21311 for as_dir in $PATH
21312 do
21313   IFS=$as_save_IFS
21314   test -z "$as_dir" && as_dir=.
21315     for ac_exec_ext in '' $ac_executable_extensions; do
21316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21317     ac_cv_prog_ac_ct_CXX="$ac_prog"
21318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21319     break 2
21320   fi
21321 done
21322   done
21323 IFS=$as_save_IFS
21324 
21325 fi
21326 fi
21327 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21328 if test -n "$ac_ct_CXX"; then
21329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21330 $as_echo "$ac_ct_CXX" >&6; }
21331 else
21332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21333 $as_echo "no" >&6; }
21334 fi
21335 
21336 
21337   test -n "$ac_ct_CXX" && break
21338 done
21339 
21340   if test "x$ac_ct_CXX" = x; then
21341     CXX="g++"
21342   else
21343     case $cross_compiling:$ac_tool_warned in
21344 yes:)
21345 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21346 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21347 ac_tool_warned=yes ;;
21348 esac
21349     CXX=$ac_ct_CXX
21350   fi
21351 fi
21352 
21353   fi
21354 fi
21355 # Provide some information about the compiler.
21356 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21357 set X $ac_compile
21358 ac_compiler=$2
21359 for ac_option in --version -v -V -qversion; do
21360   { { ac_try="$ac_compiler $ac_option >&5"
21361 case "(($ac_try" in
21362   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21363   *) ac_try_echo=$ac_try;;
21364 esac
21365 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21366 $as_echo "$ac_try_echo"; } >&5
21367   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21368   ac_status=$?
21369   if test -s conftest.err; then
21370     sed '10a\
21371 ... rest of stderr output deleted ...
21372          10q' conftest.err >conftest.er1
21373     cat conftest.er1 >&5
21374   fi
21375   rm -f conftest.er1 conftest.err
21376   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21377   test $ac_status = 0; }
21378 done
21379 
21380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21381 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21382 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21383   $as_echo_n "(cached) " >&6
21384 else
21385   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21386 /* end confdefs.h.  */
21387 
21388 int
21389 main ()
21390 {
21391 #ifndef __GNUC__
21392        choke me
21393 #endif
21394 
21395   ;
21396   return 0;
21397 }
21398 _ACEOF
21399 if ac_fn_cxx_try_compile "$LINENO"; then :
21400   ac_compiler_gnu=yes
21401 else
21402   ac_compiler_gnu=no
21403 fi
21404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21405 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21406 
21407 fi
21408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21409 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21410 if test $ac_compiler_gnu = yes; then
21411   GXX=yes
21412 else
21413   GXX=
21414 fi
21415 ac_test_CXXFLAGS=${CXXFLAGS+set}
21416 ac_save_CXXFLAGS=$CXXFLAGS
21417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21418 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21419 if ${ac_cv_prog_cxx_g+:} false; then :
21420   $as_echo_n "(cached) " >&6
21421 else
21422   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21423    ac_cxx_werror_flag=yes
21424    ac_cv_prog_cxx_g=no
21425    CXXFLAGS="-g"
21426    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21427 /* end confdefs.h.  */
21428 
21429 int
21430 main ()
21431 {
21432 
21433   ;
21434   return 0;
21435 }
21436 _ACEOF
21437 if ac_fn_cxx_try_compile "$LINENO"; then :
21438   ac_cv_prog_cxx_g=yes
21439 else
21440   CXXFLAGS=""
21441       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21442 /* end confdefs.h.  */
21443 
21444 int
21445 main ()
21446 {
21447 
21448   ;
21449   return 0;
21450 }
21451 _ACEOF
21452 if ac_fn_cxx_try_compile "$LINENO"; then :
21453 
21454 else
21455   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21456          CXXFLAGS="-g"
21457          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21458 /* end confdefs.h.  */
21459 
21460 int
21461 main ()
21462 {
21463 
21464   ;
21465   return 0;
21466 }
21467 _ACEOF
21468 if ac_fn_cxx_try_compile "$LINENO"; then :
21469   ac_cv_prog_cxx_g=yes
21470 fi
21471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21472 fi
21473 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21474 fi
21475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21476    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21477 fi
21478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21479 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21480 if test "$ac_test_CXXFLAGS" = set; then
21481   CXXFLAGS=$ac_save_CXXFLAGS
21482 elif test $ac_cv_prog_cxx_g = yes; then
21483   if test "$GXX" = yes; then
21484     CXXFLAGS="-g -O2"
21485   else
21486     CXXFLAGS="-g"
21487   fi
21488 else
21489   if test "$GXX" = yes; then
21490     CXXFLAGS="-O2"
21491   else
21492     CXXFLAGS=
21493   fi
21494 fi
21495 ac_ext=cpp
21496 ac_cpp='$CXXCPP $CPPFLAGS'
21497 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21498 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21499 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21500 
21501 
21502 ### Locate other tools
21503 
21504 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21505     ac_ext=m
21506 ac_cpp='$OBJCPP $CPPFLAGS'
21507 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21508 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21509 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21510 if test -n "$ac_tool_prefix"; then
21511   for ac_prog in gcc objcc objc cc CC
21512   do
21513     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21514 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516 $as_echo_n "checking for $ac_word... " >&6; }
21517 if ${ac_cv_prog_OBJC+:} false; then :
21518   $as_echo_n "(cached) " >&6
21519 else
21520   if test -n "$OBJC"; then
21521   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21522 else
21523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21524 for as_dir in $PATH
21525 do
21526   IFS=$as_save_IFS
21527   test -z "$as_dir" && as_dir=.
21528     for ac_exec_ext in '' $ac_executable_extensions; do
21529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21530     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21532     break 2
21533   fi
21534 done
21535   done
21536 IFS=$as_save_IFS
21537 
21538 fi
21539 fi
21540 OBJC=$ac_cv_prog_OBJC
21541 if test -n "$OBJC"; then
21542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21543 $as_echo "$OBJC" >&6; }
21544 else
21545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21546 $as_echo "no" >&6; }
21547 fi
21548 
21549 
21550     test -n "$OBJC" && break
21551   done
21552 fi
21553 if test -z "$OBJC"; then
21554   ac_ct_OBJC=$OBJC
21555   for ac_prog in gcc objcc objc cc CC
21556 do
21557   # Extract the first word of "$ac_prog", so it can be a program name with args.
21558 set dummy $ac_prog; ac_word=$2
21559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21560 $as_echo_n "checking for $ac_word... " >&6; }
21561 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
21562   $as_echo_n "(cached) " >&6
21563 else
21564   if test -n "$ac_ct_OBJC"; then
21565   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21566 else
21567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21568 for as_dir in $PATH
21569 do
21570   IFS=$as_save_IFS
21571   test -z "$as_dir" && as_dir=.
21572     for ac_exec_ext in '' $ac_executable_extensions; do
21573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21574     ac_cv_prog_ac_ct_OBJC="$ac_prog"
21575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21576     break 2
21577   fi
21578 done
21579   done
21580 IFS=$as_save_IFS
21581 
21582 fi
21583 fi
21584 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21585 if test -n "$ac_ct_OBJC"; then
21586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21587 $as_echo "$ac_ct_OBJC" >&6; }
21588 else
21589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21590 $as_echo "no" >&6; }
21591 fi
21592 
21593 
21594   test -n "$ac_ct_OBJC" && break
21595 done
21596 
21597   if test "x$ac_ct_OBJC" = x; then
21598     OBJC="gcc"
21599   else
21600     case $cross_compiling:$ac_tool_warned in
21601 yes:)
21602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21603 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21604 ac_tool_warned=yes ;;
21605 esac
21606     OBJC=$ac_ct_OBJC
21607   fi
21608 fi
21609 
21610 # Provide some information about the compiler.
21611 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21612 set X $ac_compile
21613 ac_compiler=$2
21614 for ac_option in --version -v -V -qversion; do
21615   { { ac_try="$ac_compiler $ac_option >&5"
21616 case "(($ac_try" in
21617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21618   *) ac_try_echo=$ac_try;;
21619 esac
21620 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21621 $as_echo "$ac_try_echo"; } >&5
21622   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21623   ac_status=$?
21624   if test -s conftest.err; then
21625     sed '10a\
21626 ... rest of stderr output deleted ...
21627          10q' conftest.err >conftest.er1
21628     cat conftest.er1 >&5
21629   fi
21630   rm -f conftest.er1 conftest.err
21631   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21632   test $ac_status = 0; }
21633 done
21634 
21635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21636 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21637 if ${ac_cv_objc_compiler_gnu+:} false; then :
21638   $as_echo_n "(cached) " >&6
21639 else
21640   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21641 /* end confdefs.h.  */
21642 
21643 int
21644 main ()
21645 {
21646 #ifndef __GNUC__
21647        choke me
21648 #endif
21649 
21650   ;
21651   return 0;
21652 }
21653 _ACEOF
21654 if ac_fn_objc_try_compile "$LINENO"; then :
21655   ac_compiler_gnu=yes
21656 else
21657   ac_compiler_gnu=no
21658 fi
21659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21660 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21661 
21662 fi
21663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21664 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21665 if test $ac_compiler_gnu = yes; then
21666   GOBJC=yes
21667 else
21668   GOBJC=
21669 fi
21670 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21671 ac_save_OBJCFLAGS=$OBJCFLAGS
21672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21673 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21674 if ${ac_cv_prog_objc_g+:} false; then :
21675   $as_echo_n "(cached) " >&6
21676 else
21677   ac_save_objc_werror_flag=$ac_objc_werror_flag
21678    ac_objc_werror_flag=yes
21679    ac_cv_prog_objc_g=no
21680    OBJCFLAGS="-g"
21681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21682 /* end confdefs.h.  */
21683 
21684 int
21685 main ()
21686 {
21687 
21688   ;
21689   return 0;
21690 }
21691 _ACEOF
21692 if ac_fn_objc_try_compile "$LINENO"; then :
21693   ac_cv_prog_objc_g=yes
21694 else
21695   OBJCFLAGS=""
21696       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21697 /* end confdefs.h.  */
21698 
21699 int
21700 main ()
21701 {
21702 
21703   ;
21704   return 0;
21705 }
21706 _ACEOF
21707 if ac_fn_objc_try_compile "$LINENO"; then :
21708 
21709 else
21710   ac_objc_werror_flag=$ac_save_objc_werror_flag
21711          OBJCFLAGS="-g"
21712          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21713 /* end confdefs.h.  */
21714 
21715 int
21716 main ()
21717 {
21718 
21719   ;
21720   return 0;
21721 }
21722 _ACEOF
21723 if ac_fn_objc_try_compile "$LINENO"; then :
21724   ac_cv_prog_objc_g=yes
21725 fi
21726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21727 fi
21728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21729 fi
21730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21731    ac_objc_werror_flag=$ac_save_objc_werror_flag
21732 fi
21733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21734 $as_echo "$ac_cv_prog_objc_g" >&6; }
21735 if test "$ac_test_OBJCFLAGS" = set; then
21736   OBJCFLAGS=$ac_save_OBJCFLAGS
21737 elif test $ac_cv_prog_objc_g = yes; then
21738   if test "$GOBJC" = yes; then
21739     OBJCFLAGS="-g -O2"
21740   else
21741     OBJCFLAGS="-g"
21742   fi
21743 else
21744   if test "$GOBJC" = yes; then
21745     OBJCFLAGS="-O2"
21746   else
21747     OBJCFLAGS=
21748   fi
21749 fi
21750 ac_ext=cpp
21751 ac_cpp='$CXXCPP $CPPFLAGS'
21752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21755 
21756 
21757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21758 
21759   # First separate the path from the arguments. This will split at the first
21760   # space.
21761   complete="$OBJC"
21762   path="${complete%% *}"
21763   tmp="$complete EOL"
21764   arguments="${tmp#* }"
21765 
21766   # Input might be given as Windows format, start by converting to
21767   # unix format.
21768   new_path=`$CYGPATH -u "$path"`
21769 
21770   # Now try to locate executable using which
21771   new_path=`$WHICH "$new_path" 2> /dev/null`
21772   # bat and cmd files are not always considered executable in cygwin causing which
21773   # to not find them
21774   if test "x$new_path" = x \
21775            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21776            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21777     new_path=`$CYGPATH -u "$path"`
21778   fi
21779   if test "x$new_path" = x; then
21780     # Oops. Which didn't find the executable.
21781     # The splitting of arguments from the executable at a space might have been incorrect,
21782     # since paths with space are more likely in Windows. Give it another try with the whole
21783     # argument.
21784     path="$complete"
21785     arguments="EOL"
21786     new_path=`$CYGPATH -u "$path"`
21787     new_path=`$WHICH "$new_path" 2> /dev/null`
21788     # bat and cmd files are not always considered executable in cygwin causing which
21789     # to not find them
21790     if test "x$new_path" = x \
21791              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21792              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21793       new_path=`$CYGPATH -u "$path"`
21794     fi
21795     if test "x$new_path" = x; then
21796       # It's still not found. Now this is an unrecoverable error.
21797       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21798 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21799       has_space=`$ECHO "$complete" | $GREP " "`
21800       if test "x$has_space" != x; then
21801         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21802 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21803       fi
21804       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21805     fi
21806   fi
21807 
21808   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21809   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21810   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21811   # "foo.exe" is OK but "foo" is an error.
21812   #
21813   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21814   # It is also a way to make sure we got the proper file name for the real test later on.
21815   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21816   if test "x$test_shortpath" = x; then
21817     # Short path failed, file does not exist as specified.
21818     # Try adding .exe or .cmd
21819     if test -f "${new_path}.exe"; then
21820        input_to_shortpath="${new_path}.exe"
21821     elif test -f "${new_path}.cmd"; then
21822        input_to_shortpath="${new_path}.cmd"
21823     else
21824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21825 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21826       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21827 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21828       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21829     fi
21830   else
21831     input_to_shortpath="$new_path"
21832   fi
21833 
21834   # Call helper function which possibly converts this using DOS-style short mode.
21835   # If so, the updated path is stored in $new_path.
21836   new_path="$input_to_shortpath"
21837 
21838   input_path="$input_to_shortpath"
21839   # Check if we need to convert this using DOS-style short mode. If the path
21840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21841   # take no chances and rewrite it.
21842   # Note: m4 eats our [], so we need to use [ and ] instead.
21843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21844   if test "x$has_forbidden_chars" != x; then
21845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21846     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21847     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21848     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21849       # Going to short mode and back again did indeed matter. Since short mode is
21850       # case insensitive, let's make it lowercase to improve readability.
21851       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21852       # Now convert it back to Unix-stile (cygpath)
21853       input_path=`$CYGPATH -u "$shortmode_path"`
21854       new_path="$input_path"
21855     fi
21856   fi
21857 
21858   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21859   if test "x$test_cygdrive_prefix" = x; then
21860     # As a simple fix, exclude /usr/bin since it's not a real path.
21861     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21862       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21863       # a path prefixed by /cygdrive for fixpath to work.
21864       new_path="$CYGWIN_ROOT_PATH$input_path"
21865     fi
21866   fi
21867 
21868   # remove trailing .exe if any
21869   new_path="${new_path/%.exe/}"
21870 
21871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21872 
21873   # First separate the path from the arguments. This will split at the first
21874   # space.
21875   complete="$OBJC"
21876   path="${complete%% *}"
21877   tmp="$complete EOL"
21878   arguments="${tmp#* }"
21879 
21880   # Input might be given as Windows format, start by converting to
21881   # unix format.
21882   new_path="$path"
21883 
21884   windows_path="$new_path"
21885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21886     unix_path=`$CYGPATH -u "$windows_path"`
21887     new_path="$unix_path"
21888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21890     new_path="$unix_path"
21891   fi
21892 
21893 
21894   # Now try to locate executable using which
21895   new_path=`$WHICH "$new_path" 2> /dev/null`
21896 
21897   if test "x$new_path" = x; then
21898     # Oops. Which didn't find the executable.
21899     # The splitting of arguments from the executable at a space might have been incorrect,
21900     # since paths with space are more likely in Windows. Give it another try with the whole
21901     # argument.
21902     path="$complete"
21903     arguments="EOL"
21904     new_path="$path"
21905 
21906   windows_path="$new_path"
21907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21908     unix_path=`$CYGPATH -u "$windows_path"`
21909     new_path="$unix_path"
21910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21912     new_path="$unix_path"
21913   fi
21914 
21915 
21916     new_path=`$WHICH "$new_path" 2> /dev/null`
21917 
21918     if test "x$new_path" = x; then
21919       # It's still not found. Now this is an unrecoverable error.
21920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21921 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21922       has_space=`$ECHO "$complete" | $GREP " "`
21923       if test "x$has_space" != x; then
21924         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21925 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21926       fi
21927       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21928     fi
21929   fi
21930 
21931   # Now new_path has a complete unix path to the binary
21932   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21933     # Keep paths in /bin as-is, but remove trailing .exe if any
21934     new_path="${new_path/%.exe/}"
21935     # Do not save /bin paths to all_fixpath_prefixes!
21936   else
21937     # Not in mixed or Windows style, start by that.
21938     new_path=`cmd //c echo $new_path`
21939 
21940   input_path="$new_path"
21941   # Check if we need to convert this using DOS-style short mode. If the path
21942   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21943   # take no chances and rewrite it.
21944   # Note: m4 eats our [], so we need to use [ and ] instead.
21945   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21946   if test "x$has_forbidden_chars" != x; then
21947     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21948     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21949   fi
21950 
21951     # Output is in $new_path
21952 
21953   windows_path="$new_path"
21954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21955     unix_path=`$CYGPATH -u "$windows_path"`
21956     new_path="$unix_path"
21957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21959     new_path="$unix_path"
21960   fi
21961 
21962     # remove trailing .exe if any
21963     new_path="${new_path/%.exe/}"
21964 
21965     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21966     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21967   fi
21968 
21969   else
21970     # We're on a posix platform. Hooray! :)
21971     # First separate the path from the arguments. This will split at the first
21972     # space.
21973     complete="$OBJC"
21974     path="${complete%% *}"
21975     tmp="$complete EOL"
21976     arguments="${tmp#* }"
21977 
21978     # Cannot rely on the command "which" here since it doesn't always work.
21979     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21980     if test -z "$is_absolute_path"; then
21981       # Path to executable is not absolute. Find it.
21982       IFS_save="$IFS"
21983       IFS=:
21984       for p in $PATH; do
21985         if test -f "$p/$path" && test -x "$p/$path"; then
21986           new_path="$p/$path"
21987           break
21988         fi
21989       done
21990       IFS="$IFS_save"
21991     else
21992       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21993 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21994       new_path="$path"
21995     fi
21996 
21997     if test "x$new_path" = x; then
21998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21999 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22000         has_space=`$ECHO "$complete" | $GREP " "`
22001         if test "x$has_space" != x; then
22002           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22003 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22004         fi
22005         as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22006       fi
22007   fi
22008 
22009       # Now join together the path and the arguments once again
22010       if test "x$arguments" != xEOL; then
22011         new_complete="$new_path ${arguments% *}"
22012       else
22013         new_complete="$new_path"
22014       fi
22015 
22016   if test "x$complete" != "x$new_complete"; then
22017       OBJC="$new_complete"
22018       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22019 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22020     fi
22021 
22022 else
22023     OBJC=
22024 fi
22025 
22026 # Restore the flags to the user specified values.
22027 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22028 CFLAGS="$ORG_CFLAGS"
22029 CXXFLAGS="$ORG_CXXFLAGS"
22030 OBJCFLAGS="$ORG_OBJCFLAGS"
22031 
22032 LD="$CC"
22033 LDEXE="$CC"
22034 LDCXX="$CXX"
22035 LDEXECXX="$CXX"
22036 
22037 # LDEXE is the linker to use, when creating executables.
22038 
22039 # Linking C++ libraries.
22040 
22041 # Linking C++ executables.
22042 
22043 
22044 if test "x$OPENJDK_TARGET_OS" != xwindows; then
22045     if test -n "$ac_tool_prefix"; then
22046   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22047 set dummy ${ac_tool_prefix}ar; ac_word=$2
22048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22049 $as_echo_n "checking for $ac_word... " >&6; }
22050 if ${ac_cv_prog_AR+:} false; then :
22051   $as_echo_n "(cached) " >&6
22052 else
22053   if test -n "$AR"; then
22054   ac_cv_prog_AR="$AR" # Let the user override the test.
22055 else
22056 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22057 for as_dir in $PATH
22058 do
22059   IFS=$as_save_IFS
22060   test -z "$as_dir" && as_dir=.
22061     for ac_exec_ext in '' $ac_executable_extensions; do
22062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22063     ac_cv_prog_AR="${ac_tool_prefix}ar"
22064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22065     break 2
22066   fi
22067 done
22068   done
22069 IFS=$as_save_IFS
22070 
22071 fi
22072 fi
22073 AR=$ac_cv_prog_AR
22074 if test -n "$AR"; then
22075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22076 $as_echo "$AR" >&6; }
22077 else
22078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22079 $as_echo "no" >&6; }
22080 fi
22081 
22082 
22083 fi
22084 if test -z "$ac_cv_prog_AR"; then
22085   ac_ct_AR=$AR
22086   # Extract the first word of "ar", so it can be a program name with args.
22087 set dummy ar; ac_word=$2
22088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22089 $as_echo_n "checking for $ac_word... " >&6; }
22090 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22091   $as_echo_n "(cached) " >&6
22092 else
22093   if test -n "$ac_ct_AR"; then
22094   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22095 else
22096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22097 for as_dir in $PATH
22098 do
22099   IFS=$as_save_IFS
22100   test -z "$as_dir" && as_dir=.
22101     for ac_exec_ext in '' $ac_executable_extensions; do
22102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22103     ac_cv_prog_ac_ct_AR="ar"
22104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22105     break 2
22106   fi
22107 done
22108   done
22109 IFS=$as_save_IFS
22110 
22111 fi
22112 fi
22113 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22114 if test -n "$ac_ct_AR"; then
22115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22116 $as_echo "$ac_ct_AR" >&6; }
22117 else
22118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22119 $as_echo "no" >&6; }
22120 fi
22121 
22122   if test "x$ac_ct_AR" = x; then
22123     AR=""
22124   else
22125     case $cross_compiling:$ac_tool_warned in
22126 yes:)
22127 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22128 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22129 ac_tool_warned=yes ;;
22130 esac
22131     AR=$ac_ct_AR
22132   fi
22133 else
22134   AR="$ac_cv_prog_AR"
22135 fi
22136 
22137 
22138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22139 
22140   # First separate the path from the arguments. This will split at the first
22141   # space.
22142   complete="$AR"
22143   path="${complete%% *}"
22144   tmp="$complete EOL"
22145   arguments="${tmp#* }"
22146 
22147   # Input might be given as Windows format, start by converting to
22148   # unix format.
22149   new_path=`$CYGPATH -u "$path"`
22150 
22151   # Now try to locate executable using which
22152   new_path=`$WHICH "$new_path" 2> /dev/null`
22153   # bat and cmd files are not always considered executable in cygwin causing which
22154   # to not find them
22155   if test "x$new_path" = x \
22156            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22157            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22158     new_path=`$CYGPATH -u "$path"`
22159   fi
22160   if test "x$new_path" = x; then
22161     # Oops. Which didn't find the executable.
22162     # The splitting of arguments from the executable at a space might have been incorrect,
22163     # since paths with space are more likely in Windows. Give it another try with the whole
22164     # argument.
22165     path="$complete"
22166     arguments="EOL"
22167     new_path=`$CYGPATH -u "$path"`
22168     new_path=`$WHICH "$new_path" 2> /dev/null`
22169     # bat and cmd files are not always considered executable in cygwin causing which
22170     # to not find them
22171     if test "x$new_path" = x \
22172              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22173              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22174       new_path=`$CYGPATH -u "$path"`
22175     fi
22176     if test "x$new_path" = x; then
22177       # It's still not found. Now this is an unrecoverable error.
22178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22179 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22180       has_space=`$ECHO "$complete" | $GREP " "`
22181       if test "x$has_space" != x; then
22182         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22183 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22184       fi
22185       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22186     fi
22187   fi
22188 
22189   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22190   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22191   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22192   # "foo.exe" is OK but "foo" is an error.
22193   #
22194   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22195   # It is also a way to make sure we got the proper file name for the real test later on.
22196   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22197   if test "x$test_shortpath" = x; then
22198     # Short path failed, file does not exist as specified.
22199     # Try adding .exe or .cmd
22200     if test -f "${new_path}.exe"; then
22201        input_to_shortpath="${new_path}.exe"
22202     elif test -f "${new_path}.cmd"; then
22203        input_to_shortpath="${new_path}.cmd"
22204     else
22205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22206 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22207       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22208 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22209       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22210     fi
22211   else
22212     input_to_shortpath="$new_path"
22213   fi
22214 
22215   # Call helper function which possibly converts this using DOS-style short mode.
22216   # If so, the updated path is stored in $new_path.
22217   new_path="$input_to_shortpath"
22218 
22219   input_path="$input_to_shortpath"
22220   # Check if we need to convert this using DOS-style short mode. If the path
22221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22222   # take no chances and rewrite it.
22223   # Note: m4 eats our [], so we need to use [ and ] instead.
22224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22225   if test "x$has_forbidden_chars" != x; then
22226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22227     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22228     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22229     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22230       # Going to short mode and back again did indeed matter. Since short mode is
22231       # case insensitive, let's make it lowercase to improve readability.
22232       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22233       # Now convert it back to Unix-stile (cygpath)
22234       input_path=`$CYGPATH -u "$shortmode_path"`
22235       new_path="$input_path"
22236     fi
22237   fi
22238 
22239   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22240   if test "x$test_cygdrive_prefix" = x; then
22241     # As a simple fix, exclude /usr/bin since it's not a real path.
22242     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22243       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22244       # a path prefixed by /cygdrive for fixpath to work.
22245       new_path="$CYGWIN_ROOT_PATH$input_path"
22246     fi
22247   fi
22248 
22249   # remove trailing .exe if any
22250   new_path="${new_path/%.exe/}"
22251 
22252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22253 
22254   # First separate the path from the arguments. This will split at the first
22255   # space.
22256   complete="$AR"
22257   path="${complete%% *}"
22258   tmp="$complete EOL"
22259   arguments="${tmp#* }"
22260 
22261   # Input might be given as Windows format, start by converting to
22262   # unix format.
22263   new_path="$path"
22264 
22265   windows_path="$new_path"
22266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22267     unix_path=`$CYGPATH -u "$windows_path"`
22268     new_path="$unix_path"
22269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22271     new_path="$unix_path"
22272   fi
22273 
22274 
22275   # Now try to locate executable using which
22276   new_path=`$WHICH "$new_path" 2> /dev/null`
22277 
22278   if test "x$new_path" = x; then
22279     # Oops. Which didn't find the executable.
22280     # The splitting of arguments from the executable at a space might have been incorrect,
22281     # since paths with space are more likely in Windows. Give it another try with the whole
22282     # argument.
22283     path="$complete"
22284     arguments="EOL"
22285     new_path="$path"
22286 
22287   windows_path="$new_path"
22288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22289     unix_path=`$CYGPATH -u "$windows_path"`
22290     new_path="$unix_path"
22291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22293     new_path="$unix_path"
22294   fi
22295 
22296 
22297     new_path=`$WHICH "$new_path" 2> /dev/null`
22298 
22299     if test "x$new_path" = x; then
22300       # It's still not found. Now this is an unrecoverable error.
22301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22302 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22303       has_space=`$ECHO "$complete" | $GREP " "`
22304       if test "x$has_space" != x; then
22305         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22306 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22307       fi
22308       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22309     fi
22310   fi
22311 
22312   # Now new_path has a complete unix path to the binary
22313   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22314     # Keep paths in /bin as-is, but remove trailing .exe if any
22315     new_path="${new_path/%.exe/}"
22316     # Do not save /bin paths to all_fixpath_prefixes!
22317   else
22318     # Not in mixed or Windows style, start by that.
22319     new_path=`cmd //c echo $new_path`
22320 
22321   input_path="$new_path"
22322   # Check if we need to convert this using DOS-style short mode. If the path
22323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22324   # take no chances and rewrite it.
22325   # Note: m4 eats our [], so we need to use [ and ] instead.
22326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22327   if test "x$has_forbidden_chars" != x; then
22328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22330   fi
22331 
22332     # Output is in $new_path
22333 
22334   windows_path="$new_path"
22335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22336     unix_path=`$CYGPATH -u "$windows_path"`
22337     new_path="$unix_path"
22338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22340     new_path="$unix_path"
22341   fi
22342 
22343     # remove trailing .exe if any
22344     new_path="${new_path/%.exe/}"
22345 
22346     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22347     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22348   fi
22349 
22350   else
22351     # We're on a posix platform. Hooray! :)
22352     # First separate the path from the arguments. This will split at the first
22353     # space.
22354     complete="$AR"
22355     path="${complete%% *}"
22356     tmp="$complete EOL"
22357     arguments="${tmp#* }"
22358 
22359     # Cannot rely on the command "which" here since it doesn't always work.
22360     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22361     if test -z "$is_absolute_path"; then
22362       # Path to executable is not absolute. Find it.
22363       IFS_save="$IFS"
22364       IFS=:
22365       for p in $PATH; do
22366         if test -f "$p/$path" && test -x "$p/$path"; then
22367           new_path="$p/$path"
22368           break
22369         fi
22370       done
22371       IFS="$IFS_save"
22372     else
22373       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22374 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22375       new_path="$path"
22376     fi
22377 
22378     if test "x$new_path" = x; then
22379         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22380 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22381         has_space=`$ECHO "$complete" | $GREP " "`
22382         if test "x$has_space" != x; then
22383           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22384 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22385         fi
22386         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22387       fi
22388   fi
22389 
22390       # Now join together the path and the arguments once again
22391       if test "x$arguments" != xEOL; then
22392         new_complete="$new_path ${arguments% *}"
22393       else
22394         new_complete="$new_path"
22395       fi
22396 
22397   if test "x$complete" != "x$new_complete"; then
22398       AR="$new_complete"
22399       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22400 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22401     fi
22402 
22403 fi
22404 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22405     ARFLAGS="-r"
22406 else
22407     ARFLAGS=""
22408 fi
22409 
22410 
22411 # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22412 HOTSPOT_CXX="$CXX"
22413 HOTSPOT_LD="$LD"
22414 
22415 
22416 
22417 COMPILER_NAME=gcc
22418 COMPILER_TYPE=CC
22419 if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22420 
22421     # For now, assume that we are always compiling using cl.exe.
22422     CC_OUT_OPTION=-Fo
22423     EXE_OUT_OPTION=-out:
22424     LD_OUT_OPTION=-out:
22425     AR_OUT_OPTION=-out:
22426     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22427     # program for something completely different.
22428     # Extract the first word of "link", so it can be a program name with args.
22429 set dummy link; ac_word=$2
22430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22431 $as_echo_n "checking for $ac_word... " >&6; }
22432 if ${ac_cv_prog_WINLD+:} false; then :
22433   $as_echo_n "(cached) " >&6
22434 else
22435   if test -n "$WINLD"; then
22436   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22437 else
22438   ac_prog_rejected=no
22439 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22440 for as_dir in $PATH
22441 do
22442   IFS=$as_save_IFS
22443   test -z "$as_dir" && as_dir=.
22444     for ac_exec_ext in '' $ac_executable_extensions; do
22445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22446     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22447        ac_prog_rejected=yes
22448        continue
22449      fi
22450     ac_cv_prog_WINLD="link"
22451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22452     break 2
22453   fi
22454 done
22455   done
22456 IFS=$as_save_IFS
22457 
22458 if test $ac_prog_rejected = yes; then
22459   # We found a bogon in the path, so make sure we never use it.
22460   set dummy $ac_cv_prog_WINLD
22461   shift
22462   if test $# != 0; then
22463     # We chose a different compiler from the bogus one.
22464     # However, it has the same basename, so the bogon will be chosen
22465     # first if we set WINLD to just the basename; use the full file name.
22466     shift
22467     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22468   fi
22469 fi
22470 fi
22471 fi
22472 WINLD=$ac_cv_prog_WINLD
22473 if test -n "$WINLD"; then
22474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22475 $as_echo "$WINLD" >&6; }
22476 else
22477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22478 $as_echo "no" >&6; }
22479 fi
22480 
22481 
22482     # Since we must ignore the first found link, WINLD will contain
22483     # the full path to the link.exe program.
22484 
22485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22486 
22487   # First separate the path from the arguments. This will split at the first
22488   # space.
22489   complete="$WINLD"
22490   path="${complete%% *}"
22491   tmp="$complete EOL"
22492   arguments="${tmp#* }"
22493 
22494   # Input might be given as Windows format, start by converting to
22495   # unix format.
22496   new_path=`$CYGPATH -u "$path"`
22497 
22498   # Now try to locate executable using which
22499   new_path=`$WHICH "$new_path" 2> /dev/null`
22500   # bat and cmd files are not always considered executable in cygwin causing which
22501   # to not find them
22502   if test "x$new_path" = x \
22503            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22504            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22505     new_path=`$CYGPATH -u "$path"`
22506   fi
22507   if test "x$new_path" = x; then
22508     # Oops. Which didn't find the executable.
22509     # The splitting of arguments from the executable at a space might have been incorrect,
22510     # since paths with space are more likely in Windows. Give it another try with the whole
22511     # argument.
22512     path="$complete"
22513     arguments="EOL"
22514     new_path=`$CYGPATH -u "$path"`
22515     new_path=`$WHICH "$new_path" 2> /dev/null`
22516     # bat and cmd files are not always considered executable in cygwin causing which
22517     # to not find them
22518     if test "x$new_path" = x \
22519              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22520              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22521       new_path=`$CYGPATH -u "$path"`
22522     fi
22523     if test "x$new_path" = x; then
22524       # It's still not found. Now this is an unrecoverable error.
22525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22526 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22527       has_space=`$ECHO "$complete" | $GREP " "`
22528       if test "x$has_space" != x; then
22529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22531       fi
22532       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22533     fi
22534   fi
22535 
22536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22539   # "foo.exe" is OK but "foo" is an error.
22540   #
22541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22542   # It is also a way to make sure we got the proper file name for the real test later on.
22543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22544   if test "x$test_shortpath" = x; then
22545     # Short path failed, file does not exist as specified.
22546     # Try adding .exe or .cmd
22547     if test -f "${new_path}.exe"; then
22548        input_to_shortpath="${new_path}.exe"
22549     elif test -f "${new_path}.cmd"; then
22550        input_to_shortpath="${new_path}.cmd"
22551     else
22552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22553 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22554       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22555 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22556       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22557     fi
22558   else
22559     input_to_shortpath="$new_path"
22560   fi
22561 
22562   # Call helper function which possibly converts this using DOS-style short mode.
22563   # If so, the updated path is stored in $new_path.
22564   new_path="$input_to_shortpath"
22565 
22566   input_path="$input_to_shortpath"
22567   # Check if we need to convert this using DOS-style short mode. If the path
22568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22569   # take no chances and rewrite it.
22570   # Note: m4 eats our [], so we need to use [ and ] instead.
22571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22572   if test "x$has_forbidden_chars" != x; then
22573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22577       # Going to short mode and back again did indeed matter. Since short mode is
22578       # case insensitive, let's make it lowercase to improve readability.
22579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22580       # Now convert it back to Unix-stile (cygpath)
22581       input_path=`$CYGPATH -u "$shortmode_path"`
22582       new_path="$input_path"
22583     fi
22584   fi
22585 
22586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22587   if test "x$test_cygdrive_prefix" = x; then
22588     # As a simple fix, exclude /usr/bin since it's not a real path.
22589     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22591       # a path prefixed by /cygdrive for fixpath to work.
22592       new_path="$CYGWIN_ROOT_PATH$input_path"
22593     fi
22594   fi
22595 
22596   # remove trailing .exe if any
22597   new_path="${new_path/%.exe/}"
22598 
22599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22600 
22601   # First separate the path from the arguments. This will split at the first
22602   # space.
22603   complete="$WINLD"
22604   path="${complete%% *}"
22605   tmp="$complete EOL"
22606   arguments="${tmp#* }"
22607 
22608   # Input might be given as Windows format, start by converting to
22609   # unix format.
22610   new_path="$path"
22611 
22612   windows_path="$new_path"
22613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22614     unix_path=`$CYGPATH -u "$windows_path"`
22615     new_path="$unix_path"
22616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22618     new_path="$unix_path"
22619   fi
22620 
22621 
22622   # Now try to locate executable using which
22623   new_path=`$WHICH "$new_path" 2> /dev/null`
22624 
22625   if test "x$new_path" = x; then
22626     # Oops. Which didn't find the executable.
22627     # The splitting of arguments from the executable at a space might have been incorrect,
22628     # since paths with space are more likely in Windows. Give it another try with the whole
22629     # argument.
22630     path="$complete"
22631     arguments="EOL"
22632     new_path="$path"
22633 
22634   windows_path="$new_path"
22635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22636     unix_path=`$CYGPATH -u "$windows_path"`
22637     new_path="$unix_path"
22638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22640     new_path="$unix_path"
22641   fi
22642 
22643 
22644     new_path=`$WHICH "$new_path" 2> /dev/null`
22645 
22646     if test "x$new_path" = x; then
22647       # It's still not found. Now this is an unrecoverable error.
22648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22649 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22650       has_space=`$ECHO "$complete" | $GREP " "`
22651       if test "x$has_space" != x; then
22652         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22653 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22654       fi
22655       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22656     fi
22657   fi
22658 
22659   # Now new_path has a complete unix path to the binary
22660   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22661     # Keep paths in /bin as-is, but remove trailing .exe if any
22662     new_path="${new_path/%.exe/}"
22663     # Do not save /bin paths to all_fixpath_prefixes!
22664   else
22665     # Not in mixed or Windows style, start by that.
22666     new_path=`cmd //c echo $new_path`
22667 
22668   input_path="$new_path"
22669   # Check if we need to convert this using DOS-style short mode. If the path
22670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22671   # take no chances and rewrite it.
22672   # Note: m4 eats our [], so we need to use [ and ] instead.
22673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22674   if test "x$has_forbidden_chars" != x; then
22675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22676     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22677   fi
22678 
22679     # Output is in $new_path
22680 
22681   windows_path="$new_path"
22682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22683     unix_path=`$CYGPATH -u "$windows_path"`
22684     new_path="$unix_path"
22685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22687     new_path="$unix_path"
22688   fi
22689 
22690     # remove trailing .exe if any
22691     new_path="${new_path/%.exe/}"
22692 
22693     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22694     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22695   fi
22696 
22697   else
22698     # We're on a posix platform. Hooray! :)
22699     # First separate the path from the arguments. This will split at the first
22700     # space.
22701     complete="$WINLD"
22702     path="${complete%% *}"
22703     tmp="$complete EOL"
22704     arguments="${tmp#* }"
22705 
22706     # Cannot rely on the command "which" here since it doesn't always work.
22707     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22708     if test -z "$is_absolute_path"; then
22709       # Path to executable is not absolute. Find it.
22710       IFS_save="$IFS"
22711       IFS=:
22712       for p in $PATH; do
22713         if test -f "$p/$path" && test -x "$p/$path"; then
22714           new_path="$p/$path"
22715           break
22716         fi
22717       done
22718       IFS="$IFS_save"
22719     else
22720       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22721 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22722       new_path="$path"
22723     fi
22724 
22725     if test "x$new_path" = x; then
22726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22727 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22728         has_space=`$ECHO "$complete" | $GREP " "`
22729         if test "x$has_space" != x; then
22730           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22732         fi
22733         as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22734       fi
22735   fi
22736 
22737       # Now join together the path and the arguments once again
22738       if test "x$arguments" != xEOL; then
22739         new_complete="$new_path ${arguments% *}"
22740       else
22741         new_complete="$new_path"
22742       fi
22743 
22744   if test "x$complete" != "x$new_complete"; then
22745       WINLD="$new_complete"
22746       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22747 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22748     fi
22749 
22750     printf "Windows linker was found at $WINLD\n"
22751     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22752 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22753     "$WINLD" --version > /dev/null
22754     if test $? -eq 0 ; then
22755       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22756 $as_echo "no" >&6; }
22757       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22758     else
22759       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22760 $as_echo "yes" >&6; }
22761     fi
22762     LD="$WINLD"
22763     LDEXE="$WINLD"
22764     LDCXX="$WINLD"
22765     LDEXECXX="$WINLD"
22766 
22767     # Extract the first word of "mt", so it can be a program name with args.
22768 set dummy mt; ac_word=$2
22769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22770 $as_echo_n "checking for $ac_word... " >&6; }
22771 if ${ac_cv_prog_MT+:} false; then :
22772   $as_echo_n "(cached) " >&6
22773 else
22774   if test -n "$MT"; then
22775   ac_cv_prog_MT="$MT" # Let the user override the test.
22776 else
22777   ac_prog_rejected=no
22778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22779 for as_dir in $PATH
22780 do
22781   IFS=$as_save_IFS
22782   test -z "$as_dir" && as_dir=.
22783     for ac_exec_ext in '' $ac_executable_extensions; do
22784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22785     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22786        ac_prog_rejected=yes
22787        continue
22788      fi
22789     ac_cv_prog_MT="mt"
22790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22791     break 2
22792   fi
22793 done
22794   done
22795 IFS=$as_save_IFS
22796 
22797 if test $ac_prog_rejected = yes; then
22798   # We found a bogon in the path, so make sure we never use it.
22799   set dummy $ac_cv_prog_MT
22800   shift
22801   if test $# != 0; then
22802     # We chose a different compiler from the bogus one.
22803     # However, it has the same basename, so the bogon will be chosen
22804     # first if we set MT to just the basename; use the full file name.
22805     shift
22806     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22807   fi
22808 fi
22809 fi
22810 fi
22811 MT=$ac_cv_prog_MT
22812 if test -n "$MT"; then
22813   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22814 $as_echo "$MT" >&6; }
22815 else
22816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22817 $as_echo "no" >&6; }
22818 fi
22819 
22820 
22821 
22822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22823 
22824   # First separate the path from the arguments. This will split at the first
22825   # space.
22826   complete="$MT"
22827   path="${complete%% *}"
22828   tmp="$complete EOL"
22829   arguments="${tmp#* }"
22830 
22831   # Input might be given as Windows format, start by converting to
22832   # unix format.
22833   new_path=`$CYGPATH -u "$path"`
22834 
22835   # Now try to locate executable using which
22836   new_path=`$WHICH "$new_path" 2> /dev/null`
22837   # bat and cmd files are not always considered executable in cygwin causing which
22838   # to not find them
22839   if test "x$new_path" = x \
22840            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22841            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22842     new_path=`$CYGPATH -u "$path"`
22843   fi
22844   if test "x$new_path" = x; then
22845     # Oops. Which didn't find the executable.
22846     # The splitting of arguments from the executable at a space might have been incorrect,
22847     # since paths with space are more likely in Windows. Give it another try with the whole
22848     # argument.
22849     path="$complete"
22850     arguments="EOL"
22851     new_path=`$CYGPATH -u "$path"`
22852     new_path=`$WHICH "$new_path" 2> /dev/null`
22853     # bat and cmd files are not always considered executable in cygwin causing which
22854     # to not find them
22855     if test "x$new_path" = x \
22856              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22857              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22858       new_path=`$CYGPATH -u "$path"`
22859     fi
22860     if test "x$new_path" = x; then
22861       # It's still not found. Now this is an unrecoverable error.
22862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22863 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22864       has_space=`$ECHO "$complete" | $GREP " "`
22865       if test "x$has_space" != x; then
22866         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22867 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22868       fi
22869       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22870     fi
22871   fi
22872 
22873   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22874   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22875   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22876   # "foo.exe" is OK but "foo" is an error.
22877   #
22878   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22879   # It is also a way to make sure we got the proper file name for the real test later on.
22880   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22881   if test "x$test_shortpath" = x; then
22882     # Short path failed, file does not exist as specified.
22883     # Try adding .exe or .cmd
22884     if test -f "${new_path}.exe"; then
22885        input_to_shortpath="${new_path}.exe"
22886     elif test -f "${new_path}.cmd"; then
22887        input_to_shortpath="${new_path}.cmd"
22888     else
22889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22890 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22891       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22892 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22893       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22894     fi
22895   else
22896     input_to_shortpath="$new_path"
22897   fi
22898 
22899   # Call helper function which possibly converts this using DOS-style short mode.
22900   # If so, the updated path is stored in $new_path.
22901   new_path="$input_to_shortpath"
22902 
22903   input_path="$input_to_shortpath"
22904   # Check if we need to convert this using DOS-style short mode. If the path
22905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22906   # take no chances and rewrite it.
22907   # Note: m4 eats our [], so we need to use [ and ] instead.
22908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22909   if test "x$has_forbidden_chars" != x; then
22910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22911     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22912     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22913     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22914       # Going to short mode and back again did indeed matter. Since short mode is
22915       # case insensitive, let's make it lowercase to improve readability.
22916       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22917       # Now convert it back to Unix-stile (cygpath)
22918       input_path=`$CYGPATH -u "$shortmode_path"`
22919       new_path="$input_path"
22920     fi
22921   fi
22922 
22923   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22924   if test "x$test_cygdrive_prefix" = x; then
22925     # As a simple fix, exclude /usr/bin since it's not a real path.
22926     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22927       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22928       # a path prefixed by /cygdrive for fixpath to work.
22929       new_path="$CYGWIN_ROOT_PATH$input_path"
22930     fi
22931   fi
22932 
22933   # remove trailing .exe if any
22934   new_path="${new_path/%.exe/}"
22935 
22936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22937 
22938   # First separate the path from the arguments. This will split at the first
22939   # space.
22940   complete="$MT"
22941   path="${complete%% *}"
22942   tmp="$complete EOL"
22943   arguments="${tmp#* }"
22944 
22945   # Input might be given as Windows format, start by converting to
22946   # unix format.
22947   new_path="$path"
22948 
22949   windows_path="$new_path"
22950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22951     unix_path=`$CYGPATH -u "$windows_path"`
22952     new_path="$unix_path"
22953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22955     new_path="$unix_path"
22956   fi
22957 
22958 
22959   # Now try to locate executable using which
22960   new_path=`$WHICH "$new_path" 2> /dev/null`
22961 
22962   if test "x$new_path" = x; then
22963     # Oops. Which didn't find the executable.
22964     # The splitting of arguments from the executable at a space might have been incorrect,
22965     # since paths with space are more likely in Windows. Give it another try with the whole
22966     # argument.
22967     path="$complete"
22968     arguments="EOL"
22969     new_path="$path"
22970 
22971   windows_path="$new_path"
22972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22973     unix_path=`$CYGPATH -u "$windows_path"`
22974     new_path="$unix_path"
22975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22977     new_path="$unix_path"
22978   fi
22979 
22980 
22981     new_path=`$WHICH "$new_path" 2> /dev/null`
22982 
22983     if test "x$new_path" = x; then
22984       # It's still not found. Now this is an unrecoverable error.
22985       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22986 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22987       has_space=`$ECHO "$complete" | $GREP " "`
22988       if test "x$has_space" != x; then
22989         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22990 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22991       fi
22992       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22993     fi
22994   fi
22995 
22996   # Now new_path has a complete unix path to the binary
22997   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22998     # Keep paths in /bin as-is, but remove trailing .exe if any
22999     new_path="${new_path/%.exe/}"
23000     # Do not save /bin paths to all_fixpath_prefixes!
23001   else
23002     # Not in mixed or Windows style, start by that.
23003     new_path=`cmd //c echo $new_path`
23004 
23005   input_path="$new_path"
23006   # Check if we need to convert this using DOS-style short mode. If the path
23007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23008   # take no chances and rewrite it.
23009   # Note: m4 eats our [], so we need to use [ and ] instead.
23010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23011   if test "x$has_forbidden_chars" != x; then
23012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23013     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23014   fi
23015 
23016     # Output is in $new_path
23017 
23018   windows_path="$new_path"
23019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23020     unix_path=`$CYGPATH -u "$windows_path"`
23021     new_path="$unix_path"
23022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23024     new_path="$unix_path"
23025   fi
23026 
23027     # remove trailing .exe if any
23028     new_path="${new_path/%.exe/}"
23029 
23030     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23031     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23032   fi
23033 
23034   else
23035     # We're on a posix platform. Hooray! :)
23036     # First separate the path from the arguments. This will split at the first
23037     # space.
23038     complete="$MT"
23039     path="${complete%% *}"
23040     tmp="$complete EOL"
23041     arguments="${tmp#* }"
23042 
23043     # Cannot rely on the command "which" here since it doesn't always work.
23044     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23045     if test -z "$is_absolute_path"; then
23046       # Path to executable is not absolute. Find it.
23047       IFS_save="$IFS"
23048       IFS=:
23049       for p in $PATH; do
23050         if test -f "$p/$path" && test -x "$p/$path"; then
23051           new_path="$p/$path"
23052           break
23053         fi
23054       done
23055       IFS="$IFS_save"
23056     else
23057       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23058 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23059       new_path="$path"
23060     fi
23061 
23062     if test "x$new_path" = x; then
23063         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23064 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23065         has_space=`$ECHO "$complete" | $GREP " "`
23066         if test "x$has_space" != x; then
23067           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23068 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23069         fi
23070         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23071       fi
23072   fi
23073 
23074       # Now join together the path and the arguments once again
23075       if test "x$arguments" != xEOL; then
23076         new_complete="$new_path ${arguments% *}"
23077       else
23078         new_complete="$new_path"
23079       fi
23080 
23081   if test "x$complete" != "x$new_complete"; then
23082       MT="$new_complete"
23083       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23084 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23085     fi
23086 
23087     # The resource compiler
23088     # Extract the first word of "rc", so it can be a program name with args.
23089 set dummy rc; ac_word=$2
23090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23091 $as_echo_n "checking for $ac_word... " >&6; }
23092 if ${ac_cv_prog_RC+:} false; then :
23093   $as_echo_n "(cached) " >&6
23094 else
23095   if test -n "$RC"; then
23096   ac_cv_prog_RC="$RC" # Let the user override the test.
23097 else
23098   ac_prog_rejected=no
23099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23100 for as_dir in $PATH
23101 do
23102   IFS=$as_save_IFS
23103   test -z "$as_dir" && as_dir=.
23104     for ac_exec_ext in '' $ac_executable_extensions; do
23105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23106     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23107        ac_prog_rejected=yes
23108        continue
23109      fi
23110     ac_cv_prog_RC="rc"
23111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23112     break 2
23113   fi
23114 done
23115   done
23116 IFS=$as_save_IFS
23117 
23118 if test $ac_prog_rejected = yes; then
23119   # We found a bogon in the path, so make sure we never use it.
23120   set dummy $ac_cv_prog_RC
23121   shift
23122   if test $# != 0; then
23123     # We chose a different compiler from the bogus one.
23124     # However, it has the same basename, so the bogon will be chosen
23125     # first if we set RC to just the basename; use the full file name.
23126     shift
23127     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23128   fi
23129 fi
23130 fi
23131 fi
23132 RC=$ac_cv_prog_RC
23133 if test -n "$RC"; then
23134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23135 $as_echo "$RC" >&6; }
23136 else
23137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23138 $as_echo "no" >&6; }
23139 fi
23140 
23141 
23142 
23143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23144 
23145   # First separate the path from the arguments. This will split at the first
23146   # space.
23147   complete="$RC"
23148   path="${complete%% *}"
23149   tmp="$complete EOL"
23150   arguments="${tmp#* }"
23151 
23152   # Input might be given as Windows format, start by converting to
23153   # unix format.
23154   new_path=`$CYGPATH -u "$path"`
23155 
23156   # Now try to locate executable using which
23157   new_path=`$WHICH "$new_path" 2> /dev/null`
23158   # bat and cmd files are not always considered executable in cygwin causing which
23159   # to not find them
23160   if test "x$new_path" = x \
23161            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23162            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23163     new_path=`$CYGPATH -u "$path"`
23164   fi
23165   if test "x$new_path" = x; then
23166     # Oops. Which didn't find the executable.
23167     # The splitting of arguments from the executable at a space might have been incorrect,
23168     # since paths with space are more likely in Windows. Give it another try with the whole
23169     # argument.
23170     path="$complete"
23171     arguments="EOL"
23172     new_path=`$CYGPATH -u "$path"`
23173     new_path=`$WHICH "$new_path" 2> /dev/null`
23174     # bat and cmd files are not always considered executable in cygwin causing which
23175     # to not find them
23176     if test "x$new_path" = x \
23177              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23178              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23179       new_path=`$CYGPATH -u "$path"`
23180     fi
23181     if test "x$new_path" = x; then
23182       # It's still not found. Now this is an unrecoverable error.
23183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23184 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23185       has_space=`$ECHO "$complete" | $GREP " "`
23186       if test "x$has_space" != x; then
23187         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23188 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23189       fi
23190       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23191     fi
23192   fi
23193 
23194   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23195   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23196   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23197   # "foo.exe" is OK but "foo" is an error.
23198   #
23199   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23200   # It is also a way to make sure we got the proper file name for the real test later on.
23201   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23202   if test "x$test_shortpath" = x; then
23203     # Short path failed, file does not exist as specified.
23204     # Try adding .exe or .cmd
23205     if test -f "${new_path}.exe"; then
23206        input_to_shortpath="${new_path}.exe"
23207     elif test -f "${new_path}.cmd"; then
23208        input_to_shortpath="${new_path}.cmd"
23209     else
23210       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23211 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23212       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23213 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23214       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23215     fi
23216   else
23217     input_to_shortpath="$new_path"
23218   fi
23219 
23220   # Call helper function which possibly converts this using DOS-style short mode.
23221   # If so, the updated path is stored in $new_path.
23222   new_path="$input_to_shortpath"
23223 
23224   input_path="$input_to_shortpath"
23225   # Check if we need to convert this using DOS-style short mode. If the path
23226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23227   # take no chances and rewrite it.
23228   # Note: m4 eats our [], so we need to use [ and ] instead.
23229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23230   if test "x$has_forbidden_chars" != x; then
23231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23232     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23233     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23234     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23235       # Going to short mode and back again did indeed matter. Since short mode is
23236       # case insensitive, let's make it lowercase to improve readability.
23237       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23238       # Now convert it back to Unix-stile (cygpath)
23239       input_path=`$CYGPATH -u "$shortmode_path"`
23240       new_path="$input_path"
23241     fi
23242   fi
23243 
23244   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23245   if test "x$test_cygdrive_prefix" = x; then
23246     # As a simple fix, exclude /usr/bin since it's not a real path.
23247     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23248       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23249       # a path prefixed by /cygdrive for fixpath to work.
23250       new_path="$CYGWIN_ROOT_PATH$input_path"
23251     fi
23252   fi
23253 
23254   # remove trailing .exe if any
23255   new_path="${new_path/%.exe/}"
23256 
23257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23258 
23259   # First separate the path from the arguments. This will split at the first
23260   # space.
23261   complete="$RC"
23262   path="${complete%% *}"
23263   tmp="$complete EOL"
23264   arguments="${tmp#* }"
23265 
23266   # Input might be given as Windows format, start by converting to
23267   # unix format.
23268   new_path="$path"
23269 
23270   windows_path="$new_path"
23271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23272     unix_path=`$CYGPATH -u "$windows_path"`
23273     new_path="$unix_path"
23274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23276     new_path="$unix_path"
23277   fi
23278 
23279 
23280   # Now try to locate executable using which
23281   new_path=`$WHICH "$new_path" 2> /dev/null`
23282 
23283   if test "x$new_path" = x; then
23284     # Oops. Which didn't find the executable.
23285     # The splitting of arguments from the executable at a space might have been incorrect,
23286     # since paths with space are more likely in Windows. Give it another try with the whole
23287     # argument.
23288     path="$complete"
23289     arguments="EOL"
23290     new_path="$path"
23291 
23292   windows_path="$new_path"
23293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23294     unix_path=`$CYGPATH -u "$windows_path"`
23295     new_path="$unix_path"
23296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23298     new_path="$unix_path"
23299   fi
23300 
23301 
23302     new_path=`$WHICH "$new_path" 2> /dev/null`
23303 
23304     if test "x$new_path" = x; then
23305       # It's still not found. Now this is an unrecoverable error.
23306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23307 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23308       has_space=`$ECHO "$complete" | $GREP " "`
23309       if test "x$has_space" != x; then
23310         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23311 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23312       fi
23313       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23314     fi
23315   fi
23316 
23317   # Now new_path has a complete unix path to the binary
23318   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23319     # Keep paths in /bin as-is, but remove trailing .exe if any
23320     new_path="${new_path/%.exe/}"
23321     # Do not save /bin paths to all_fixpath_prefixes!
23322   else
23323     # Not in mixed or Windows style, start by that.
23324     new_path=`cmd //c echo $new_path`
23325 
23326   input_path="$new_path"
23327   # Check if we need to convert this using DOS-style short mode. If the path
23328   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23329   # take no chances and rewrite it.
23330   # Note: m4 eats our [], so we need to use [ and ] instead.
23331   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23332   if test "x$has_forbidden_chars" != x; then
23333     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23334     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23335   fi
23336 
23337     # Output is in $new_path
23338 
23339   windows_path="$new_path"
23340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23341     unix_path=`$CYGPATH -u "$windows_path"`
23342     new_path="$unix_path"
23343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23345     new_path="$unix_path"
23346   fi
23347 
23348     # remove trailing .exe if any
23349     new_path="${new_path/%.exe/}"
23350 
23351     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23352     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23353   fi
23354 
23355   else
23356     # We're on a posix platform. Hooray! :)
23357     # First separate the path from the arguments. This will split at the first
23358     # space.
23359     complete="$RC"
23360     path="${complete%% *}"
23361     tmp="$complete EOL"
23362     arguments="${tmp#* }"
23363 
23364     # Cannot rely on the command "which" here since it doesn't always work.
23365     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23366     if test -z "$is_absolute_path"; then
23367       # Path to executable is not absolute. Find it.
23368       IFS_save="$IFS"
23369       IFS=:
23370       for p in $PATH; do
23371         if test -f "$p/$path" && test -x "$p/$path"; then
23372           new_path="$p/$path"
23373           break
23374         fi
23375       done
23376       IFS="$IFS_save"
23377     else
23378       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23379 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23380       new_path="$path"
23381     fi
23382 
23383     if test "x$new_path" = x; then
23384         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23385 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23386         has_space=`$ECHO "$complete" | $GREP " "`
23387         if test "x$has_space" != x; then
23388           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23389 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23390         fi
23391         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23392       fi
23393   fi
23394 
23395       # Now join together the path and the arguments once again
23396       if test "x$arguments" != xEOL; then
23397         new_complete="$new_path ${arguments% *}"
23398       else
23399         new_complete="$new_path"
23400       fi
23401 
23402   if test "x$complete" != "x$new_complete"; then
23403       RC="$new_complete"
23404       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23405 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23406     fi
23407 
23408 
23409     # For hotspot, we need these in Windows mixed path,
23410     # so rewrite them all. Need added .exe suffix.
23411     HOTSPOT_CXX="$CXX.exe"
23412     HOTSPOT_LD="$LD.exe"
23413     HOTSPOT_MT="$MT.exe"
23414     HOTSPOT_RC="$RC.exe"
23415 
23416   unix_path="$HOTSPOT_CXX"
23417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23418     windows_path=`$CYGPATH -m "$unix_path"`
23419     HOTSPOT_CXX="$windows_path"
23420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23421     windows_path=`cmd //c echo $unix_path`
23422     HOTSPOT_CXX="$windows_path"
23423   fi
23424 
23425 
23426   unix_path="$HOTSPOT_LD"
23427   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23428     windows_path=`$CYGPATH -m "$unix_path"`
23429     HOTSPOT_LD="$windows_path"
23430   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23431     windows_path=`cmd //c echo $unix_path`
23432     HOTSPOT_LD="$windows_path"
23433   fi
23434 
23435 
23436   unix_path="$HOTSPOT_MT"
23437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23438     windows_path=`$CYGPATH -m "$unix_path"`
23439     HOTSPOT_MT="$windows_path"
23440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23441     windows_path=`cmd //c echo $unix_path`
23442     HOTSPOT_MT="$windows_path"
23443   fi
23444 
23445 
23446   unix_path="$HOTSPOT_RC"
23447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23448     windows_path=`$CYGPATH -m "$unix_path"`
23449     HOTSPOT_RC="$windows_path"
23450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23451     windows_path=`cmd //c echo $unix_path`
23452     HOTSPOT_RC="$windows_path"
23453   fi
23454 
23455 
23456 
23457 
23458     RC_FLAGS="-nologo -l 0x409 -r"
23459     if test "x$VARIANT" = xOPT; then :
23460 
23461         RC_FLAGS="$RC_FLAGS -d NDEBUG"
23462 
23463 fi
23464 
23465     # The version variables used to create RC_FLAGS may be overridden
23466     # in a custom configure script, or possibly the command line.
23467     # Let those variables be expanded at make time in spec.gmk.
23468     # The \$ are escaped to the shell, and the $(...) variables
23469     # are evaluated by make.
23470     RC_FLAGS="$RC_FLAGS \
23471         -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23472         -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23473         -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23474         -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23475         -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23476         -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23477         -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23478 
23479     # lib.exe is used to create static libraries.
23480     # Extract the first word of "lib", so it can be a program name with args.
23481 set dummy lib; ac_word=$2
23482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23483 $as_echo_n "checking for $ac_word... " >&6; }
23484 if ${ac_cv_prog_WINAR+:} false; then :
23485   $as_echo_n "(cached) " >&6
23486 else
23487   if test -n "$WINAR"; then
23488   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23489 else
23490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23491 for as_dir in $PATH
23492 do
23493   IFS=$as_save_IFS
23494   test -z "$as_dir" && as_dir=.
23495     for ac_exec_ext in '' $ac_executable_extensions; do
23496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23497     ac_cv_prog_WINAR="lib"
23498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23499     break 2
23500   fi
23501 done
23502   done
23503 IFS=$as_save_IFS
23504 
23505 fi
23506 fi
23507 WINAR=$ac_cv_prog_WINAR
23508 if test -n "$WINAR"; then
23509   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23510 $as_echo "$WINAR" >&6; }
23511 else
23512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23513 $as_echo "no" >&6; }
23514 fi
23515 
23516 
23517 
23518   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23519 
23520   # First separate the path from the arguments. This will split at the first
23521   # space.
23522   complete="$WINAR"
23523   path="${complete%% *}"
23524   tmp="$complete EOL"
23525   arguments="${tmp#* }"
23526 
23527   # Input might be given as Windows format, start by converting to
23528   # unix format.
23529   new_path=`$CYGPATH -u "$path"`
23530 
23531   # Now try to locate executable using which
23532   new_path=`$WHICH "$new_path" 2> /dev/null`
23533   # bat and cmd files are not always considered executable in cygwin causing which
23534   # to not find them
23535   if test "x$new_path" = x \
23536            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23537            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23538     new_path=`$CYGPATH -u "$path"`
23539   fi
23540   if test "x$new_path" = x; then
23541     # Oops. Which didn't find the executable.
23542     # The splitting of arguments from the executable at a space might have been incorrect,
23543     # since paths with space are more likely in Windows. Give it another try with the whole
23544     # argument.
23545     path="$complete"
23546     arguments="EOL"
23547     new_path=`$CYGPATH -u "$path"`
23548     new_path=`$WHICH "$new_path" 2> /dev/null`
23549     # bat and cmd files are not always considered executable in cygwin causing which
23550     # to not find them
23551     if test "x$new_path" = x \
23552              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23553              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23554       new_path=`$CYGPATH -u "$path"`
23555     fi
23556     if test "x$new_path" = x; then
23557       # It's still not found. Now this is an unrecoverable error.
23558       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23559 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23560       has_space=`$ECHO "$complete" | $GREP " "`
23561       if test "x$has_space" != x; then
23562         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23563 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23564       fi
23565       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23566     fi
23567   fi
23568 
23569   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23570   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23571   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23572   # "foo.exe" is OK but "foo" is an error.
23573   #
23574   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23575   # It is also a way to make sure we got the proper file name for the real test later on.
23576   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23577   if test "x$test_shortpath" = x; then
23578     # Short path failed, file does not exist as specified.
23579     # Try adding .exe or .cmd
23580     if test -f "${new_path}.exe"; then
23581        input_to_shortpath="${new_path}.exe"
23582     elif test -f "${new_path}.cmd"; then
23583        input_to_shortpath="${new_path}.cmd"
23584     else
23585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23586 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23587       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23588 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23589       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23590     fi
23591   else
23592     input_to_shortpath="$new_path"
23593   fi
23594 
23595   # Call helper function which possibly converts this using DOS-style short mode.
23596   # If so, the updated path is stored in $new_path.
23597   new_path="$input_to_shortpath"
23598 
23599   input_path="$input_to_shortpath"
23600   # Check if we need to convert this using DOS-style short mode. If the path
23601   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23602   # take no chances and rewrite it.
23603   # Note: m4 eats our [], so we need to use [ and ] instead.
23604   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23605   if test "x$has_forbidden_chars" != x; then
23606     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23607     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23608     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23609     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23610       # Going to short mode and back again did indeed matter. Since short mode is
23611       # case insensitive, let's make it lowercase to improve readability.
23612       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23613       # Now convert it back to Unix-stile (cygpath)
23614       input_path=`$CYGPATH -u "$shortmode_path"`
23615       new_path="$input_path"
23616     fi
23617   fi
23618 
23619   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23620   if test "x$test_cygdrive_prefix" = x; then
23621     # As a simple fix, exclude /usr/bin since it's not a real path.
23622     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23623       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23624       # a path prefixed by /cygdrive for fixpath to work.
23625       new_path="$CYGWIN_ROOT_PATH$input_path"
23626     fi
23627   fi
23628 
23629   # remove trailing .exe if any
23630   new_path="${new_path/%.exe/}"
23631 
23632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23633 
23634   # First separate the path from the arguments. This will split at the first
23635   # space.
23636   complete="$WINAR"
23637   path="${complete%% *}"
23638   tmp="$complete EOL"
23639   arguments="${tmp#* }"
23640 
23641   # Input might be given as Windows format, start by converting to
23642   # unix format.
23643   new_path="$path"
23644 
23645   windows_path="$new_path"
23646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23647     unix_path=`$CYGPATH -u "$windows_path"`
23648     new_path="$unix_path"
23649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23651     new_path="$unix_path"
23652   fi
23653 
23654 
23655   # Now try to locate executable using which
23656   new_path=`$WHICH "$new_path" 2> /dev/null`
23657 
23658   if test "x$new_path" = x; then
23659     # Oops. Which didn't find the executable.
23660     # The splitting of arguments from the executable at a space might have been incorrect,
23661     # since paths with space are more likely in Windows. Give it another try with the whole
23662     # argument.
23663     path="$complete"
23664     arguments="EOL"
23665     new_path="$path"
23666 
23667   windows_path="$new_path"
23668   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23669     unix_path=`$CYGPATH -u "$windows_path"`
23670     new_path="$unix_path"
23671   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23672     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23673     new_path="$unix_path"
23674   fi
23675 
23676 
23677     new_path=`$WHICH "$new_path" 2> /dev/null`
23678 
23679     if test "x$new_path" = x; then
23680       # It's still not found. Now this is an unrecoverable error.
23681       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23682 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23683       has_space=`$ECHO "$complete" | $GREP " "`
23684       if test "x$has_space" != x; then
23685         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23686 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23687       fi
23688       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23689     fi
23690   fi
23691 
23692   # Now new_path has a complete unix path to the binary
23693   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23694     # Keep paths in /bin as-is, but remove trailing .exe if any
23695     new_path="${new_path/%.exe/}"
23696     # Do not save /bin paths to all_fixpath_prefixes!
23697   else
23698     # Not in mixed or Windows style, start by that.
23699     new_path=`cmd //c echo $new_path`
23700 
23701   input_path="$new_path"
23702   # Check if we need to convert this using DOS-style short mode. If the path
23703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23704   # take no chances and rewrite it.
23705   # Note: m4 eats our [], so we need to use [ and ] instead.
23706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23707   if test "x$has_forbidden_chars" != x; then
23708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23709     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23710   fi
23711 
23712     # Output is in $new_path
23713 
23714   windows_path="$new_path"
23715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23716     unix_path=`$CYGPATH -u "$windows_path"`
23717     new_path="$unix_path"
23718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23720     new_path="$unix_path"
23721   fi
23722 
23723     # remove trailing .exe if any
23724     new_path="${new_path/%.exe/}"
23725 
23726     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23727     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23728   fi
23729 
23730   else
23731     # We're on a posix platform. Hooray! :)
23732     # First separate the path from the arguments. This will split at the first
23733     # space.
23734     complete="$WINAR"
23735     path="${complete%% *}"
23736     tmp="$complete EOL"
23737     arguments="${tmp#* }"
23738 
23739     # Cannot rely on the command "which" here since it doesn't always work.
23740     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23741     if test -z "$is_absolute_path"; then
23742       # Path to executable is not absolute. Find it.
23743       IFS_save="$IFS"
23744       IFS=:
23745       for p in $PATH; do
23746         if test -f "$p/$path" && test -x "$p/$path"; then
23747           new_path="$p/$path"
23748           break
23749         fi
23750       done
23751       IFS="$IFS_save"
23752     else
23753       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23754 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23755       new_path="$path"
23756     fi
23757 
23758     if test "x$new_path" = x; then
23759         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23760 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23761         has_space=`$ECHO "$complete" | $GREP " "`
23762         if test "x$has_space" != x; then
23763           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23764 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23765         fi
23766         as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23767       fi
23768   fi
23769 
23770       # Now join together the path and the arguments once again
23771       if test "x$arguments" != xEOL; then
23772         new_complete="$new_path ${arguments% *}"
23773       else
23774         new_complete="$new_path"
23775       fi
23776 
23777   if test "x$complete" != "x$new_complete"; then
23778       WINAR="$new_complete"
23779       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23780 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23781     fi
23782 
23783     AR="$WINAR"
23784     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23785 
23786     # Extract the first word of "dumpbin", so it can be a program name with args.
23787 set dummy dumpbin; ac_word=$2
23788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23789 $as_echo_n "checking for $ac_word... " >&6; }
23790 if ${ac_cv_prog_DUMPBIN+:} false; then :
23791   $as_echo_n "(cached) " >&6
23792 else
23793   if test -n "$DUMPBIN"; then
23794   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23795 else
23796 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23797 for as_dir in $PATH
23798 do
23799   IFS=$as_save_IFS
23800   test -z "$as_dir" && as_dir=.
23801     for ac_exec_ext in '' $ac_executable_extensions; do
23802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23803     ac_cv_prog_DUMPBIN="dumpbin"
23804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23805     break 2
23806   fi
23807 done
23808   done
23809 IFS=$as_save_IFS
23810 
23811 fi
23812 fi
23813 DUMPBIN=$ac_cv_prog_DUMPBIN
23814 if test -n "$DUMPBIN"; then
23815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23816 $as_echo "$DUMPBIN" >&6; }
23817 else
23818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23819 $as_echo "no" >&6; }
23820 fi
23821 
23822 
23823 
23824   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23825 
23826   # First separate the path from the arguments. This will split at the first
23827   # space.
23828   complete="$DUMPBIN"
23829   path="${complete%% *}"
23830   tmp="$complete EOL"
23831   arguments="${tmp#* }"
23832 
23833   # Input might be given as Windows format, start by converting to
23834   # unix format.
23835   new_path=`$CYGPATH -u "$path"`
23836 
23837   # Now try to locate executable using which
23838   new_path=`$WHICH "$new_path" 2> /dev/null`
23839   # bat and cmd files are not always considered executable in cygwin causing which
23840   # to not find them
23841   if test "x$new_path" = x \
23842            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23843            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23844     new_path=`$CYGPATH -u "$path"`
23845   fi
23846   if test "x$new_path" = x; then
23847     # Oops. Which didn't find the executable.
23848     # The splitting of arguments from the executable at a space might have been incorrect,
23849     # since paths with space are more likely in Windows. Give it another try with the whole
23850     # argument.
23851     path="$complete"
23852     arguments="EOL"
23853     new_path=`$CYGPATH -u "$path"`
23854     new_path=`$WHICH "$new_path" 2> /dev/null`
23855     # bat and cmd files are not always considered executable in cygwin causing which
23856     # to not find them
23857     if test "x$new_path" = x \
23858              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23859              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23860       new_path=`$CYGPATH -u "$path"`
23861     fi
23862     if test "x$new_path" = x; then
23863       # It's still not found. Now this is an unrecoverable error.
23864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23865 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23866       has_space=`$ECHO "$complete" | $GREP " "`
23867       if test "x$has_space" != x; then
23868         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23869 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23870       fi
23871       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23872     fi
23873   fi
23874 
23875   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23876   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23877   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23878   # "foo.exe" is OK but "foo" is an error.
23879   #
23880   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23881   # It is also a way to make sure we got the proper file name for the real test later on.
23882   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23883   if test "x$test_shortpath" = x; then
23884     # Short path failed, file does not exist as specified.
23885     # Try adding .exe or .cmd
23886     if test -f "${new_path}.exe"; then
23887        input_to_shortpath="${new_path}.exe"
23888     elif test -f "${new_path}.cmd"; then
23889        input_to_shortpath="${new_path}.cmd"
23890     else
23891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23892 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23893       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23894 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23895       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23896     fi
23897   else
23898     input_to_shortpath="$new_path"
23899   fi
23900 
23901   # Call helper function which possibly converts this using DOS-style short mode.
23902   # If so, the updated path is stored in $new_path.
23903   new_path="$input_to_shortpath"
23904 
23905   input_path="$input_to_shortpath"
23906   # Check if we need to convert this using DOS-style short mode. If the path
23907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23908   # take no chances and rewrite it.
23909   # Note: m4 eats our [], so we need to use [ and ] instead.
23910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23911   if test "x$has_forbidden_chars" != x; then
23912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23913     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23914     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23915     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23916       # Going to short mode and back again did indeed matter. Since short mode is
23917       # case insensitive, let's make it lowercase to improve readability.
23918       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23919       # Now convert it back to Unix-stile (cygpath)
23920       input_path=`$CYGPATH -u "$shortmode_path"`
23921       new_path="$input_path"
23922     fi
23923   fi
23924 
23925   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23926   if test "x$test_cygdrive_prefix" = x; then
23927     # As a simple fix, exclude /usr/bin since it's not a real path.
23928     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23929       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23930       # a path prefixed by /cygdrive for fixpath to work.
23931       new_path="$CYGWIN_ROOT_PATH$input_path"
23932     fi
23933   fi
23934 
23935   # remove trailing .exe if any
23936   new_path="${new_path/%.exe/}"
23937 
23938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23939 
23940   # First separate the path from the arguments. This will split at the first
23941   # space.
23942   complete="$DUMPBIN"
23943   path="${complete%% *}"
23944   tmp="$complete EOL"
23945   arguments="${tmp#* }"
23946 
23947   # Input might be given as Windows format, start by converting to
23948   # unix format.
23949   new_path="$path"
23950 
23951   windows_path="$new_path"
23952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23953     unix_path=`$CYGPATH -u "$windows_path"`
23954     new_path="$unix_path"
23955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23957     new_path="$unix_path"
23958   fi
23959 
23960 
23961   # Now try to locate executable using which
23962   new_path=`$WHICH "$new_path" 2> /dev/null`
23963 
23964   if test "x$new_path" = x; then
23965     # Oops. Which didn't find the executable.
23966     # The splitting of arguments from the executable at a space might have been incorrect,
23967     # since paths with space are more likely in Windows. Give it another try with the whole
23968     # argument.
23969     path="$complete"
23970     arguments="EOL"
23971     new_path="$path"
23972 
23973   windows_path="$new_path"
23974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23975     unix_path=`$CYGPATH -u "$windows_path"`
23976     new_path="$unix_path"
23977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23979     new_path="$unix_path"
23980   fi
23981 
23982 
23983     new_path=`$WHICH "$new_path" 2> /dev/null`
23984 
23985     if test "x$new_path" = x; then
23986       # It's still not found. Now this is an unrecoverable error.
23987       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23988 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23989       has_space=`$ECHO "$complete" | $GREP " "`
23990       if test "x$has_space" != x; then
23991         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23992 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23993       fi
23994       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23995     fi
23996   fi
23997 
23998   # Now new_path has a complete unix path to the binary
23999   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24000     # Keep paths in /bin as-is, but remove trailing .exe if any
24001     new_path="${new_path/%.exe/}"
24002     # Do not save /bin paths to all_fixpath_prefixes!
24003   else
24004     # Not in mixed or Windows style, start by that.
24005     new_path=`cmd //c echo $new_path`
24006 
24007   input_path="$new_path"
24008   # Check if we need to convert this using DOS-style short mode. If the path
24009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24010   # take no chances and rewrite it.
24011   # Note: m4 eats our [], so we need to use [ and ] instead.
24012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24013   if test "x$has_forbidden_chars" != x; then
24014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24015     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24016   fi
24017 
24018     # Output is in $new_path
24019 
24020   windows_path="$new_path"
24021   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24022     unix_path=`$CYGPATH -u "$windows_path"`
24023     new_path="$unix_path"
24024   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24025     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24026     new_path="$unix_path"
24027   fi
24028 
24029     # remove trailing .exe if any
24030     new_path="${new_path/%.exe/}"
24031 
24032     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24033     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24034   fi
24035 
24036   else
24037     # We're on a posix platform. Hooray! :)
24038     # First separate the path from the arguments. This will split at the first
24039     # space.
24040     complete="$DUMPBIN"
24041     path="${complete%% *}"
24042     tmp="$complete EOL"
24043     arguments="${tmp#* }"
24044 
24045     # Cannot rely on the command "which" here since it doesn't always work.
24046     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24047     if test -z "$is_absolute_path"; then
24048       # Path to executable is not absolute. Find it.
24049       IFS_save="$IFS"
24050       IFS=:
24051       for p in $PATH; do
24052         if test -f "$p/$path" && test -x "$p/$path"; then
24053           new_path="$p/$path"
24054           break
24055         fi
24056       done
24057       IFS="$IFS_save"
24058     else
24059       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24060 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24061       new_path="$path"
24062     fi
24063 
24064     if test "x$new_path" = x; then
24065         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24066 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24067         has_space=`$ECHO "$complete" | $GREP " "`
24068         if test "x$has_space" != x; then
24069           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24070 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24071         fi
24072         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24073       fi
24074   fi
24075 
24076       # Now join together the path and the arguments once again
24077       if test "x$arguments" != xEOL; then
24078         new_complete="$new_path ${arguments% *}"
24079       else
24080         new_complete="$new_path"
24081       fi
24082 
24083   if test "x$complete" != "x$new_complete"; then
24084       DUMPBIN="$new_complete"
24085       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24086 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24087     fi
24088 
24089 
24090     COMPILER_TYPE=CL
24091     CCXXFLAGS="$CCXXFLAGS -nologo"
24092 
24093 fi
24094 
24095 
24096 
24097 ac_ext=c
24098 ac_cpp='$CPP $CPPFLAGS'
24099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24103 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24104 # On Suns, sometimes $CPP names a directory.
24105 if test -n "$CPP" && test -d "$CPP"; then
24106   CPP=
24107 fi
24108 if test -z "$CPP"; then
24109   if ${ac_cv_prog_CPP+:} false; then :
24110   $as_echo_n "(cached) " >&6
24111 else
24112       # Double quotes because CPP needs to be expanded
24113     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24114     do
24115       ac_preproc_ok=false
24116 for ac_c_preproc_warn_flag in '' yes
24117 do
24118   # Use a header file that comes with gcc, so configuring glibc
24119   # with a fresh cross-compiler works.
24120   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24121   # <limits.h> exists even on freestanding compilers.
24122   # On the NeXT, cc -E runs the code through the compiler's parser,
24123   # not just through cpp. "Syntax error" is here to catch this case.
24124   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24125 /* end confdefs.h.  */
24126 #ifdef __STDC__
24127 # include <limits.h>
24128 #else
24129 # include <assert.h>
24130 #endif
24131                      Syntax error
24132 _ACEOF
24133 if ac_fn_c_try_cpp "$LINENO"; then :
24134 
24135 else
24136   # Broken: fails on valid input.
24137 continue
24138 fi
24139 rm -f conftest.err conftest.i conftest.$ac_ext
24140 
24141   # OK, works on sane cases.  Now check whether nonexistent headers
24142   # can be detected and how.
24143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24144 /* end confdefs.h.  */
24145 #include <ac_nonexistent.h>
24146 _ACEOF
24147 if ac_fn_c_try_cpp "$LINENO"; then :
24148   # Broken: success on invalid input.
24149 continue
24150 else
24151   # Passes both tests.
24152 ac_preproc_ok=:
24153 break
24154 fi
24155 rm -f conftest.err conftest.i conftest.$ac_ext
24156 
24157 done
24158 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24159 rm -f conftest.i conftest.err conftest.$ac_ext
24160 if $ac_preproc_ok; then :
24161   break
24162 fi
24163 
24164     done
24165     ac_cv_prog_CPP=$CPP
24166 
24167 fi
24168   CPP=$ac_cv_prog_CPP
24169 else
24170   ac_cv_prog_CPP=$CPP
24171 fi
24172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24173 $as_echo "$CPP" >&6; }
24174 ac_preproc_ok=false
24175 for ac_c_preproc_warn_flag in '' yes
24176 do
24177   # Use a header file that comes with gcc, so configuring glibc
24178   # with a fresh cross-compiler works.
24179   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24180   # <limits.h> exists even on freestanding compilers.
24181   # On the NeXT, cc -E runs the code through the compiler's parser,
24182   # not just through cpp. "Syntax error" is here to catch this case.
24183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24184 /* end confdefs.h.  */
24185 #ifdef __STDC__
24186 # include <limits.h>
24187 #else
24188 # include <assert.h>
24189 #endif
24190                      Syntax error
24191 _ACEOF
24192 if ac_fn_c_try_cpp "$LINENO"; then :
24193 
24194 else
24195   # Broken: fails on valid input.
24196 continue
24197 fi
24198 rm -f conftest.err conftest.i conftest.$ac_ext
24199 
24200   # OK, works on sane cases.  Now check whether nonexistent headers
24201   # can be detected and how.
24202   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24203 /* end confdefs.h.  */
24204 #include <ac_nonexistent.h>
24205 _ACEOF
24206 if ac_fn_c_try_cpp "$LINENO"; then :
24207   # Broken: success on invalid input.
24208 continue
24209 else
24210   # Passes both tests.
24211 ac_preproc_ok=:
24212 break
24213 fi
24214 rm -f conftest.err conftest.i conftest.$ac_ext
24215 
24216 done
24217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24218 rm -f conftest.i conftest.err conftest.$ac_ext
24219 if $ac_preproc_ok; then :
24220 
24221 else
24222   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24223 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24224 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24225 See \`config.log' for more details" "$LINENO" 5; }
24226 fi
24227 
24228 ac_ext=cpp
24229 ac_cpp='$CXXCPP $CPPFLAGS'
24230 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24231 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24232 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24233 
24234 
24235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24236 
24237   # First separate the path from the arguments. This will split at the first
24238   # space.
24239   complete="$CPP"
24240   path="${complete%% *}"
24241   tmp="$complete EOL"
24242   arguments="${tmp#* }"
24243 
24244   # Input might be given as Windows format, start by converting to
24245   # unix format.
24246   new_path=`$CYGPATH -u "$path"`
24247 
24248   # Now try to locate executable using which
24249   new_path=`$WHICH "$new_path" 2> /dev/null`
24250   # bat and cmd files are not always considered executable in cygwin causing which
24251   # to not find them
24252   if test "x$new_path" = x \
24253            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24254            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24255     new_path=`$CYGPATH -u "$path"`
24256   fi
24257   if test "x$new_path" = x; then
24258     # Oops. Which didn't find the executable.
24259     # The splitting of arguments from the executable at a space might have been incorrect,
24260     # since paths with space are more likely in Windows. Give it another try with the whole
24261     # argument.
24262     path="$complete"
24263     arguments="EOL"
24264     new_path=`$CYGPATH -u "$path"`
24265     new_path=`$WHICH "$new_path" 2> /dev/null`
24266     # bat and cmd files are not always considered executable in cygwin causing which
24267     # to not find them
24268     if test "x$new_path" = x \
24269              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24270              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24271       new_path=`$CYGPATH -u "$path"`
24272     fi
24273     if test "x$new_path" = x; then
24274       # It's still not found. Now this is an unrecoverable error.
24275       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24276 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24277       has_space=`$ECHO "$complete" | $GREP " "`
24278       if test "x$has_space" != x; then
24279         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24281       fi
24282       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24283     fi
24284   fi
24285 
24286   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24287   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24288   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24289   # "foo.exe" is OK but "foo" is an error.
24290   #
24291   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24292   # It is also a way to make sure we got the proper file name for the real test later on.
24293   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24294   if test "x$test_shortpath" = x; then
24295     # Short path failed, file does not exist as specified.
24296     # Try adding .exe or .cmd
24297     if test -f "${new_path}.exe"; then
24298        input_to_shortpath="${new_path}.exe"
24299     elif test -f "${new_path}.cmd"; then
24300        input_to_shortpath="${new_path}.cmd"
24301     else
24302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24303 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24304       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24305 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24306       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24307     fi
24308   else
24309     input_to_shortpath="$new_path"
24310   fi
24311 
24312   # Call helper function which possibly converts this using DOS-style short mode.
24313   # If so, the updated path is stored in $new_path.
24314   new_path="$input_to_shortpath"
24315 
24316   input_path="$input_to_shortpath"
24317   # Check if we need to convert this using DOS-style short mode. If the path
24318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24319   # take no chances and rewrite it.
24320   # Note: m4 eats our [], so we need to use [ and ] instead.
24321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24322   if test "x$has_forbidden_chars" != x; then
24323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24324     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24325     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24326     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24327       # Going to short mode and back again did indeed matter. Since short mode is
24328       # case insensitive, let's make it lowercase to improve readability.
24329       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24330       # Now convert it back to Unix-stile (cygpath)
24331       input_path=`$CYGPATH -u "$shortmode_path"`
24332       new_path="$input_path"
24333     fi
24334   fi
24335 
24336   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24337   if test "x$test_cygdrive_prefix" = x; then
24338     # As a simple fix, exclude /usr/bin since it's not a real path.
24339     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24340       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24341       # a path prefixed by /cygdrive for fixpath to work.
24342       new_path="$CYGWIN_ROOT_PATH$input_path"
24343     fi
24344   fi
24345 
24346   # remove trailing .exe if any
24347   new_path="${new_path/%.exe/}"
24348 
24349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24350 
24351   # First separate the path from the arguments. This will split at the first
24352   # space.
24353   complete="$CPP"
24354   path="${complete%% *}"
24355   tmp="$complete EOL"
24356   arguments="${tmp#* }"
24357 
24358   # Input might be given as Windows format, start by converting to
24359   # unix format.
24360   new_path="$path"
24361 
24362   windows_path="$new_path"
24363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24364     unix_path=`$CYGPATH -u "$windows_path"`
24365     new_path="$unix_path"
24366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24368     new_path="$unix_path"
24369   fi
24370 
24371 
24372   # Now try to locate executable using which
24373   new_path=`$WHICH "$new_path" 2> /dev/null`
24374 
24375   if test "x$new_path" = x; then
24376     # Oops. Which didn't find the executable.
24377     # The splitting of arguments from the executable at a space might have been incorrect,
24378     # since paths with space are more likely in Windows. Give it another try with the whole
24379     # argument.
24380     path="$complete"
24381     arguments="EOL"
24382     new_path="$path"
24383 
24384   windows_path="$new_path"
24385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24386     unix_path=`$CYGPATH -u "$windows_path"`
24387     new_path="$unix_path"
24388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24390     new_path="$unix_path"
24391   fi
24392 
24393 
24394     new_path=`$WHICH "$new_path" 2> /dev/null`
24395 
24396     if test "x$new_path" = x; then
24397       # It's still not found. Now this is an unrecoverable error.
24398       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24399 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24400       has_space=`$ECHO "$complete" | $GREP " "`
24401       if test "x$has_space" != x; then
24402         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24403 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24404       fi
24405       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24406     fi
24407   fi
24408 
24409   # Now new_path has a complete unix path to the binary
24410   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24411     # Keep paths in /bin as-is, but remove trailing .exe if any
24412     new_path="${new_path/%.exe/}"
24413     # Do not save /bin paths to all_fixpath_prefixes!
24414   else
24415     # Not in mixed or Windows style, start by that.
24416     new_path=`cmd //c echo $new_path`
24417 
24418   input_path="$new_path"
24419   # Check if we need to convert this using DOS-style short mode. If the path
24420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24421   # take no chances and rewrite it.
24422   # Note: m4 eats our [], so we need to use [ and ] instead.
24423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24424   if test "x$has_forbidden_chars" != x; then
24425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24426     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24427   fi
24428 
24429     # Output is in $new_path
24430 
24431   windows_path="$new_path"
24432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24433     unix_path=`$CYGPATH -u "$windows_path"`
24434     new_path="$unix_path"
24435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24437     new_path="$unix_path"
24438   fi
24439 
24440     # remove trailing .exe if any
24441     new_path="${new_path/%.exe/}"
24442 
24443     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24444     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24445   fi
24446 
24447   else
24448     # We're on a posix platform. Hooray! :)
24449     # First separate the path from the arguments. This will split at the first
24450     # space.
24451     complete="$CPP"
24452     path="${complete%% *}"
24453     tmp="$complete EOL"
24454     arguments="${tmp#* }"
24455 
24456     # Cannot rely on the command "which" here since it doesn't always work.
24457     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24458     if test -z "$is_absolute_path"; then
24459       # Path to executable is not absolute. Find it.
24460       IFS_save="$IFS"
24461       IFS=:
24462       for p in $PATH; do
24463         if test -f "$p/$path" && test -x "$p/$path"; then
24464           new_path="$p/$path"
24465           break
24466         fi
24467       done
24468       IFS="$IFS_save"
24469     else
24470       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24471 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24472       new_path="$path"
24473     fi
24474 
24475     if test "x$new_path" = x; then
24476         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24477 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24478         has_space=`$ECHO "$complete" | $GREP " "`
24479         if test "x$has_space" != x; then
24480           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24481 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24482         fi
24483         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24484       fi
24485   fi
24486 
24487       # Now join together the path and the arguments once again
24488       if test "x$arguments" != xEOL; then
24489         new_complete="$new_path ${arguments% *}"
24490       else
24491         new_complete="$new_path"
24492       fi
24493 
24494   if test "x$complete" != "x$new_complete"; then
24495       CPP="$new_complete"
24496       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24497 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24498     fi
24499 
24500 
24501 ac_ext=cpp
24502 ac_cpp='$CXXCPP $CPPFLAGS'
24503 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24504 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24505 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24507 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24508 if test -z "$CXXCPP"; then
24509   if ${ac_cv_prog_CXXCPP+:} false; then :
24510   $as_echo_n "(cached) " >&6
24511 else
24512       # Double quotes because CXXCPP needs to be expanded
24513     for CXXCPP in "$CXX -E" "/lib/cpp"
24514     do
24515       ac_preproc_ok=false
24516 for ac_cxx_preproc_warn_flag in '' yes
24517 do
24518   # Use a header file that comes with gcc, so configuring glibc
24519   # with a fresh cross-compiler works.
24520   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24521   # <limits.h> exists even on freestanding compilers.
24522   # On the NeXT, cc -E runs the code through the compiler's parser,
24523   # not just through cpp. "Syntax error" is here to catch this case.
24524   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24525 /* end confdefs.h.  */
24526 #ifdef __STDC__
24527 # include <limits.h>
24528 #else
24529 # include <assert.h>
24530 #endif
24531                      Syntax error
24532 _ACEOF
24533 if ac_fn_cxx_try_cpp "$LINENO"; then :
24534 
24535 else
24536   # Broken: fails on valid input.
24537 continue
24538 fi
24539 rm -f conftest.err conftest.i conftest.$ac_ext
24540 
24541   # OK, works on sane cases.  Now check whether nonexistent headers
24542   # can be detected and how.
24543   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24544 /* end confdefs.h.  */
24545 #include <ac_nonexistent.h>
24546 _ACEOF
24547 if ac_fn_cxx_try_cpp "$LINENO"; then :
24548   # Broken: success on invalid input.
24549 continue
24550 else
24551   # Passes both tests.
24552 ac_preproc_ok=:
24553 break
24554 fi
24555 rm -f conftest.err conftest.i conftest.$ac_ext
24556 
24557 done
24558 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24559 rm -f conftest.i conftest.err conftest.$ac_ext
24560 if $ac_preproc_ok; then :
24561   break
24562 fi
24563 
24564     done
24565     ac_cv_prog_CXXCPP=$CXXCPP
24566 
24567 fi
24568   CXXCPP=$ac_cv_prog_CXXCPP
24569 else
24570   ac_cv_prog_CXXCPP=$CXXCPP
24571 fi
24572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24573 $as_echo "$CXXCPP" >&6; }
24574 ac_preproc_ok=false
24575 for ac_cxx_preproc_warn_flag in '' yes
24576 do
24577   # Use a header file that comes with gcc, so configuring glibc
24578   # with a fresh cross-compiler works.
24579   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24580   # <limits.h> exists even on freestanding compilers.
24581   # On the NeXT, cc -E runs the code through the compiler's parser,
24582   # not just through cpp. "Syntax error" is here to catch this case.
24583   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24584 /* end confdefs.h.  */
24585 #ifdef __STDC__
24586 # include <limits.h>
24587 #else
24588 # include <assert.h>
24589 #endif
24590                      Syntax error
24591 _ACEOF
24592 if ac_fn_cxx_try_cpp "$LINENO"; then :
24593 
24594 else
24595   # Broken: fails on valid input.
24596 continue
24597 fi
24598 rm -f conftest.err conftest.i conftest.$ac_ext
24599 
24600   # OK, works on sane cases.  Now check whether nonexistent headers
24601   # can be detected and how.
24602   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24603 /* end confdefs.h.  */
24604 #include <ac_nonexistent.h>
24605 _ACEOF
24606 if ac_fn_cxx_try_cpp "$LINENO"; then :
24607   # Broken: success on invalid input.
24608 continue
24609 else
24610   # Passes both tests.
24611 ac_preproc_ok=:
24612 break
24613 fi
24614 rm -f conftest.err conftest.i conftest.$ac_ext
24615 
24616 done
24617 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24618 rm -f conftest.i conftest.err conftest.$ac_ext
24619 if $ac_preproc_ok; then :
24620 
24621 else
24622   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24624 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24625 See \`config.log' for more details" "$LINENO" 5; }
24626 fi
24627 
24628 ac_ext=cpp
24629 ac_cpp='$CXXCPP $CPPFLAGS'
24630 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24631 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24632 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24633 
24634 
24635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24636 
24637   # First separate the path from the arguments. This will split at the first
24638   # space.
24639   complete="$CXXCPP"
24640   path="${complete%% *}"
24641   tmp="$complete EOL"
24642   arguments="${tmp#* }"
24643 
24644   # Input might be given as Windows format, start by converting to
24645   # unix format.
24646   new_path=`$CYGPATH -u "$path"`
24647 
24648   # Now try to locate executable using which
24649   new_path=`$WHICH "$new_path" 2> /dev/null`
24650   # bat and cmd files are not always considered executable in cygwin causing which
24651   # to not find them
24652   if test "x$new_path" = x \
24653            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24654            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24655     new_path=`$CYGPATH -u "$path"`
24656   fi
24657   if test "x$new_path" = x; then
24658     # Oops. Which didn't find the executable.
24659     # The splitting of arguments from the executable at a space might have been incorrect,
24660     # since paths with space are more likely in Windows. Give it another try with the whole
24661     # argument.
24662     path="$complete"
24663     arguments="EOL"
24664     new_path=`$CYGPATH -u "$path"`
24665     new_path=`$WHICH "$new_path" 2> /dev/null`
24666     # bat and cmd files are not always considered executable in cygwin causing which
24667     # to not find them
24668     if test "x$new_path" = x \
24669              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24670              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24671       new_path=`$CYGPATH -u "$path"`
24672     fi
24673     if test "x$new_path" = x; then
24674       # It's still not found. Now this is an unrecoverable error.
24675       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24676 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24677       has_space=`$ECHO "$complete" | $GREP " "`
24678       if test "x$has_space" != x; then
24679         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24680 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24681       fi
24682       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24683     fi
24684   fi
24685 
24686   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24687   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24688   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24689   # "foo.exe" is OK but "foo" is an error.
24690   #
24691   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24692   # It is also a way to make sure we got the proper file name for the real test later on.
24693   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24694   if test "x$test_shortpath" = x; then
24695     # Short path failed, file does not exist as specified.
24696     # Try adding .exe or .cmd
24697     if test -f "${new_path}.exe"; then
24698        input_to_shortpath="${new_path}.exe"
24699     elif test -f "${new_path}.cmd"; then
24700        input_to_shortpath="${new_path}.cmd"
24701     else
24702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24703 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24704       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24705 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24706       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24707     fi
24708   else
24709     input_to_shortpath="$new_path"
24710   fi
24711 
24712   # Call helper function which possibly converts this using DOS-style short mode.
24713   # If so, the updated path is stored in $new_path.
24714   new_path="$input_to_shortpath"
24715 
24716   input_path="$input_to_shortpath"
24717   # Check if we need to convert this using DOS-style short mode. If the path
24718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24719   # take no chances and rewrite it.
24720   # Note: m4 eats our [], so we need to use [ and ] instead.
24721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24722   if test "x$has_forbidden_chars" != x; then
24723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24724     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24725     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24726     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24727       # Going to short mode and back again did indeed matter. Since short mode is
24728       # case insensitive, let's make it lowercase to improve readability.
24729       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24730       # Now convert it back to Unix-stile (cygpath)
24731       input_path=`$CYGPATH -u "$shortmode_path"`
24732       new_path="$input_path"
24733     fi
24734   fi
24735 
24736   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24737   if test "x$test_cygdrive_prefix" = x; then
24738     # As a simple fix, exclude /usr/bin since it's not a real path.
24739     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24740       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24741       # a path prefixed by /cygdrive for fixpath to work.
24742       new_path="$CYGWIN_ROOT_PATH$input_path"
24743     fi
24744   fi
24745 
24746   # remove trailing .exe if any
24747   new_path="${new_path/%.exe/}"
24748 
24749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24750 
24751   # First separate the path from the arguments. This will split at the first
24752   # space.
24753   complete="$CXXCPP"
24754   path="${complete%% *}"
24755   tmp="$complete EOL"
24756   arguments="${tmp#* }"
24757 
24758   # Input might be given as Windows format, start by converting to
24759   # unix format.
24760   new_path="$path"
24761 
24762   windows_path="$new_path"
24763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24764     unix_path=`$CYGPATH -u "$windows_path"`
24765     new_path="$unix_path"
24766   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24767     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24768     new_path="$unix_path"
24769   fi
24770 
24771 
24772   # Now try to locate executable using which
24773   new_path=`$WHICH "$new_path" 2> /dev/null`
24774 
24775   if test "x$new_path" = x; then
24776     # Oops. Which didn't find the executable.
24777     # The splitting of arguments from the executable at a space might have been incorrect,
24778     # since paths with space are more likely in Windows. Give it another try with the whole
24779     # argument.
24780     path="$complete"
24781     arguments="EOL"
24782     new_path="$path"
24783 
24784   windows_path="$new_path"
24785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24786     unix_path=`$CYGPATH -u "$windows_path"`
24787     new_path="$unix_path"
24788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24790     new_path="$unix_path"
24791   fi
24792 
24793 
24794     new_path=`$WHICH "$new_path" 2> /dev/null`
24795 
24796     if test "x$new_path" = x; then
24797       # It's still not found. Now this is an unrecoverable error.
24798       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24799 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24800       has_space=`$ECHO "$complete" | $GREP " "`
24801       if test "x$has_space" != x; then
24802         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24803 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24804       fi
24805       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24806     fi
24807   fi
24808 
24809   # Now new_path has a complete unix path to the binary
24810   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24811     # Keep paths in /bin as-is, but remove trailing .exe if any
24812     new_path="${new_path/%.exe/}"
24813     # Do not save /bin paths to all_fixpath_prefixes!
24814   else
24815     # Not in mixed or Windows style, start by that.
24816     new_path=`cmd //c echo $new_path`
24817 
24818   input_path="$new_path"
24819   # Check if we need to convert this using DOS-style short mode. If the path
24820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24821   # take no chances and rewrite it.
24822   # Note: m4 eats our [], so we need to use [ and ] instead.
24823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24824   if test "x$has_forbidden_chars" != x; then
24825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24826     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24827   fi
24828 
24829     # Output is in $new_path
24830 
24831   windows_path="$new_path"
24832   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24833     unix_path=`$CYGPATH -u "$windows_path"`
24834     new_path="$unix_path"
24835   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24836     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24837     new_path="$unix_path"
24838   fi
24839 
24840     # remove trailing .exe if any
24841     new_path="${new_path/%.exe/}"
24842 
24843     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24844     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24845   fi
24846 
24847   else
24848     # We're on a posix platform. Hooray! :)
24849     # First separate the path from the arguments. This will split at the first
24850     # space.
24851     complete="$CXXCPP"
24852     path="${complete%% *}"
24853     tmp="$complete EOL"
24854     arguments="${tmp#* }"
24855 
24856     # Cannot rely on the command "which" here since it doesn't always work.
24857     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24858     if test -z "$is_absolute_path"; then
24859       # Path to executable is not absolute. Find it.
24860       IFS_save="$IFS"
24861       IFS=:
24862       for p in $PATH; do
24863         if test -f "$p/$path" && test -x "$p/$path"; then
24864           new_path="$p/$path"
24865           break
24866         fi
24867       done
24868       IFS="$IFS_save"
24869     else
24870       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24871 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24872       new_path="$path"
24873     fi
24874 
24875     if test "x$new_path" = x; then
24876         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24877 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24878         has_space=`$ECHO "$complete" | $GREP " "`
24879         if test "x$has_space" != x; then
24880           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24881 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24882         fi
24883         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24884       fi
24885   fi
24886 
24887       # Now join together the path and the arguments once again
24888       if test "x$arguments" != xEOL; then
24889         new_complete="$new_path ${arguments% *}"
24890       else
24891         new_complete="$new_path"
24892       fi
24893 
24894   if test "x$complete" != "x$new_complete"; then
24895       CXXCPP="$new_complete"
24896       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24897 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24898     fi
24899 
24900 
24901 if test "x$COMPILE_TYPE" != "xcross"; then
24902     # If we are not cross compiling, use the same compilers for
24903     # building the build platform executables. The cross-compilation
24904     # case needed to be done earlier, but this can only be done after
24905     # the native tools have been localized.
24906     BUILD_CC="$CC"
24907     BUILD_CXX="$CXX"
24908     BUILD_LD="$LD"
24909 fi
24910 
24911 # for solaris we really need solaris tools, and not gnu equivalent
24912 #   these seems to normally reside in /usr/ccs/bin so add that to path before
24913 #   starting to probe
24914 #
24915 #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24916 #         so that it can be overriden --with-tools-dir
24917 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24918     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24919 fi
24920 
24921 # Find the right assembler.
24922 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24923     # Extract the first word of "as", so it can be a program name with args.
24924 set dummy as; ac_word=$2
24925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24926 $as_echo_n "checking for $ac_word... " >&6; }
24927 if ${ac_cv_path_AS+:} false; then :
24928   $as_echo_n "(cached) " >&6
24929 else
24930   case $AS in
24931   [\\/]* | ?:[\\/]*)
24932   ac_cv_path_AS="$AS" # Let the user override the test with a path.
24933   ;;
24934   *)
24935   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24936 for as_dir in $PATH
24937 do
24938   IFS=$as_save_IFS
24939   test -z "$as_dir" && as_dir=.
24940     for ac_exec_ext in '' $ac_executable_extensions; do
24941   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24942     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24943     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24944     break 2
24945   fi
24946 done
24947   done
24948 IFS=$as_save_IFS
24949 
24950   ;;
24951 esac
24952 fi
24953 AS=$ac_cv_path_AS
24954 if test -n "$AS"; then
24955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24956 $as_echo "$AS" >&6; }
24957 else
24958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24959 $as_echo "no" >&6; }
24960 fi
24961 
24962 
24963 
24964   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24965 
24966   # First separate the path from the arguments. This will split at the first
24967   # space.
24968   complete="$AS"
24969   path="${complete%% *}"
24970   tmp="$complete EOL"
24971   arguments="${tmp#* }"
24972 
24973   # Input might be given as Windows format, start by converting to
24974   # unix format.
24975   new_path=`$CYGPATH -u "$path"`
24976 
24977   # Now try to locate executable using which
24978   new_path=`$WHICH "$new_path" 2> /dev/null`
24979   # bat and cmd files are not always considered executable in cygwin causing which
24980   # to not find them
24981   if test "x$new_path" = x \
24982            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24983            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24984     new_path=`$CYGPATH -u "$path"`
24985   fi
24986   if test "x$new_path" = x; then
24987     # Oops. Which didn't find the executable.
24988     # The splitting of arguments from the executable at a space might have been incorrect,
24989     # since paths with space are more likely in Windows. Give it another try with the whole
24990     # argument.
24991     path="$complete"
24992     arguments="EOL"
24993     new_path=`$CYGPATH -u "$path"`
24994     new_path=`$WHICH "$new_path" 2> /dev/null`
24995     # bat and cmd files are not always considered executable in cygwin causing which
24996     # to not find them
24997     if test "x$new_path" = x \
24998              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24999              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25000       new_path=`$CYGPATH -u "$path"`
25001     fi
25002     if test "x$new_path" = x; then
25003       # It's still not found. Now this is an unrecoverable error.
25004       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25005 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25006       has_space=`$ECHO "$complete" | $GREP " "`
25007       if test "x$has_space" != x; then
25008         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25009 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25010       fi
25011       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25012     fi
25013   fi
25014 
25015   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25016   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25017   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25018   # "foo.exe" is OK but "foo" is an error.
25019   #
25020   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25021   # It is also a way to make sure we got the proper file name for the real test later on.
25022   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25023   if test "x$test_shortpath" = x; then
25024     # Short path failed, file does not exist as specified.
25025     # Try adding .exe or .cmd
25026     if test -f "${new_path}.exe"; then
25027        input_to_shortpath="${new_path}.exe"
25028     elif test -f "${new_path}.cmd"; then
25029        input_to_shortpath="${new_path}.cmd"
25030     else
25031       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25032 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25033       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25034 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25035       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25036     fi
25037   else
25038     input_to_shortpath="$new_path"
25039   fi
25040 
25041   # Call helper function which possibly converts this using DOS-style short mode.
25042   # If so, the updated path is stored in $new_path.
25043   new_path="$input_to_shortpath"
25044 
25045   input_path="$input_to_shortpath"
25046   # Check if we need to convert this using DOS-style short mode. If the path
25047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25048   # take no chances and rewrite it.
25049   # Note: m4 eats our [], so we need to use [ and ] instead.
25050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25051   if test "x$has_forbidden_chars" != x; then
25052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25053     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25054     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25055     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25056       # Going to short mode and back again did indeed matter. Since short mode is
25057       # case insensitive, let's make it lowercase to improve readability.
25058       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25059       # Now convert it back to Unix-stile (cygpath)
25060       input_path=`$CYGPATH -u "$shortmode_path"`
25061       new_path="$input_path"
25062     fi
25063   fi
25064 
25065   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25066   if test "x$test_cygdrive_prefix" = x; then
25067     # As a simple fix, exclude /usr/bin since it's not a real path.
25068     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25069       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25070       # a path prefixed by /cygdrive for fixpath to work.
25071       new_path="$CYGWIN_ROOT_PATH$input_path"
25072     fi
25073   fi
25074 
25075   # remove trailing .exe if any
25076   new_path="${new_path/%.exe/}"
25077 
25078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25079 
25080   # First separate the path from the arguments. This will split at the first
25081   # space.
25082   complete="$AS"
25083   path="${complete%% *}"
25084   tmp="$complete EOL"
25085   arguments="${tmp#* }"
25086 
25087   # Input might be given as Windows format, start by converting to
25088   # unix format.
25089   new_path="$path"
25090 
25091   windows_path="$new_path"
25092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25093     unix_path=`$CYGPATH -u "$windows_path"`
25094     new_path="$unix_path"
25095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25097     new_path="$unix_path"
25098   fi
25099 
25100 
25101   # Now try to locate executable using which
25102   new_path=`$WHICH "$new_path" 2> /dev/null`
25103 
25104   if test "x$new_path" = x; then
25105     # Oops. Which didn't find the executable.
25106     # The splitting of arguments from the executable at a space might have been incorrect,
25107     # since paths with space are more likely in Windows. Give it another try with the whole
25108     # argument.
25109     path="$complete"
25110     arguments="EOL"
25111     new_path="$path"
25112 
25113   windows_path="$new_path"
25114   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25115     unix_path=`$CYGPATH -u "$windows_path"`
25116     new_path="$unix_path"
25117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25118     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25119     new_path="$unix_path"
25120   fi
25121 
25122 
25123     new_path=`$WHICH "$new_path" 2> /dev/null`
25124 
25125     if test "x$new_path" = x; then
25126       # It's still not found. Now this is an unrecoverable error.
25127       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25128 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25129       has_space=`$ECHO "$complete" | $GREP " "`
25130       if test "x$has_space" != x; then
25131         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25132 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25133       fi
25134       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25135     fi
25136   fi
25137 
25138   # Now new_path has a complete unix path to the binary
25139   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25140     # Keep paths in /bin as-is, but remove trailing .exe if any
25141     new_path="${new_path/%.exe/}"
25142     # Do not save /bin paths to all_fixpath_prefixes!
25143   else
25144     # Not in mixed or Windows style, start by that.
25145     new_path=`cmd //c echo $new_path`
25146 
25147   input_path="$new_path"
25148   # Check if we need to convert this using DOS-style short mode. If the path
25149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25150   # take no chances and rewrite it.
25151   # Note: m4 eats our [], so we need to use [ and ] instead.
25152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25153   if test "x$has_forbidden_chars" != x; then
25154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25155     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25156   fi
25157 
25158     # Output is in $new_path
25159 
25160   windows_path="$new_path"
25161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25162     unix_path=`$CYGPATH -u "$windows_path"`
25163     new_path="$unix_path"
25164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25166     new_path="$unix_path"
25167   fi
25168 
25169     # remove trailing .exe if any
25170     new_path="${new_path/%.exe/}"
25171 
25172     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25173     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25174   fi
25175 
25176   else
25177     # We're on a posix platform. Hooray! :)
25178     # First separate the path from the arguments. This will split at the first
25179     # space.
25180     complete="$AS"
25181     path="${complete%% *}"
25182     tmp="$complete EOL"
25183     arguments="${tmp#* }"
25184 
25185     # Cannot rely on the command "which" here since it doesn't always work.
25186     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25187     if test -z "$is_absolute_path"; then
25188       # Path to executable is not absolute. Find it.
25189       IFS_save="$IFS"
25190       IFS=:
25191       for p in $PATH; do
25192         if test -f "$p/$path" && test -x "$p/$path"; then
25193           new_path="$p/$path"
25194           break
25195         fi
25196       done
25197       IFS="$IFS_save"
25198     else
25199       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25200 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25201       new_path="$path"
25202     fi
25203 
25204     if test "x$new_path" = x; then
25205         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25206 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25207         has_space=`$ECHO "$complete" | $GREP " "`
25208         if test "x$has_space" != x; then
25209           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25210 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25211         fi
25212         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25213       fi
25214   fi
25215 
25216       # Now join together the path and the arguments once again
25217       if test "x$arguments" != xEOL; then
25218         new_complete="$new_path ${arguments% *}"
25219       else
25220         new_complete="$new_path"
25221       fi
25222 
25223   if test "x$complete" != "x$new_complete"; then
25224       AS="$new_complete"
25225       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25226 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25227     fi
25228 
25229 else
25230     AS="$CC -c"
25231 fi
25232 
25233 
25234 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25235     # Extract the first word of "nm", so it can be a program name with args.
25236 set dummy nm; ac_word=$2
25237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25238 $as_echo_n "checking for $ac_word... " >&6; }
25239 if ${ac_cv_path_NM+:} false; then :
25240   $as_echo_n "(cached) " >&6
25241 else
25242   case $NM in
25243   [\\/]* | ?:[\\/]*)
25244   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25245   ;;
25246   *)
25247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25248 for as_dir in $PATH
25249 do
25250   IFS=$as_save_IFS
25251   test -z "$as_dir" && as_dir=.
25252     for ac_exec_ext in '' $ac_executable_extensions; do
25253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25254     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25256     break 2
25257   fi
25258 done
25259   done
25260 IFS=$as_save_IFS
25261 
25262   ;;
25263 esac
25264 fi
25265 NM=$ac_cv_path_NM
25266 if test -n "$NM"; then
25267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25268 $as_echo "$NM" >&6; }
25269 else
25270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25271 $as_echo "no" >&6; }
25272 fi
25273 
25274 
25275 
25276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25277 
25278   # First separate the path from the arguments. This will split at the first
25279   # space.
25280   complete="$NM"
25281   path="${complete%% *}"
25282   tmp="$complete EOL"
25283   arguments="${tmp#* }"
25284 
25285   # Input might be given as Windows format, start by converting to
25286   # unix format.
25287   new_path=`$CYGPATH -u "$path"`
25288 
25289   # Now try to locate executable using which
25290   new_path=`$WHICH "$new_path" 2> /dev/null`
25291   # bat and cmd files are not always considered executable in cygwin causing which
25292   # to not find them
25293   if test "x$new_path" = x \
25294            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25295            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25296     new_path=`$CYGPATH -u "$path"`
25297   fi
25298   if test "x$new_path" = x; then
25299     # Oops. Which didn't find the executable.
25300     # The splitting of arguments from the executable at a space might have been incorrect,
25301     # since paths with space are more likely in Windows. Give it another try with the whole
25302     # argument.
25303     path="$complete"
25304     arguments="EOL"
25305     new_path=`$CYGPATH -u "$path"`
25306     new_path=`$WHICH "$new_path" 2> /dev/null`
25307     # bat and cmd files are not always considered executable in cygwin causing which
25308     # to not find them
25309     if test "x$new_path" = x \
25310              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25311              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25312       new_path=`$CYGPATH -u "$path"`
25313     fi
25314     if test "x$new_path" = x; then
25315       # It's still not found. Now this is an unrecoverable error.
25316       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25317 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25318       has_space=`$ECHO "$complete" | $GREP " "`
25319       if test "x$has_space" != x; then
25320         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25321 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25322       fi
25323       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25324     fi
25325   fi
25326 
25327   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25328   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25329   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25330   # "foo.exe" is OK but "foo" is an error.
25331   #
25332   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25333   # It is also a way to make sure we got the proper file name for the real test later on.
25334   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25335   if test "x$test_shortpath" = x; then
25336     # Short path failed, file does not exist as specified.
25337     # Try adding .exe or .cmd
25338     if test -f "${new_path}.exe"; then
25339        input_to_shortpath="${new_path}.exe"
25340     elif test -f "${new_path}.cmd"; then
25341        input_to_shortpath="${new_path}.cmd"
25342     else
25343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25344 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25345       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25346 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25347       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25348     fi
25349   else
25350     input_to_shortpath="$new_path"
25351   fi
25352 
25353   # Call helper function which possibly converts this using DOS-style short mode.
25354   # If so, the updated path is stored in $new_path.
25355   new_path="$input_to_shortpath"
25356 
25357   input_path="$input_to_shortpath"
25358   # Check if we need to convert this using DOS-style short mode. If the path
25359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25360   # take no chances and rewrite it.
25361   # Note: m4 eats our [], so we need to use [ and ] instead.
25362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25363   if test "x$has_forbidden_chars" != x; then
25364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25365     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25366     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25367     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25368       # Going to short mode and back again did indeed matter. Since short mode is
25369       # case insensitive, let's make it lowercase to improve readability.
25370       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25371       # Now convert it back to Unix-stile (cygpath)
25372       input_path=`$CYGPATH -u "$shortmode_path"`
25373       new_path="$input_path"
25374     fi
25375   fi
25376 
25377   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25378   if test "x$test_cygdrive_prefix" = x; then
25379     # As a simple fix, exclude /usr/bin since it's not a real path.
25380     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25381       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25382       # a path prefixed by /cygdrive for fixpath to work.
25383       new_path="$CYGWIN_ROOT_PATH$input_path"
25384     fi
25385   fi
25386 
25387   # remove trailing .exe if any
25388   new_path="${new_path/%.exe/}"
25389 
25390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25391 
25392   # First separate the path from the arguments. This will split at the first
25393   # space.
25394   complete="$NM"
25395   path="${complete%% *}"
25396   tmp="$complete EOL"
25397   arguments="${tmp#* }"
25398 
25399   # Input might be given as Windows format, start by converting to
25400   # unix format.
25401   new_path="$path"
25402 
25403   windows_path="$new_path"
25404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25405     unix_path=`$CYGPATH -u "$windows_path"`
25406     new_path="$unix_path"
25407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25409     new_path="$unix_path"
25410   fi
25411 
25412 
25413   # Now try to locate executable using which
25414   new_path=`$WHICH "$new_path" 2> /dev/null`
25415 
25416   if test "x$new_path" = x; then
25417     # Oops. Which didn't find the executable.
25418     # The splitting of arguments from the executable at a space might have been incorrect,
25419     # since paths with space are more likely in Windows. Give it another try with the whole
25420     # argument.
25421     path="$complete"
25422     arguments="EOL"
25423     new_path="$path"
25424 
25425   windows_path="$new_path"
25426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25427     unix_path=`$CYGPATH -u "$windows_path"`
25428     new_path="$unix_path"
25429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25431     new_path="$unix_path"
25432   fi
25433 
25434 
25435     new_path=`$WHICH "$new_path" 2> /dev/null`
25436 
25437     if test "x$new_path" = x; then
25438       # It's still not found. Now this is an unrecoverable error.
25439       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25440 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25441       has_space=`$ECHO "$complete" | $GREP " "`
25442       if test "x$has_space" != x; then
25443         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25444 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25445       fi
25446       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25447     fi
25448   fi
25449 
25450   # Now new_path has a complete unix path to the binary
25451   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25452     # Keep paths in /bin as-is, but remove trailing .exe if any
25453     new_path="${new_path/%.exe/}"
25454     # Do not save /bin paths to all_fixpath_prefixes!
25455   else
25456     # Not in mixed or Windows style, start by that.
25457     new_path=`cmd //c echo $new_path`
25458 
25459   input_path="$new_path"
25460   # Check if we need to convert this using DOS-style short mode. If the path
25461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25462   # take no chances and rewrite it.
25463   # Note: m4 eats our [], so we need to use [ and ] instead.
25464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25465   if test "x$has_forbidden_chars" != x; then
25466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25467     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25468   fi
25469 
25470     # Output is in $new_path
25471 
25472   windows_path="$new_path"
25473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25474     unix_path=`$CYGPATH -u "$windows_path"`
25475     new_path="$unix_path"
25476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25478     new_path="$unix_path"
25479   fi
25480 
25481     # remove trailing .exe if any
25482     new_path="${new_path/%.exe/}"
25483 
25484     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25485     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25486   fi
25487 
25488   else
25489     # We're on a posix platform. Hooray! :)
25490     # First separate the path from the arguments. This will split at the first
25491     # space.
25492     complete="$NM"
25493     path="${complete%% *}"
25494     tmp="$complete EOL"
25495     arguments="${tmp#* }"
25496 
25497     # Cannot rely on the command "which" here since it doesn't always work.
25498     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25499     if test -z "$is_absolute_path"; then
25500       # Path to executable is not absolute. Find it.
25501       IFS_save="$IFS"
25502       IFS=:
25503       for p in $PATH; do
25504         if test -f "$p/$path" && test -x "$p/$path"; then
25505           new_path="$p/$path"
25506           break
25507         fi
25508       done
25509       IFS="$IFS_save"
25510     else
25511       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25512 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25513       new_path="$path"
25514     fi
25515 
25516     if test "x$new_path" = x; then
25517         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25518 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25519         has_space=`$ECHO "$complete" | $GREP " "`
25520         if test "x$has_space" != x; then
25521           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25522 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25523         fi
25524         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25525       fi
25526   fi
25527 
25528       # Now join together the path and the arguments once again
25529       if test "x$arguments" != xEOL; then
25530         new_complete="$new_path ${arguments% *}"
25531       else
25532         new_complete="$new_path"
25533       fi
25534 
25535   if test "x$complete" != "x$new_complete"; then
25536       NM="$new_complete"
25537       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25538 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25539     fi
25540 
25541     # Extract the first word of "gnm", so it can be a program name with args.
25542 set dummy gnm; ac_word=$2
25543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25544 $as_echo_n "checking for $ac_word... " >&6; }
25545 if ${ac_cv_path_GNM+:} false; then :
25546   $as_echo_n "(cached) " >&6
25547 else
25548   case $GNM in
25549   [\\/]* | ?:[\\/]*)
25550   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25551   ;;
25552   *)
25553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25554 for as_dir in $PATH
25555 do
25556   IFS=$as_save_IFS
25557   test -z "$as_dir" && as_dir=.
25558     for ac_exec_ext in '' $ac_executable_extensions; do
25559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25560     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25562     break 2
25563   fi
25564 done
25565   done
25566 IFS=$as_save_IFS
25567 
25568   ;;
25569 esac
25570 fi
25571 GNM=$ac_cv_path_GNM
25572 if test -n "$GNM"; then
25573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25574 $as_echo "$GNM" >&6; }
25575 else
25576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25577 $as_echo "no" >&6; }
25578 fi
25579 
25580 
25581 
25582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25583 
25584   # First separate the path from the arguments. This will split at the first
25585   # space.
25586   complete="$GNM"
25587   path="${complete%% *}"
25588   tmp="$complete EOL"
25589   arguments="${tmp#* }"
25590 
25591   # Input might be given as Windows format, start by converting to
25592   # unix format.
25593   new_path=`$CYGPATH -u "$path"`
25594 
25595   # Now try to locate executable using which
25596   new_path=`$WHICH "$new_path" 2> /dev/null`
25597   # bat and cmd files are not always considered executable in cygwin causing which
25598   # to not find them
25599   if test "x$new_path" = x \
25600            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25601            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25602     new_path=`$CYGPATH -u "$path"`
25603   fi
25604   if test "x$new_path" = x; then
25605     # Oops. Which didn't find the executable.
25606     # The splitting of arguments from the executable at a space might have been incorrect,
25607     # since paths with space are more likely in Windows. Give it another try with the whole
25608     # argument.
25609     path="$complete"
25610     arguments="EOL"
25611     new_path=`$CYGPATH -u "$path"`
25612     new_path=`$WHICH "$new_path" 2> /dev/null`
25613     # bat and cmd files are not always considered executable in cygwin causing which
25614     # to not find them
25615     if test "x$new_path" = x \
25616              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25617              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25618       new_path=`$CYGPATH -u "$path"`
25619     fi
25620     if test "x$new_path" = x; then
25621       # It's still not found. Now this is an unrecoverable error.
25622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25623 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25624       has_space=`$ECHO "$complete" | $GREP " "`
25625       if test "x$has_space" != x; then
25626         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25627 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25628       fi
25629       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25630     fi
25631   fi
25632 
25633   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25634   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25635   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25636   # "foo.exe" is OK but "foo" is an error.
25637   #
25638   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25639   # It is also a way to make sure we got the proper file name for the real test later on.
25640   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25641   if test "x$test_shortpath" = x; then
25642     # Short path failed, file does not exist as specified.
25643     # Try adding .exe or .cmd
25644     if test -f "${new_path}.exe"; then
25645        input_to_shortpath="${new_path}.exe"
25646     elif test -f "${new_path}.cmd"; then
25647        input_to_shortpath="${new_path}.cmd"
25648     else
25649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25650 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25651       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25652 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25653       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25654     fi
25655   else
25656     input_to_shortpath="$new_path"
25657   fi
25658 
25659   # Call helper function which possibly converts this using DOS-style short mode.
25660   # If so, the updated path is stored in $new_path.
25661   new_path="$input_to_shortpath"
25662 
25663   input_path="$input_to_shortpath"
25664   # Check if we need to convert this using DOS-style short mode. If the path
25665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25666   # take no chances and rewrite it.
25667   # Note: m4 eats our [], so we need to use [ and ] instead.
25668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25669   if test "x$has_forbidden_chars" != x; then
25670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25671     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25672     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25673     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25674       # Going to short mode and back again did indeed matter. Since short mode is
25675       # case insensitive, let's make it lowercase to improve readability.
25676       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25677       # Now convert it back to Unix-stile (cygpath)
25678       input_path=`$CYGPATH -u "$shortmode_path"`
25679       new_path="$input_path"
25680     fi
25681   fi
25682 
25683   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25684   if test "x$test_cygdrive_prefix" = x; then
25685     # As a simple fix, exclude /usr/bin since it's not a real path.
25686     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25687       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25688       # a path prefixed by /cygdrive for fixpath to work.
25689       new_path="$CYGWIN_ROOT_PATH$input_path"
25690     fi
25691   fi
25692 
25693   # remove trailing .exe if any
25694   new_path="${new_path/%.exe/}"
25695 
25696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25697 
25698   # First separate the path from the arguments. This will split at the first
25699   # space.
25700   complete="$GNM"
25701   path="${complete%% *}"
25702   tmp="$complete EOL"
25703   arguments="${tmp#* }"
25704 
25705   # Input might be given as Windows format, start by converting to
25706   # unix format.
25707   new_path="$path"
25708 
25709   windows_path="$new_path"
25710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25711     unix_path=`$CYGPATH -u "$windows_path"`
25712     new_path="$unix_path"
25713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25715     new_path="$unix_path"
25716   fi
25717 
25718 
25719   # Now try to locate executable using which
25720   new_path=`$WHICH "$new_path" 2> /dev/null`
25721 
25722   if test "x$new_path" = x; then
25723     # Oops. Which didn't find the executable.
25724     # The splitting of arguments from the executable at a space might have been incorrect,
25725     # since paths with space are more likely in Windows. Give it another try with the whole
25726     # argument.
25727     path="$complete"
25728     arguments="EOL"
25729     new_path="$path"
25730 
25731   windows_path="$new_path"
25732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733     unix_path=`$CYGPATH -u "$windows_path"`
25734     new_path="$unix_path"
25735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737     new_path="$unix_path"
25738   fi
25739 
25740 
25741     new_path=`$WHICH "$new_path" 2> /dev/null`
25742 
25743     if test "x$new_path" = x; then
25744       # It's still not found. Now this is an unrecoverable error.
25745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25746 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25747       has_space=`$ECHO "$complete" | $GREP " "`
25748       if test "x$has_space" != x; then
25749         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25751       fi
25752       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25753     fi
25754   fi
25755 
25756   # Now new_path has a complete unix path to the binary
25757   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25758     # Keep paths in /bin as-is, but remove trailing .exe if any
25759     new_path="${new_path/%.exe/}"
25760     # Do not save /bin paths to all_fixpath_prefixes!
25761   else
25762     # Not in mixed or Windows style, start by that.
25763     new_path=`cmd //c echo $new_path`
25764 
25765   input_path="$new_path"
25766   # Check if we need to convert this using DOS-style short mode. If the path
25767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25768   # take no chances and rewrite it.
25769   # Note: m4 eats our [], so we need to use [ and ] instead.
25770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25771   if test "x$has_forbidden_chars" != x; then
25772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25774   fi
25775 
25776     # Output is in $new_path
25777 
25778   windows_path="$new_path"
25779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25780     unix_path=`$CYGPATH -u "$windows_path"`
25781     new_path="$unix_path"
25782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25783     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25784     new_path="$unix_path"
25785   fi
25786 
25787     # remove trailing .exe if any
25788     new_path="${new_path/%.exe/}"
25789 
25790     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25791     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25792   fi
25793 
25794   else
25795     # We're on a posix platform. Hooray! :)
25796     # First separate the path from the arguments. This will split at the first
25797     # space.
25798     complete="$GNM"
25799     path="${complete%% *}"
25800     tmp="$complete EOL"
25801     arguments="${tmp#* }"
25802 
25803     # Cannot rely on the command "which" here since it doesn't always work.
25804     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25805     if test -z "$is_absolute_path"; then
25806       # Path to executable is not absolute. Find it.
25807       IFS_save="$IFS"
25808       IFS=:
25809       for p in $PATH; do
25810         if test -f "$p/$path" && test -x "$p/$path"; then
25811           new_path="$p/$path"
25812           break
25813         fi
25814       done
25815       IFS="$IFS_save"
25816     else
25817       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
25818 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
25819       new_path="$path"
25820     fi
25821 
25822     if test "x$new_path" = x; then
25823         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25824 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25825         has_space=`$ECHO "$complete" | $GREP " "`
25826         if test "x$has_space" != x; then
25827           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25828 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25829         fi
25830         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25831       fi
25832   fi
25833 
25834       # Now join together the path and the arguments once again
25835       if test "x$arguments" != xEOL; then
25836         new_complete="$new_path ${arguments% *}"
25837       else
25838         new_complete="$new_path"
25839       fi
25840 
25841   if test "x$complete" != "x$new_complete"; then
25842       GNM="$new_complete"
25843       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
25844 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
25845     fi
25846 
25847     # Extract the first word of "strip", so it can be a program name with args.
25848 set dummy strip; ac_word=$2
25849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25850 $as_echo_n "checking for $ac_word... " >&6; }
25851 if ${ac_cv_path_STRIP+:} false; then :
25852   $as_echo_n "(cached) " >&6
25853 else
25854   case $STRIP in
25855   [\\/]* | ?:[\\/]*)
25856   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
25857   ;;
25858   *)
25859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25860 for as_dir in $PATH
25861 do
25862   IFS=$as_save_IFS
25863   test -z "$as_dir" && as_dir=.
25864     for ac_exec_ext in '' $ac_executable_extensions; do
25865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25866     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
25867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25868     break 2
25869   fi
25870 done
25871   done
25872 IFS=$as_save_IFS
25873 
25874   ;;
25875 esac
25876 fi
25877 STRIP=$ac_cv_path_STRIP
25878 if test -n "$STRIP"; then
25879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25880 $as_echo "$STRIP" >&6; }
25881 else
25882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25883 $as_echo "no" >&6; }
25884 fi
25885 
25886 
25887 
25888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25889 
25890   # First separate the path from the arguments. This will split at the first
25891   # space.
25892   complete="$STRIP"
25893   path="${complete%% *}"
25894   tmp="$complete EOL"
25895   arguments="${tmp#* }"
25896 
25897   # Input might be given as Windows format, start by converting to
25898   # unix format.
25899   new_path=`$CYGPATH -u "$path"`
25900 
25901   # Now try to locate executable using which
25902   new_path=`$WHICH "$new_path" 2> /dev/null`
25903   # bat and cmd files are not always considered executable in cygwin causing which
25904   # to not find them
25905   if test "x$new_path" = x \
25906            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25907            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25908     new_path=`$CYGPATH -u "$path"`
25909   fi
25910   if test "x$new_path" = x; then
25911     # Oops. Which didn't find the executable.
25912     # The splitting of arguments from the executable at a space might have been incorrect,
25913     # since paths with space are more likely in Windows. Give it another try with the whole
25914     # argument.
25915     path="$complete"
25916     arguments="EOL"
25917     new_path=`$CYGPATH -u "$path"`
25918     new_path=`$WHICH "$new_path" 2> /dev/null`
25919     # bat and cmd files are not always considered executable in cygwin causing which
25920     # to not find them
25921     if test "x$new_path" = x \
25922              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25923              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25924       new_path=`$CYGPATH -u "$path"`
25925     fi
25926     if test "x$new_path" = x; then
25927       # It's still not found. Now this is an unrecoverable error.
25928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25929 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25930       has_space=`$ECHO "$complete" | $GREP " "`
25931       if test "x$has_space" != x; then
25932         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25933 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25934       fi
25935       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25936     fi
25937   fi
25938 
25939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25942   # "foo.exe" is OK but "foo" is an error.
25943   #
25944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25945   # It is also a way to make sure we got the proper file name for the real test later on.
25946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25947   if test "x$test_shortpath" = x; then
25948     # Short path failed, file does not exist as specified.
25949     # Try adding .exe or .cmd
25950     if test -f "${new_path}.exe"; then
25951        input_to_shortpath="${new_path}.exe"
25952     elif test -f "${new_path}.cmd"; then
25953        input_to_shortpath="${new_path}.cmd"
25954     else
25955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25956 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25957       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25958 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25959       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25960     fi
25961   else
25962     input_to_shortpath="$new_path"
25963   fi
25964 
25965   # Call helper function which possibly converts this using DOS-style short mode.
25966   # If so, the updated path is stored in $new_path.
25967   new_path="$input_to_shortpath"
25968 
25969   input_path="$input_to_shortpath"
25970   # Check if we need to convert this using DOS-style short mode. If the path
25971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25972   # take no chances and rewrite it.
25973   # Note: m4 eats our [], so we need to use [ and ] instead.
25974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25975   if test "x$has_forbidden_chars" != x; then
25976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25980       # Going to short mode and back again did indeed matter. Since short mode is
25981       # case insensitive, let's make it lowercase to improve readability.
25982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25983       # Now convert it back to Unix-stile (cygpath)
25984       input_path=`$CYGPATH -u "$shortmode_path"`
25985       new_path="$input_path"
25986     fi
25987   fi
25988 
25989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25990   if test "x$test_cygdrive_prefix" = x; then
25991     # As a simple fix, exclude /usr/bin since it's not a real path.
25992     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25994       # a path prefixed by /cygdrive for fixpath to work.
25995       new_path="$CYGWIN_ROOT_PATH$input_path"
25996     fi
25997   fi
25998 
25999   # remove trailing .exe if any
26000   new_path="${new_path/%.exe/}"
26001 
26002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26003 
26004   # First separate the path from the arguments. This will split at the first
26005   # space.
26006   complete="$STRIP"
26007   path="${complete%% *}"
26008   tmp="$complete EOL"
26009   arguments="${tmp#* }"
26010 
26011   # Input might be given as Windows format, start by converting to
26012   # unix format.
26013   new_path="$path"
26014 
26015   windows_path="$new_path"
26016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26017     unix_path=`$CYGPATH -u "$windows_path"`
26018     new_path="$unix_path"
26019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26021     new_path="$unix_path"
26022   fi
26023 
26024 
26025   # Now try to locate executable using which
26026   new_path=`$WHICH "$new_path" 2> /dev/null`
26027 
26028   if test "x$new_path" = x; then
26029     # Oops. Which didn't find the executable.
26030     # The splitting of arguments from the executable at a space might have been incorrect,
26031     # since paths with space are more likely in Windows. Give it another try with the whole
26032     # argument.
26033     path="$complete"
26034     arguments="EOL"
26035     new_path="$path"
26036 
26037   windows_path="$new_path"
26038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26039     unix_path=`$CYGPATH -u "$windows_path"`
26040     new_path="$unix_path"
26041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26043     new_path="$unix_path"
26044   fi
26045 
26046 
26047     new_path=`$WHICH "$new_path" 2> /dev/null`
26048 
26049     if test "x$new_path" = x; then
26050       # It's still not found. Now this is an unrecoverable error.
26051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26052 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26053       has_space=`$ECHO "$complete" | $GREP " "`
26054       if test "x$has_space" != x; then
26055         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26056 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26057       fi
26058       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26059     fi
26060   fi
26061 
26062   # Now new_path has a complete unix path to the binary
26063   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26064     # Keep paths in /bin as-is, but remove trailing .exe if any
26065     new_path="${new_path/%.exe/}"
26066     # Do not save /bin paths to all_fixpath_prefixes!
26067   else
26068     # Not in mixed or Windows style, start by that.
26069     new_path=`cmd //c echo $new_path`
26070 
26071   input_path="$new_path"
26072   # Check if we need to convert this using DOS-style short mode. If the path
26073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26074   # take no chances and rewrite it.
26075   # Note: m4 eats our [], so we need to use [ and ] instead.
26076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26077   if test "x$has_forbidden_chars" != x; then
26078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26079     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26080   fi
26081 
26082     # Output is in $new_path
26083 
26084   windows_path="$new_path"
26085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26086     unix_path=`$CYGPATH -u "$windows_path"`
26087     new_path="$unix_path"
26088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26090     new_path="$unix_path"
26091   fi
26092 
26093     # remove trailing .exe if any
26094     new_path="${new_path/%.exe/}"
26095 
26096     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26097     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26098   fi
26099 
26100   else
26101     # We're on a posix platform. Hooray! :)
26102     # First separate the path from the arguments. This will split at the first
26103     # space.
26104     complete="$STRIP"
26105     path="${complete%% *}"
26106     tmp="$complete EOL"
26107     arguments="${tmp#* }"
26108 
26109     # Cannot rely on the command "which" here since it doesn't always work.
26110     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26111     if test -z "$is_absolute_path"; then
26112       # Path to executable is not absolute. Find it.
26113       IFS_save="$IFS"
26114       IFS=:
26115       for p in $PATH; do
26116         if test -f "$p/$path" && test -x "$p/$path"; then
26117           new_path="$p/$path"
26118           break
26119         fi
26120       done
26121       IFS="$IFS_save"
26122     else
26123       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26124 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26125       new_path="$path"
26126     fi
26127 
26128     if test "x$new_path" = x; then
26129         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26130 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26131         has_space=`$ECHO "$complete" | $GREP " "`
26132         if test "x$has_space" != x; then
26133           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26134 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26135         fi
26136         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26137       fi
26138   fi
26139 
26140       # Now join together the path and the arguments once again
26141       if test "x$arguments" != xEOL; then
26142         new_complete="$new_path ${arguments% *}"
26143       else
26144         new_complete="$new_path"
26145       fi
26146 
26147   if test "x$complete" != "x$new_complete"; then
26148       STRIP="$new_complete"
26149       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26150 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26151     fi
26152 
26153     # Extract the first word of "mcs", so it can be a program name with args.
26154 set dummy mcs; ac_word=$2
26155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26156 $as_echo_n "checking for $ac_word... " >&6; }
26157 if ${ac_cv_path_MCS+:} false; then :
26158   $as_echo_n "(cached) " >&6
26159 else
26160   case $MCS in
26161   [\\/]* | ?:[\\/]*)
26162   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26163   ;;
26164   *)
26165   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26166 for as_dir in $PATH
26167 do
26168   IFS=$as_save_IFS
26169   test -z "$as_dir" && as_dir=.
26170     for ac_exec_ext in '' $ac_executable_extensions; do
26171   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26172     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26173     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26174     break 2
26175   fi
26176 done
26177   done
26178 IFS=$as_save_IFS
26179 
26180   ;;
26181 esac
26182 fi
26183 MCS=$ac_cv_path_MCS
26184 if test -n "$MCS"; then
26185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26186 $as_echo "$MCS" >&6; }
26187 else
26188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26189 $as_echo "no" >&6; }
26190 fi
26191 
26192 
26193 
26194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26195 
26196   # First separate the path from the arguments. This will split at the first
26197   # space.
26198   complete="$MCS"
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=`$CYGPATH -u "$path"`
26206 
26207   # Now try to locate executable using which
26208   new_path=`$WHICH "$new_path" 2> /dev/null`
26209   # bat and cmd files are not always considered executable in cygwin causing which
26210   # to not find them
26211   if test "x$new_path" = x \
26212            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26213            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26214     new_path=`$CYGPATH -u "$path"`
26215   fi
26216   if test "x$new_path" = x; then
26217     # Oops. Which didn't find the executable.
26218     # The splitting of arguments from the executable at a space might have been incorrect,
26219     # since paths with space are more likely in Windows. Give it another try with the whole
26220     # argument.
26221     path="$complete"
26222     arguments="EOL"
26223     new_path=`$CYGPATH -u "$path"`
26224     new_path=`$WHICH "$new_path" 2> /dev/null`
26225     # bat and cmd files are not always considered executable in cygwin causing which
26226     # to not find them
26227     if test "x$new_path" = x \
26228              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26229              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26230       new_path=`$CYGPATH -u "$path"`
26231     fi
26232     if test "x$new_path" = x; then
26233       # It's still not found. Now this is an unrecoverable error.
26234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26235 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26236       has_space=`$ECHO "$complete" | $GREP " "`
26237       if test "x$has_space" != x; then
26238         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26239 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26240       fi
26241       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26242     fi
26243   fi
26244 
26245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26248   # "foo.exe" is OK but "foo" is an error.
26249   #
26250   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26251   # It is also a way to make sure we got the proper file name for the real test later on.
26252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26253   if test "x$test_shortpath" = x; then
26254     # Short path failed, file does not exist as specified.
26255     # Try adding .exe or .cmd
26256     if test -f "${new_path}.exe"; then
26257        input_to_shortpath="${new_path}.exe"
26258     elif test -f "${new_path}.cmd"; then
26259        input_to_shortpath="${new_path}.cmd"
26260     else
26261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26262 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26263       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26264 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26265       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26266     fi
26267   else
26268     input_to_shortpath="$new_path"
26269   fi
26270 
26271   # Call helper function which possibly converts this using DOS-style short mode.
26272   # If so, the updated path is stored in $new_path.
26273   new_path="$input_to_shortpath"
26274 
26275   input_path="$input_to_shortpath"
26276   # Check if we need to convert this using DOS-style short mode. If the path
26277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26278   # take no chances and rewrite it.
26279   # Note: m4 eats our [], so we need to use [ and ] instead.
26280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26281   if test "x$has_forbidden_chars" != x; then
26282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26286       # Going to short mode and back again did indeed matter. Since short mode is
26287       # case insensitive, let's make it lowercase to improve readability.
26288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26289       # Now convert it back to Unix-stile (cygpath)
26290       input_path=`$CYGPATH -u "$shortmode_path"`
26291       new_path="$input_path"
26292     fi
26293   fi
26294 
26295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26296   if test "x$test_cygdrive_prefix" = x; then
26297     # As a simple fix, exclude /usr/bin since it's not a real path.
26298     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26300       # a path prefixed by /cygdrive for fixpath to work.
26301       new_path="$CYGWIN_ROOT_PATH$input_path"
26302     fi
26303   fi
26304 
26305   # remove trailing .exe if any
26306   new_path="${new_path/%.exe/}"
26307 
26308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26309 
26310   # First separate the path from the arguments. This will split at the first
26311   # space.
26312   complete="$MCS"
26313   path="${complete%% *}"
26314   tmp="$complete EOL"
26315   arguments="${tmp#* }"
26316 
26317   # Input might be given as Windows format, start by converting to
26318   # unix format.
26319   new_path="$path"
26320 
26321   windows_path="$new_path"
26322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26323     unix_path=`$CYGPATH -u "$windows_path"`
26324     new_path="$unix_path"
26325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26327     new_path="$unix_path"
26328   fi
26329 
26330 
26331   # Now try to locate executable using which
26332   new_path=`$WHICH "$new_path" 2> /dev/null`
26333 
26334   if test "x$new_path" = x; then
26335     # Oops. Which didn't find the executable.
26336     # The splitting of arguments from the executable at a space might have been incorrect,
26337     # since paths with space are more likely in Windows. Give it another try with the whole
26338     # argument.
26339     path="$complete"
26340     arguments="EOL"
26341     new_path="$path"
26342 
26343   windows_path="$new_path"
26344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26345     unix_path=`$CYGPATH -u "$windows_path"`
26346     new_path="$unix_path"
26347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26349     new_path="$unix_path"
26350   fi
26351 
26352 
26353     new_path=`$WHICH "$new_path" 2> /dev/null`
26354 
26355     if test "x$new_path" = x; then
26356       # It's still not found. Now this is an unrecoverable error.
26357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26358 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26359       has_space=`$ECHO "$complete" | $GREP " "`
26360       if test "x$has_space" != x; then
26361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26363       fi
26364       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26365     fi
26366   fi
26367 
26368   # Now new_path has a complete unix path to the binary
26369   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26370     # Keep paths in /bin as-is, but remove trailing .exe if any
26371     new_path="${new_path/%.exe/}"
26372     # Do not save /bin paths to all_fixpath_prefixes!
26373   else
26374     # Not in mixed or Windows style, start by that.
26375     new_path=`cmd //c echo $new_path`
26376 
26377   input_path="$new_path"
26378   # Check if we need to convert this using DOS-style short mode. If the path
26379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26380   # take no chances and rewrite it.
26381   # Note: m4 eats our [], so we need to use [ and ] instead.
26382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26383   if test "x$has_forbidden_chars" != x; then
26384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26386   fi
26387 
26388     # Output is in $new_path
26389 
26390   windows_path="$new_path"
26391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26392     unix_path=`$CYGPATH -u "$windows_path"`
26393     new_path="$unix_path"
26394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26396     new_path="$unix_path"
26397   fi
26398 
26399     # remove trailing .exe if any
26400     new_path="${new_path/%.exe/}"
26401 
26402     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26403     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26404   fi
26405 
26406   else
26407     # We're on a posix platform. Hooray! :)
26408     # First separate the path from the arguments. This will split at the first
26409     # space.
26410     complete="$MCS"
26411     path="${complete%% *}"
26412     tmp="$complete EOL"
26413     arguments="${tmp#* }"
26414 
26415     # Cannot rely on the command "which" here since it doesn't always work.
26416     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26417     if test -z "$is_absolute_path"; then
26418       # Path to executable is not absolute. Find it.
26419       IFS_save="$IFS"
26420       IFS=:
26421       for p in $PATH; do
26422         if test -f "$p/$path" && test -x "$p/$path"; then
26423           new_path="$p/$path"
26424           break
26425         fi
26426       done
26427       IFS="$IFS_save"
26428     else
26429       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26430 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26431       new_path="$path"
26432     fi
26433 
26434     if test "x$new_path" = x; then
26435         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26436 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26437         has_space=`$ECHO "$complete" | $GREP " "`
26438         if test "x$has_space" != x; then
26439           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26440 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26441         fi
26442         as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26443       fi
26444   fi
26445 
26446       # Now join together the path and the arguments once again
26447       if test "x$arguments" != xEOL; then
26448         new_complete="$new_path ${arguments% *}"
26449       else
26450         new_complete="$new_path"
26451       fi
26452 
26453   if test "x$complete" != "x$new_complete"; then
26454       MCS="$new_complete"
26455       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26456 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26457     fi
26458 
26459 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26460     if test -n "$ac_tool_prefix"; then
26461   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26462 set dummy ${ac_tool_prefix}nm; ac_word=$2
26463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26464 $as_echo_n "checking for $ac_word... " >&6; }
26465 if ${ac_cv_prog_NM+:} false; then :
26466   $as_echo_n "(cached) " >&6
26467 else
26468   if test -n "$NM"; then
26469   ac_cv_prog_NM="$NM" # Let the user override the test.
26470 else
26471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26472 for as_dir in $PATH
26473 do
26474   IFS=$as_save_IFS
26475   test -z "$as_dir" && as_dir=.
26476     for ac_exec_ext in '' $ac_executable_extensions; do
26477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26478     ac_cv_prog_NM="${ac_tool_prefix}nm"
26479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26480     break 2
26481   fi
26482 done
26483   done
26484 IFS=$as_save_IFS
26485 
26486 fi
26487 fi
26488 NM=$ac_cv_prog_NM
26489 if test -n "$NM"; then
26490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26491 $as_echo "$NM" >&6; }
26492 else
26493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26494 $as_echo "no" >&6; }
26495 fi
26496 
26497 
26498 fi
26499 if test -z "$ac_cv_prog_NM"; then
26500   ac_ct_NM=$NM
26501   # Extract the first word of "nm", so it can be a program name with args.
26502 set dummy nm; ac_word=$2
26503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26504 $as_echo_n "checking for $ac_word... " >&6; }
26505 if ${ac_cv_prog_ac_ct_NM+:} false; then :
26506   $as_echo_n "(cached) " >&6
26507 else
26508   if test -n "$ac_ct_NM"; then
26509   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26510 else
26511 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26512 for as_dir in $PATH
26513 do
26514   IFS=$as_save_IFS
26515   test -z "$as_dir" && as_dir=.
26516     for ac_exec_ext in '' $ac_executable_extensions; do
26517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26518     ac_cv_prog_ac_ct_NM="nm"
26519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26520     break 2
26521   fi
26522 done
26523   done
26524 IFS=$as_save_IFS
26525 
26526 fi
26527 fi
26528 ac_ct_NM=$ac_cv_prog_ac_ct_NM
26529 if test -n "$ac_ct_NM"; then
26530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26531 $as_echo "$ac_ct_NM" >&6; }
26532 else
26533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26534 $as_echo "no" >&6; }
26535 fi
26536 
26537   if test "x$ac_ct_NM" = x; then
26538     NM=""
26539   else
26540     case $cross_compiling:$ac_tool_warned in
26541 yes:)
26542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26543 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26544 ac_tool_warned=yes ;;
26545 esac
26546     NM=$ac_ct_NM
26547   fi
26548 else
26549   NM="$ac_cv_prog_NM"
26550 fi
26551 
26552 
26553   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26554 
26555   # First separate the path from the arguments. This will split at the first
26556   # space.
26557   complete="$NM"
26558   path="${complete%% *}"
26559   tmp="$complete EOL"
26560   arguments="${tmp#* }"
26561 
26562   # Input might be given as Windows format, start by converting to
26563   # unix format.
26564   new_path=`$CYGPATH -u "$path"`
26565 
26566   # Now try to locate executable using which
26567   new_path=`$WHICH "$new_path" 2> /dev/null`
26568   # bat and cmd files are not always considered executable in cygwin causing which
26569   # to not find them
26570   if test "x$new_path" = x \
26571            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26572            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26573     new_path=`$CYGPATH -u "$path"`
26574   fi
26575   if test "x$new_path" = x; then
26576     # Oops. Which didn't find the executable.
26577     # The splitting of arguments from the executable at a space might have been incorrect,
26578     # since paths with space are more likely in Windows. Give it another try with the whole
26579     # argument.
26580     path="$complete"
26581     arguments="EOL"
26582     new_path=`$CYGPATH -u "$path"`
26583     new_path=`$WHICH "$new_path" 2> /dev/null`
26584     # bat and cmd files are not always considered executable in cygwin causing which
26585     # to not find them
26586     if test "x$new_path" = x \
26587              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26588              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26589       new_path=`$CYGPATH -u "$path"`
26590     fi
26591     if test "x$new_path" = x; then
26592       # It's still not found. Now this is an unrecoverable error.
26593       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26594 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26595       has_space=`$ECHO "$complete" | $GREP " "`
26596       if test "x$has_space" != x; then
26597         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26598 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26599       fi
26600       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26601     fi
26602   fi
26603 
26604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26607   # "foo.exe" is OK but "foo" is an error.
26608   #
26609   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26610   # It is also a way to make sure we got the proper file name for the real test later on.
26611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26612   if test "x$test_shortpath" = x; then
26613     # Short path failed, file does not exist as specified.
26614     # Try adding .exe or .cmd
26615     if test -f "${new_path}.exe"; then
26616        input_to_shortpath="${new_path}.exe"
26617     elif test -f "${new_path}.cmd"; then
26618        input_to_shortpath="${new_path}.cmd"
26619     else
26620       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26621 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26622       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26623 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26624       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26625     fi
26626   else
26627     input_to_shortpath="$new_path"
26628   fi
26629 
26630   # Call helper function which possibly converts this using DOS-style short mode.
26631   # If so, the updated path is stored in $new_path.
26632   new_path="$input_to_shortpath"
26633 
26634   input_path="$input_to_shortpath"
26635   # Check if we need to convert this using DOS-style short mode. If the path
26636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26637   # take no chances and rewrite it.
26638   # Note: m4 eats our [], so we need to use [ and ] instead.
26639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26640   if test "x$has_forbidden_chars" != x; then
26641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26642     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26643     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26644     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26645       # Going to short mode and back again did indeed matter. Since short mode is
26646       # case insensitive, let's make it lowercase to improve readability.
26647       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26648       # Now convert it back to Unix-stile (cygpath)
26649       input_path=`$CYGPATH -u "$shortmode_path"`
26650       new_path="$input_path"
26651     fi
26652   fi
26653 
26654   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26655   if test "x$test_cygdrive_prefix" = x; then
26656     # As a simple fix, exclude /usr/bin since it's not a real path.
26657     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26658       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26659       # a path prefixed by /cygdrive for fixpath to work.
26660       new_path="$CYGWIN_ROOT_PATH$input_path"
26661     fi
26662   fi
26663 
26664   # remove trailing .exe if any
26665   new_path="${new_path/%.exe/}"
26666 
26667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26668 
26669   # First separate the path from the arguments. This will split at the first
26670   # space.
26671   complete="$NM"
26672   path="${complete%% *}"
26673   tmp="$complete EOL"
26674   arguments="${tmp#* }"
26675 
26676   # Input might be given as Windows format, start by converting to
26677   # unix format.
26678   new_path="$path"
26679 
26680   windows_path="$new_path"
26681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26682     unix_path=`$CYGPATH -u "$windows_path"`
26683     new_path="$unix_path"
26684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26686     new_path="$unix_path"
26687   fi
26688 
26689 
26690   # Now try to locate executable using which
26691   new_path=`$WHICH "$new_path" 2> /dev/null`
26692 
26693   if test "x$new_path" = x; then
26694     # Oops. Which didn't find the executable.
26695     # The splitting of arguments from the executable at a space might have been incorrect,
26696     # since paths with space are more likely in Windows. Give it another try with the whole
26697     # argument.
26698     path="$complete"
26699     arguments="EOL"
26700     new_path="$path"
26701 
26702   windows_path="$new_path"
26703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26704     unix_path=`$CYGPATH -u "$windows_path"`
26705     new_path="$unix_path"
26706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26708     new_path="$unix_path"
26709   fi
26710 
26711 
26712     new_path=`$WHICH "$new_path" 2> /dev/null`
26713 
26714     if test "x$new_path" = x; then
26715       # It's still not found. Now this is an unrecoverable error.
26716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26717 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26718       has_space=`$ECHO "$complete" | $GREP " "`
26719       if test "x$has_space" != x; then
26720         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26721 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26722       fi
26723       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26724     fi
26725   fi
26726 
26727   # Now new_path has a complete unix path to the binary
26728   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26729     # Keep paths in /bin as-is, but remove trailing .exe if any
26730     new_path="${new_path/%.exe/}"
26731     # Do not save /bin paths to all_fixpath_prefixes!
26732   else
26733     # Not in mixed or Windows style, start by that.
26734     new_path=`cmd //c echo $new_path`
26735 
26736   input_path="$new_path"
26737   # Check if we need to convert this using DOS-style short mode. If the path
26738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26739   # take no chances and rewrite it.
26740   # Note: m4 eats our [], so we need to use [ and ] instead.
26741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26742   if test "x$has_forbidden_chars" != x; then
26743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26744     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26745   fi
26746 
26747     # Output is in $new_path
26748 
26749   windows_path="$new_path"
26750   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26751     unix_path=`$CYGPATH -u "$windows_path"`
26752     new_path="$unix_path"
26753   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26754     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26755     new_path="$unix_path"
26756   fi
26757 
26758     # remove trailing .exe if any
26759     new_path="${new_path/%.exe/}"
26760 
26761     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26762     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26763   fi
26764 
26765   else
26766     # We're on a posix platform. Hooray! :)
26767     # First separate the path from the arguments. This will split at the first
26768     # space.
26769     complete="$NM"
26770     path="${complete%% *}"
26771     tmp="$complete EOL"
26772     arguments="${tmp#* }"
26773 
26774     # Cannot rely on the command "which" here since it doesn't always work.
26775     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26776     if test -z "$is_absolute_path"; then
26777       # Path to executable is not absolute. Find it.
26778       IFS_save="$IFS"
26779       IFS=:
26780       for p in $PATH; do
26781         if test -f "$p/$path" && test -x "$p/$path"; then
26782           new_path="$p/$path"
26783           break
26784         fi
26785       done
26786       IFS="$IFS_save"
26787     else
26788       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26789 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26790       new_path="$path"
26791     fi
26792 
26793     if test "x$new_path" = x; then
26794         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26795 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26796         has_space=`$ECHO "$complete" | $GREP " "`
26797         if test "x$has_space" != x; then
26798           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26799 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26800         fi
26801         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26802       fi
26803   fi
26804 
26805       # Now join together the path and the arguments once again
26806       if test "x$arguments" != xEOL; then
26807         new_complete="$new_path ${arguments% *}"
26808       else
26809         new_complete="$new_path"
26810       fi
26811 
26812   if test "x$complete" != "x$new_complete"; then
26813       NM="$new_complete"
26814       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26815 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26816     fi
26817 
26818     GNM="$NM"
26819 
26820     if test -n "$ac_tool_prefix"; then
26821   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
26822 set dummy ${ac_tool_prefix}strip; ac_word=$2
26823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26824 $as_echo_n "checking for $ac_word... " >&6; }
26825 if ${ac_cv_prog_STRIP+:} false; then :
26826   $as_echo_n "(cached) " >&6
26827 else
26828   if test -n "$STRIP"; then
26829   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
26830 else
26831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26832 for as_dir in $PATH
26833 do
26834   IFS=$as_save_IFS
26835   test -z "$as_dir" && as_dir=.
26836     for ac_exec_ext in '' $ac_executable_extensions; do
26837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26838     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
26839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26840     break 2
26841   fi
26842 done
26843   done
26844 IFS=$as_save_IFS
26845 
26846 fi
26847 fi
26848 STRIP=$ac_cv_prog_STRIP
26849 if test -n "$STRIP"; then
26850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26851 $as_echo "$STRIP" >&6; }
26852 else
26853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26854 $as_echo "no" >&6; }
26855 fi
26856 
26857 
26858 fi
26859 if test -z "$ac_cv_prog_STRIP"; then
26860   ac_ct_STRIP=$STRIP
26861   # Extract the first word of "strip", so it can be a program name with args.
26862 set dummy strip; ac_word=$2
26863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26864 $as_echo_n "checking for $ac_word... " >&6; }
26865 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
26866   $as_echo_n "(cached) " >&6
26867 else
26868   if test -n "$ac_ct_STRIP"; then
26869   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
26870 else
26871 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26872 for as_dir in $PATH
26873 do
26874   IFS=$as_save_IFS
26875   test -z "$as_dir" && as_dir=.
26876     for ac_exec_ext in '' $ac_executable_extensions; do
26877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26878     ac_cv_prog_ac_ct_STRIP="strip"
26879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26880     break 2
26881   fi
26882 done
26883   done
26884 IFS=$as_save_IFS
26885 
26886 fi
26887 fi
26888 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
26889 if test -n "$ac_ct_STRIP"; then
26890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
26891 $as_echo "$ac_ct_STRIP" >&6; }
26892 else
26893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26894 $as_echo "no" >&6; }
26895 fi
26896 
26897   if test "x$ac_ct_STRIP" = x; then
26898     STRIP=""
26899   else
26900     case $cross_compiling:$ac_tool_warned in
26901 yes:)
26902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26903 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26904 ac_tool_warned=yes ;;
26905 esac
26906     STRIP=$ac_ct_STRIP
26907   fi
26908 else
26909   STRIP="$ac_cv_prog_STRIP"
26910 fi
26911 
26912 
26913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26914 
26915   # First separate the path from the arguments. This will split at the first
26916   # space.
26917   complete="$STRIP"
26918   path="${complete%% *}"
26919   tmp="$complete EOL"
26920   arguments="${tmp#* }"
26921 
26922   # Input might be given as Windows format, start by converting to
26923   # unix format.
26924   new_path=`$CYGPATH -u "$path"`
26925 
26926   # Now try to locate executable using which
26927   new_path=`$WHICH "$new_path" 2> /dev/null`
26928   # bat and cmd files are not always considered executable in cygwin causing which
26929   # to not find them
26930   if test "x$new_path" = x \
26931            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26932            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26933     new_path=`$CYGPATH -u "$path"`
26934   fi
26935   if test "x$new_path" = x; then
26936     # Oops. Which didn't find the executable.
26937     # The splitting of arguments from the executable at a space might have been incorrect,
26938     # since paths with space are more likely in Windows. Give it another try with the whole
26939     # argument.
26940     path="$complete"
26941     arguments="EOL"
26942     new_path=`$CYGPATH -u "$path"`
26943     new_path=`$WHICH "$new_path" 2> /dev/null`
26944     # bat and cmd files are not always considered executable in cygwin causing which
26945     # to not find them
26946     if test "x$new_path" = x \
26947              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26948              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26949       new_path=`$CYGPATH -u "$path"`
26950     fi
26951     if test "x$new_path" = x; then
26952       # It's still not found. Now this is an unrecoverable error.
26953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26954 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26955       has_space=`$ECHO "$complete" | $GREP " "`
26956       if test "x$has_space" != x; then
26957         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26959       fi
26960       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26961     fi
26962   fi
26963 
26964   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26965   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26966   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26967   # "foo.exe" is OK but "foo" is an error.
26968   #
26969   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26970   # It is also a way to make sure we got the proper file name for the real test later on.
26971   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26972   if test "x$test_shortpath" = x; then
26973     # Short path failed, file does not exist as specified.
26974     # Try adding .exe or .cmd
26975     if test -f "${new_path}.exe"; then
26976        input_to_shortpath="${new_path}.exe"
26977     elif test -f "${new_path}.cmd"; then
26978        input_to_shortpath="${new_path}.cmd"
26979     else
26980       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26981 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26982       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26983 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26984       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26985     fi
26986   else
26987     input_to_shortpath="$new_path"
26988   fi
26989 
26990   # Call helper function which possibly converts this using DOS-style short mode.
26991   # If so, the updated path is stored in $new_path.
26992   new_path="$input_to_shortpath"
26993 
26994   input_path="$input_to_shortpath"
26995   # Check if we need to convert this using DOS-style short mode. If the path
26996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26997   # take no chances and rewrite it.
26998   # Note: m4 eats our [], so we need to use [ and ] instead.
26999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27000   if test "x$has_forbidden_chars" != x; then
27001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27002     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27003     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27004     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27005       # Going to short mode and back again did indeed matter. Since short mode is
27006       # case insensitive, let's make it lowercase to improve readability.
27007       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27008       # Now convert it back to Unix-stile (cygpath)
27009       input_path=`$CYGPATH -u "$shortmode_path"`
27010       new_path="$input_path"
27011     fi
27012   fi
27013 
27014   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27015   if test "x$test_cygdrive_prefix" = x; then
27016     # As a simple fix, exclude /usr/bin since it's not a real path.
27017     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27018       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27019       # a path prefixed by /cygdrive for fixpath to work.
27020       new_path="$CYGWIN_ROOT_PATH$input_path"
27021     fi
27022   fi
27023 
27024   # remove trailing .exe if any
27025   new_path="${new_path/%.exe/}"
27026 
27027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27028 
27029   # First separate the path from the arguments. This will split at the first
27030   # space.
27031   complete="$STRIP"
27032   path="${complete%% *}"
27033   tmp="$complete EOL"
27034   arguments="${tmp#* }"
27035 
27036   # Input might be given as Windows format, start by converting to
27037   # unix format.
27038   new_path="$path"
27039 
27040   windows_path="$new_path"
27041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27042     unix_path=`$CYGPATH -u "$windows_path"`
27043     new_path="$unix_path"
27044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27046     new_path="$unix_path"
27047   fi
27048 
27049 
27050   # Now try to locate executable using which
27051   new_path=`$WHICH "$new_path" 2> /dev/null`
27052 
27053   if test "x$new_path" = x; then
27054     # Oops. Which didn't find the executable.
27055     # The splitting of arguments from the executable at a space might have been incorrect,
27056     # since paths with space are more likely in Windows. Give it another try with the whole
27057     # argument.
27058     path="$complete"
27059     arguments="EOL"
27060     new_path="$path"
27061 
27062   windows_path="$new_path"
27063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27064     unix_path=`$CYGPATH -u "$windows_path"`
27065     new_path="$unix_path"
27066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27068     new_path="$unix_path"
27069   fi
27070 
27071 
27072     new_path=`$WHICH "$new_path" 2> /dev/null`
27073 
27074     if test "x$new_path" = x; then
27075       # It's still not found. Now this is an unrecoverable error.
27076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27077 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27078       has_space=`$ECHO "$complete" | $GREP " "`
27079       if test "x$has_space" != x; then
27080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27082       fi
27083       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27084     fi
27085   fi
27086 
27087   # Now new_path has a complete unix path to the binary
27088   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27089     # Keep paths in /bin as-is, but remove trailing .exe if any
27090     new_path="${new_path/%.exe/}"
27091     # Do not save /bin paths to all_fixpath_prefixes!
27092   else
27093     # Not in mixed or Windows style, start by that.
27094     new_path=`cmd //c echo $new_path`
27095 
27096   input_path="$new_path"
27097   # Check if we need to convert this using DOS-style short mode. If the path
27098   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27099   # take no chances and rewrite it.
27100   # Note: m4 eats our [], so we need to use [ and ] instead.
27101   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27102   if test "x$has_forbidden_chars" != x; then
27103     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27104     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27105   fi
27106 
27107     # Output is in $new_path
27108 
27109   windows_path="$new_path"
27110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27111     unix_path=`$CYGPATH -u "$windows_path"`
27112     new_path="$unix_path"
27113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27115     new_path="$unix_path"
27116   fi
27117 
27118     # remove trailing .exe if any
27119     new_path="${new_path/%.exe/}"
27120 
27121     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27122     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27123   fi
27124 
27125   else
27126     # We're on a posix platform. Hooray! :)
27127     # First separate the path from the arguments. This will split at the first
27128     # space.
27129     complete="$STRIP"
27130     path="${complete%% *}"
27131     tmp="$complete EOL"
27132     arguments="${tmp#* }"
27133 
27134     # Cannot rely on the command "which" here since it doesn't always work.
27135     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27136     if test -z "$is_absolute_path"; then
27137       # Path to executable is not absolute. Find it.
27138       IFS_save="$IFS"
27139       IFS=:
27140       for p in $PATH; do
27141         if test -f "$p/$path" && test -x "$p/$path"; then
27142           new_path="$p/$path"
27143           break
27144         fi
27145       done
27146       IFS="$IFS_save"
27147     else
27148       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27149 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27150       new_path="$path"
27151     fi
27152 
27153     if test "x$new_path" = x; then
27154         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27155 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27156         has_space=`$ECHO "$complete" | $GREP " "`
27157         if test "x$has_space" != x; then
27158           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27159 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27160         fi
27161         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27162       fi
27163   fi
27164 
27165       # Now join together the path and the arguments once again
27166       if test "x$arguments" != xEOL; then
27167         new_complete="$new_path ${arguments% *}"
27168       else
27169         new_complete="$new_path"
27170       fi
27171 
27172   if test "x$complete" != "x$new_complete"; then
27173       STRIP="$new_complete"
27174       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27175 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27176     fi
27177 
27178 fi
27179 
27180 # objcopy is used for moving debug symbols to separate files when
27181 # full debug symbols are enabled.
27182 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27183     if test -n "$ac_tool_prefix"; then
27184   for ac_prog in gobjcopy objcopy
27185   do
27186     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27187 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27189 $as_echo_n "checking for $ac_word... " >&6; }
27190 if ${ac_cv_prog_OBJCOPY+:} false; then :
27191   $as_echo_n "(cached) " >&6
27192 else
27193   if test -n "$OBJCOPY"; then
27194   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27195 else
27196 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27197 for as_dir in $PATH
27198 do
27199   IFS=$as_save_IFS
27200   test -z "$as_dir" && as_dir=.
27201     for ac_exec_ext in '' $ac_executable_extensions; do
27202   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27203     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27204     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27205     break 2
27206   fi
27207 done
27208   done
27209 IFS=$as_save_IFS
27210 
27211 fi
27212 fi
27213 OBJCOPY=$ac_cv_prog_OBJCOPY
27214 if test -n "$OBJCOPY"; then
27215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27216 $as_echo "$OBJCOPY" >&6; }
27217 else
27218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27219 $as_echo "no" >&6; }
27220 fi
27221 
27222 
27223     test -n "$OBJCOPY" && break
27224   done
27225 fi
27226 if test -z "$OBJCOPY"; then
27227   ac_ct_OBJCOPY=$OBJCOPY
27228   for ac_prog in gobjcopy objcopy
27229 do
27230   # Extract the first word of "$ac_prog", so it can be a program name with args.
27231 set dummy $ac_prog; ac_word=$2
27232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27233 $as_echo_n "checking for $ac_word... " >&6; }
27234 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27235   $as_echo_n "(cached) " >&6
27236 else
27237   if test -n "$ac_ct_OBJCOPY"; then
27238   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27239 else
27240 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27241 for as_dir in $PATH
27242 do
27243   IFS=$as_save_IFS
27244   test -z "$as_dir" && as_dir=.
27245     for ac_exec_ext in '' $ac_executable_extensions; do
27246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27247     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27249     break 2
27250   fi
27251 done
27252   done
27253 IFS=$as_save_IFS
27254 
27255 fi
27256 fi
27257 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27258 if test -n "$ac_ct_OBJCOPY"; then
27259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27260 $as_echo "$ac_ct_OBJCOPY" >&6; }
27261 else
27262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27263 $as_echo "no" >&6; }
27264 fi
27265 
27266 
27267   test -n "$ac_ct_OBJCOPY" && break
27268 done
27269 
27270   if test "x$ac_ct_OBJCOPY" = x; then
27271     OBJCOPY=""
27272   else
27273     case $cross_compiling:$ac_tool_warned in
27274 yes:)
27275 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27276 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27277 ac_tool_warned=yes ;;
27278 esac
27279     OBJCOPY=$ac_ct_OBJCOPY
27280   fi
27281 fi
27282 
27283     # Only call fixup if objcopy was found.
27284     if test -n "$OBJCOPY"; then
27285 
27286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27287 
27288   # First separate the path from the arguments. This will split at the first
27289   # space.
27290   complete="$OBJCOPY"
27291   path="${complete%% *}"
27292   tmp="$complete EOL"
27293   arguments="${tmp#* }"
27294 
27295   # Input might be given as Windows format, start by converting to
27296   # unix format.
27297   new_path=`$CYGPATH -u "$path"`
27298 
27299   # Now try to locate executable using which
27300   new_path=`$WHICH "$new_path" 2> /dev/null`
27301   # bat and cmd files are not always considered executable in cygwin causing which
27302   # to not find them
27303   if test "x$new_path" = x \
27304            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27305            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27306     new_path=`$CYGPATH -u "$path"`
27307   fi
27308   if test "x$new_path" = x; then
27309     # Oops. Which didn't find the executable.
27310     # The splitting of arguments from the executable at a space might have been incorrect,
27311     # since paths with space are more likely in Windows. Give it another try with the whole
27312     # argument.
27313     path="$complete"
27314     arguments="EOL"
27315     new_path=`$CYGPATH -u "$path"`
27316     new_path=`$WHICH "$new_path" 2> /dev/null`
27317     # bat and cmd files are not always considered executable in cygwin causing which
27318     # to not find them
27319     if test "x$new_path" = x \
27320              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27321              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27322       new_path=`$CYGPATH -u "$path"`
27323     fi
27324     if test "x$new_path" = x; then
27325       # It's still not found. Now this is an unrecoverable error.
27326       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27327 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27328       has_space=`$ECHO "$complete" | $GREP " "`
27329       if test "x$has_space" != x; then
27330         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27331 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27332       fi
27333       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27334     fi
27335   fi
27336 
27337   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27338   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27339   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27340   # "foo.exe" is OK but "foo" is an error.
27341   #
27342   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27343   # It is also a way to make sure we got the proper file name for the real test later on.
27344   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27345   if test "x$test_shortpath" = x; then
27346     # Short path failed, file does not exist as specified.
27347     # Try adding .exe or .cmd
27348     if test -f "${new_path}.exe"; then
27349        input_to_shortpath="${new_path}.exe"
27350     elif test -f "${new_path}.cmd"; then
27351        input_to_shortpath="${new_path}.cmd"
27352     else
27353       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27354 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27355       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27356 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27357       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27358     fi
27359   else
27360     input_to_shortpath="$new_path"
27361   fi
27362 
27363   # Call helper function which possibly converts this using DOS-style short mode.
27364   # If so, the updated path is stored in $new_path.
27365   new_path="$input_to_shortpath"
27366 
27367   input_path="$input_to_shortpath"
27368   # Check if we need to convert this using DOS-style short mode. If the path
27369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27370   # take no chances and rewrite it.
27371   # Note: m4 eats our [], so we need to use [ and ] instead.
27372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27373   if test "x$has_forbidden_chars" != x; then
27374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27375     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27376     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27377     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27378       # Going to short mode and back again did indeed matter. Since short mode is
27379       # case insensitive, let's make it lowercase to improve readability.
27380       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27381       # Now convert it back to Unix-stile (cygpath)
27382       input_path=`$CYGPATH -u "$shortmode_path"`
27383       new_path="$input_path"
27384     fi
27385   fi
27386 
27387   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27388   if test "x$test_cygdrive_prefix" = x; then
27389     # As a simple fix, exclude /usr/bin since it's not a real path.
27390     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27391       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27392       # a path prefixed by /cygdrive for fixpath to work.
27393       new_path="$CYGWIN_ROOT_PATH$input_path"
27394     fi
27395   fi
27396 
27397   # remove trailing .exe if any
27398   new_path="${new_path/%.exe/}"
27399 
27400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27401 
27402   # First separate the path from the arguments. This will split at the first
27403   # space.
27404   complete="$OBJCOPY"
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="$path"
27412 
27413   windows_path="$new_path"
27414   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27415     unix_path=`$CYGPATH -u "$windows_path"`
27416     new_path="$unix_path"
27417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27418     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27419     new_path="$unix_path"
27420   fi
27421 
27422 
27423   # Now try to locate executable using which
27424   new_path=`$WHICH "$new_path" 2> /dev/null`
27425 
27426   if test "x$new_path" = x; then
27427     # Oops. Which didn't find the executable.
27428     # The splitting of arguments from the executable at a space might have been incorrect,
27429     # since paths with space are more likely in Windows. Give it another try with the whole
27430     # argument.
27431     path="$complete"
27432     arguments="EOL"
27433     new_path="$path"
27434 
27435   windows_path="$new_path"
27436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27437     unix_path=`$CYGPATH -u "$windows_path"`
27438     new_path="$unix_path"
27439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27441     new_path="$unix_path"
27442   fi
27443 
27444 
27445     new_path=`$WHICH "$new_path" 2> /dev/null`
27446 
27447     if test "x$new_path" = x; then
27448       # It's still not found. Now this is an unrecoverable error.
27449       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27450 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27451       has_space=`$ECHO "$complete" | $GREP " "`
27452       if test "x$has_space" != x; then
27453         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27454 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27455       fi
27456       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27457     fi
27458   fi
27459 
27460   # Now new_path has a complete unix path to the binary
27461   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27462     # Keep paths in /bin as-is, but remove trailing .exe if any
27463     new_path="${new_path/%.exe/}"
27464     # Do not save /bin paths to all_fixpath_prefixes!
27465   else
27466     # Not in mixed or Windows style, start by that.
27467     new_path=`cmd //c echo $new_path`
27468 
27469   input_path="$new_path"
27470   # Check if we need to convert this using DOS-style short mode. If the path
27471   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27472   # take no chances and rewrite it.
27473   # Note: m4 eats our [], so we need to use [ and ] instead.
27474   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27475   if test "x$has_forbidden_chars" != x; then
27476     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27477     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27478   fi
27479 
27480     # Output is in $new_path
27481 
27482   windows_path="$new_path"
27483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27484     unix_path=`$CYGPATH -u "$windows_path"`
27485     new_path="$unix_path"
27486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27488     new_path="$unix_path"
27489   fi
27490 
27491     # remove trailing .exe if any
27492     new_path="${new_path/%.exe/}"
27493 
27494     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27495     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27496   fi
27497 
27498   else
27499     # We're on a posix platform. Hooray! :)
27500     # First separate the path from the arguments. This will split at the first
27501     # space.
27502     complete="$OBJCOPY"
27503     path="${complete%% *}"
27504     tmp="$complete EOL"
27505     arguments="${tmp#* }"
27506 
27507     # Cannot rely on the command "which" here since it doesn't always work.
27508     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27509     if test -z "$is_absolute_path"; then
27510       # Path to executable is not absolute. Find it.
27511       IFS_save="$IFS"
27512       IFS=:
27513       for p in $PATH; do
27514         if test -f "$p/$path" && test -x "$p/$path"; then
27515           new_path="$p/$path"
27516           break
27517         fi
27518       done
27519       IFS="$IFS_save"
27520     else
27521       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27522 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27523       new_path="$path"
27524     fi
27525 
27526     if test "x$new_path" = x; then
27527         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27528 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27529         has_space=`$ECHO "$complete" | $GREP " "`
27530         if test "x$has_space" != x; then
27531           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27532 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27533         fi
27534         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27535       fi
27536   fi
27537 
27538       # Now join together the path and the arguments once again
27539       if test "x$arguments" != xEOL; then
27540         new_complete="$new_path ${arguments% *}"
27541       else
27542         new_complete="$new_path"
27543       fi
27544 
27545   if test "x$complete" != "x$new_complete"; then
27546       OBJCOPY="$new_complete"
27547       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27548 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27549     fi
27550 
27551     fi
27552 fi
27553 
27554 if test -n "$ac_tool_prefix"; then
27555   for ac_prog in gobjdump objdump
27556   do
27557     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27558 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27560 $as_echo_n "checking for $ac_word... " >&6; }
27561 if ${ac_cv_prog_OBJDUMP+:} false; then :
27562   $as_echo_n "(cached) " >&6
27563 else
27564   if test -n "$OBJDUMP"; then
27565   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27566 else
27567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27568 for as_dir in $PATH
27569 do
27570   IFS=$as_save_IFS
27571   test -z "$as_dir" && as_dir=.
27572     for ac_exec_ext in '' $ac_executable_extensions; do
27573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27574     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27576     break 2
27577   fi
27578 done
27579   done
27580 IFS=$as_save_IFS
27581 
27582 fi
27583 fi
27584 OBJDUMP=$ac_cv_prog_OBJDUMP
27585 if test -n "$OBJDUMP"; then
27586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27587 $as_echo "$OBJDUMP" >&6; }
27588 else
27589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27590 $as_echo "no" >&6; }
27591 fi
27592 
27593 
27594     test -n "$OBJDUMP" && break
27595   done
27596 fi
27597 if test -z "$OBJDUMP"; then
27598   ac_ct_OBJDUMP=$OBJDUMP
27599   for ac_prog in gobjdump objdump
27600 do
27601   # Extract the first word of "$ac_prog", so it can be a program name with args.
27602 set dummy $ac_prog; ac_word=$2
27603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27604 $as_echo_n "checking for $ac_word... " >&6; }
27605 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
27606   $as_echo_n "(cached) " >&6
27607 else
27608   if test -n "$ac_ct_OBJDUMP"; then
27609   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27610 else
27611 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27612 for as_dir in $PATH
27613 do
27614   IFS=$as_save_IFS
27615   test -z "$as_dir" && as_dir=.
27616     for ac_exec_ext in '' $ac_executable_extensions; do
27617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27618     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27620     break 2
27621   fi
27622 done
27623   done
27624 IFS=$as_save_IFS
27625 
27626 fi
27627 fi
27628 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27629 if test -n "$ac_ct_OBJDUMP"; then
27630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27631 $as_echo "$ac_ct_OBJDUMP" >&6; }
27632 else
27633   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27634 $as_echo "no" >&6; }
27635 fi
27636 
27637 
27638   test -n "$ac_ct_OBJDUMP" && break
27639 done
27640 
27641   if test "x$ac_ct_OBJDUMP" = x; then
27642     OBJDUMP=""
27643   else
27644     case $cross_compiling:$ac_tool_warned in
27645 yes:)
27646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27647 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27648 ac_tool_warned=yes ;;
27649 esac
27650     OBJDUMP=$ac_ct_OBJDUMP
27651   fi
27652 fi
27653 
27654 if test "x$OBJDUMP" != x; then
27655   # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27656 
27657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27658 
27659   # First separate the path from the arguments. This will split at the first
27660   # space.
27661   complete="$OBJDUMP"
27662   path="${complete%% *}"
27663   tmp="$complete EOL"
27664   arguments="${tmp#* }"
27665 
27666   # Input might be given as Windows format, start by converting to
27667   # unix format.
27668   new_path=`$CYGPATH -u "$path"`
27669 
27670   # Now try to locate executable using which
27671   new_path=`$WHICH "$new_path" 2> /dev/null`
27672   # bat and cmd files are not always considered executable in cygwin causing which
27673   # to not find them
27674   if test "x$new_path" = x \
27675            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27676            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27677     new_path=`$CYGPATH -u "$path"`
27678   fi
27679   if test "x$new_path" = x; then
27680     # Oops. Which didn't find the executable.
27681     # The splitting of arguments from the executable at a space might have been incorrect,
27682     # since paths with space are more likely in Windows. Give it another try with the whole
27683     # argument.
27684     path="$complete"
27685     arguments="EOL"
27686     new_path=`$CYGPATH -u "$path"`
27687     new_path=`$WHICH "$new_path" 2> /dev/null`
27688     # bat and cmd files are not always considered executable in cygwin causing which
27689     # to not find them
27690     if test "x$new_path" = x \
27691              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27692              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27693       new_path=`$CYGPATH -u "$path"`
27694     fi
27695     if test "x$new_path" = x; then
27696       # It's still not found. Now this is an unrecoverable error.
27697       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27698 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27699       has_space=`$ECHO "$complete" | $GREP " "`
27700       if test "x$has_space" != x; then
27701         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27703       fi
27704       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27705     fi
27706   fi
27707 
27708   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27709   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27710   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27711   # "foo.exe" is OK but "foo" is an error.
27712   #
27713   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27714   # It is also a way to make sure we got the proper file name for the real test later on.
27715   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27716   if test "x$test_shortpath" = x; then
27717     # Short path failed, file does not exist as specified.
27718     # Try adding .exe or .cmd
27719     if test -f "${new_path}.exe"; then
27720        input_to_shortpath="${new_path}.exe"
27721     elif test -f "${new_path}.cmd"; then
27722        input_to_shortpath="${new_path}.cmd"
27723     else
27724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27725 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27726       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27727 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27728       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27729     fi
27730   else
27731     input_to_shortpath="$new_path"
27732   fi
27733 
27734   # Call helper function which possibly converts this using DOS-style short mode.
27735   # If so, the updated path is stored in $new_path.
27736   new_path="$input_to_shortpath"
27737 
27738   input_path="$input_to_shortpath"
27739   # Check if we need to convert this using DOS-style short mode. If the path
27740   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27741   # take no chances and rewrite it.
27742   # Note: m4 eats our [], so we need to use [ and ] instead.
27743   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27744   if test "x$has_forbidden_chars" != x; then
27745     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27746     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27747     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27748     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27749       # Going to short mode and back again did indeed matter. Since short mode is
27750       # case insensitive, let's make it lowercase to improve readability.
27751       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27752       # Now convert it back to Unix-stile (cygpath)
27753       input_path=`$CYGPATH -u "$shortmode_path"`
27754       new_path="$input_path"
27755     fi
27756   fi
27757 
27758   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27759   if test "x$test_cygdrive_prefix" = x; then
27760     # As a simple fix, exclude /usr/bin since it's not a real path.
27761     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27762       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27763       # a path prefixed by /cygdrive for fixpath to work.
27764       new_path="$CYGWIN_ROOT_PATH$input_path"
27765     fi
27766   fi
27767 
27768   # remove trailing .exe if any
27769   new_path="${new_path/%.exe/}"
27770 
27771   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27772 
27773   # First separate the path from the arguments. This will split at the first
27774   # space.
27775   complete="$OBJDUMP"
27776   path="${complete%% *}"
27777   tmp="$complete EOL"
27778   arguments="${tmp#* }"
27779 
27780   # Input might be given as Windows format, start by converting to
27781   # unix format.
27782   new_path="$path"
27783 
27784   windows_path="$new_path"
27785   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27786     unix_path=`$CYGPATH -u "$windows_path"`
27787     new_path="$unix_path"
27788   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27789     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27790     new_path="$unix_path"
27791   fi
27792 
27793 
27794   # Now try to locate executable using which
27795   new_path=`$WHICH "$new_path" 2> /dev/null`
27796 
27797   if test "x$new_path" = x; then
27798     # Oops. Which didn't find the executable.
27799     # The splitting of arguments from the executable at a space might have been incorrect,
27800     # since paths with space are more likely in Windows. Give it another try with the whole
27801     # argument.
27802     path="$complete"
27803     arguments="EOL"
27804     new_path="$path"
27805 
27806   windows_path="$new_path"
27807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27808     unix_path=`$CYGPATH -u "$windows_path"`
27809     new_path="$unix_path"
27810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27812     new_path="$unix_path"
27813   fi
27814 
27815 
27816     new_path=`$WHICH "$new_path" 2> /dev/null`
27817 
27818     if test "x$new_path" = x; then
27819       # It's still not found. Now this is an unrecoverable error.
27820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27821 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27822       has_space=`$ECHO "$complete" | $GREP " "`
27823       if test "x$has_space" != x; then
27824         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27825 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27826       fi
27827       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27828     fi
27829   fi
27830 
27831   # Now new_path has a complete unix path to the binary
27832   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27833     # Keep paths in /bin as-is, but remove trailing .exe if any
27834     new_path="${new_path/%.exe/}"
27835     # Do not save /bin paths to all_fixpath_prefixes!
27836   else
27837     # Not in mixed or Windows style, start by that.
27838     new_path=`cmd //c echo $new_path`
27839 
27840   input_path="$new_path"
27841   # Check if we need to convert this using DOS-style short mode. If the path
27842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27843   # take no chances and rewrite it.
27844   # Note: m4 eats our [], so we need to use [ and ] instead.
27845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27846   if test "x$has_forbidden_chars" != x; then
27847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27848     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27849   fi
27850 
27851     # Output is in $new_path
27852 
27853   windows_path="$new_path"
27854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27855     unix_path=`$CYGPATH -u "$windows_path"`
27856     new_path="$unix_path"
27857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27859     new_path="$unix_path"
27860   fi
27861 
27862     # remove trailing .exe if any
27863     new_path="${new_path/%.exe/}"
27864 
27865     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27866     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27867   fi
27868 
27869   else
27870     # We're on a posix platform. Hooray! :)
27871     # First separate the path from the arguments. This will split at the first
27872     # space.
27873     complete="$OBJDUMP"
27874     path="${complete%% *}"
27875     tmp="$complete EOL"
27876     arguments="${tmp#* }"
27877 
27878     # Cannot rely on the command "which" here since it doesn't always work.
27879     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27880     if test -z "$is_absolute_path"; then
27881       # Path to executable is not absolute. Find it.
27882       IFS_save="$IFS"
27883       IFS=:
27884       for p in $PATH; do
27885         if test -f "$p/$path" && test -x "$p/$path"; then
27886           new_path="$p/$path"
27887           break
27888         fi
27889       done
27890       IFS="$IFS_save"
27891     else
27892       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
27893 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
27894       new_path="$path"
27895     fi
27896 
27897     if test "x$new_path" = x; then
27898         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27899 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27900         has_space=`$ECHO "$complete" | $GREP " "`
27901         if test "x$has_space" != x; then
27902           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27903 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27904         fi
27905         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27906       fi
27907   fi
27908 
27909       # Now join together the path and the arguments once again
27910       if test "x$arguments" != xEOL; then
27911         new_complete="$new_path ${arguments% *}"
27912       else
27913         new_complete="$new_path"
27914       fi
27915 
27916   if test "x$complete" != "x$new_complete"; then
27917       OBJDUMP="$new_complete"
27918       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27919 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27920     fi
27921 
27922 fi
27923 
27924 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27925    # Extract the first word of "lipo", so it can be a program name with args.
27926 set dummy lipo; ac_word=$2
27927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27928 $as_echo_n "checking for $ac_word... " >&6; }
27929 if ${ac_cv_path_LIPO+:} false; then :
27930   $as_echo_n "(cached) " >&6
27931 else
27932   case $LIPO in
27933   [\\/]* | ?:[\\/]*)
27934   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27935   ;;
27936   *)
27937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27938 for as_dir in $PATH
27939 do
27940   IFS=$as_save_IFS
27941   test -z "$as_dir" && as_dir=.
27942     for ac_exec_ext in '' $ac_executable_extensions; do
27943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27944     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27946     break 2
27947   fi
27948 done
27949   done
27950 IFS=$as_save_IFS
27951 
27952   ;;
27953 esac
27954 fi
27955 LIPO=$ac_cv_path_LIPO
27956 if test -n "$LIPO"; then
27957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27958 $as_echo "$LIPO" >&6; }
27959 else
27960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27961 $as_echo "no" >&6; }
27962 fi
27963 
27964 
27965 
27966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27967 
27968   # First separate the path from the arguments. This will split at the first
27969   # space.
27970   complete="$LIPO"
27971   path="${complete%% *}"
27972   tmp="$complete EOL"
27973   arguments="${tmp#* }"
27974 
27975   # Input might be given as Windows format, start by converting to
27976   # unix format.
27977   new_path=`$CYGPATH -u "$path"`
27978 
27979   # Now try to locate executable using which
27980   new_path=`$WHICH "$new_path" 2> /dev/null`
27981   # bat and cmd files are not always considered executable in cygwin causing which
27982   # to not find them
27983   if test "x$new_path" = x \
27984            && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27985            && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27986     new_path=`$CYGPATH -u "$path"`
27987   fi
27988   if test "x$new_path" = x; then
27989     # Oops. Which didn't find the executable.
27990     # The splitting of arguments from the executable at a space might have been incorrect,
27991     # since paths with space are more likely in Windows. Give it another try with the whole
27992     # argument.
27993     path="$complete"
27994     arguments="EOL"
27995     new_path=`$CYGPATH -u "$path"`
27996     new_path=`$WHICH "$new_path" 2> /dev/null`
27997     # bat and cmd files are not always considered executable in cygwin causing which
27998     # to not find them
27999     if test "x$new_path" = x \
28000              && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28001              && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28002       new_path=`$CYGPATH -u "$path"`
28003     fi
28004     if test "x$new_path" = x; then
28005       # It's still not found. Now this is an unrecoverable error.
28006       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28007 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28008       has_space=`$ECHO "$complete" | $GREP " "`
28009       if test "x$has_space" != x; then
28010         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28011 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28012       fi
28013       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28014     fi
28015   fi
28016 
28017   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28018   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28019   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28020   # "foo.exe" is OK but "foo" is an error.
28021   #
28022   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28023   # It is also a way to make sure we got the proper file name for the real test later on.
28024   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28025   if test "x$test_shortpath" = x; then
28026     # Short path failed, file does not exist as specified.
28027     # Try adding .exe or .cmd
28028     if test -f "${new_path}.exe"; then
28029        input_to_shortpath="${new_path}.exe"
28030     elif test -f "${new_path}.cmd"; then
28031        input_to_shortpath="${new_path}.cmd"
28032     else
28033       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28034 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28035       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28036 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28037       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28038     fi
28039   else
28040     input_to_shortpath="$new_path"
28041   fi
28042 
28043   # Call helper function which possibly converts this using DOS-style short mode.
28044   # If so, the updated path is stored in $new_path.
28045   new_path="$input_to_shortpath"
28046 
28047   input_path="$input_to_shortpath"
28048   # Check if we need to convert this using DOS-style short mode. If the path
28049   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28050   # take no chances and rewrite it.
28051   # Note: m4 eats our [], so we need to use [ and ] instead.
28052   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28053   if test "x$has_forbidden_chars" != x; then
28054     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28055     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28056     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28057     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28058       # Going to short mode and back again did indeed matter. Since short mode is
28059       # case insensitive, let's make it lowercase to improve readability.
28060       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28061       # Now convert it back to Unix-stile (cygpath)
28062       input_path=`$CYGPATH -u "$shortmode_path"`
28063       new_path="$input_path"
28064     fi
28065   fi
28066 
28067   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28068   if test "x$test_cygdrive_prefix" = x; then
28069     # As a simple fix, exclude /usr/bin since it's not a real path.
28070     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28071       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28072       # a path prefixed by /cygdrive for fixpath to work.
28073       new_path="$CYGWIN_ROOT_PATH$input_path"
28074     fi
28075   fi
28076 
28077   # remove trailing .exe if any
28078   new_path="${new_path/%.exe/}"
28079 
28080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28081 
28082   # First separate the path from the arguments. This will split at the first
28083   # space.
28084   complete="$LIPO"
28085   path="${complete%% *}"
28086   tmp="$complete EOL"
28087   arguments="${tmp#* }"
28088 
28089   # Input might be given as Windows format, start by converting to
28090   # unix format.
28091   new_path="$path"
28092 
28093   windows_path="$new_path"
28094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28095     unix_path=`$CYGPATH -u "$windows_path"`
28096     new_path="$unix_path"
28097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28098     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28099     new_path="$unix_path"
28100   fi
28101 
28102 
28103   # Now try to locate executable using which
28104   new_path=`$WHICH "$new_path" 2> /dev/null`
28105 
28106   if test "x$new_path" = x; then
28107     # Oops. Which didn't find the executable.
28108     # The splitting of arguments from the executable at a space might have been incorrect,
28109     # since paths with space are more likely in Windows. Give it another try with the whole
28110     # argument.
28111     path="$complete"
28112     arguments="EOL"
28113     new_path="$path"
28114 
28115   windows_path="$new_path"
28116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28117     unix_path=`$CYGPATH -u "$windows_path"`
28118     new_path="$unix_path"
28119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28121     new_path="$unix_path"
28122   fi
28123 
28124 
28125     new_path=`$WHICH "$new_path" 2> /dev/null`
28126 
28127     if test "x$new_path" = x; then
28128       # It's still not found. Now this is an unrecoverable error.
28129       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28130 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28131       has_space=`$ECHO "$complete" | $GREP " "`
28132       if test "x$has_space" != x; then
28133         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28134 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28135       fi
28136       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28137     fi
28138   fi
28139 
28140   # Now new_path has a complete unix path to the binary
28141   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28142     # Keep paths in /bin as-is, but remove trailing .exe if any
28143     new_path="${new_path/%.exe/}"
28144     # Do not save /bin paths to all_fixpath_prefixes!
28145   else
28146     # Not in mixed or Windows style, start by that.
28147     new_path=`cmd //c echo $new_path`
28148 
28149   input_path="$new_path"
28150   # Check if we need to convert this using DOS-style short mode. If the path
28151   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28152   # take no chances and rewrite it.
28153   # Note: m4 eats our [], so we need to use [ and ] instead.
28154   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28155   if test "x$has_forbidden_chars" != x; then
28156     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28157     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28158   fi
28159 
28160     # Output is in $new_path
28161 
28162   windows_path="$new_path"
28163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28164     unix_path=`$CYGPATH -u "$windows_path"`
28165     new_path="$unix_path"
28166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28167     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28168     new_path="$unix_path"
28169   fi
28170 
28171     # remove trailing .exe if any
28172     new_path="${new_path/%.exe/}"
28173 
28174     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28175     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28176   fi
28177 
28178   else
28179     # We're on a posix platform. Hooray! :)
28180     # First separate the path from the arguments. This will split at the first
28181     # space.
28182     complete="$LIPO"
28183     path="${complete%% *}"
28184     tmp="$complete EOL"
28185     arguments="${tmp#* }"
28186 
28187     # Cannot rely on the command "which" here since it doesn't always work.
28188     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28189     if test -z "$is_absolute_path"; then
28190       # Path to executable is not absolute. Find it.
28191       IFS_save="$IFS"
28192       IFS=:
28193       for p in $PATH; do
28194         if test -f "$p/$path" && test -x "$p/$path"; then
28195           new_path="$p/$path"
28196           break
28197         fi
28198       done
28199       IFS="$IFS_save"
28200     else
28201       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28202 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28203       new_path="$path"
28204     fi
28205 
28206     if test "x$new_path" = x; then
28207         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28208 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28209         has_space=`$ECHO "$complete" | $GREP " "`
28210         if test "x$has_space" != x; then
28211           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28212 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28213         fi
28214         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28215       fi
28216   fi
28217 
28218       # Now join together the path and the arguments once again
28219       if test "x$arguments" != xEOL; then
28220         new_complete="$new_path ${arguments% *}"
28221       else
28222         new_complete="$new_path"
28223       fi
28224 
28225   if test "x$complete" != "x$new_complete"; then
28226       LIPO="$new_complete"
28227       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28228 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28229     fi
28230 
28231 fi
28232 
28233 
28234 
28235 # Restore old path without tools dir
28236 PATH="$OLD_PATH"
28237 
28238 
28239 # FIXME: Currently we must test this after paths but before flags. Fix!
28240 
28241 # And we can test some aspects on the target using configure macros.
28242 
28243 
28244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28245 $as_echo_n "checking for ANSI C header files... " >&6; }
28246 if ${ac_cv_header_stdc+:} false; then :
28247   $as_echo_n "(cached) " >&6
28248 else
28249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28250 /* end confdefs.h.  */
28251 #include <stdlib.h>
28252 #include <stdarg.h>
28253 #include <string.h>
28254 #include <float.h>
28255 
28256 int
28257 main ()
28258 {
28259 
28260   ;
28261   return 0;
28262 }
28263 _ACEOF
28264 if ac_fn_cxx_try_compile "$LINENO"; then :
28265   ac_cv_header_stdc=yes
28266 else
28267   ac_cv_header_stdc=no
28268 fi
28269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28270 
28271 if test $ac_cv_header_stdc = yes; then
28272   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28273   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28274 /* end confdefs.h.  */
28275 #include <string.h>
28276 
28277 _ACEOF
28278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28279   $EGREP "memchr" >/dev/null 2>&1; then :
28280 
28281 else
28282   ac_cv_header_stdc=no
28283 fi
28284 rm -f conftest*
28285 
28286 fi
28287 
28288 if test $ac_cv_header_stdc = yes; then
28289   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28291 /* end confdefs.h.  */
28292 #include <stdlib.h>
28293 
28294 _ACEOF
28295 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28296   $EGREP "free" >/dev/null 2>&1; then :
28297 
28298 else
28299   ac_cv_header_stdc=no
28300 fi
28301 rm -f conftest*
28302 
28303 fi
28304 
28305 if test $ac_cv_header_stdc = yes; then
28306   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28307   if test "$cross_compiling" = yes; then :
28308   :
28309 else
28310   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28311 /* end confdefs.h.  */
28312 #include <ctype.h>
28313 #include <stdlib.h>
28314 #if ((' ' & 0x0FF) == 0x020)
28315 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28316 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28317 #else
28318 # define ISLOWER(c) \
28319                    (('a' <= (c) && (c) <= 'i') \
28320                      || ('j' <= (c) && (c) <= 'r') \
28321                      || ('s' <= (c) && (c) <= 'z'))
28322 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28323 #endif
28324 
28325 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28326 int
28327 main ()
28328 {
28329   int i;
28330   for (i = 0; i < 256; i++)
28331     if (XOR (islower (i), ISLOWER (i))
28332         || toupper (i) != TOUPPER (i))
28333       return 2;
28334   return 0;
28335 }
28336 _ACEOF
28337 if ac_fn_cxx_try_run "$LINENO"; then :
28338 
28339 else
28340   ac_cv_header_stdc=no
28341 fi
28342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28343   conftest.$ac_objext conftest.beam conftest.$ac_ext
28344 fi
28345 
28346 fi
28347 fi
28348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28349 $as_echo "$ac_cv_header_stdc" >&6; }
28350 if test $ac_cv_header_stdc = yes; then
28351 
28352 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28353 
28354 fi
28355 
28356 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28357 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28358                   inttypes.h stdint.h unistd.h
28359 do :
28360   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28361 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28362 "
28363 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28364   cat >>confdefs.h <<_ACEOF
28365 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28366 _ACEOF
28367 
28368 fi
28369 
28370 done
28371 
28372 
28373 
28374 ###############################################################################
28375 #
28376 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28377 # (The JVM can use 32 or 64 bit Java pointers but that decision
28378 # is made at runtime.)
28379 #
28380 
28381 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28382   # Always specify -m flags on Solaris
28383 
28384   # keep track of c/cxx flags that we added outselves...
28385   #   to prevent emitting warning...
28386   TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28387 
28388 
28389   CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28390   CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28391   LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28392 
28393   CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28394   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28395   LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28396 
28397 elif test "x$COMPILE_TYPE" = xreduced; then
28398   if test "x$OPENJDK_TARGET_OS" != xwindows; then
28399     # Specify -m if running reduced on other Posix platforms
28400 
28401   # keep track of c/cxx flags that we added outselves...
28402   #   to prevent emitting warning...
28403   TARGET_BITS_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
28404 
28405 
28406   CFLAGS="${CFLAGS} ${TARGET_BITS_FLAG}"
28407   CXXFLAGS="${CXXFLAGS} ${TARGET_BITS_FLAG}"
28408   LDFLAGS="${LDFLAGS} ${TARGET_BITS_FLAG}"
28409 
28410   CFLAGS_JDK="${CFLAGS_JDK} ${TARGET_BITS_FLAG}"
28411   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${TARGET_BITS_FLAG}"
28412   LDFLAGS_JDK="${LDFLAGS_JDK} ${TARGET_BITS_FLAG}"
28413 
28414   fi
28415 fi
28416 
28417 # Make compilation sanity check
28418 for ac_header in stdio.h
28419 do :
28420   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28421 if test "x$ac_cv_header_stdio_h" = xyes; then :
28422   cat >>confdefs.h <<_ACEOF
28423 #define HAVE_STDIO_H 1
28424 _ACEOF
28425 
28426 else
28427 
28428   { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28429 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28430   if test "x$COMPILE_TYPE" = xreduced; then
28431     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28432 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28433   elif test "x$COMPILE_TYPE" = xcross; then
28434     { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28435 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28436   fi
28437   as_fn_error $? "Cannot continue." "$LINENO" 5
28438 
28439 fi
28440 
28441 done
28442 
28443 
28444 # The cast to long int works around a bug in the HP C Compiler
28445 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28446 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28447 # This bug is HP SR number 8606223364.
28448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28449 $as_echo_n "checking size of int *... " >&6; }
28450 if ${ac_cv_sizeof_int_p+:} false; then :
28451   $as_echo_n "(cached) " >&6
28452 else
28453   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28454 
28455 else
28456   if test "$ac_cv_type_int_p" = yes; then
28457      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28459 as_fn_error 77 "cannot compute sizeof (int *)
28460 See \`config.log' for more details" "$LINENO" 5; }
28461    else
28462      ac_cv_sizeof_int_p=0
28463    fi
28464 fi
28465 
28466 fi
28467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28468 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28469 
28470 
28471 
28472 cat >>confdefs.h <<_ACEOF
28473 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
28474 _ACEOF
28475 
28476 
28477 
28478 if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28479   # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28480   SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28481 fi
28482 
28483 if test "x$SIZEOF_INT_P" = x; then
28484     # The test failed, lets stick to the assumed value.
28485     { $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
28486 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28487 else
28488     TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28489 
28490     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28491         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
28492     fi
28493 fi
28494 
28495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28496 $as_echo_n "checking for target address size... " >&6; }
28497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28498 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28499 
28500 
28501 ###############################################################################
28502 #
28503 # Is the target little of big endian?
28504 #
28505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28506 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28507 if ${ac_cv_c_bigendian+:} false; then :
28508   $as_echo_n "(cached) " >&6
28509 else
28510   ac_cv_c_bigendian=unknown
28511     # See if we're dealing with a universal compiler.
28512     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28513 /* end confdefs.h.  */
28514 #ifndef __APPLE_CC__
28515                not a universal capable compiler
28516              #endif
28517              typedef int dummy;
28518 
28519 _ACEOF
28520 if ac_fn_cxx_try_compile "$LINENO"; then :
28521 
28522         # Check for potential -arch flags.  It is not universal unless
28523         # there are at least two -arch flags with different values.
28524         ac_arch=
28525         ac_prev=
28526         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28527          if test -n "$ac_prev"; then
28528            case $ac_word in
28529              i?86 | x86_64 | ppc | ppc64)
28530                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28531                  ac_arch=$ac_word
28532                else
28533                  ac_cv_c_bigendian=universal
28534                  break
28535                fi
28536                ;;
28537            esac
28538            ac_prev=
28539          elif test "x$ac_word" = "x-arch"; then
28540            ac_prev=arch
28541          fi
28542        done
28543 fi
28544 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28545     if test $ac_cv_c_bigendian = unknown; then
28546       # See if sys/param.h defines the BYTE_ORDER macro.
28547       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28548 /* end confdefs.h.  */
28549 #include <sys/types.h>
28550              #include <sys/param.h>
28551 
28552 int
28553 main ()
28554 {
28555 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28556                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28557                      && LITTLE_ENDIAN)
28558               bogus endian macros
28559              #endif
28560 
28561   ;
28562   return 0;
28563 }
28564 _ACEOF
28565 if ac_fn_cxx_try_compile "$LINENO"; then :
28566   # It does; now see whether it defined to BIG_ENDIAN or not.
28567          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28568 /* end confdefs.h.  */
28569 #include <sys/types.h>
28570                 #include <sys/param.h>
28571 
28572 int
28573 main ()
28574 {
28575 #if BYTE_ORDER != BIG_ENDIAN
28576                  not big endian
28577                 #endif
28578 
28579   ;
28580   return 0;
28581 }
28582 _ACEOF
28583 if ac_fn_cxx_try_compile "$LINENO"; then :
28584   ac_cv_c_bigendian=yes
28585 else
28586   ac_cv_c_bigendian=no
28587 fi
28588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28589 fi
28590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28591     fi
28592     if test $ac_cv_c_bigendian = unknown; then
28593       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28594       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28595 /* end confdefs.h.  */
28596 #include <limits.h>
28597 
28598 int
28599 main ()
28600 {
28601 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28602               bogus endian macros
28603              #endif
28604 
28605   ;
28606   return 0;
28607 }
28608 _ACEOF
28609 if ac_fn_cxx_try_compile "$LINENO"; then :
28610   # It does; now see whether it defined to _BIG_ENDIAN or not.
28611          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28612 /* end confdefs.h.  */
28613 #include <limits.h>
28614 
28615 int
28616 main ()
28617 {
28618 #ifndef _BIG_ENDIAN
28619                  not big endian
28620                 #endif
28621 
28622   ;
28623   return 0;
28624 }
28625 _ACEOF
28626 if ac_fn_cxx_try_compile "$LINENO"; then :
28627   ac_cv_c_bigendian=yes
28628 else
28629   ac_cv_c_bigendian=no
28630 fi
28631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28632 fi
28633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28634     fi
28635     if test $ac_cv_c_bigendian = unknown; then
28636       # Compile a test program.
28637       if test "$cross_compiling" = yes; then :
28638   # Try to guess by grepping values from an object file.
28639          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28640 /* end confdefs.h.  */
28641 short int ascii_mm[] =
28642                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28643                 short int ascii_ii[] =
28644                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28645                 int use_ascii (int i) {
28646                   return ascii_mm[i] + ascii_ii[i];
28647                 }
28648                 short int ebcdic_ii[] =
28649                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28650                 short int ebcdic_mm[] =
28651                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28652                 int use_ebcdic (int i) {
28653                   return ebcdic_mm[i] + ebcdic_ii[i];
28654                 }
28655                 extern int foo;
28656 
28657 int
28658 main ()
28659 {
28660 return use_ascii (foo) == use_ebcdic (foo);
28661   ;
28662   return 0;
28663 }
28664 _ACEOF
28665 if ac_fn_cxx_try_compile "$LINENO"; then :
28666   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28667               ac_cv_c_bigendian=yes
28668             fi
28669             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28670               if test "$ac_cv_c_bigendian" = unknown; then
28671                 ac_cv_c_bigendian=no
28672               else
28673                 # finding both strings is unlikely to happen, but who knows?
28674                 ac_cv_c_bigendian=unknown
28675               fi
28676             fi
28677 fi
28678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28679 else
28680   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28681 /* end confdefs.h.  */
28682 $ac_includes_default
28683 int
28684 main ()
28685 {
28686 
28687              /* Are we little or big endian?  From Harbison&Steele.  */
28688              union
28689              {
28690                long int l;
28691                char c[sizeof (long int)];
28692              } u;
28693              u.l = 1;
28694              return u.c[sizeof (long int) - 1] == 1;
28695 
28696   ;
28697   return 0;
28698 }
28699 _ACEOF
28700 if ac_fn_cxx_try_run "$LINENO"; then :
28701   ac_cv_c_bigendian=no
28702 else
28703   ac_cv_c_bigendian=yes
28704 fi
28705 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28706   conftest.$ac_objext conftest.beam conftest.$ac_ext
28707 fi
28708 
28709     fi
28710 fi
28711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28712 $as_echo "$ac_cv_c_bigendian" >&6; }
28713  case $ac_cv_c_bigendian in #(
28714    yes)
28715      ENDIAN="big";; #(
28716    no)
28717      ENDIAN="little" ;; #(
28718    universal)
28719      ENDIAN="universal_endianness"
28720      ;; #(
28721    *)
28722      ENDIAN="unknown" ;;
28723  esac
28724 
28725 
28726 if test "x$ENDIAN" = xuniversal_endianness; then
28727     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28728 fi
28729 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28730     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
28731 fi
28732 
28733 
28734 # Configure flags for the tools
28735 
28736 
28737 ###############################################################################
28738 #
28739 # How to compile shared libraries.
28740 #
28741 
28742 if test "x$GCC" = xyes; then
28743     COMPILER_NAME=gcc
28744     PICFLAG="-fPIC"
28745     LIBRARY_PREFIX=lib
28746     SHARED_LIBRARY='lib$1.so'
28747     STATIC_LIBRARY='lib$1.a'
28748     SHARED_LIBRARY_FLAGS="-shared"
28749     SHARED_LIBRARY_SUFFIX='.so'
28750     STATIC_LIBRARY_SUFFIX='.a'
28751     OBJ_SUFFIX='.o'
28752     EXE_SUFFIX=''
28753     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
28754     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
28755     C_FLAG_REORDER=''
28756     CXX_FLAG_REORDER=''
28757     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28758     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
28759     LD="$CC"
28760     LDEXE="$CC"
28761     LDCXX="$CXX"
28762     LDEXECXX="$CXX"
28763     POST_STRIP_CMD="$STRIP -g"
28764 
28765     # Linking is different on MacOSX
28766     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28767         # Might change in the future to clang.
28768         COMPILER_NAME=gcc
28769         SHARED_LIBRARY='lib$1.dylib'
28770         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
28771         SHARED_LIBRARY_SUFFIX='.dylib'
28772         EXE_SUFFIX=''
28773         SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
28774         SET_SHARED_LIBRARY_MAPFILE=''
28775         SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
28776         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28777         POST_STRIP_CMD="$STRIP -S"
28778     fi
28779 else
28780     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28781         # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
28782         COMPILER_NAME=ossc
28783         PICFLAG="-KPIC"
28784         LIBRARY_PREFIX=lib
28785         SHARED_LIBRARY='lib$1.so'
28786         STATIC_LIBRARY='lib$1.a'
28787         SHARED_LIBRARY_FLAGS="-G"
28788         SHARED_LIBRARY_SUFFIX='.so'
28789         STATIC_LIBRARY_SUFFIX='.a'
28790         OBJ_SUFFIX='.o'
28791         EXE_SUFFIX=''
28792         SET_SHARED_LIBRARY_NAME=''
28793         SET_SHARED_LIBRARY_MAPFILE='-M$1'
28794         C_FLAG_REORDER='-xF'
28795         CXX_FLAG_REORDER='-xF'
28796         SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
28797         SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
28798         CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
28799         CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
28800         CFLAGS_JDKLIB_EXTRA='-xstrconst'
28801         POST_STRIP_CMD="$STRIP -x"
28802         POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
28803     fi
28804     if test "x$OPENJDK_TARGET_OS" = xwindows; then
28805         # If it is not gcc, then assume it is the MS Visual Studio compiler
28806         COMPILER_NAME=cl
28807         PICFLAG=""
28808         LIBRARY_PREFIX=
28809         SHARED_LIBRARY='$1.dll'
28810         STATIC_LIBRARY='$1.lib'
28811         SHARED_LIBRARY_FLAGS="-LD"
28812         SHARED_LIBRARY_SUFFIX='.dll'
28813         STATIC_LIBRARY_SUFFIX='.lib'
28814         OBJ_SUFFIX='.obj'
28815         EXE_SUFFIX='.exe'
28816         SET_SHARED_LIBRARY_NAME=''
28817         SET_SHARED_LIBRARY_MAPFILE=''
28818         SET_SHARED_LIBRARY_ORIGIN=''
28819         SET_EXECUTABLE_ORIGIN=''
28820     fi
28821 fi
28822 
28823 
28824 
28825 
28826 
28827 
28828 
28829 
28830 
28831 
28832 
28833 
28834 
28835 
28836 
28837 
28838 
28839 
28840 
28841 # The (cross) compiler is now configured, we can now test capabilities
28842 # of the target platform.
28843 
28844 
28845 
28846 ###############################################################################
28847 #
28848 # Setup the opt flags for different compilers
28849 # and different operating systems.
28850 #
28851 
28852 #
28853 # NOTE: check for -mstackrealign needs to be below potential addition of -m32
28854 #
28855 if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
28856     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
28857     # While waiting for a better solution, the current workaround is to use -mstackrealign.
28858     CFLAGS="$CFLAGS -mstackrealign"
28859     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
28860 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
28861     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28862 /* end confdefs.h.  */
28863 int main() { return 0; }
28864 _ACEOF
28865 if ac_fn_cxx_try_link "$LINENO"; then :
28866 
28867                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28868 $as_echo "yes" >&6; }
28869 
28870 else
28871 
28872                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28873 $as_echo "no" >&6; }
28874                         as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
28875 
28876 fi
28877 rm -f core conftest.err conftest.$ac_objext \
28878     conftest$ac_exeext conftest.$ac_ext
28879 fi
28880 
28881 C_FLAG_DEPS="-MMD -MF"
28882 CXX_FLAG_DEPS="-MMD -MF"
28883 
28884 case $COMPILER_TYPE in
28885   CC )
28886     case $COMPILER_NAME in
28887       gcc )
28888         case $OPENJDK_TARGET_OS in
28889           macosx )
28890             # On MacOSX we optimize for size, something
28891             # we should do for all platforms?
28892             C_O_FLAG_HI="-Os"
28893             C_O_FLAG_NORM="-Os"
28894             C_O_FLAG_NONE=""
28895             ;;
28896           *)
28897             C_O_FLAG_HI="-O3"
28898             C_O_FLAG_NORM="-O2"
28899             C_O_FLAG_NONE="-O0"
28900             ;;
28901         esac
28902         CXX_O_FLAG_HI="$C_O_FLAG_HI"
28903         CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28904         CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28905         CFLAGS_DEBUG_SYMBOLS="-g"
28906         CXXFLAGS_DEBUG_SYMBOLS="-g"
28907         if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28908             CFLAGS_DEBUG_SYMBOLS="-g1"
28909             CXXFLAGS_DEBUG_SYMBOLS="-g1"
28910         fi
28911         ;;
28912       ossc )
28913         #
28914         # Forte has different names for this with their C++ compiler...
28915         #
28916         C_FLAG_DEPS="-xMMD -xMF"
28917         CXX_FLAG_DEPS="-xMMD -xMF"
28918 
28919         # Extra options used with HIGHEST
28920         #
28921         # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28922         #          done with care, there are some assumptions below that need to
28923         #          be understood about the use of pointers, and IEEE behavior.
28924         #
28925         # Use non-standard floating point mode (not IEEE 754)
28926         CC_HIGHEST="$CC_HIGHEST -fns"
28927         # Do some simplification of floating point arithmetic (not IEEE 754)
28928         CC_HIGHEST="$CC_HIGHEST -fsimple"
28929         # Use single precision floating point with 'float'
28930         CC_HIGHEST="$CC_HIGHEST -fsingle"
28931         # Assume memory references via basic pointer types do not alias
28932         #   (Source with excessing pointer casting and data access with mixed
28933         #    pointer types are not recommended)
28934         CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28935         # Use intrinsic or inline versions for math/std functions
28936         #   (If you expect perfect errno behavior, do not use this)
28937         CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28938         # Loop data dependency optimizations (need -xO3 or higher)
28939         CC_HIGHEST="$CC_HIGHEST -xdepend"
28940         # Pointer parameters to functions do not overlap
28941         #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28942         #    If you pass in multiple pointers to the same data, do not use this)
28943         CC_HIGHEST="$CC_HIGHEST -xrestrict"
28944         # Inline some library routines
28945         #   (If you expect perfect errno behavior, do not use this)
28946         CC_HIGHEST="$CC_HIGHEST -xlibmil"
28947         # Use optimized math routines
28948         #   (If you expect perfect errno behavior, do not use this)
28949         #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28950         #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28951 
28952         if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28953           CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28954           CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28955         fi
28956 
28957         case $OPENJDK_TARGET_CPU_ARCH in
28958           x86)
28959             C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28960             C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28961             C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28962             C_O_FLAG_NONE="-xregs=no%frameptr"
28963             CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28964             CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28965             CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28966             CXX_O_FLAG_NONE="-xregs=no%frameptr"
28967             if test "x$OPENJDK_TARGET_CPU" = xx86; then
28968                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28969                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28970             fi
28971             ;;
28972           sparc)
28973             CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28974             CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28975             C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28976             C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28977             C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28978             C_O_FLAG_NONE=""
28979             CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28980             CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28981             CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28982             CXX_O_FLAG_NONE=""
28983             ;;
28984         esac
28985 
28986     CFLAGS_DEBUG_SYMBOLS="-g -xs"
28987     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28988     esac
28989     ;;
28990   CL )
28991     C_O_FLAG_HIGHEST="-O2"
28992     C_O_FLAG_HI="-O1"
28993     C_O_FLAG_NORM="-O1"
28994     C_O_FLAG_NONE="-Od"
28995     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28996     CXX_O_FLAG_HI="$C_O_FLAG_HI"
28997     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28998     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28999     ;;
29000 esac
29001 
29002 if test -z "$C_O_FLAG_HIGHEST"; then
29003    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29004 fi
29005 
29006 if test -z "$CXX_O_FLAG_HIGHEST"; then
29007    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29008 fi
29009 
29010 
29011 
29012 
29013 
29014 
29015 
29016 
29017 
29018 
29019 
29020 
29021 
29022 
29023 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29024    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29025 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29026 fi
29027 
29028 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29029    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29030 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29031 fi
29032 
29033 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29034    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29035 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29036 fi
29037 
29038 
29039 # Check whether --with-extra-cflags was given.
29040 if test "${with_extra_cflags+set}" = set; then :
29041   withval=$with_extra_cflags;
29042 fi
29043 
29044 
29045 
29046 # Check whether --with-extra-cxxflags was given.
29047 if test "${with_extra_cxxflags+set}" = set; then :
29048   withval=$with_extra_cxxflags;
29049 fi
29050 
29051 
29052 
29053 # Check whether --with-extra-ldflags was given.
29054 if test "${with_extra_ldflags+set}" = set; then :
29055   withval=$with_extra_ldflags;
29056 fi
29057 
29058 
29059 CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29060 CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29061 LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29062 
29063 # Hotspot needs these set in their legacy form
29064 LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29065 LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29066 LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29067 
29068 
29069 
29070 
29071 
29072 ###############################################################################
29073 #
29074 # Now setup the CFLAGS and LDFLAGS for the JDK build.
29075 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29076 #
29077 case $COMPILER_NAME in
29078       gcc )
29079           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29080                           -pipe \
29081                           -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29082           case $OPENJDK_TARGET_CPU_ARCH in
29083           arm )
29084             # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29085             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29086           ;;
29087           ppc )
29088             # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29089           ;;
29090           * )
29091             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29092             CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29093           ;;
29094           esac
29095           ;;
29096       ossc )
29097           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29098           case $OPENJDK_TARGET_CPU_ARCH in
29099           x86 )
29100             CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29101             CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29102           ;;
29103           esac
29104 
29105           CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29106           CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29107 
29108           LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29109           LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29110           ;;
29111       cl )
29112           CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29113                -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29114                -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29115                -DWIN32 -DIAL"
29116           case $OPENJDK_TARGET_CPU in
29117               x86 )
29118                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29119                   ;;
29120               x86_64 )
29121                   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29122                   ;;
29123           esac
29124           ;;
29125 esac
29126 
29127 ###############################################################################
29128 
29129 # Adjust flags according to debug level.
29130 case $DEBUG_LEVEL in
29131       fastdebug )
29132               CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29133               CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29134               C_O_FLAG_HI="$C_O_FLAG_NORM"
29135               C_O_FLAG_NORM="$C_O_FLAG_NORM"
29136               CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29137               CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29138               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29139               ;;
29140       slowdebug )
29141               CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29142               CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29143               C_O_FLAG_HI="$C_O_FLAG_NONE"
29144               C_O_FLAG_NORM="$C_O_FLAG_NONE"
29145               CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29146               CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29147               JAVAC_FLAGS="$JAVAC_FLAGS -g"
29148               ;;
29149 esac
29150 
29151 CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29152 
29153 # The package path is used only on macosx?
29154 PACKAGE_PATH=/opt/local
29155 
29156 
29157 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29158     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29159     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29160     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29161     #   Note: -Dmacro         is the same as    #define macro 1
29162     #         -Dmacro=      is the same as    #define macro
29163     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29164         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29165     else
29166         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29167     fi
29168 else
29169     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29170 fi
29171 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29172     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29173 fi
29174 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29175     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29176 fi
29177 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29178     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29179 fi
29180 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29181     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29182     # Setting these parameters makes it an error to link to macosx APIs that are
29183     # newer than the given OS version and makes the linked binaries compatible even
29184     # if built on a newer version of the OS.
29185     # The expected format is X.Y.Z
29186     MACOSX_VERSION_MIN=10.7.0
29187 
29188     # The macro takes the version with no dots, ex: 1070
29189     # Let the flags variables get resolved in make for easier override on make
29190     # command line.
29191     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29192     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29193 fi
29194 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29195     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29196 fi
29197 if test "x$DEBUG_LEVEL" = xrelease; then
29198     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29199     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29200         CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29201     fi
29202 else
29203     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29204 fi
29205 
29206 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29207 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29208 
29209 CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29210         -I${JDK_OUTPUTDIR}/include \
29211         -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29212         -I${JDK_TOPDIR}/src/share/javavm/export \
29213         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29214         -I${JDK_TOPDIR}/src/share/native/common \
29215         -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29216 
29217 # The shared libraries are compiled using the picflag.
29218 CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29219 CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29220 
29221 # Executable flags
29222 CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29223 CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29224 
29225 # Now this is odd. The JDK native libraries have to link against libjvm.so
29226 # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29227 # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29228 # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29229 # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29230 # libraries will link to whatever is in memory. Yuck.
29231 #
29232 # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29233 if test "x$COMPILER_NAME" = xcl; then
29234     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29235     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29236         LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29237     fi
29238     # TODO: make -debug optional "--disable-full-debug-symbols"
29239     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29240     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29241     LDFLAGS_JDKLIB_SUFFIX=""
29242     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29243         LDFLAGS_STACK_SIZE=1048576
29244     else
29245         LDFLAGS_STACK_SIZE=327680
29246     fi
29247     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29248 else
29249     if test "x$COMPILER_NAME" = xgcc; then
29250         # If this is a --hash-style=gnu system, use --hash-style=both, why?
29251         HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29252         if test -n "$HAS_GNU_HASH"; then
29253             LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29254         fi
29255         if test "x$OPENJDK_TARGET_OS" = xlinux; then
29256           # And since we now know that the linker is gnu, then add -z defs, to forbid
29257           # undefined symbols in object files.
29258           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29259           if test "x$DEBUG_LEVEL" = "xrelease"; then
29260               # When building release libraries, tell the linker optimize them.
29261               # Should this be supplied to the OSS linker as well?
29262               LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29263           fi
29264         fi
29265     fi
29266     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29267                     -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29268 
29269     # On some platforms (mac) the linker warns about non existing -L dirs.
29270     # Add server first if available. Linking aginst client does not always produce the same results.
29271     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29272     # Default to server for other variants.
29273     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29274         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29275     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29276         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29277     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29278         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29279     else
29280         LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29281     fi
29282 
29283     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29284     if test "x$COMPILER_NAME" = xossc; then
29285         LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29286     fi
29287 
29288     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29289     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29290         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29291     fi
29292 fi
29293 
29294 
29295 
29296 
29297 
29298 
29299 
29300 
29301 
29302 
29303 
29304 
29305 
29306 
29307 
29308   # Some Zero and Shark settings.
29309   # ZERO_ARCHFLAG tells the compiler which mode to build for
29310   case "${OPENJDK_TARGET_CPU}" in
29311     s390)
29312       ZERO_ARCHFLAG="-m31"
29313       ;;
29314     *)
29315       ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29316   esac
29317 
29318   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29319 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29320   supports=yes
29321 
29322   saved_cflags="$CFLAGS"
29323   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29324   ac_ext=c
29325 ac_cpp='$CPP $CPPFLAGS'
29326 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29327 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29328 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29329 
29330   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29331 /* end confdefs.h.  */
29332 
29333     int i;
29334 
29335 _ACEOF
29336 if ac_fn_c_try_compile "$LINENO"; then :
29337 
29338 else
29339   supports=no
29340 fi
29341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29342   ac_ext=cpp
29343 ac_cpp='$CXXCPP $CPPFLAGS'
29344 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29345 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29346 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29347 
29348   CFLAGS="$saved_cflags"
29349 
29350   saved_cxxflags="$CXXFLAGS"
29351   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29352   ac_ext=cpp
29353 ac_cpp='$CXXCPP $CPPFLAGS'
29354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29357 
29358   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29359 /* end confdefs.h.  */
29360 
29361     int i;
29362 
29363 _ACEOF
29364 if ac_fn_cxx_try_compile "$LINENO"; then :
29365 
29366 else
29367   supports=no
29368 fi
29369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29370   ac_ext=cpp
29371 ac_cpp='$CXXCPP $CPPFLAGS'
29372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29375 
29376   CXXFLAGS="$saved_cxxflags"
29377 
29378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29379 $as_echo "$supports" >&6; }
29380   if test "x$supports" = "xyes" ; then
29381     :
29382   else
29383     ZERO_ARCHFLAG=""
29384   fi
29385 
29386 
29387 
29388   # Check that the compiler supports -mX flags
29389   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29390 
29391   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29392 $as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29393   supports=yes
29394 
29395   saved_cflags="$CFLAGS"
29396   CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29397   ac_ext=c
29398 ac_cpp='$CPP $CPPFLAGS'
29399 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29400 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29401 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29402 
29403   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29404 /* end confdefs.h.  */
29405 
29406     int i;
29407 
29408 _ACEOF
29409 if ac_fn_c_try_compile "$LINENO"; then :
29410 
29411 else
29412   supports=no
29413 fi
29414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29415   ac_ext=cpp
29416 ac_cpp='$CXXCPP $CPPFLAGS'
29417 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29418 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29419 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29420 
29421   CFLAGS="$saved_cflags"
29422 
29423   saved_cxxflags="$CXXFLAGS"
29424   CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29425   ac_ext=cpp
29426 ac_cpp='$CXXCPP $CPPFLAGS'
29427 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29428 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29429 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29430 
29431   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29432 /* end confdefs.h.  */
29433 
29434     int i;
29435 
29436 _ACEOF
29437 if ac_fn_cxx_try_compile "$LINENO"; then :
29438 
29439 else
29440   supports=no
29441 fi
29442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29443   ac_ext=cpp
29444 ac_cpp='$CXXCPP $CPPFLAGS'
29445 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29446 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29447 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29448 
29449   CXXFLAGS="$saved_cxxflags"
29450 
29451   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29452 $as_echo "$supports" >&6; }
29453   if test "x$supports" = "xyes" ; then
29454     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29455   else
29456     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29457   fi
29458 
29459 
29460 
29461 
29462 # Setup debug symbols (need objcopy from the toolchain for that)
29463 
29464 #
29465 # ENABLE_DEBUG_SYMBOLS
29466 # This must be done after the toolchain is setup, since we're looking at objcopy.
29467 #
29468 # Check whether --enable-debug-symbols was given.
29469 if test "${enable_debug_symbols+set}" = set; then :
29470   enableval=$enable_debug_symbols;
29471 fi
29472 
29473 
29474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29475 $as_echo_n "checking if we should generate debug symbols... " >&6; }
29476 
29477 if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29478    # explicit enabling of enable-debug-symbols and can't find objcopy
29479    #   this is an error
29480    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29481 fi
29482 
29483 if test "x$enable_debug_symbols" = "xyes"; then
29484   ENABLE_DEBUG_SYMBOLS=true
29485 elif test "x$enable_debug_symbols" = "xno"; then
29486   ENABLE_DEBUG_SYMBOLS=false
29487 else
29488   # default on macosx is false
29489   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29490     ENABLE_DEBUG_SYMBOLS=false
29491   # Default is on if objcopy is found, otherwise off
29492   elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29493     ENABLE_DEBUG_SYMBOLS=true
29494   else
29495     ENABLE_DEBUG_SYMBOLS=false
29496   fi
29497 fi
29498 
29499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29500 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29501 
29502 #
29503 # ZIP_DEBUGINFO_FILES
29504 #
29505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29506 $as_echo_n "checking if we should zip debug-info files... " >&6; }
29507 # Check whether --enable-zip-debug-info was given.
29508 if test "${enable_zip_debug_info+set}" = set; then :
29509   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29510 else
29511   enable_zip_debug_info="yes"
29512 fi
29513 
29514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29515 $as_echo "${enable_zip_debug_info}" >&6; }
29516 
29517 if test "x${enable_zip_debug_info}" = "xno"; then
29518    ZIP_DEBUGINFO_FILES=false
29519 else
29520    ZIP_DEBUGINFO_FILES=true
29521 fi
29522 
29523 
29524 
29525 
29526 
29527 
29528 
29529 ###############################################################################
29530 #
29531 # Check dependencies for external and internal libraries.
29532 #
29533 ###############################################################################
29534 
29535 
29536 
29537 ###############################################################################
29538 #
29539 # OS specific settings that we never will need to probe.
29540 #
29541 if test "x$OPENJDK_TARGET_OS" = xlinux; then
29542     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29543 $as_echo_n "checking what is not needed on Linux?... " >&6; }
29544     PULSE_NOT_NEEDED=yes
29545     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29546 $as_echo "pulse" >&6; }
29547 fi
29548 
29549 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29550     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29551 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
29552     ALSA_NOT_NEEDED=yes
29553     PULSE_NOT_NEEDED=yes
29554     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29555 $as_echo "alsa pulse" >&6; }
29556 fi
29557 
29558 if test "x$OPENJDK_TARGET_OS" = xwindows; then
29559     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29560 $as_echo_n "checking what is not needed on Windows?... " >&6; }
29561     CUPS_NOT_NEEDED=yes
29562     ALSA_NOT_NEEDED=yes
29563     PULSE_NOT_NEEDED=yes
29564     X11_NOT_NEEDED=yes
29565     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29566 $as_echo "alsa cups pulse x11" >&6; }
29567 fi
29568 
29569 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29570     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29571 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29572     ALSA_NOT_NEEDED=yes
29573     PULSE_NOT_NEEDED=yes
29574     X11_NOT_NEEDED=yes
29575     FREETYPE2_NOT_NEEDED=yes
29576     # If the java runtime framework is disabled, then we need X11.
29577     # This will be adjusted below.
29578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29579 $as_echo "alsa pulse x11" >&6; }
29580 fi
29581 
29582 if test "x$OPENJDK_TARGET_OS" = xbsd; then
29583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29584 $as_echo_n "checking what is not needed on bsd?... " >&6; }
29585     ALSA_NOT_NEEDED=yes
29586     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29587 $as_echo "alsa" >&6; }
29588 fi
29589 
29590 if test "x$OPENJDK" = "xfalse"; then
29591     FREETYPE2_NOT_NEEDED=yes
29592 fi
29593 
29594 if test "x$SUPPORT_HEADFUL" = xno; then
29595     X11_NOT_NEEDED=yes
29596 fi
29597 
29598 ###############################################################################
29599 #
29600 # Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29601 # that uses this API.
29602 #
29603 # Check whether --enable-macosx-runtime-support was given.
29604 if test "${enable_macosx_runtime_support+set}" = set; then :
29605   enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29606 else
29607   MACOSX_RUNTIME_SUPPORT="no"
29608 fi
29609 
29610 
29611 USE_MACOSX_RUNTIME_SUPPORT=no
29612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29613 $as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29614 if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29615     if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29616         MACOSX_RUNTIME_SUPPORT=yes
29617         USE_MACOSX_RUNTIME_SUPPORT=yes
29618         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29619 $as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29620     else
29621         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29622 $as_echo "yes, but explicitly disabled." >&6; }
29623     fi
29624 else
29625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29626 $as_echo "no" >&6; }
29627 fi
29628 
29629 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29630     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29631 $as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29632     X11_NOT_NEEDED=
29633     FREETYPE2_NOT_NEEDED=
29634     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29635 $as_echo "alsa pulse" >&6; }
29636 fi
29637 
29638 
29639 
29640 ###############################################################################
29641 #
29642 # Check for X Windows
29643 #
29644 
29645 # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29646 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
29647 # --x-libraries for the sysroot, if that seems to be correct.
29648 if test "x$SYS_ROOT" != "x/"; then
29649   if test "x$x_includes" = xNONE; then
29650     if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29651       x_includes="$SYS_ROOT/usr/X11R6/include"
29652     elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
29653       x_includes="$SYS_ROOT/usr/include"
29654     fi
29655   fi
29656   if test "x$x_libraries" = xNONE; then
29657     if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29658       x_libraries="$SYS_ROOT/usr/X11R6/lib"
29659     elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
29660       x_libraries="$SYS_ROOT/usr/lib64"
29661     elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
29662       x_libraries="$SYS_ROOT/usr/lib"
29663     fi
29664   fi
29665 fi
29666 
29667 # Now let autoconf do it's magic
29668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29669 $as_echo_n "checking for X... " >&6; }
29670 
29671 
29672 # Check whether --with-x was given.
29673 if test "${with_x+set}" = set; then :
29674   withval=$with_x;
29675 fi
29676 
29677 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29678 if test "x$with_x" = xno; then
29679   # The user explicitly disabled X.
29680   have_x=disabled
29681 else
29682   case $x_includes,$x_libraries in #(
29683     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29684     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
29685   $as_echo_n "(cached) " >&6
29686 else
29687   # One or both of the vars are not set, and there is no cached value.
29688 ac_x_includes=no ac_x_libraries=no
29689 rm -f -r conftest.dir
29690 if mkdir conftest.dir; then
29691   cd conftest.dir
29692   cat >Imakefile <<'_ACEOF'
29693 incroot:
29694         @echo incroot='${INCROOT}'
29695 usrlibdir:
29696         @echo usrlibdir='${USRLIBDIR}'
29697 libdir:
29698         @echo libdir='${LIBDIR}'
29699 _ACEOF
29700   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29701     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29702     for ac_var in incroot usrlibdir libdir; do
29703       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29704     done
29705     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29706     for ac_extension in a so sl dylib la dll; do
29707       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29708          test -f "$ac_im_libdir/libX11.$ac_extension"; then
29709         ac_im_usrlibdir=$ac_im_libdir; break
29710       fi
29711     done
29712     # Screen out bogus values from the imake configuration.  They are
29713     # bogus both because they are the default anyway, and because
29714     # using them would break gcc on systems where it needs fixed includes.
29715     case $ac_im_incroot in
29716         /usr/include) ac_x_includes= ;;
29717         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29718     esac
29719     case $ac_im_usrlibdir in
29720         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
29721         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29722     esac
29723   fi
29724   cd ..
29725   rm -f -r conftest.dir
29726 fi
29727 
29728 # Standard set of common directories for X headers.
29729 # Check X11 before X11Rn because it is often a symlink to the current release.
29730 ac_x_header_dirs='
29731 /usr/X11/include
29732 /usr/X11R7/include
29733 /usr/X11R6/include
29734 /usr/X11R5/include
29735 /usr/X11R4/include
29736 
29737 /usr/include/X11
29738 /usr/include/X11R7
29739 /usr/include/X11R6
29740 /usr/include/X11R5
29741 /usr/include/X11R4
29742 
29743 /usr/local/X11/include
29744 /usr/local/X11R7/include
29745 /usr/local/X11R6/include
29746 /usr/local/X11R5/include
29747 /usr/local/X11R4/include
29748 
29749 /usr/local/include/X11
29750 /usr/local/include/X11R7
29751 /usr/local/include/X11R6
29752 /usr/local/include/X11R5
29753 /usr/local/include/X11R4
29754 
29755 /usr/X386/include
29756 /usr/x386/include
29757 /usr/XFree86/include/X11
29758 
29759 /usr/include
29760 /usr/local/include
29761 /usr/unsupported/include
29762 /usr/athena/include
29763 /usr/local/x11r5/include
29764 /usr/lpp/Xamples/include
29765 
29766 /usr/openwin/include
29767 /usr/openwin/share/include'
29768 
29769 if test "$ac_x_includes" = no; then
29770   # Guess where to find include files, by looking for Xlib.h.
29771   # First, try using that file with no special directory specified.
29772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29773 /* end confdefs.h.  */
29774 #include <X11/Xlib.h>
29775 _ACEOF
29776 if ac_fn_cxx_try_cpp "$LINENO"; then :
29777   # We can compile using X headers with no special include directory.
29778 ac_x_includes=
29779 else
29780   for ac_dir in $ac_x_header_dirs; do
29781   if test -r "$ac_dir/X11/Xlib.h"; then
29782     ac_x_includes=$ac_dir
29783     break
29784   fi
29785 done
29786 fi
29787 rm -f conftest.err conftest.i conftest.$ac_ext
29788 fi # $ac_x_includes = no
29789 
29790 if test "$ac_x_libraries" = no; then
29791   # Check for the libraries.
29792   # See if we find them without any special options.
29793   # Don't add to $LIBS permanently.
29794   ac_save_LIBS=$LIBS
29795   LIBS="-lX11 $LIBS"
29796   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797 /* end confdefs.h.  */
29798 #include <X11/Xlib.h>
29799 int
29800 main ()
29801 {
29802 XrmInitialize ()
29803   ;
29804   return 0;
29805 }
29806 _ACEOF
29807 if ac_fn_cxx_try_link "$LINENO"; then :
29808   LIBS=$ac_save_LIBS
29809 # We can link X programs with no special library path.
29810 ac_x_libraries=
29811 else
29812   LIBS=$ac_save_LIBS
29813 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
29814 do
29815   # Don't even attempt the hair of trying to link an X program!
29816   for ac_extension in a so sl dylib la dll; do
29817     if test -r "$ac_dir/libX11.$ac_extension"; then
29818       ac_x_libraries=$ac_dir
29819       break 2
29820     fi
29821   done
29822 done
29823 fi
29824 rm -f core conftest.err conftest.$ac_objext \
29825     conftest$ac_exeext conftest.$ac_ext
29826 fi # $ac_x_libraries = no
29827 
29828 case $ac_x_includes,$ac_x_libraries in #(
29829   no,* | *,no | *\'*)
29830     # Didn't find X, or a directory has "'" in its name.
29831     ac_cv_have_x="have_x=no";; #(
29832   *)
29833     # Record where we found X for the cache.
29834     ac_cv_have_x="have_x=yes\
29835         ac_x_includes='$ac_x_includes'\
29836         ac_x_libraries='$ac_x_libraries'"
29837 esac
29838 fi
29839 ;; #(
29840     *) have_x=yes;;
29841   esac
29842   eval "$ac_cv_have_x"
29843 fi # $with_x != no
29844 
29845 if test "$have_x" != yes; then
29846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
29847 $as_echo "$have_x" >&6; }
29848   no_x=yes
29849 else
29850   # If each of the values was on the command line, it overrides each guess.
29851   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
29852   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
29853   # Update the cache value to reflect the command line values.
29854   ac_cv_have_x="have_x=yes\
29855         ac_x_includes='$x_includes'\
29856         ac_x_libraries='$x_libraries'"
29857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
29858 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
29859 fi
29860 
29861 if test "$no_x" = yes; then
29862   # Not all programs may use this symbol, but it does not hurt to define it.
29863 
29864 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
29865 
29866   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
29867 else
29868   if test -n "$x_includes"; then
29869     X_CFLAGS="$X_CFLAGS -I$x_includes"
29870   fi
29871 
29872   # It would also be nice to do this for all -L options, not just this one.
29873   if test -n "$x_libraries"; then
29874     X_LIBS="$X_LIBS -L$x_libraries"
29875     # For Solaris; some versions of Sun CC require a space after -R and
29876     # others require no space.  Words are not sufficient . . . .
29877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
29878 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
29879     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
29880     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
29881     ac_cxx_werror_flag=yes
29882     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29883 /* end confdefs.h.  */
29884 
29885 int
29886 main ()
29887 {
29888 
29889   ;
29890   return 0;
29891 }
29892 _ACEOF
29893 if ac_fn_cxx_try_link "$LINENO"; then :
29894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29895 $as_echo "no" >&6; }
29896        X_LIBS="$X_LIBS -R$x_libraries"
29897 else
29898   LIBS="$ac_xsave_LIBS -R $x_libraries"
29899        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29900 /* end confdefs.h.  */
29901 
29902 int
29903 main ()
29904 {
29905 
29906   ;
29907   return 0;
29908 }
29909 _ACEOF
29910 if ac_fn_cxx_try_link "$LINENO"; then :
29911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29912 $as_echo "yes" >&6; }
29913           X_LIBS="$X_LIBS -R $x_libraries"
29914 else
29915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
29916 $as_echo "neither works" >&6; }
29917 fi
29918 rm -f core conftest.err conftest.$ac_objext \
29919     conftest$ac_exeext conftest.$ac_ext
29920 fi
29921 rm -f core conftest.err conftest.$ac_objext \
29922     conftest$ac_exeext conftest.$ac_ext
29923     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
29924     LIBS=$ac_xsave_LIBS
29925   fi
29926 
29927   # Check for system-dependent libraries X programs must link with.
29928   # Do this before checking for the system-independent R6 libraries
29929   # (-lICE), since we may need -lsocket or whatever for X linking.
29930 
29931   if test "$ISC" = yes; then
29932     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
29933   else
29934     # Martyn Johnson says this is needed for Ultrix, if the X
29935     # libraries were built with DECnet support.  And Karl Berry says
29936     # the Alpha needs dnet_stub (dnet does not exist).
29937     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
29938     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29939 /* end confdefs.h.  */
29940 
29941 /* Override any GCC internal prototype to avoid an error.
29942    Use char because int might match the return type of a GCC
29943    builtin and then its argument prototype would still apply.  */
29944 #ifdef __cplusplus
29945 extern "C"
29946 #endif
29947 char XOpenDisplay ();
29948 int
29949 main ()
29950 {
29951 return XOpenDisplay ();
29952   ;
29953   return 0;
29954 }
29955 _ACEOF
29956 if ac_fn_cxx_try_link "$LINENO"; then :
29957 
29958 else
29959   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
29960 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
29961 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
29962   $as_echo_n "(cached) " >&6
29963 else
29964   ac_check_lib_save_LIBS=$LIBS
29965 LIBS="-ldnet  $LIBS"
29966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29967 /* end confdefs.h.  */
29968 
29969 /* Override any GCC internal prototype to avoid an error.
29970    Use char because int might match the return type of a GCC
29971    builtin and then its argument prototype would still apply.  */
29972 #ifdef __cplusplus
29973 extern "C"
29974 #endif
29975 char dnet_ntoa ();
29976 int
29977 main ()
29978 {
29979 return dnet_ntoa ();
29980   ;
29981   return 0;
29982 }
29983 _ACEOF
29984 if ac_fn_cxx_try_link "$LINENO"; then :
29985   ac_cv_lib_dnet_dnet_ntoa=yes
29986 else
29987   ac_cv_lib_dnet_dnet_ntoa=no
29988 fi
29989 rm -f core conftest.err conftest.$ac_objext \
29990     conftest$ac_exeext conftest.$ac_ext
29991 LIBS=$ac_check_lib_save_LIBS
29992 fi
29993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
29994 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
29995 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
29996   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
29997 fi
29998 
29999     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30000       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30001 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30002 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30003   $as_echo_n "(cached) " >&6
30004 else
30005   ac_check_lib_save_LIBS=$LIBS
30006 LIBS="-ldnet_stub  $LIBS"
30007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30008 /* end confdefs.h.  */
30009 
30010 /* Override any GCC internal prototype to avoid an error.
30011    Use char because int might match the return type of a GCC
30012    builtin and then its argument prototype would still apply.  */
30013 #ifdef __cplusplus
30014 extern "C"
30015 #endif
30016 char dnet_ntoa ();
30017 int
30018 main ()
30019 {
30020 return dnet_ntoa ();
30021   ;
30022   return 0;
30023 }
30024 _ACEOF
30025 if ac_fn_cxx_try_link "$LINENO"; then :
30026   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30027 else
30028   ac_cv_lib_dnet_stub_dnet_ntoa=no
30029 fi
30030 rm -f core conftest.err conftest.$ac_objext \
30031     conftest$ac_exeext conftest.$ac_ext
30032 LIBS=$ac_check_lib_save_LIBS
30033 fi
30034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30035 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30036 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30037   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30038 fi
30039 
30040     fi
30041 fi
30042 rm -f core conftest.err conftest.$ac_objext \
30043     conftest$ac_exeext conftest.$ac_ext
30044     LIBS="$ac_xsave_LIBS"
30045 
30046     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30047     # to get the SysV transport functions.
30048     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30049     # needs -lnsl.
30050     # The nsl library prevents programs from opening the X display
30051     # on Irix 5.2, according to T.E. Dickey.
30052     # The functions gethostbyname, getservbyname, and inet_addr are
30053     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30054     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30055 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30056 
30057 fi
30058 
30059     if test $ac_cv_func_gethostbyname = no; then
30060       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30061 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30062 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30063   $as_echo_n "(cached) " >&6
30064 else
30065   ac_check_lib_save_LIBS=$LIBS
30066 LIBS="-lnsl  $LIBS"
30067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30068 /* end confdefs.h.  */
30069 
30070 /* Override any GCC internal prototype to avoid an error.
30071    Use char because int might match the return type of a GCC
30072    builtin and then its argument prototype would still apply.  */
30073 #ifdef __cplusplus
30074 extern "C"
30075 #endif
30076 char gethostbyname ();
30077 int
30078 main ()
30079 {
30080 return gethostbyname ();
30081   ;
30082   return 0;
30083 }
30084 _ACEOF
30085 if ac_fn_cxx_try_link "$LINENO"; then :
30086   ac_cv_lib_nsl_gethostbyname=yes
30087 else
30088   ac_cv_lib_nsl_gethostbyname=no
30089 fi
30090 rm -f core conftest.err conftest.$ac_objext \
30091     conftest$ac_exeext conftest.$ac_ext
30092 LIBS=$ac_check_lib_save_LIBS
30093 fi
30094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30095 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30096 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30097   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30098 fi
30099 
30100       if test $ac_cv_lib_nsl_gethostbyname = no; then
30101         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30102 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30103 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30104   $as_echo_n "(cached) " >&6
30105 else
30106   ac_check_lib_save_LIBS=$LIBS
30107 LIBS="-lbsd  $LIBS"
30108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30109 /* end confdefs.h.  */
30110 
30111 /* Override any GCC internal prototype to avoid an error.
30112    Use char because int might match the return type of a GCC
30113    builtin and then its argument prototype would still apply.  */
30114 #ifdef __cplusplus
30115 extern "C"
30116 #endif
30117 char gethostbyname ();
30118 int
30119 main ()
30120 {
30121 return gethostbyname ();
30122   ;
30123   return 0;
30124 }
30125 _ACEOF
30126 if ac_fn_cxx_try_link "$LINENO"; then :
30127   ac_cv_lib_bsd_gethostbyname=yes
30128 else
30129   ac_cv_lib_bsd_gethostbyname=no
30130 fi
30131 rm -f core conftest.err conftest.$ac_objext \
30132     conftest$ac_exeext conftest.$ac_ext
30133 LIBS=$ac_check_lib_save_LIBS
30134 fi
30135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30136 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30137 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30138   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30139 fi
30140 
30141       fi
30142     fi
30143 
30144     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30145     # socket/setsockopt and other routines are undefined under SCO ODT
30146     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30147     # on later versions), says Simon Leinen: it contains gethostby*
30148     # variants that don't use the name server (or something).  -lsocket
30149     # must be given before -lnsl if both are needed.  We assume that
30150     # if connect needs -lnsl, so does gethostbyname.
30151     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30152 if test "x$ac_cv_func_connect" = xyes; then :
30153 
30154 fi
30155 
30156     if test $ac_cv_func_connect = no; then
30157       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30158 $as_echo_n "checking for connect in -lsocket... " >&6; }
30159 if ${ac_cv_lib_socket_connect+:} false; then :
30160   $as_echo_n "(cached) " >&6
30161 else
30162   ac_check_lib_save_LIBS=$LIBS
30163 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30165 /* end confdefs.h.  */
30166 
30167 /* Override any GCC internal prototype to avoid an error.
30168    Use char because int might match the return type of a GCC
30169    builtin and then its argument prototype would still apply.  */
30170 #ifdef __cplusplus
30171 extern "C"
30172 #endif
30173 char connect ();
30174 int
30175 main ()
30176 {
30177 return connect ();
30178   ;
30179   return 0;
30180 }
30181 _ACEOF
30182 if ac_fn_cxx_try_link "$LINENO"; then :
30183   ac_cv_lib_socket_connect=yes
30184 else
30185   ac_cv_lib_socket_connect=no
30186 fi
30187 rm -f core conftest.err conftest.$ac_objext \
30188     conftest$ac_exeext conftest.$ac_ext
30189 LIBS=$ac_check_lib_save_LIBS
30190 fi
30191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30192 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30193 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30194   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30195 fi
30196 
30197     fi
30198 
30199     # Guillermo Gomez says -lposix is necessary on A/UX.
30200     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30201 if test "x$ac_cv_func_remove" = xyes; then :
30202 
30203 fi
30204 
30205     if test $ac_cv_func_remove = no; then
30206       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30207 $as_echo_n "checking for remove in -lposix... " >&6; }
30208 if ${ac_cv_lib_posix_remove+:} false; then :
30209   $as_echo_n "(cached) " >&6
30210 else
30211   ac_check_lib_save_LIBS=$LIBS
30212 LIBS="-lposix  $LIBS"
30213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30214 /* end confdefs.h.  */
30215 
30216 /* Override any GCC internal prototype to avoid an error.
30217    Use char because int might match the return type of a GCC
30218    builtin and then its argument prototype would still apply.  */
30219 #ifdef __cplusplus
30220 extern "C"
30221 #endif
30222 char remove ();
30223 int
30224 main ()
30225 {
30226 return remove ();
30227   ;
30228   return 0;
30229 }
30230 _ACEOF
30231 if ac_fn_cxx_try_link "$LINENO"; then :
30232   ac_cv_lib_posix_remove=yes
30233 else
30234   ac_cv_lib_posix_remove=no
30235 fi
30236 rm -f core conftest.err conftest.$ac_objext \
30237     conftest$ac_exeext conftest.$ac_ext
30238 LIBS=$ac_check_lib_save_LIBS
30239 fi
30240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30241 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30242 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30243   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30244 fi
30245 
30246     fi
30247 
30248     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30249     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30250 if test "x$ac_cv_func_shmat" = xyes; then :
30251 
30252 fi
30253 
30254     if test $ac_cv_func_shmat = no; then
30255       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30256 $as_echo_n "checking for shmat in -lipc... " >&6; }
30257 if ${ac_cv_lib_ipc_shmat+:} false; then :
30258   $as_echo_n "(cached) " >&6
30259 else
30260   ac_check_lib_save_LIBS=$LIBS
30261 LIBS="-lipc  $LIBS"
30262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30263 /* end confdefs.h.  */
30264 
30265 /* Override any GCC internal prototype to avoid an error.
30266    Use char because int might match the return type of a GCC
30267    builtin and then its argument prototype would still apply.  */
30268 #ifdef __cplusplus
30269 extern "C"
30270 #endif
30271 char shmat ();
30272 int
30273 main ()
30274 {
30275 return shmat ();
30276   ;
30277   return 0;
30278 }
30279 _ACEOF
30280 if ac_fn_cxx_try_link "$LINENO"; then :
30281   ac_cv_lib_ipc_shmat=yes
30282 else
30283   ac_cv_lib_ipc_shmat=no
30284 fi
30285 rm -f core conftest.err conftest.$ac_objext \
30286     conftest$ac_exeext conftest.$ac_ext
30287 LIBS=$ac_check_lib_save_LIBS
30288 fi
30289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30290 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30291 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
30292   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30293 fi
30294 
30295     fi
30296   fi
30297 
30298   # Check for libraries that X11R6 Xt/Xaw programs need.
30299   ac_save_LDFLAGS=$LDFLAGS
30300   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30301   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30302   # check for ICE first), but we must link in the order -lSM -lICE or
30303   # we get undefined symbols.  So assume we have SM if we have ICE.
30304   # These have to be linked with before -lX11, unlike the other
30305   # libraries we check for below, so use a different variable.
30306   # John Interrante, Karl Berry
30307   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30308 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30309 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
30310   $as_echo_n "(cached) " >&6
30311 else
30312   ac_check_lib_save_LIBS=$LIBS
30313 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30315 /* end confdefs.h.  */
30316 
30317 /* Override any GCC internal prototype to avoid an error.
30318    Use char because int might match the return type of a GCC
30319    builtin and then its argument prototype would still apply.  */
30320 #ifdef __cplusplus
30321 extern "C"
30322 #endif
30323 char IceConnectionNumber ();
30324 int
30325 main ()
30326 {
30327 return IceConnectionNumber ();
30328   ;
30329   return 0;
30330 }
30331 _ACEOF
30332 if ac_fn_cxx_try_link "$LINENO"; then :
30333   ac_cv_lib_ICE_IceConnectionNumber=yes
30334 else
30335   ac_cv_lib_ICE_IceConnectionNumber=no
30336 fi
30337 rm -f core conftest.err conftest.$ac_objext \
30338     conftest$ac_exeext conftest.$ac_ext
30339 LIBS=$ac_check_lib_save_LIBS
30340 fi
30341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30342 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30343 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
30344   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30345 fi
30346 
30347   LDFLAGS=$ac_save_LDFLAGS
30348 
30349 fi
30350 
30351 
30352 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30353 # this doesn't make sense so we remove it.
30354 if test "x$COMPILE_TYPE" = xcross; then
30355   X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30356 fi
30357 
30358 if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30359 
30360     # Print a helpful message on how to acquire the necessary build dependency.
30361     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30362     MISSING_DEPENDENCY=x11
30363     PKGHANDLER_COMMAND=
30364 
30365     case $PKGHANDLER in
30366         apt-get)
30367                 apt_help     $MISSING_DEPENDENCY ;;
30368     yum)
30369                 yum_help     $MISSING_DEPENDENCY ;;
30370         port)
30371                 port_help    $MISSING_DEPENDENCY ;;
30372         pkgutil)
30373                 pkgutil_help $MISSING_DEPENDENCY ;;
30374         pkgadd)
30375                 pkgadd_help  $MISSING_DEPENDENCY ;;
30376     * )
30377       break ;;
30378     esac
30379 
30380     if test "x$PKGHANDLER_COMMAND" != x; then
30381         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30382     fi
30383 
30384     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30385 fi
30386 
30387 # Some of the old makefiles require a setting of OPENWIN_HOME
30388 # Since the X11R6 directory has disappeared on later Linuxes,
30389 # we need to probe for it.
30390 if test "x$OPENJDK_TARGET_OS" = xlinux; then
30391     if test -d "$SYS_ROOT/usr/X11R6"; then
30392         OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30393     elif test -d "$SYS_ROOT/usr/include/X11"; then
30394         OPENWIN_HOME="$SYS_ROOT/usr"
30395     fi
30396 fi
30397 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30398     OPENWIN_HOME="/usr/openwin"
30399 fi
30400 
30401 
30402 
30403 #
30404 # Weird Sol10 something check...TODO change to try compile
30405 #
30406 if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30407   if test "`uname -r`" = "5.10"; then
30408      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30409         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30410      fi
30411   fi
30412 fi
30413 
30414 ac_ext=c
30415 ac_cpp='$CPP $CPPFLAGS'
30416 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30417 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30418 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30419 
30420 OLD_CFLAGS="$CFLAGS"
30421 CFLAGS="$CFLAGS $X_CFLAGS"
30422 
30423 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30424 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
30425 do :
30426   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30427 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30428                    # include <X11/Xutil.h>
30429 
30430 "
30431 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30432   cat >>confdefs.h <<_ACEOF
30433 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30434 _ACEOF
30435  X11_A_OK=yes
30436 else
30437   X11_A_OK=no; break
30438 fi
30439 
30440 done
30441 
30442 
30443 CFLAGS="$OLD_CFLAGS"
30444 ac_ext=cpp
30445 ac_cpp='$CXXCPP $CPPFLAGS'
30446 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30447 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30448 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30449 
30450 
30451 if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30452 
30453     # Print a helpful message on how to acquire the necessary build dependency.
30454     # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30455     MISSING_DEPENDENCY=x11
30456     PKGHANDLER_COMMAND=
30457 
30458     case $PKGHANDLER in
30459         apt-get)
30460                 apt_help     $MISSING_DEPENDENCY ;;
30461     yum)
30462                 yum_help     $MISSING_DEPENDENCY ;;
30463         port)
30464                 port_help    $MISSING_DEPENDENCY ;;
30465         pkgutil)
30466                 pkgutil_help $MISSING_DEPENDENCY ;;
30467         pkgadd)
30468                 pkgadd_help  $MISSING_DEPENDENCY ;;
30469     * )
30470       break ;;
30471     esac
30472 
30473     if test "x$PKGHANDLER_COMMAND" != x; then
30474         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30475     fi
30476 
30477     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
30478 fi
30479 
30480 
30481 
30482 
30483 
30484 
30485 ###############################################################################
30486 #
30487 # The common unix printing system cups is used to print from java.
30488 #
30489 
30490 # Check whether --with-cups was given.
30491 if test "${with_cups+set}" = set; then :
30492   withval=$with_cups;
30493 fi
30494 
30495 
30496 # Check whether --with-cups-include was given.
30497 if test "${with_cups_include+set}" = set; then :
30498   withval=$with_cups_include;
30499 fi
30500 
30501 
30502 if test "x$CUPS_NOT_NEEDED" = xyes; then
30503         if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30504                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30505 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30506         fi
30507         CUPS_CFLAGS=
30508 else
30509         CUPS_FOUND=no
30510 
30511         if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30512             as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30513         fi
30514 
30515         if test "x${with_cups}" != x; then
30516             CUPS_CFLAGS="-I${with_cups}/include"
30517             CUPS_FOUND=yes
30518         fi
30519         if test "x${with_cups_include}" != x; then
30520             CUPS_CFLAGS="-I${with_cups_include}"
30521             CUPS_FOUND=yes
30522         fi
30523         if test "x$CUPS_FOUND" = xno; then
30524 
30525 
30526     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30527         # Source the builddeps file again, to make sure it uses the latest variables!
30528         . $builddepsfile
30529         # Look for a target and build machine specific resource!
30530         eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30531         if test "x$resource" = x; then
30532             # Ok, lets instead look for a target specific resource
30533             eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30534         fi
30535         if test "x$resource" = x; then
30536             # Ok, lets instead look for a build specific resource
30537             eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30538         fi
30539         if test "x$resource" = x; then
30540             # Ok, lets instead look for a generic resource
30541             # (The cups comes from M4 and not the shell, thus no need for eval here.)
30542             resource=${builddep_cups}
30543         fi
30544         if test "x$resource" != x; then
30545             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30546 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30547             # If the resource in the builddeps.conf file is an existing directory,
30548             # for example /java/linux/cups
30549             if test -d ${resource}; then
30550                depdir=${resource}
30551             else
30552 
30553 # cups is for example mymodule
30554 # $resource is for example libs/general/libmymod_1_2_3.zip
30555 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30556 # $with_builddeps_dir is for example /localhome/builddeps
30557 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30558 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30559 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30560     filename=`basename $resource`
30561     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30562     filebase=${filename%%.*}
30563     extension=${filename#*.}
30564     installdir=$with_builddeps_dir/$filebase
30565     if test ! -f $installdir/$filename.unpacked; then
30566         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30567 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30568         if test ! -d $installdir; then
30569             mkdir -p $installdir
30570         fi
30571         if test ! -d $installdir; then
30572             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30573         fi
30574         tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30575         touch $tmpfile
30576         if test ! -f $tmpfile; then
30577             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30578         fi
30579 
30580     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30581     # $tmpfile is the local file name for the downloaded file.
30582     VALID_TOOL=no
30583     if test "x$BDEPS_FTP" = xwget; then
30584        VALID_TOOL=yes
30585        wget -O $tmpfile $with_builddeps_server/$resource
30586     fi
30587     if test "x$BDEPS_FTP" = xlftp; then
30588        VALID_TOOL=yes
30589        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30590     fi
30591     if test "x$BDEPS_FTP" = xftp; then
30592         VALID_TOOL=yes
30593         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30594         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30595         FTPUSERPWD=${FTPSERVER%%@*}
30596         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30597             FTPUSER=${userpwd%%:*}
30598             FTPPWD=${userpwd#*@}
30599             FTPSERVER=${FTPSERVER#*@}
30600         else
30601             FTPUSER=ftp
30602             FTPPWD=ftp
30603         fi
30604         # the "pass" command does not work on some
30605         # ftp clients (read ftp.exe) but if it works,
30606         # passive mode is better!
30607         (\
30608             echo "user $FTPUSER $FTPPWD"        ;\
30609             echo "pass"                         ;\
30610             echo "bin"                          ;\
30611             echo "get $FTPPATH $tmpfile"              ;\
30612         ) | ftp -in $FTPSERVER
30613     fi
30614     if test "x$VALID_TOOL" != xyes; then
30615        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30616     fi
30617 
30618         mv $tmpfile $installdir/$filename
30619         if test ! -s $installdir/$filename; then
30620             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30621         fi
30622         case "$extension" in
30623             zip)  echo "Unzipping $installdir/$filename..."
30624                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30625             ;;
30626             tar.gz) echo "Untaring $installdir/$filename..."
30627                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30628             ;;
30629             tgz) echo "Untaring $installdir/$filename..."
30630                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30631             ;;
30632             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30633             ;;
30634         esac
30635     fi
30636     if test -f $installdir/$filename.unpacked; then
30637         depdir=$installdir
30638     fi
30639 
30640             fi
30641             # Source the builddeps file again, because in the previous command, the depdir
30642             # was updated to point at the current build dependency install directory.
30643             . $builddepsfile
30644             # Now extract variables from the builddeps.conf files.
30645             theroot=${builddep_cups_ROOT}
30646             thecflags=${builddep_cups_CFLAGS}
30647             thelibs=${builddep_cups_LIBS}
30648             if test "x$depdir" = x; then
30649                 as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30650             fi
30651             CUPS=$depdir
30652             if test "x$theroot" != x; then
30653                CUPS="$theroot"
30654             fi
30655             if test "x$thecflags" != x; then
30656                CUPS_CFLAGS="$thecflags"
30657             fi
30658             if test "x$thelibs" != x; then
30659                CUPS_LIBS="$thelibs"
30660             fi
30661             CUPS_FOUND=yes
30662 
30663         fi
30664 
30665     fi
30666 
30667         fi
30668         if test "x$CUPS_FOUND" = xno; then
30669             # Are the cups headers installed in the default /usr/include location?
30670             for ac_header in cups/cups.h cups/ppd.h
30671 do :
30672   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30673 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30674 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30675   cat >>confdefs.h <<_ACEOF
30676 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30677 _ACEOF
30678  CUPS_FOUND=yes
30679                               CUPS_CFLAGS=
30680                               DEFAULT_CUPS=yes
30681 fi
30682 
30683 done
30684 
30685         fi
30686         if test "x$CUPS_FOUND" = xno; then
30687             # Getting nervous now? Lets poke around for standard Solaris third-party
30688             # package installation locations.
30689             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30690 $as_echo_n "checking for cups headers... " >&6; }
30691             if test -s /opt/sfw/cups/include/cups/cups.h; then
30692                # An SFW package seems to be installed!
30693                CUPS_FOUND=yes
30694                CUPS_CFLAGS="-I/opt/sfw/cups/include"
30695             elif test -s /opt/csw/include/cups/cups.h; then
30696                # A CSW package seems to be installed!
30697                CUPS_FOUND=yes
30698                CUPS_CFLAGS="-I/opt/csw/include"
30699             fi
30700             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30701 $as_echo "$CUPS_FOUND" >&6; }
30702         fi
30703         if test "x$CUPS_FOUND" = xno; then
30704 
30705     # Print a helpful message on how to acquire the necessary build dependency.
30706     # cups is the help tag: freetyp2, cups, pulse, alsa etc
30707     MISSING_DEPENDENCY=cups
30708     PKGHANDLER_COMMAND=
30709 
30710     case $PKGHANDLER in
30711         apt-get)
30712                 apt_help     $MISSING_DEPENDENCY ;;
30713     yum)
30714                 yum_help     $MISSING_DEPENDENCY ;;
30715         port)
30716                 port_help    $MISSING_DEPENDENCY ;;
30717         pkgutil)
30718                 pkgutil_help $MISSING_DEPENDENCY ;;
30719         pkgadd)
30720                 pkgadd_help  $MISSING_DEPENDENCY ;;
30721     * )
30722       break ;;
30723     esac
30724 
30725     if test "x$PKGHANDLER_COMMAND" != x; then
30726         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30727     fi
30728 
30729             as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30730         fi
30731 fi
30732 
30733 
30734 
30735 
30736 
30737 
30738 ###############################################################################
30739 #
30740 # The ubiquitous freetype2 library is used to render fonts.
30741 #
30742 
30743 # Check whether --with-freetype was given.
30744 if test "${with_freetype+set}" = set; then :
30745   withval=$with_freetype;
30746 fi
30747 
30748 
30749 # If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
30750 USING_SYSTEM_FT_LIB=false
30751 
30752 if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
30753         if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
30754                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
30755 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
30756         fi
30757         FREETYPE2_CFLAGS=
30758         FREETYPE2_LIBS=
30759         FREETYPE2_LIB_PATH=
30760 else
30761         FREETYPE2_FOUND=no
30762 
30763         if test "x$with_freetype" != x; then
30764 
30765   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30766 
30767   # Input might be given as Windows format, start by converting to
30768   # unix format.
30769   path="$with_freetype"
30770   new_path=`$CYGPATH -u "$path"`
30771 
30772   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30773   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30774   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30775   # "foo.exe" is OK but "foo" is an error.
30776   #
30777   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30778   # It is also a way to make sure we got the proper file name for the real test later on.
30779   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30780   if test "x$test_shortpath" = x; then
30781     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30782 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30783     as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
30784   fi
30785 
30786   # Call helper function which possibly converts this using DOS-style short mode.
30787   # If so, the updated path is stored in $new_path.
30788 
30789   input_path="$new_path"
30790   # Check if we need to convert this using DOS-style short mode. If the path
30791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30792   # take no chances and rewrite it.
30793   # Note: m4 eats our [], so we need to use [ and ] instead.
30794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30795   if test "x$has_forbidden_chars" != x; then
30796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30797     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30798     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30799     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30800       # Going to short mode and back again did indeed matter. Since short mode is
30801       # case insensitive, let's make it lowercase to improve readability.
30802       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30803       # Now convert it back to Unix-stile (cygpath)
30804       input_path=`$CYGPATH -u "$shortmode_path"`
30805       new_path="$input_path"
30806     fi
30807   fi
30808 
30809   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30810   if test "x$test_cygdrive_prefix" = x; then
30811     # As a simple fix, exclude /usr/bin since it's not a real path.
30812     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30813       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30814       # a path prefixed by /cygdrive for fixpath to work.
30815       new_path="$CYGWIN_ROOT_PATH$input_path"
30816     fi
30817   fi
30818 
30819 
30820   if test "x$path" != "x$new_path"; then
30821     with_freetype="$new_path"
30822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30823 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30824   fi
30825 
30826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30827 
30828   path="$with_freetype"
30829   has_colon=`$ECHO $path | $GREP ^.:`
30830   new_path="$path"
30831   if test "x$has_colon" = x; then
30832     # Not in mixed or Windows style, start by that.
30833     new_path=`cmd //c echo $path`
30834   fi
30835 
30836 
30837   input_path="$new_path"
30838   # Check if we need to convert this using DOS-style short mode. If the path
30839   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30840   # take no chances and rewrite it.
30841   # Note: m4 eats our [], so we need to use [ and ] instead.
30842   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30843   if test "x$has_forbidden_chars" != x; then
30844     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30845     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30846   fi
30847 
30848 
30849   windows_path="$new_path"
30850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30851     unix_path=`$CYGPATH -u "$windows_path"`
30852     new_path="$unix_path"
30853   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30854     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30855     new_path="$unix_path"
30856   fi
30857 
30858   if test "x$path" != "x$new_path"; then
30859     with_freetype="$new_path"
30860     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
30861 $as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
30862   fi
30863 
30864   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30865   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30866 
30867   else
30868     # We're on a posix platform. Hooray! :)
30869     path="$with_freetype"
30870     has_space=`$ECHO "$path" | $GREP " "`
30871     if test "x$has_space" != x; then
30872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
30873 $as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
30874       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30875     fi
30876 
30877     # Use eval to expand a potential ~
30878     eval path="$path"
30879     if test ! -f "$path" && test ! -d "$path"; then
30880       as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
30881     fi
30882 
30883     with_freetype="`cd "$path"; $THEPWDCMD -L`"
30884   fi
30885 
30886             FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
30887             FREETYPE2_LIB_PATH="$with_freetype/lib"
30888             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
30889                 FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
30890                 FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
30891             fi
30892             if test "x$OPENJDK_TARGET_OS" = xwindows; then
30893                 FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
30894             fi
30895             FREETYPE2_CFLAGS="-I$with_freetype/include"
30896             if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
30897                 FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
30898             fi
30899             FREETYPE2_FOUND=yes
30900             if test "x$FREETYPE2_FOUND" = xyes; then
30901                 # Verify that the directories exist
30902                 if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
30903                    as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
30904                 fi
30905                 # List the contents of the lib.
30906                 FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
30907                 if test "x$FREETYPELIB" = x; then
30908                    as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
30909                 fi
30910                 # Check one h-file
30911                 if ! test -s "$with_freetype/include/ft2build.h"; then
30912                    as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
30913                 fi
30914             fi
30915         fi
30916         if test "x$FREETYPE2_FOUND" = xno; then
30917 
30918 
30919     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30920         # Source the builddeps file again, to make sure it uses the latest variables!
30921         . $builddepsfile
30922         # Look for a target and build machine specific resource!
30923         eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30924         if test "x$resource" = x; then
30925             # Ok, lets instead look for a target specific resource
30926             eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
30927         fi
30928         if test "x$resource" = x; then
30929             # Ok, lets instead look for a build specific resource
30930             eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
30931         fi
30932         if test "x$resource" = x; then
30933             # Ok, lets instead look for a generic resource
30934             # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
30935             resource=${builddep_freetype2}
30936         fi
30937         if test "x$resource" != x; then
30938             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
30939 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
30940             # If the resource in the builddeps.conf file is an existing directory,
30941             # for example /java/linux/cups
30942             if test -d ${resource}; then
30943                depdir=${resource}
30944             else
30945 
30946 # freetype2 is for example mymodule
30947 # $resource is for example libs/general/libmymod_1_2_3.zip
30948 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30949 # $with_builddeps_dir is for example /localhome/builddeps
30950 # depdir is the name of the variable into which we store the depdir, eg MYMOD
30951 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30952 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30953     filename=`basename $resource`
30954     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30955     filebase=${filename%%.*}
30956     extension=${filename#*.}
30957     installdir=$with_builddeps_dir/$filebase
30958     if test ! -f $installdir/$filename.unpacked; then
30959         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
30960 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30961         if test ! -d $installdir; then
30962             mkdir -p $installdir
30963         fi
30964         if test ! -d $installdir; then
30965             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30966         fi
30967         tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
30968         touch $tmpfile
30969         if test ! -f $tmpfile; then
30970             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30971         fi
30972 
30973     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30974     # $tmpfile is the local file name for the downloaded file.
30975     VALID_TOOL=no
30976     if test "x$BDEPS_FTP" = xwget; then
30977        VALID_TOOL=yes
30978        wget -O $tmpfile $with_builddeps_server/$resource
30979     fi
30980     if test "x$BDEPS_FTP" = xlftp; then
30981        VALID_TOOL=yes
30982        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30983     fi
30984     if test "x$BDEPS_FTP" = xftp; then
30985         VALID_TOOL=yes
30986         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30987         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30988         FTPUSERPWD=${FTPSERVER%%@*}
30989         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30990             FTPUSER=${userpwd%%:*}
30991             FTPPWD=${userpwd#*@}
30992             FTPSERVER=${FTPSERVER#*@}
30993         else
30994             FTPUSER=ftp
30995             FTPPWD=ftp
30996         fi
30997         # the "pass" command does not work on some
30998         # ftp clients (read ftp.exe) but if it works,
30999         # passive mode is better!
31000         (\
31001             echo "user $FTPUSER $FTPPWD"        ;\
31002             echo "pass"                         ;\
31003             echo "bin"                          ;\
31004             echo "get $FTPPATH $tmpfile"              ;\
31005         ) | ftp -in $FTPSERVER
31006     fi
31007     if test "x$VALID_TOOL" != xyes; then
31008        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31009     fi
31010 
31011         mv $tmpfile $installdir/$filename
31012         if test ! -s $installdir/$filename; then
31013             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31014         fi
31015         case "$extension" in
31016             zip)  echo "Unzipping $installdir/$filename..."
31017                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31018             ;;
31019             tar.gz) echo "Untaring $installdir/$filename..."
31020                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31021             ;;
31022             tgz) echo "Untaring $installdir/$filename..."
31023                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31024             ;;
31025             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31026             ;;
31027         esac
31028     fi
31029     if test -f $installdir/$filename.unpacked; then
31030         depdir=$installdir
31031     fi
31032 
31033             fi
31034             # Source the builddeps file again, because in the previous command, the depdir
31035             # was updated to point at the current build dependency install directory.
31036             . $builddepsfile
31037             # Now extract variables from the builddeps.conf files.
31038             theroot=${builddep_freetype2_ROOT}
31039             thecflags=${builddep_freetype2_CFLAGS}
31040             thelibs=${builddep_freetype2_LIBS}
31041             if test "x$depdir" = x; then
31042                 as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31043             fi
31044             FREETYPE2=$depdir
31045             if test "x$theroot" != x; then
31046                FREETYPE2="$theroot"
31047             fi
31048             if test "x$thecflags" != x; then
31049                FREETYPE2_CFLAGS="$thecflags"
31050             fi
31051             if test "x$thelibs" != x; then
31052                FREETYPE2_LIBS="$thelibs"
31053             fi
31054             FREETYPE2_FOUND=yes
31055             else FREETYPE2_FOUND=no
31056 
31057         fi
31058         else FREETYPE2_FOUND=no
31059 
31060     fi
31061 
31062             USING_SYSTEM_FT_LIB=true
31063         fi
31064         if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31065             FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31066 
31067   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31068 
31069   # Input might be given as Windows format, start by converting to
31070   # unix format.
31071   path="$FREETYPELOCATION"
31072   new_path=`$CYGPATH -u "$path"`
31073 
31074   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31075   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31076   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31077   # "foo.exe" is OK but "foo" is an error.
31078   #
31079   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31080   # It is also a way to make sure we got the proper file name for the real test later on.
31081   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31082   if test "x$test_shortpath" = x; then
31083     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31084 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31085     as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31086   fi
31087 
31088   # Call helper function which possibly converts this using DOS-style short mode.
31089   # If so, the updated path is stored in $new_path.
31090 
31091   input_path="$new_path"
31092   # Check if we need to convert this using DOS-style short mode. If the path
31093   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31094   # take no chances and rewrite it.
31095   # Note: m4 eats our [], so we need to use [ and ] instead.
31096   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31097   if test "x$has_forbidden_chars" != x; then
31098     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31099     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31100     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31101     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31102       # Going to short mode and back again did indeed matter. Since short mode is
31103       # case insensitive, let's make it lowercase to improve readability.
31104       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31105       # Now convert it back to Unix-stile (cygpath)
31106       input_path=`$CYGPATH -u "$shortmode_path"`
31107       new_path="$input_path"
31108     fi
31109   fi
31110 
31111   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31112   if test "x$test_cygdrive_prefix" = x; then
31113     # As a simple fix, exclude /usr/bin since it's not a real path.
31114     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31115       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31116       # a path prefixed by /cygdrive for fixpath to work.
31117       new_path="$CYGWIN_ROOT_PATH$input_path"
31118     fi
31119   fi
31120 
31121 
31122   if test "x$path" != "x$new_path"; then
31123     FREETYPELOCATION="$new_path"
31124     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31125 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31126   fi
31127 
31128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31129 
31130   path="$FREETYPELOCATION"
31131   has_colon=`$ECHO $path | $GREP ^.:`
31132   new_path="$path"
31133   if test "x$has_colon" = x; then
31134     # Not in mixed or Windows style, start by that.
31135     new_path=`cmd //c echo $path`
31136   fi
31137 
31138 
31139   input_path="$new_path"
31140   # Check if we need to convert this using DOS-style short mode. If the path
31141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31142   # take no chances and rewrite it.
31143   # Note: m4 eats our [], so we need to use [ and ] instead.
31144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31145   if test "x$has_forbidden_chars" != x; then
31146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31147     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31148   fi
31149 
31150 
31151   windows_path="$new_path"
31152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31153     unix_path=`$CYGPATH -u "$windows_path"`
31154     new_path="$unix_path"
31155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31157     new_path="$unix_path"
31158   fi
31159 
31160   if test "x$path" != "x$new_path"; then
31161     FREETYPELOCATION="$new_path"
31162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31163 $as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31164   fi
31165 
31166   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31167   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31168 
31169   else
31170     # We're on a posix platform. Hooray! :)
31171     path="$FREETYPELOCATION"
31172     has_space=`$ECHO "$path" | $GREP " "`
31173     if test "x$has_space" != x; then
31174       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31175 $as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31176       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31177     fi
31178 
31179     # Use eval to expand a potential ~
31180     eval path="$path"
31181     if test ! -f "$path" && test ! -d "$path"; then
31182       as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31183     fi
31184 
31185     FREETYPELOCATION="`cd "$path"; $THEPWDCMD -L`"
31186   fi
31187 
31188             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31189 $as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31190             if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31191                 FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31192                 FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31193                 FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31194                 if ! test -s "$FREETYPE2_LIBS"; then
31195                    as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31196                 fi
31197                 if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31198                    as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31199                 fi
31200                 USING_SYSTEM_FT_LIB=true
31201                 FREETYPE2_FOUND=yes
31202             fi
31203             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31204 $as_echo "$FREETYPE2_FOUND" >&6; }
31205         fi
31206         if test "x$FREETYPE2_FOUND" = xno; then
31207 
31208 pkg_failed=no
31209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31210 $as_echo_n "checking for FREETYPE2... " >&6; }
31211 
31212 if test -n "$FREETYPE2_CFLAGS"; then
31213     pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31214  elif test -n "$PKG_CONFIG"; then
31215     if test -n "$PKG_CONFIG" && \
31216     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31217   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31218   ac_status=$?
31219   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31220   test $ac_status = 0; }; then
31221   pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31222 else
31223   pkg_failed=yes
31224 fi
31225  else
31226     pkg_failed=untried
31227 fi
31228 if test -n "$FREETYPE2_LIBS"; then
31229     pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31230  elif test -n "$PKG_CONFIG"; then
31231     if test -n "$PKG_CONFIG" && \
31232     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31233   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31234   ac_status=$?
31235   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31236   test $ac_status = 0; }; then
31237   pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31238 else
31239   pkg_failed=yes
31240 fi
31241  else
31242     pkg_failed=untried
31243 fi
31244 
31245 
31246 
31247 if test $pkg_failed = yes; then
31248 
31249 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31250         _pkg_short_errors_supported=yes
31251 else
31252         _pkg_short_errors_supported=no
31253 fi
31254         if test $_pkg_short_errors_supported = yes; then
31255                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31256         else
31257                 FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31258         fi
31259         # Put the nasty error message in config.log where it belongs
31260         echo "$FREETYPE2_PKG_ERRORS" >&5
31261 
31262         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31263 $as_echo "no" >&6; }
31264                 FREETYPE2_FOUND=no
31265 elif test $pkg_failed = untried; then
31266         FREETYPE2_FOUND=no
31267 else
31268         FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31269         FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31270         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31271 $as_echo "yes" >&6; }
31272         FREETYPE2_FOUND=yes
31273 fi
31274             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31275             FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31276             USING_SYSTEM_FT_LIB=true
31277             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31278             if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31279               FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31280             fi
31281         fi
31282         if test "x$FREETYPE2_FOUND" = xno; then
31283             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31284 $as_echo_n "checking for freetype in some standard locations... " >&6; }
31285 
31286             if test -s $SYS_ROOT/usr/X11/include/ft2build.h && test -d $SYS_ROOT/usr/X11/include/freetype2/freetype; then
31287                 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/X11/include/freetype2 -I$SYS_ROOT/usr/X11/include"
31288                 DEFAULT_FREETYPE_LIBS="-L$SYS_ROOT/usr/X11/lib -lfreetype"
31289             fi
31290             if test -s $SYS_ROOT/usr/include/ft2build.h && test -d $SYS_ROOT/usr/include/freetype2/freetype; then
31291                 DEFAULT_FREETYPE_CFLAGS="-I$SYS_ROOT/usr/include/freetype2"
31292                 DEFAULT_FREETYPE_LIBS="-lfreetype"
31293             fi
31294 
31295             PREV_CXXCFLAGS="$CXXFLAGS"
31296             PREV_LDFLAGS="$LDFLAGS"
31297             CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31298             LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31299             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31300 /* end confdefs.h.  */
31301 #include<ft2build.h>
31302                             #include FT_FREETYPE_H
31303                            int main() { return 0; }
31304 
31305 _ACEOF
31306 if ac_fn_cxx_try_link "$LINENO"; then :
31307 
31308                               # Yes, the default cflags and libs did the trick.
31309                               FREETYPE2_FOUND=yes
31310                               FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31311                               FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31312 
31313 else
31314 
31315                               FREETYPE2_FOUND=no
31316 
31317 fi
31318 rm -f core conftest.err conftest.$ac_objext \
31319     conftest$ac_exeext conftest.$ac_ext
31320             CXXCFLAGS="$PREV_CXXFLAGS"
31321             LDFLAGS="$PREV_LDFLAGS"
31322             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31323 $as_echo "$FREETYPE2_FOUND" >&6; }
31324             USING_SYSTEM_FT_LIB=true
31325         fi
31326         if test "x$FREETYPE2_FOUND" = xno; then
31327 
31328     # Print a helpful message on how to acquire the necessary build dependency.
31329     # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31330     MISSING_DEPENDENCY=freetype2
31331     PKGHANDLER_COMMAND=
31332 
31333     case $PKGHANDLER in
31334         apt-get)
31335                 apt_help     $MISSING_DEPENDENCY ;;
31336     yum)
31337                 yum_help     $MISSING_DEPENDENCY ;;
31338         port)
31339                 port_help    $MISSING_DEPENDENCY ;;
31340         pkgutil)
31341                 pkgutil_help $MISSING_DEPENDENCY ;;
31342         pkgadd)
31343                 pkgadd_help  $MISSING_DEPENDENCY ;;
31344     * )
31345       break ;;
31346     esac
31347 
31348     if test "x$PKGHANDLER_COMMAND" != x; then
31349         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31350     fi
31351 
31352                 as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31353         fi
31354 
31355         if test "x$OPENJDK_TARGET_OS" != xwindows; then
31356             # AC_CHECK_LIB does not support use of cl.exe
31357             PREV_LDFLAGS="$LDFLAGS"
31358             LDFLAGS="$FREETYPE2_LIBS"
31359             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31360 $as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31361 if ${ac_cv_lib_freetype_FT_Init_FreeType+:} false; then :
31362   $as_echo_n "(cached) " >&6
31363 else
31364   ac_check_lib_save_LIBS=$LIBS
31365 LIBS="-lfreetype  $LIBS"
31366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31367 /* end confdefs.h.  */
31368 
31369 /* Override any GCC internal prototype to avoid an error.
31370    Use char because int might match the return type of a GCC
31371    builtin and then its argument prototype would still apply.  */
31372 #ifdef __cplusplus
31373 extern "C"
31374 #endif
31375 char FT_Init_FreeType ();
31376 int
31377 main ()
31378 {
31379 return FT_Init_FreeType ();
31380   ;
31381   return 0;
31382 }
31383 _ACEOF
31384 if ac_fn_cxx_try_link "$LINENO"; then :
31385   ac_cv_lib_freetype_FT_Init_FreeType=yes
31386 else
31387   ac_cv_lib_freetype_FT_Init_FreeType=no
31388 fi
31389 rm -f core conftest.err conftest.$ac_objext \
31390     conftest$ac_exeext conftest.$ac_ext
31391 LIBS=$ac_check_lib_save_LIBS
31392 fi
31393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31394 $as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31395 if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = xyes; then :
31396   FREETYPE2_FOUND=true
31397 else
31398   as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31399 fi
31400 
31401             LDFLAGS="$PREV_LDFLAGS"
31402         fi
31403 fi
31404 
31405 
31406 
31407 
31408 
31409 
31410 
31411 
31412 
31413 ###############################################################################
31414 #
31415 # Check for alsa headers and libraries. Used on Linux/GNU systems.
31416 #
31417 
31418 # Check whether --with-alsa was given.
31419 if test "${with_alsa+set}" = set; then :
31420   withval=$with_alsa;
31421 fi
31422 
31423 
31424 # Check whether --with-alsa-include was given.
31425 if test "${with_alsa_include+set}" = set; then :
31426   withval=$with_alsa_include;
31427 fi
31428 
31429 
31430 # Check whether --with-alsa-lib was given.
31431 if test "${with_alsa_lib+set}" = set; then :
31432   withval=$with_alsa_lib;
31433 fi
31434 
31435 
31436 if test "x$ALSA_NOT_NEEDED" = xyes; then
31437         if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31438                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31439 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31440         fi
31441         ALSA_CFLAGS=
31442         ALSA_LIBS=
31443 else
31444         ALSA_FOUND=no
31445 
31446         if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31447             as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31448         fi
31449 
31450         if test "x${with_alsa}" != x; then
31451             ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31452             ALSA_CFLAGS="-I${with_alsa}/include"
31453             ALSA_FOUND=yes
31454         fi
31455         if test "x${with_alsa_include}" != x; then
31456             ALSA_CFLAGS="-I${with_alsa_include}"
31457             ALSA_FOUND=yes
31458         fi
31459         if test "x${with_alsa_lib}" != x; then
31460             ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31461             ALSA_FOUND=yes
31462         fi
31463         if test "x$ALSA_FOUND" = xno; then
31464 
31465 
31466     if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31467         # Source the builddeps file again, to make sure it uses the latest variables!
31468         . $builddepsfile
31469         # Look for a target and build machine specific resource!
31470         eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31471         if test "x$resource" = x; then
31472             # Ok, lets instead look for a target specific resource
31473             eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31474         fi
31475         if test "x$resource" = x; then
31476             # Ok, lets instead look for a build specific resource
31477             eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31478         fi
31479         if test "x$resource" = x; then
31480             # Ok, lets instead look for a generic resource
31481             # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31482             resource=${builddep_alsa}
31483         fi
31484         if test "x$resource" != x; then
31485             { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31486 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31487             # If the resource in the builddeps.conf file is an existing directory,
31488             # for example /java/linux/cups
31489             if test -d ${resource}; then
31490                depdir=${resource}
31491             else
31492 
31493 # alsa is for example mymodule
31494 # $resource is for example libs/general/libmymod_1_2_3.zip
31495 # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31496 # $with_builddeps_dir is for example /localhome/builddeps
31497 # depdir is the name of the variable into which we store the depdir, eg MYMOD
31498 # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31499 # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31500     filename=`basename $resource`
31501     filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31502     filebase=${filename%%.*}
31503     extension=${filename#*.}
31504     installdir=$with_builddeps_dir/$filebase
31505     if test ! -f $installdir/$filename.unpacked; then
31506         { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31507 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31508         if test ! -d $installdir; then
31509             mkdir -p $installdir
31510         fi
31511         if test ! -d $installdir; then
31512             as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31513         fi
31514         tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31515         touch $tmpfile
31516         if test ! -f $tmpfile; then
31517             as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31518         fi
31519 
31520     # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31521     # $tmpfile is the local file name for the downloaded file.
31522     VALID_TOOL=no
31523     if test "x$BDEPS_FTP" = xwget; then
31524        VALID_TOOL=yes
31525        wget -O $tmpfile $with_builddeps_server/$resource
31526     fi
31527     if test "x$BDEPS_FTP" = xlftp; then
31528        VALID_TOOL=yes
31529        lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31530     fi
31531     if test "x$BDEPS_FTP" = xftp; then
31532         VALID_TOOL=yes
31533         FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31534         FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31535         FTPUSERPWD=${FTPSERVER%%@*}
31536         if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31537             FTPUSER=${userpwd%%:*}
31538             FTPPWD=${userpwd#*@}
31539             FTPSERVER=${FTPSERVER#*@}
31540         else
31541             FTPUSER=ftp
31542             FTPPWD=ftp
31543         fi
31544         # the "pass" command does not work on some
31545         # ftp clients (read ftp.exe) but if it works,
31546         # passive mode is better!
31547         (\
31548             echo "user $FTPUSER $FTPPWD"        ;\
31549             echo "pass"                         ;\
31550             echo "bin"                          ;\
31551             echo "get $FTPPATH $tmpfile"              ;\
31552         ) | ftp -in $FTPSERVER
31553     fi
31554     if test "x$VALID_TOOL" != xyes; then
31555        as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31556     fi
31557 
31558         mv $tmpfile $installdir/$filename
31559         if test ! -s $installdir/$filename; then
31560             as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31561         fi
31562         case "$extension" in
31563             zip)  echo "Unzipping $installdir/$filename..."
31564                (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31565             ;;
31566             tar.gz) echo "Untaring $installdir/$filename..."
31567                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31568             ;;
31569             tgz) echo "Untaring $installdir/$filename..."
31570                (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31571             ;;
31572             *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31573             ;;
31574         esac
31575     fi
31576     if test -f $installdir/$filename.unpacked; then
31577         depdir=$installdir
31578     fi
31579 
31580             fi
31581             # Source the builddeps file again, because in the previous command, the depdir
31582             # was updated to point at the current build dependency install directory.
31583             . $builddepsfile
31584             # Now extract variables from the builddeps.conf files.
31585             theroot=${builddep_alsa_ROOT}
31586             thecflags=${builddep_alsa_CFLAGS}
31587             thelibs=${builddep_alsa_LIBS}
31588             if test "x$depdir" = x; then
31589                 as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31590             fi
31591             ALSA=$depdir
31592             if test "x$theroot" != x; then
31593                ALSA="$theroot"
31594             fi
31595             if test "x$thecflags" != x; then
31596                ALSA_CFLAGS="$thecflags"
31597             fi
31598             if test "x$thelibs" != x; then
31599                ALSA_LIBS="$thelibs"
31600             fi
31601             ALSA_FOUND=yes
31602             else ALSA_FOUND=no
31603 
31604         fi
31605         else ALSA_FOUND=no
31606 
31607     fi
31608 
31609         fi
31610         if test "x$ALSA_FOUND" = xno; then
31611 
31612 pkg_failed=no
31613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31614 $as_echo_n "checking for ALSA... " >&6; }
31615 
31616 if test -n "$ALSA_CFLAGS"; then
31617     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31618  elif test -n "$PKG_CONFIG"; then
31619     if test -n "$PKG_CONFIG" && \
31620     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31621   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31622   ac_status=$?
31623   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31624   test $ac_status = 0; }; then
31625   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31626 else
31627   pkg_failed=yes
31628 fi
31629  else
31630     pkg_failed=untried
31631 fi
31632 if test -n "$ALSA_LIBS"; then
31633     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31634  elif test -n "$PKG_CONFIG"; then
31635     if test -n "$PKG_CONFIG" && \
31636     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31637   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31638   ac_status=$?
31639   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31640   test $ac_status = 0; }; then
31641   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31642 else
31643   pkg_failed=yes
31644 fi
31645  else
31646     pkg_failed=untried
31647 fi
31648 
31649 
31650 
31651 if test $pkg_failed = yes; then
31652 
31653 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31654         _pkg_short_errors_supported=yes
31655 else
31656         _pkg_short_errors_supported=no
31657 fi
31658         if test $_pkg_short_errors_supported = yes; then
31659                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31660         else
31661                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31662         fi
31663         # Put the nasty error message in config.log where it belongs
31664         echo "$ALSA_PKG_ERRORS" >&5
31665 
31666         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31667 $as_echo "no" >&6; }
31668                 ALSA_FOUND=no
31669 elif test $pkg_failed = untried; then
31670         ALSA_FOUND=no
31671 else
31672         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31673         ALSA_LIBS=$pkg_cv_ALSA_LIBS
31674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31675 $as_echo "yes" >&6; }
31676         ALSA_FOUND=yes
31677 fi
31678         fi
31679         if test "x$ALSA_FOUND" = xno; then
31680             for ac_header in alsa/asoundlib.h
31681 do :
31682   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31683 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
31684   cat >>confdefs.h <<_ACEOF
31685 #define HAVE_ALSA_ASOUNDLIB_H 1
31686 _ACEOF
31687  ALSA_FOUND=yes
31688                               ALSA_CFLAGS=-Iignoreme
31689                               ALSA_LIBS=-lasound
31690                               DEFAULT_ALSA=yes
31691 else
31692   ALSA_FOUND=no
31693 fi
31694 
31695 done
31696 
31697         fi
31698         if test "x$ALSA_FOUND" = xno; then
31699 
31700     # Print a helpful message on how to acquire the necessary build dependency.
31701     # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31702     MISSING_DEPENDENCY=alsa
31703     PKGHANDLER_COMMAND=
31704 
31705     case $PKGHANDLER in
31706         apt-get)
31707                 apt_help     $MISSING_DEPENDENCY ;;
31708     yum)
31709                 yum_help     $MISSING_DEPENDENCY ;;
31710         port)
31711                 port_help    $MISSING_DEPENDENCY ;;
31712         pkgutil)
31713                 pkgutil_help $MISSING_DEPENDENCY ;;
31714         pkgadd)
31715                 pkgadd_help  $MISSING_DEPENDENCY ;;
31716     * )
31717       break ;;
31718     esac
31719 
31720     if test "x$PKGHANDLER_COMMAND" != x; then
31721         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31722     fi
31723 
31724             as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31725         fi
31726 fi
31727 
31728 
31729 
31730 
31731 
31732 
31733 
31734 ###############################################################################
31735 #
31736 # Check for the jpeg library
31737 #
31738 
31739 USE_EXTERNAL_LIBJPEG=true
31740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31741 $as_echo_n "checking for main in -ljpeg... " >&6; }
31742 if ${ac_cv_lib_jpeg_main+:} false; then :
31743   $as_echo_n "(cached) " >&6
31744 else
31745   ac_check_lib_save_LIBS=$LIBS
31746 LIBS="-ljpeg  $LIBS"
31747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31748 /* end confdefs.h.  */
31749 
31750 
31751 int
31752 main ()
31753 {
31754 return main ();
31755   ;
31756   return 0;
31757 }
31758 _ACEOF
31759 if ac_fn_cxx_try_link "$LINENO"; then :
31760   ac_cv_lib_jpeg_main=yes
31761 else
31762   ac_cv_lib_jpeg_main=no
31763 fi
31764 rm -f core conftest.err conftest.$ac_objext \
31765     conftest$ac_exeext conftest.$ac_ext
31766 LIBS=$ac_check_lib_save_LIBS
31767 fi
31768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
31769 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
31770 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
31771   cat >>confdefs.h <<_ACEOF
31772 #define HAVE_LIBJPEG 1
31773 _ACEOF
31774 
31775   LIBS="-ljpeg $LIBS"
31776 
31777 else
31778    USE_EXTERNAL_LIBJPEG=false
31779                { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
31780 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
31781 
31782 fi
31783 
31784 
31785 
31786 ###############################################################################
31787 #
31788 # Check for the gif library
31789 #
31790 
31791 
31792 # Check whether --with-giflib was given.
31793 if test "${with_giflib+set}" = set; then :
31794   withval=$with_giflib;
31795 fi
31796 
31797 
31798 
31799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
31800 $as_echo_n "checking for which giflib to use... " >&6; }
31801 
31802 # default is bundled
31803 DEFAULT_GIFLIB=bundled
31804 
31805 #
31806 # if user didn't specify, use DEFAULT_GIFLIB
31807 #
31808 if test "x${with_giflib}" = "x"; then
31809     with_giflib=${DEFAULT_GIFLIB}
31810 fi
31811 
31812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
31813 $as_echo "${with_giflib}" >&6; }
31814 
31815 if test "x${with_giflib}" = "xbundled"; then
31816     USE_EXTERNAL_LIBGIF=false
31817 elif test "x${with_giflib}" = "xsystem"; then
31818     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
31819 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
31820 
31821 else
31822    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
31823 fi
31824 
31825 
31826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
31827 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
31828 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
31829   $as_echo_n "(cached) " >&6
31830 else
31831   ac_check_lib_save_LIBS=$LIBS
31832 LIBS="-lgif  $LIBS"
31833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31834 /* end confdefs.h.  */
31835 
31836 /* Override any GCC internal prototype to avoid an error.
31837    Use char because int might match the return type of a GCC
31838    builtin and then its argument prototype would still apply.  */
31839 #ifdef __cplusplus
31840 extern "C"
31841 #endif
31842 char DGifGetCode ();
31843 int
31844 main ()
31845 {
31846 return DGifGetCode ();
31847   ;
31848   return 0;
31849 }
31850 _ACEOF
31851 if ac_fn_cxx_try_link "$LINENO"; then :
31852   ac_cv_lib_gif_DGifGetCode=yes
31853 else
31854   ac_cv_lib_gif_DGifGetCode=no
31855 fi
31856 rm -f core conftest.err conftest.$ac_objext \
31857     conftest$ac_exeext conftest.$ac_ext
31858 LIBS=$ac_check_lib_save_LIBS
31859 fi
31860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
31861 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
31862 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
31863   cat >>confdefs.h <<_ACEOF
31864 #define HAVE_LIBGIF 1
31865 _ACEOF
31866 
31867   LIBS="-lgif $LIBS"
31868 
31869 else
31870    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
31871 fi
31872 
31873 
31874     USE_EXTERNAL_LIBGIF=true
31875 else
31876     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
31877 fi
31878 
31879 
31880 ###############################################################################
31881 #
31882 # Check for the zlib library
31883 #
31884 
31885 
31886 # Check whether --with-zlib was given.
31887 if test "${with_zlib+set}" = set; then :
31888   withval=$with_zlib;
31889 fi
31890 
31891 
31892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
31893 $as_echo_n "checking for compress in -lz... " >&6; }
31894 if ${ac_cv_lib_z_compress+:} false; then :
31895   $as_echo_n "(cached) " >&6
31896 else
31897   ac_check_lib_save_LIBS=$LIBS
31898 LIBS="-lz  $LIBS"
31899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31900 /* end confdefs.h.  */
31901 
31902 /* Override any GCC internal prototype to avoid an error.
31903    Use char because int might match the return type of a GCC
31904    builtin and then its argument prototype would still apply.  */
31905 #ifdef __cplusplus
31906 extern "C"
31907 #endif
31908 char compress ();
31909 int
31910 main ()
31911 {
31912 return compress ();
31913   ;
31914   return 0;
31915 }
31916 _ACEOF
31917 if ac_fn_cxx_try_link "$LINENO"; then :
31918   ac_cv_lib_z_compress=yes
31919 else
31920   ac_cv_lib_z_compress=no
31921 fi
31922 rm -f core conftest.err conftest.$ac_objext \
31923     conftest$ac_exeext conftest.$ac_ext
31924 LIBS=$ac_check_lib_save_LIBS
31925 fi
31926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
31927 $as_echo "$ac_cv_lib_z_compress" >&6; }
31928 if test "x$ac_cv_lib_z_compress" = xyes; then :
31929    ZLIB_FOUND=yes
31930 else
31931    ZLIB_FOUND=no
31932 fi
31933 
31934 
31935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
31936 $as_echo_n "checking for which zlib to use... " >&6; }
31937 
31938 DEFAULT_ZLIB=bundled
31939 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31940 #
31941 # On macosx default is system...on others default is
31942 #
31943     DEFAULT_ZLIB=system
31944 fi
31945 
31946 if test "x${ZLIB_FOUND}" != "xyes"; then
31947 #
31948 # If we don't find any system...set default to bundled
31949 #
31950     DEFAULT_ZLIB=bundled
31951 fi
31952 
31953 #
31954 # If user didn't specify, use DEFAULT_ZLIB
31955 #
31956 if test "x${with_zlib}" = "x"; then
31957     with_zlib=${DEFAULT_ZLIB}
31958 fi
31959 
31960 if test "x${with_zlib}" = "xbundled"; then
31961     USE_EXTERNAL_LIBZ=false
31962     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
31963 $as_echo "bundled" >&6; }
31964 elif test "x${with_zlib}" = "xsystem"; then
31965     if test "x${ZLIB_FOUND}" = "xyes"; then
31966         USE_EXTERNAL_LIBZ=true
31967         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
31968 $as_echo "system" >&6; }
31969     else
31970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
31971 $as_echo "system not found" >&6; }
31972         as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
31973     fi
31974 else
31975     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
31976 fi
31977 
31978 
31979 
31980 ###############################################################################
31981 LIBZIP_CAN_USE_MMAP=true
31982 
31983 
31984 
31985 ###############################################################################
31986 #
31987 # Check if altzone exists in time.h
31988 #
31989 
31990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31991 /* end confdefs.h.  */
31992 #include <time.h>
31993 int
31994 main ()
31995 {
31996 return (int)altzone;
31997   ;
31998   return 0;
31999 }
32000 _ACEOF
32001 if ac_fn_cxx_try_link "$LINENO"; then :
32002   has_altzone=yes
32003 else
32004   has_altzone=no
32005 fi
32006 rm -f core conftest.err conftest.$ac_objext \
32007     conftest$ac_exeext conftest.$ac_ext
32008 if test "x$has_altzone" = xyes; then
32009 
32010 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32011 
32012 fi
32013 
32014 ###############################################################################
32015 #
32016 # Check the maths library
32017 #
32018 
32019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32020 $as_echo_n "checking for cos in -lm... " >&6; }
32021 if ${ac_cv_lib_m_cos+:} false; then :
32022   $as_echo_n "(cached) " >&6
32023 else
32024   ac_check_lib_save_LIBS=$LIBS
32025 LIBS="-lm  $LIBS"
32026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32027 /* end confdefs.h.  */
32028 
32029 /* Override any GCC internal prototype to avoid an error.
32030    Use char because int might match the return type of a GCC
32031    builtin and then its argument prototype would still apply.  */
32032 #ifdef __cplusplus
32033 extern "C"
32034 #endif
32035 char cos ();
32036 int
32037 main ()
32038 {
32039 return cos ();
32040   ;
32041   return 0;
32042 }
32043 _ACEOF
32044 if ac_fn_cxx_try_link "$LINENO"; then :
32045   ac_cv_lib_m_cos=yes
32046 else
32047   ac_cv_lib_m_cos=no
32048 fi
32049 rm -f core conftest.err conftest.$ac_objext \
32050     conftest$ac_exeext conftest.$ac_ext
32051 LIBS=$ac_check_lib_save_LIBS
32052 fi
32053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32054 $as_echo "$ac_cv_lib_m_cos" >&6; }
32055 if test "x$ac_cv_lib_m_cos" = xyes; then :
32056   cat >>confdefs.h <<_ACEOF
32057 #define HAVE_LIBM 1
32058 _ACEOF
32059 
32060   LIBS="-lm $LIBS"
32061 
32062 else
32063 
32064                   { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32065 $as_echo "$as_me: Maths library was not found" >&6;}
32066 
32067 fi
32068 
32069 
32070 
32071 ###############################################################################
32072 #
32073 # Check for libdl.so
32074 
32075 save_LIBS="$LIBS"
32076 LIBS=""
32077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32078 $as_echo_n "checking for dlopen in -ldl... " >&6; }
32079 if ${ac_cv_lib_dl_dlopen+:} false; then :
32080   $as_echo_n "(cached) " >&6
32081 else
32082   ac_check_lib_save_LIBS=$LIBS
32083 LIBS="-ldl  $LIBS"
32084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32085 /* end confdefs.h.  */
32086 
32087 /* Override any GCC internal prototype to avoid an error.
32088    Use char because int might match the return type of a GCC
32089    builtin and then its argument prototype would still apply.  */
32090 #ifdef __cplusplus
32091 extern "C"
32092 #endif
32093 char dlopen ();
32094 int
32095 main ()
32096 {
32097 return dlopen ();
32098   ;
32099   return 0;
32100 }
32101 _ACEOF
32102 if ac_fn_cxx_try_link "$LINENO"; then :
32103   ac_cv_lib_dl_dlopen=yes
32104 else
32105   ac_cv_lib_dl_dlopen=no
32106 fi
32107 rm -f core conftest.err conftest.$ac_objext \
32108     conftest$ac_exeext conftest.$ac_ext
32109 LIBS=$ac_check_lib_save_LIBS
32110 fi
32111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32112 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32113 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
32114   cat >>confdefs.h <<_ACEOF
32115 #define HAVE_LIBDL 1
32116 _ACEOF
32117 
32118   LIBS="-ldl $LIBS"
32119 
32120 fi
32121 
32122 LIBDL="$LIBS"
32123 
32124 LIBS="$save_LIBS"
32125 
32126 
32127 
32128 ###############################################################################
32129 #
32130 # statically link libstdc++ before C++ ABI is stablized on Linux unless
32131 # dynamic build is configured on command line.
32132 #
32133 
32134 # Check whether --with-stdc++lib was given.
32135 if test "${with_stdc__lib+set}" = set; then :
32136   withval=$with_stdc__lib;
32137     if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32138         && test "x$with_stdc__lib" != xdefault; then
32139       as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32140     fi
32141 
32142 else
32143   with_stdc__lib=default
32144 
32145 fi
32146 
32147 
32148 if test "x$OPENJDK_TARGET_OS" = xlinux; then
32149     # Test if -lstdc++ works.
32150     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32151 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32152     ac_ext=cpp
32153 ac_cpp='$CXXCPP $CPPFLAGS'
32154 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32155 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32156 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32157 
32158     OLD_CXXFLAGS="$CXXFLAGS"
32159     CXXFLAGS="$CXXFLAGS -lstdc++"
32160     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32161 /* end confdefs.h.  */
32162 
32163 int
32164 main ()
32165 {
32166 return 0;
32167   ;
32168   return 0;
32169 }
32170 _ACEOF
32171 if ac_fn_cxx_try_link "$LINENO"; then :
32172   has_dynamic_libstdcxx=yes
32173 else
32174   has_dynamic_libstdcxx=no
32175 fi
32176 rm -f core conftest.err conftest.$ac_objext \
32177     conftest$ac_exeext conftest.$ac_ext
32178     CXXFLAGS="$OLD_CXXFLAGS"
32179     ac_ext=cpp
32180 ac_cpp='$CXXCPP $CPPFLAGS'
32181 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32182 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32183 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32184 
32185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32186 $as_echo "$has_dynamic_libstdcxx" >&6; }
32187 
32188     # Test if stdc++ can be linked statically.
32189     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32190 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32191     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32192     ac_ext=cpp
32193 ac_cpp='$CXXCPP $CPPFLAGS'
32194 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32195 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32196 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32197 
32198     OLD_LIBS="$LIBS"
32199     OLD_CXX="$CXX"
32200     LIBS="$STATIC_STDCXX_FLAGS"
32201     CXX="$CC"
32202     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32203 /* end confdefs.h.  */
32204 
32205 int
32206 main ()
32207 {
32208 return 0;
32209   ;
32210   return 0;
32211 }
32212 _ACEOF
32213 if ac_fn_cxx_try_link "$LINENO"; then :
32214   has_static_libstdcxx=yes
32215 else
32216   has_static_libstdcxx=no
32217 fi
32218 rm -f core conftest.err conftest.$ac_objext \
32219     conftest$ac_exeext conftest.$ac_ext
32220     LIBS="$OLD_LIBS"
32221     CXX="$OLD_CXX"
32222     ac_ext=cpp
32223 ac_cpp='$CXXCPP $CPPFLAGS'
32224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32227 
32228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32229 $as_echo "$has_static_libstdcxx" >&6; }
32230 
32231     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32232         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32233     fi
32234 
32235     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32236         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32237     fi
32238 
32239     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32240         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32241     fi
32242 
32243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32244 $as_echo_n "checking how to link with libstdc++... " >&6; }
32245     # If dynamic was requested, it's available since it would fail above otherwise.
32246     # If dynamic wasn't requested, go with static unless it isn't available.
32247     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32248         LIBCXX="$LIBCXX -lstdc++"
32249         LDCXX="$CXX"
32250         STATIC_CXX_SETTING="STATIC_CXX=false"
32251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32252 $as_echo "dynamic" >&6; }
32253     else
32254         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32255         LDCXX="$CC"
32256         STATIC_CXX_SETTING="STATIC_CXX=true"
32257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32258 $as_echo "static" >&6; }
32259     fi
32260 fi
32261 
32262 
32263 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32264     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32265 
32266 pkg_failed=no
32267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32268 $as_echo_n "checking for LIBFFI... " >&6; }
32269 
32270 if test -n "$LIBFFI_CFLAGS"; then
32271     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32272  elif test -n "$PKG_CONFIG"; then
32273     if test -n "$PKG_CONFIG" && \
32274     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32275   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32276   ac_status=$?
32277   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32278   test $ac_status = 0; }; then
32279   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32280 else
32281   pkg_failed=yes
32282 fi
32283  else
32284     pkg_failed=untried
32285 fi
32286 if test -n "$LIBFFI_LIBS"; then
32287     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32288  elif test -n "$PKG_CONFIG"; then
32289     if test -n "$PKG_CONFIG" && \
32290     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32291   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32292   ac_status=$?
32293   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32294   test $ac_status = 0; }; then
32295   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32296 else
32297   pkg_failed=yes
32298 fi
32299  else
32300     pkg_failed=untried
32301 fi
32302 
32303 
32304 
32305 if test $pkg_failed = yes; then
32306 
32307 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32308         _pkg_short_errors_supported=yes
32309 else
32310         _pkg_short_errors_supported=no
32311 fi
32312         if test $_pkg_short_errors_supported = yes; then
32313                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32314         else
32315                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32316         fi
32317         # Put the nasty error message in config.log where it belongs
32318         echo "$LIBFFI_PKG_ERRORS" >&5
32319 
32320         as_fn_error $? "Package requirements (libffi) were not met:
32321 
32322 $LIBFFI_PKG_ERRORS
32323 
32324 Consider adjusting the PKG_CONFIG_PATH environment variable if you
32325 installed software in a non-standard prefix.
32326 
32327 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32328 and LIBFFI_LIBS to avoid the need to call pkg-config.
32329 See the pkg-config man page for more details.
32330 " "$LINENO" 5
32331 elif test $pkg_failed = untried; then
32332         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32333 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32334 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32335 is in your PATH or set the PKG_CONFIG environment variable to the full
32336 path to pkg-config.
32337 
32338 Alternatively, you may set the environment variables LIBFFI_CFLAGS
32339 and LIBFFI_LIBS to avoid the need to call pkg-config.
32340 See the pkg-config man page for more details.
32341 
32342 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32343 See \`config.log' for more details" "$LINENO" 5; }
32344 else
32345         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32346         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32347         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32348 $as_echo "yes" >&6; }
32349         :
32350 fi
32351 
32352 fi
32353 
32354 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32355     # Extract the first word of "llvm-config", so it can be a program name with args.
32356 set dummy llvm-config; ac_word=$2
32357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32358 $as_echo_n "checking for $ac_word... " >&6; }
32359 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
32360   $as_echo_n "(cached) " >&6
32361 else
32362   if test -n "$LLVM_CONFIG"; then
32363   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32364 else
32365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32366 for as_dir in $PATH
32367 do
32368   IFS=$as_save_IFS
32369   test -z "$as_dir" && as_dir=.
32370     for ac_exec_ext in '' $ac_executable_extensions; do
32371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32372     ac_cv_prog_LLVM_CONFIG="llvm-config"
32373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32374     break 2
32375   fi
32376 done
32377   done
32378 IFS=$as_save_IFS
32379 
32380 fi
32381 fi
32382 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32383 if test -n "$LLVM_CONFIG"; then
32384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32385 $as_echo "$LLVM_CONFIG" >&6; }
32386 else
32387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32388 $as_echo "no" >&6; }
32389 fi
32390 
32391 
32392 
32393     if test "x$LLVM_CONFIG" != xllvm-config; then
32394         as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32395     fi
32396 
32397     llvm_components="jit mcjit engine nativecodegen native"
32398     unset LLVM_CFLAGS
32399     for flag in $("$LLVM_CONFIG" --cxxflags); do
32400       if echo "${flag}" | grep -q '^-[ID]'; then
32401         if test "${flag}" != "-D_DEBUG" ; then
32402           if test "${LLVM_CFLAGS}" != "" ; then
32403             LLVM_CFLAGS="${LLVM_CFLAGS} "
32404           fi
32405           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32406         fi
32407       fi
32408     done
32409     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32410     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32411 
32412     unset LLVM_LDFLAGS
32413     for flag in $("${LLVM_CONFIG}" --ldflags); do
32414       if echo "${flag}" | grep -q '^-L'; then
32415         if test "${LLVM_LDFLAGS}" != ""; then
32416           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32417         fi
32418         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32419       fi
32420     done
32421 
32422     unset LLVM_LIBS
32423     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32424       if echo "${flag}" | grep -q '^-l'; then
32425         if test "${LLVM_LIBS}" != ""; then
32426           LLVM_LIBS="${LLVM_LIBS} "
32427         fi
32428         LLVM_LIBS="${LLVM_LIBS}${flag}"
32429       fi
32430     done
32431 
32432 
32433 
32434 
32435 fi
32436 
32437 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32438 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32439     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32440 fi
32441 
32442 # TODO better (platform agnostic) test
32443 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32444     LIBCXX="-lstdc++"
32445 fi
32446 
32447 
32448 
32449 
32450 
32451 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32452 
32453 # When using cygwin or msys, we need a wrapper binary that renames
32454 # /cygdrive/c/ arguments into c:/ arguments and peeks into
32455 # @files and rewrites these too! This wrapper binary is
32456 # called fixpath.
32457 FIXPATH=
32458 if test "x$OPENJDK_BUILD_OS" = xwindows; then
32459     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32460 $as_echo_n "checking if fixpath can be created... " >&6; }
32461     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32462     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32463     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32464       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32465       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32466       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32467       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32468     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32469       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32470       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32471 
32472       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32473       # @ was chosen as separator to minimize risk of other tools messing around with it
32474       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32475       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32476 
32477       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32478     fi
32479     rm -f $OUTPUT_ROOT/fixpath*
32480     cd $OUTPUT_ROOT
32481     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32482     cd $CURDIR
32483 
32484     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32485         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32486 $as_echo "no" >&6; }
32487         cat $OUTPUT_ROOT/fixpath1.log
32488         as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32489     fi
32490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32491 $as_echo "yes" >&6; }
32492     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32493 $as_echo_n "checking if fixpath.exe works... " >&6; }
32494     cd $OUTPUT_ROOT
32495     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32496     cd $CURDIR
32497     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32498         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32499 $as_echo "no" >&6; }
32500         cat $OUTPUT_ROOT/fixpath2.log
32501         as_fn_error $? "fixpath did not work!" "$LINENO" 5
32502     fi
32503     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32504 $as_echo "yes" >&6; }
32505     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32506 fi
32507 
32508 
32509 
32510 
32511 ###############################################################################
32512 #
32513 # We need to do some final tweaking, when everything else is done.
32514 #
32515 ###############################################################################
32516 
32517 
32518 HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32519 
32520 
32521 # The name of the Service Agent jar.
32522 SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32523 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32524   SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32525 fi
32526 
32527 
32528 
32529 
32530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32531 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32532 
32533 if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32534     ENABLE_INTREE_EC=yes
32535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32536 $as_echo "yes" >&6; }
32537 else
32538     ENABLE_INTREE_EC=no
32539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32540 $as_echo "no" >&6; }
32541 fi
32542 
32543 
32544 
32545 
32546 ###############################################################################
32547 #
32548 # Configure parts of the build that only affect the build performance,
32549 # not the result.
32550 #
32551 ###############################################################################
32552 
32553 
32554   # How many cores do we have on this build system?
32555 
32556 # Check whether --with-num-cores was given.
32557 if test "${with_num_cores+set}" = set; then :
32558   withval=$with_num_cores;
32559 fi
32560 
32561   if test "x$with_num_cores" = x; then
32562     # The number of cores were not specified, try to probe them.
32563 
32564     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32565 $as_echo_n "checking for number of cores... " >&6; }
32566     NUM_CORES=1
32567     FOUND_CORES=no
32568 
32569     if test -f /proc/cpuinfo; then
32570         # Looks like a Linux (or cygwin) system
32571         NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32572         FOUND_CORES=yes
32573     elif test -x /usr/sbin/psrinfo; then
32574         # Looks like a Solaris system
32575         NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32576         FOUND_CORES=yes
32577     elif test -x /usr/sbin/system_profiler; then
32578         # Looks like a MacOSX system
32579         NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32580         FOUND_CORES=yes
32581     elif test -n "$NUMBER_OF_PROCESSORS"; then
32582         # On windows, look in the env
32583         NUM_CORES=$NUMBER_OF_PROCESSORS
32584         FOUND_CORES=yes
32585     fi
32586 
32587     if test "x$FOUND_CORES" = xyes; then
32588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32589 $as_echo "$NUM_CORES" >&6; }
32590     else
32591         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32592 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
32593         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32594 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32595     fi
32596 
32597 
32598   else
32599     NUM_CORES=$with_num_cores
32600   fi
32601 
32602 
32603 
32604   # How much memory do we have on this build system?
32605 
32606 # Check whether --with-memory-size was given.
32607 if test "${with_memory_size+set}" = set; then :
32608   withval=$with_memory_size;
32609 fi
32610 
32611   if test "x$with_memory_size" = x; then
32612     # The memory size was not specified, try to probe it.
32613 
32614     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32615 $as_echo_n "checking for memory size... " >&6; }
32616     # Default to 1024 MB
32617     MEMORY_SIZE=1024
32618     FOUND_MEM=no
32619 
32620     if test -f /proc/meminfo; then
32621         # Looks like a Linux (or cygwin) system
32622         MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32623         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32624         FOUND_MEM=yes
32625     elif test -x /usr/sbin/prtconf; then
32626         # Looks like a Solaris system
32627         MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32628         FOUND_MEM=yes
32629     elif test -x /usr/sbin/system_profiler; then
32630         # Looks like a MacOSX system
32631         MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32632         MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32633         FOUND_MEM=yes
32634     elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32635         # Windows, but without cygwin
32636         MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32637         MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32638         FOUND_MEM=yes
32639     fi
32640 
32641     if test "x$FOUND_MEM" = xyes; then
32642         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32643 $as_echo "$MEMORY_SIZE MB" >&6; }
32644     else
32645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32646 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32647         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32648 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32649     fi
32650 
32651   else
32652     MEMORY_SIZE=$with_memory_size
32653   fi
32654 
32655 
32656 
32657   # Provide a decent default number of parallel jobs for make depending on
32658   # number of cores, amount of memory and machine architecture.
32659 
32660 # Check whether --with-jobs was given.
32661 if test "${with_jobs+set}" = set; then :
32662   withval=$with_jobs;
32663 fi
32664 
32665   if test "x$with_jobs" = x; then
32666     # Number of jobs was not specified, calculate.
32667     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32668 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32669     # Approximate memory in GB, rounding up a bit.
32670     memory_gb=`expr $MEMORY_SIZE / 1100`
32671     # Pick the lowest of memory in gb and number of cores.
32672     if test "$memory_gb" -lt "$NUM_CORES"; then
32673       JOBS="$memory_gb"
32674     else
32675       JOBS="$NUM_CORES"
32676       # On bigger machines, leave some room for other processes to run
32677       if test "$JOBS" -gt "4"; then
32678         JOBS=`expr $JOBS '*' 90 / 100`
32679       fi
32680     fi
32681     # Cap number of jobs to 16
32682     if test "$JOBS" -gt "16"; then
32683       JOBS=16
32684     fi
32685     if test "$JOBS" -eq "0"; then
32686       JOBS=1
32687     fi
32688     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32689 $as_echo "$JOBS" >&6; }
32690   else
32691     JOBS=$with_jobs
32692   fi
32693 
32694 
32695 
32696 # Setup smart javac (after cores and memory have been setup)
32697 
32698 
32699 # Check whether --with-sjavac-server-java was given.
32700 if test "${with_sjavac_server_java+set}" = set; then :
32701   withval=$with_sjavac_server_java;
32702 fi
32703 
32704 
32705 if test "x$with_sjavac_server_java" != x; then
32706     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32707     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32708     if test "x$FOUND_VERSION" = x; then
32709         as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32710     fi
32711 else
32712     SJAVAC_SERVER_JAVA=""
32713     # Hotspot specific options.
32714 
32715     $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32716     $ECHO "Command: $JAVA -verbosegc -version" >&5
32717     OUTPUT=`$JAVA -verbosegc -version 2>&1`
32718     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32719     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32720     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32721         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32722         JVM_ARG_OK=true
32723     else
32724         $ECHO "Arg failed:" >&5
32725         $ECHO "$OUTPUT" >&5
32726         JVM_ARG_OK=false
32727     fi
32728 
32729     # JRockit specific options.
32730 
32731     $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32732     $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32733     OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32734     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32735     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32736     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32737         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32738         JVM_ARG_OK=true
32739     else
32740         $ECHO "Arg failed:" >&5
32741         $ECHO "$OUTPUT" >&5
32742         JVM_ARG_OK=false
32743     fi
32744 
32745     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32746 fi
32747 
32748 
32749 if test "$MEMORY_SIZE" -gt "2500"; then
32750 
32751     $ECHO "Check if jvm arg is ok: -d64" >&5
32752     $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
32753     OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
32754     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32755     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32756     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32757         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
32758         JVM_ARG_OK=true
32759     else
32760         $ECHO "Arg failed:" >&5
32761         $ECHO "$OUTPUT" >&5
32762         JVM_ARG_OK=false
32763     fi
32764 
32765     if test "$JVM_ARG_OK" = true; then
32766         JVM_64BIT=true
32767         JVM_ARG_OK=false
32768     fi
32769     fi
32770 
32771 if test "$JVM_64BIT" = true; then
32772     if test "$MEMORY_SIZE" -gt "17000"; then
32773 
32774     $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
32775     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
32776     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
32777     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32778     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32779     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32780         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
32781         JVM_ARG_OK=true
32782     else
32783         $ECHO "Arg failed:" >&5
32784         $ECHO "$OUTPUT" >&5
32785         JVM_ARG_OK=false
32786     fi
32787 
32788     fi
32789     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
32790 
32791     $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
32792     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
32793     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
32794     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32795     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32796     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32797         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
32798         JVM_ARG_OK=true
32799     else
32800         $ECHO "Arg failed:" >&5
32801         $ECHO "$OUTPUT" >&5
32802         JVM_ARG_OK=false
32803     fi
32804 
32805     fi
32806     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
32807 
32808     $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
32809     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
32810     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
32811     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32812     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32813     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32814         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
32815         JVM_ARG_OK=true
32816     else
32817         $ECHO "Arg failed:" >&5
32818         $ECHO "$OUTPUT" >&5
32819         JVM_ARG_OK=false
32820     fi
32821 
32822     fi
32823     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
32824 
32825     $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
32826     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
32827     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
32828     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32829     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32830     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32831         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
32832         JVM_ARG_OK=true
32833     else
32834         $ECHO "Arg failed:" >&5
32835         $ECHO "$OUTPUT" >&5
32836         JVM_ARG_OK=false
32837     fi
32838 
32839     fi
32840 fi
32841 if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
32842 
32843     $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
32844     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
32845     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
32846     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32847     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32848     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32849         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
32850         JVM_ARG_OK=true
32851     else
32852         $ECHO "Arg failed:" >&5
32853         $ECHO "$OUTPUT" >&5
32854         JVM_ARG_OK=false
32855     fi
32856 
32857 fi
32858 if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
32859 
32860     $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
32861     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
32862     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
32863     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32864     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32865     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32866         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
32867         JVM_ARG_OK=true
32868     else
32869         $ECHO "Arg failed:" >&5
32870         $ECHO "$OUTPUT" >&5
32871         JVM_ARG_OK=false
32872     fi
32873 
32874 fi
32875 if test "$JVM_ARG_OK" = false; then
32876 
32877     $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
32878     $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
32879     OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
32880     FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32881     FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32882     if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32883         SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
32884         JVM_ARG_OK=true
32885     else
32886         $ECHO "Arg failed:" >&5
32887         $ECHO "$OUTPUT" >&5
32888         JVM_ARG_OK=false
32889     fi
32890 
32891 fi
32892 
32893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
32894 $as_echo_n "checking whether to use sjavac... " >&6; }
32895 # Check whether --enable-sjavac was given.
32896 if test "${enable_sjavac+set}" = set; then :
32897   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
32898 else
32899   ENABLE_SJAVAC='no'
32900 fi
32901 
32902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
32903 $as_echo "$ENABLE_SJAVAC" >&6; }
32904 
32905 
32906 if test "x$ENABLE_SJAVAC" = xyes; then
32907     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
32908 else
32909     SJAVAC_SERVER_DIR=
32910 fi
32911 
32912 
32913 
32914 
32915 # Can the C/C++ compiler use precompiled headers?
32916 
32917 
32918 ###############################################################################
32919 #
32920 # Can the C/C++ compiler use precompiled headers?
32921 #
32922 # Check whether --enable-precompiled-headers was given.
32923 if test "${enable_precompiled_headers+set}" = set; then :
32924   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
32925 else
32926   ENABLE_PRECOMPH=yes
32927 fi
32928 
32929 
32930 USE_PRECOMPILED_HEADER=1
32931 if test "x$ENABLE_PRECOMPH" = xno; then
32932     USE_PRECOMPILED_HEADER=0
32933 fi
32934 
32935 if test "x$ENABLE_PRECOMPH" = xyes; then
32936     # Check that the compiler actually supports precomp headers.
32937     if test "x$GCC" = xyes; then
32938          { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
32939 $as_echo_n "checking that precompiled headers work... " >&6; }
32940          echo "int alfa();" > conftest.h
32941          $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
32942          if test ! -f conftest.hpp.gch; then
32943              USE_PRECOMPILED_HEADER=0
32944              { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32945 $as_echo "no" >&6; }
32946          else
32947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32948 $as_echo "yes" >&6; }
32949          fi
32950          rm -f conftest.h conftest.hpp.gch
32951     fi
32952 fi
32953 
32954 
32955 
32956 
32957 # Setup use of ccache, if available
32958 
32959     # Check whether --enable-ccache was given.
32960 if test "${enable_ccache+set}" = set; then :
32961   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
32962 else
32963   ENABLE_CCACHE=yes
32964 fi
32965 
32966     if test "x$ENABLE_CCACHE" = xyes; then
32967         OLD_PATH="$PATH"
32968         if test "x$TOOLS_DIR" != x; then
32969           PATH=$TOOLS_DIR:$PATH
32970         fi
32971         # Extract the first word of "ccache", so it can be a program name with args.
32972 set dummy ccache; ac_word=$2
32973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32974 $as_echo_n "checking for $ac_word... " >&6; }
32975 if ${ac_cv_path_CCACHE+:} false; then :
32976   $as_echo_n "(cached) " >&6
32977 else
32978   case $CCACHE in
32979   [\\/]* | ?:[\\/]*)
32980   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
32981   ;;
32982   *)
32983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32984 for as_dir in $PATH
32985 do
32986   IFS=$as_save_IFS
32987   test -z "$as_dir" && as_dir=.
32988     for ac_exec_ext in '' $ac_executable_extensions; do
32989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32990     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
32991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32992     break 2
32993   fi
32994 done
32995   done
32996 IFS=$as_save_IFS
32997 
32998   ;;
32999 esac
33000 fi
33001 CCACHE=$ac_cv_path_CCACHE
33002 if test -n "$CCACHE"; then
33003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33004 $as_echo "$CCACHE" >&6; }
33005 else
33006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33007 $as_echo "no" >&6; }
33008 fi
33009 
33010 
33011         PATH="$OLD_PATH"
33012     else
33013         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33014 $as_echo_n "checking for ccache... " >&6; }
33015         { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33016 $as_echo "explicitly disabled" >&6; }
33017         CCACHE=
33018     fi
33019 
33020 
33021 
33022 # Check whether --with-ccache-dir was given.
33023 if test "${with_ccache_dir+set}" = set; then :
33024   withval=$with_ccache_dir;
33025 fi
33026 
33027 
33028     if test "x$with_ccache_dir" != x; then
33029         # When using a non home ccache directory, assume the use is to share ccache files
33030         # with other users. Thus change the umask.
33031         SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33032     fi
33033     CCACHE_FOUND=""
33034     if test "x$CCACHE" != x; then
33035 
33036     if test "x$CCACHE" != x; then
33037         CCACHE_FOUND="true"
33038         # Only use ccache if it is 3.1.4 or later, which supports
33039         # precompiled headers.
33040         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33041 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33042         HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33043         if test "x$HAS_GOOD_CCACHE" = x; then
33044             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33045 $as_echo "no, disabling ccache" >&6; }
33046             CCACHE=
33047         else
33048             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33049 $as_echo "yes" >&6; }
33050             { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33051 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33052             PUSHED_FLAGS="$CXXFLAGS"
33053             CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33054             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33055 /* end confdefs.h.  */
33056 
33057 int
33058 main ()
33059 {
33060 
33061   ;
33062   return 0;
33063 }
33064 _ACEOF
33065 if ac_fn_cxx_try_compile "$LINENO"; then :
33066   CC_KNOWS_CCACHE_TRICK=yes
33067 else
33068   CC_KNOWS_CCACHE_TRICK=no
33069 fi
33070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33071             CXXFLAGS="$PUSHED_FLAGS"
33072             if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33073                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33074 $as_echo "yes" >&6; }
33075             else
33076                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33077 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
33078                 CCACHE=
33079             fi
33080         fi
33081     fi
33082 
33083     if test "x$CCACHE" != x; then
33084         CCACHE_SLOPPINESS=time_macros
33085         CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33086         CCACHE_FLAGS=-fpch-preprocess
33087 
33088         if test "x$SET_CCACHE_DIR" != x; then
33089             mkdir -p $CCACHE_DIR > /dev/null 2>&1
33090             chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33091         fi
33092     fi
33093 
33094     fi
33095 
33096 
33097 ###############################################################################
33098 #
33099 # And now the finish...
33100 #
33101 ###############################################################################
33102 
33103 # Check for some common pitfalls
33104 
33105   if test x"$OPENJDK_BUILD_OS" = xwindows; then
33106     file_to_test="$SRC_ROOT/LICENSE"
33107     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33108       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
33109     fi
33110   fi
33111 
33112 
33113 
33114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33115 $as_echo_n "checking if build directory is on local disk... " >&6; }
33116 
33117         # df -l lists only local disks; if the given directory is not found then
33118         # a non-zero exit code is given
33119   if test "x$DF" = x; then
33120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33121       # msys does not have df; use Windows "net use" instead.
33122       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33123       if test "x$IS_NETWORK_DISK" = x; then
33124         OUTPUT_DIR_IS_LOCAL="yes"
33125       else
33126         OUTPUT_DIR_IS_LOCAL="no"
33127       fi
33128     else
33129       # No df here, say it's local
33130       OUTPUT_DIR_IS_LOCAL="yes"
33131     fi
33132   else
33133     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33134       OUTPUT_DIR_IS_LOCAL="yes"
33135     else
33136       OUTPUT_DIR_IS_LOCAL="no"
33137     fi
33138   fi
33139 
33140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33141 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33142 
33143 
33144 
33145 # Check if the user has any old-style ALT_ variables set.
33146 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33147 
33148 # Before generating output files, test if they exist. If they do, this is a reconfigure.
33149 # Since we can't properly handle the dependencies for this, warn the user about the situation
33150 if test -e $OUTPUT_ROOT/spec.gmk; then
33151   IS_RECONFIGURE=yes
33152 else
33153   IS_RECONFIGURE=no
33154 fi
33155 
33156 if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33157   HIDE_PERFORMANCE_HINTS=yes
33158 else
33159   HIDE_PERFORMANCE_HINTS=no
33160   # Hide it the next time around...
33161   $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33162 fi
33163 
33164 
33165 
33166 # At the end, call the custom hook. (Dummy macro if no custom sources available)
33167 
33168 
33169 # We're messing a bit with internal autoconf variables to put the config.status
33170 # in the output directory instead of the current directory.
33171 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33172 # Create the actual output files. Now the main work of configure is done.
33173 cat >confcache <<\_ACEOF
33174 # This file is a shell script that caches the results of configure
33175 # tests run on this system so they can be shared between configure
33176 # scripts and configure runs, see configure's option --config-cache.
33177 # It is not useful on other systems.  If it contains results you don't
33178 # want to keep, you may remove or edit it.
33179 #
33180 # config.status only pays attention to the cache file if you give it
33181 # the --recheck option to rerun configure.
33182 #
33183 # `ac_cv_env_foo' variables (set or unset) will be overridden when
33184 # loading this file, other *unset* `ac_cv_foo' will be assigned the
33185 # following values.
33186 
33187 _ACEOF
33188 
33189 # The following way of writing the cache mishandles newlines in values,
33190 # but we know of no workaround that is simple, portable, and efficient.
33191 # So, we kill variables containing newlines.
33192 # Ultrix sh set writes to stderr and can't be redirected directly,
33193 # and sets the high bit in the cache file unless we assign to the vars.
33194 (
33195   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33196     eval ac_val=\$$ac_var
33197     case $ac_val in #(
33198     *${as_nl}*)
33199       case $ac_var in #(
33200       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33201 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33202       esac
33203       case $ac_var in #(
33204       _ | IFS | as_nl) ;; #(
33205       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33206       *) { eval $ac_var=; unset $ac_var;} ;;
33207       esac ;;
33208     esac
33209   done
33210 
33211   (set) 2>&1 |
33212     case $as_nl`(ac_space=' '; set) 2>&1` in #(
33213     *${as_nl}ac_space=\ *)
33214       # `set' does not quote correctly, so add quotes: double-quote
33215       # substitution turns \\\\ into \\, and sed turns \\ into \.
33216       sed -n \
33217         "s/'/'\\\\''/g;
33218           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33219       ;; #(
33220     *)
33221       # `set' quotes correctly as required by POSIX, so do not add quotes.
33222       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33223       ;;
33224     esac |
33225     sort
33226 ) |
33227   sed '
33228      /^ac_cv_env_/b end
33229      t clear
33230      :clear
33231      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33232      t end
33233      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33234      :end' >>confcache
33235 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33236   if test -w "$cache_file"; then
33237     if test "x$cache_file" != "x/dev/null"; then
33238       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33239 $as_echo "$as_me: updating cache $cache_file" >&6;}
33240       if test ! -f "$cache_file" || test -h "$cache_file"; then
33241         cat confcache >"$cache_file"
33242       else
33243         case $cache_file in #(
33244         */* | ?:*)
33245           mv -f confcache "$cache_file"$$ &&
33246           mv -f "$cache_file"$$ "$cache_file" ;; #(
33247         *)
33248           mv -f confcache "$cache_file" ;;
33249         esac
33250       fi
33251     fi
33252   else
33253     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33254 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33255   fi
33256 fi
33257 rm -f confcache
33258 
33259 test "x$prefix" = xNONE && prefix=$ac_default_prefix
33260 # Let make expand exec_prefix.
33261 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33262 
33263 DEFS=-DHAVE_CONFIG_H
33264 
33265 ac_libobjs=
33266 ac_ltlibobjs=
33267 U=
33268 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33269   # 1. Remove the extension, and $U if already installed.
33270   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33271   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33272   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33273   #    will be set to the directory where LIBOBJS objects are built.
33274   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33275   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33276 done
33277 LIBOBJS=$ac_libobjs
33278 
33279 LTLIBOBJS=$ac_ltlibobjs
33280 
33281 
33282 
33283 : "${CONFIG_STATUS=./config.status}"
33284 ac_write_fail=0
33285 ac_clean_files_save=$ac_clean_files
33286 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33287 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33288 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33289 as_write_fail=0
33290 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33291 #! $SHELL
33292 # Generated by $as_me.
33293 # Run this file to recreate the current configuration.
33294 # Compiler output produced by configure, useful for debugging
33295 # configure, is in config.log if it exists.
33296 
33297 debug=false
33298 ac_cs_recheck=false
33299 ac_cs_silent=false
33300 
33301 SHELL=\${CONFIG_SHELL-$SHELL}
33302 export SHELL
33303 _ASEOF
33304 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33305 ## -------------------- ##
33306 ## M4sh Initialization. ##
33307 ## -------------------- ##
33308 
33309 # Be more Bourne compatible
33310 DUALCASE=1; export DUALCASE # for MKS sh
33311 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33312   emulate sh
33313   NULLCMD=:
33314   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33315   # is contrary to our usage.  Disable this feature.
33316   alias -g '${1+"$@"}'='"$@"'
33317   setopt NO_GLOB_SUBST
33318 else
33319   case `(set -o) 2>/dev/null` in #(
33320   *posix*) :
33321     set -o posix ;; #(
33322   *) :
33323      ;;
33324 esac
33325 fi
33326 
33327 
33328 as_nl='
33329 '
33330 export as_nl
33331 # Printing a long string crashes Solaris 7 /usr/bin/printf.
33332 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33333 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33334 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33335 # Prefer a ksh shell builtin over an external printf program on Solaris,
33336 # but without wasting forks for bash or zsh.
33337 if test -z "$BASH_VERSION$ZSH_VERSION" \
33338     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33339   as_echo='print -r --'
33340   as_echo_n='print -rn --'
33341 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33342   as_echo='printf %s\n'
33343   as_echo_n='printf %s'
33344 else
33345   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33346     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33347     as_echo_n='/usr/ucb/echo -n'
33348   else
33349     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33350     as_echo_n_body='eval
33351       arg=$1;
33352       case $arg in #(
33353       *"$as_nl"*)
33354         expr "X$arg" : "X\\(.*\\)$as_nl";
33355         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33356       esac;
33357       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33358     '
33359     export as_echo_n_body
33360     as_echo_n='sh -c $as_echo_n_body as_echo'
33361   fi
33362   export as_echo_body
33363   as_echo='sh -c $as_echo_body as_echo'
33364 fi
33365 
33366 # The user is always right.
33367 if test "${PATH_SEPARATOR+set}" != set; then
33368   PATH_SEPARATOR=:
33369   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33370     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33371       PATH_SEPARATOR=';'
33372   }
33373 fi
33374 
33375 
33376 # IFS
33377 # We need space, tab and new line, in precisely that order.  Quoting is
33378 # there to prevent editors from complaining about space-tab.
33379 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
33380 # splitting by setting IFS to empty value.)
33381 IFS=" ""        $as_nl"
33382 
33383 # Find who we are.  Look in the path if we contain no directory separator.
33384 as_myself=
33385 case $0 in #((
33386   *[\\/]* ) as_myself=$0 ;;
33387   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33388 for as_dir in $PATH
33389 do
33390   IFS=$as_save_IFS
33391   test -z "$as_dir" && as_dir=.
33392     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33393   done
33394 IFS=$as_save_IFS
33395 
33396      ;;
33397 esac
33398 # We did not find ourselves, most probably we were run as `sh COMMAND'
33399 # in which case we are not to be found in the path.
33400 if test "x$as_myself" = x; then
33401   as_myself=$0
33402 fi
33403 if test ! -f "$as_myself"; then
33404   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33405   exit 1
33406 fi
33407 
33408 # Unset variables that we do not need and which cause bugs (e.g. in
33409 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33410 # suppresses any "Segmentation fault" message there.  '((' could
33411 # trigger a bug in pdksh 5.2.14.
33412 for as_var in BASH_ENV ENV MAIL MAILPATH
33413 do eval test x\${$as_var+set} = xset \
33414   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33415 done
33416 PS1='$ '
33417 PS2='> '
33418 PS4='+ '
33419 
33420 # NLS nuisances.
33421 LC_ALL=C
33422 export LC_ALL
33423 LANGUAGE=C
33424 export LANGUAGE
33425 
33426 # CDPATH.
33427 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33428 
33429 
33430 # as_fn_error STATUS ERROR [LINENO LOG_FD]
33431 # ----------------------------------------
33432 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33433 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33434 # script with STATUS, using 1 if that was 0.
33435 as_fn_error ()
33436 {
33437   as_status=$1; test $as_status -eq 0 && as_status=1
33438   if test "$4"; then
33439     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33440     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33441   fi
33442   $as_echo "$as_me: error: $2" >&2
33443   as_fn_exit $as_status
33444 } # as_fn_error
33445 
33446 
33447 # as_fn_set_status STATUS
33448 # -----------------------
33449 # Set $? to STATUS, without forking.
33450 as_fn_set_status ()
33451 {
33452   return $1
33453 } # as_fn_set_status
33454 
33455 # as_fn_exit STATUS
33456 # -----------------
33457 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33458 as_fn_exit ()
33459 {
33460   set +e
33461   as_fn_set_status $1
33462   exit $1
33463 } # as_fn_exit
33464 
33465 # as_fn_unset VAR
33466 # ---------------
33467 # Portably unset VAR.
33468 as_fn_unset ()
33469 {
33470   { eval $1=; unset $1;}
33471 }
33472 as_unset=as_fn_unset
33473 # as_fn_append VAR VALUE
33474 # ----------------------
33475 # Append the text in VALUE to the end of the definition contained in VAR. Take
33476 # advantage of any shell optimizations that allow amortized linear growth over
33477 # repeated appends, instead of the typical quadratic growth present in naive
33478 # implementations.
33479 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33480   eval 'as_fn_append ()
33481   {
33482     eval $1+=\$2
33483   }'
33484 else
33485   as_fn_append ()
33486   {
33487     eval $1=\$$1\$2
33488   }
33489 fi # as_fn_append
33490 
33491 # as_fn_arith ARG...
33492 # ------------------
33493 # Perform arithmetic evaluation on the ARGs, and store the result in the
33494 # global $as_val. Take advantage of shells that can avoid forks. The arguments
33495 # must be portable across $(()) and expr.
33496 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33497   eval 'as_fn_arith ()
33498   {
33499     as_val=$(( $* ))
33500   }'
33501 else
33502   as_fn_arith ()
33503   {
33504     as_val=`expr "$@" || test $? -eq 1`
33505   }
33506 fi # as_fn_arith
33507 
33508 
33509 if expr a : '\(a\)' >/dev/null 2>&1 &&
33510    test "X`expr 00001 : '.*\(...\)'`" = X001; then
33511   as_expr=expr
33512 else
33513   as_expr=false
33514 fi
33515 
33516 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33517   as_basename=basename
33518 else
33519   as_basename=false
33520 fi
33521 
33522 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33523   as_dirname=dirname
33524 else
33525   as_dirname=false
33526 fi
33527 
33528 as_me=`$as_basename -- "$0" ||
33529 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33530          X"$0" : 'X\(//\)$' \| \
33531          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33532 $as_echo X/"$0" |
33533     sed '/^.*\/\([^/][^/]*\)\/*$/{
33534             s//\1/
33535             q
33536           }
33537           /^X\/\(\/\/\)$/{
33538             s//\1/
33539             q
33540           }
33541           /^X\/\(\/\).*/{
33542             s//\1/
33543             q
33544           }
33545           s/.*/./; q'`
33546 
33547 # Avoid depending upon Character Ranges.
33548 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33549 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33550 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33551 as_cr_digits='0123456789'
33552 as_cr_alnum=$as_cr_Letters$as_cr_digits
33553 
33554 ECHO_C= ECHO_N= ECHO_T=
33555 case `echo -n x` in #(((((
33556 -n*)
33557   case `echo 'xy\c'` in
33558   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
33559   xy)  ECHO_C='\c';;
33560   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33561        ECHO_T=' ';;
33562   esac;;
33563 *)
33564   ECHO_N='-n';;
33565 esac
33566 
33567 rm -f conf$$ conf$$.exe conf$$.file
33568 if test -d conf$$.dir; then
33569   rm -f conf$$.dir/conf$$.file
33570 else
33571   rm -f conf$$.dir
33572   mkdir conf$$.dir 2>/dev/null
33573 fi
33574 if (echo >conf$$.file) 2>/dev/null; then
33575   if ln -s conf$$.file conf$$ 2>/dev/null; then
33576     as_ln_s='ln -s'
33577     # ... but there are two gotchas:
33578     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33579     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33580     # In both cases, we have to default to `cp -pR'.
33581     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33582       as_ln_s='cp -pR'
33583   elif ln conf$$.file conf$$ 2>/dev/null; then
33584     as_ln_s=ln
33585   else
33586     as_ln_s='cp -pR'
33587   fi
33588 else
33589   as_ln_s='cp -pR'
33590 fi
33591 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33592 rmdir conf$$.dir 2>/dev/null
33593 
33594 
33595 # as_fn_mkdir_p
33596 # -------------
33597 # Create "$as_dir" as a directory, including parents if necessary.
33598 as_fn_mkdir_p ()
33599 {
33600 
33601   case $as_dir in #(
33602   -*) as_dir=./$as_dir;;
33603   esac
33604   test -d "$as_dir" || eval $as_mkdir_p || {
33605     as_dirs=
33606     while :; do
33607       case $as_dir in #(
33608       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33609       *) as_qdir=$as_dir;;
33610       esac
33611       as_dirs="'$as_qdir' $as_dirs"
33612       as_dir=`$as_dirname -- "$as_dir" ||
33613 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33614          X"$as_dir" : 'X\(//\)[^/]' \| \
33615          X"$as_dir" : 'X\(//\)$' \| \
33616          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33617 $as_echo X"$as_dir" |
33618     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33619             s//\1/
33620             q
33621           }
33622           /^X\(\/\/\)[^/].*/{
33623             s//\1/
33624             q
33625           }
33626           /^X\(\/\/\)$/{
33627             s//\1/
33628             q
33629           }
33630           /^X\(\/\).*/{
33631             s//\1/
33632             q
33633           }
33634           s/.*/./; q'`
33635       test -d "$as_dir" && break
33636     done
33637     test -z "$as_dirs" || eval "mkdir $as_dirs"
33638   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33639 
33640 
33641 } # as_fn_mkdir_p
33642 if mkdir -p . 2>/dev/null; then
33643   as_mkdir_p='mkdir -p "$as_dir"'
33644 else
33645   test -d ./-p && rmdir ./-p
33646   as_mkdir_p=false
33647 fi
33648 
33649 
33650 # as_fn_executable_p FILE
33651 # -----------------------
33652 # Test if FILE is an executable regular file.
33653 as_fn_executable_p ()
33654 {
33655   test -f "$1" && test -x "$1"
33656 } # as_fn_executable_p
33657 as_test_x='test -x'
33658 as_executable_p=as_fn_executable_p
33659 
33660 # Sed expression to map a string onto a valid CPP name.
33661 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33662 
33663 # Sed expression to map a string onto a valid variable name.
33664 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33665 
33666 
33667 exec 6>&1
33668 ## ----------------------------------- ##
33669 ## Main body of $CONFIG_STATUS script. ##
33670 ## ----------------------------------- ##
33671 _ASEOF
33672 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33673 
33674 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33675 # Save the log message, to keep $0 and so on meaningful, and to
33676 # report actual input values of CONFIG_FILES etc. instead of their
33677 # values after options handling.
33678 ac_log="
33679 This file was extended by OpenJDK $as_me jdk8, which was
33680 generated by GNU Autoconf 2.69.  Invocation command line was
33681 
33682   CONFIG_FILES    = $CONFIG_FILES
33683   CONFIG_HEADERS  = $CONFIG_HEADERS
33684   CONFIG_LINKS    = $CONFIG_LINKS
33685   CONFIG_COMMANDS = $CONFIG_COMMANDS
33686   $ $0 $@
33687 
33688 on `(hostname || uname -n) 2>/dev/null | sed 1q`
33689 "
33690 
33691 _ACEOF
33692 
33693 case $ac_config_files in *"
33694 "*) set x $ac_config_files; shift; ac_config_files=$*;;
33695 esac
33696 
33697 case $ac_config_headers in *"
33698 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33699 esac
33700 
33701 
33702 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33703 # Files that config.status was made for.
33704 config_files="$ac_config_files"
33705 config_headers="$ac_config_headers"
33706 
33707 _ACEOF
33708 
33709 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33710 ac_cs_usage="\
33711 \`$as_me' instantiates files and other configuration actions
33712 from templates according to the current configuration.  Unless the files
33713 and actions are specified as TAGs, all are instantiated by default.
33714 
33715 Usage: $0 [OPTION]... [TAG]...
33716 
33717   -h, --help       print this help, then exit
33718   -V, --version    print version number and configuration settings, then exit
33719       --config     print configuration, then exit
33720   -q, --quiet, --silent
33721                    do not print progress messages
33722   -d, --debug      don't remove temporary files
33723       --recheck    update $as_me by reconfiguring in the same conditions
33724       --file=FILE[:TEMPLATE]
33725                    instantiate the configuration file FILE
33726       --header=FILE[:TEMPLATE]
33727                    instantiate the configuration header FILE
33728 
33729 Configuration files:
33730 $config_files
33731 
33732 Configuration headers:
33733 $config_headers
33734 
33735 Report bugs to <build-dev@openjdk.java.net>.
33736 OpenJDK home page: <http://openjdk.java.net>."
33737 
33738 _ACEOF
33739 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33740 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33741 ac_cs_version="\\
33742 OpenJDK config.status jdk8
33743 configured by $0, generated by GNU Autoconf 2.69,
33744   with options \\"\$ac_cs_config\\"
33745 
33746 Copyright (C) 2012 Free Software Foundation, Inc.
33747 This config.status script is free software; the Free Software Foundation
33748 gives unlimited permission to copy, distribute and modify it."
33749 
33750 ac_pwd='$ac_pwd'
33751 srcdir='$srcdir'
33752 AWK='$AWK'
33753 test -n "\$AWK" || AWK=awk
33754 _ACEOF
33755 
33756 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33757 # The default lists apply if the user does not specify any file.
33758 ac_need_defaults=:
33759 while test $# != 0
33760 do
33761   case $1 in
33762   --*=?*)
33763     ac_option=`expr "X$1" : 'X\([^=]*\)='`
33764     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
33765     ac_shift=:
33766     ;;
33767   --*=)
33768     ac_option=`expr "X$1" : 'X\([^=]*\)='`
33769     ac_optarg=
33770     ac_shift=:
33771     ;;
33772   *)
33773     ac_option=$1
33774     ac_optarg=$2
33775     ac_shift=shift
33776     ;;
33777   esac
33778 
33779   case $ac_option in
33780   # Handling of the options.
33781   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
33782     ac_cs_recheck=: ;;
33783   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
33784     $as_echo "$ac_cs_version"; exit ;;
33785   --config | --confi | --conf | --con | --co | --c )
33786     $as_echo "$ac_cs_config"; exit ;;
33787   --debug | --debu | --deb | --de | --d | -d )
33788     debug=: ;;
33789   --file | --fil | --fi | --f )
33790     $ac_shift
33791     case $ac_optarg in
33792     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33793     '') as_fn_error $? "missing file argument" ;;
33794     esac
33795     as_fn_append CONFIG_FILES " '$ac_optarg'"
33796     ac_need_defaults=false;;
33797   --header | --heade | --head | --hea )
33798     $ac_shift
33799     case $ac_optarg in
33800     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
33801     esac
33802     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
33803     ac_need_defaults=false;;
33804   --he | --h)
33805     # Conflict between --help and --header
33806     as_fn_error $? "ambiguous option: \`$1'
33807 Try \`$0 --help' for more information.";;
33808   --help | --hel | -h )
33809     $as_echo "$ac_cs_usage"; exit ;;
33810   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
33811   | -silent | --silent | --silen | --sile | --sil | --si | --s)
33812     ac_cs_silent=: ;;
33813 
33814   # This is an error.
33815   -*) as_fn_error $? "unrecognized option: \`$1'
33816 Try \`$0 --help' for more information." ;;
33817 
33818   *) as_fn_append ac_config_targets " $1"
33819      ac_need_defaults=false ;;
33820 
33821   esac
33822   shift
33823 done
33824 
33825 ac_configure_extra_args=
33826 
33827 if $ac_cs_silent; then
33828   exec 6>/dev/null
33829   ac_configure_extra_args="$ac_configure_extra_args --silent"
33830 fi
33831 
33832 _ACEOF
33833 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33834 if \$ac_cs_recheck; then
33835   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
33836   shift
33837   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
33838   CONFIG_SHELL='$SHELL'
33839   export CONFIG_SHELL
33840   exec "\$@"
33841 fi
33842 
33843 _ACEOF
33844 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33845 exec 5>>config.log
33846 {
33847   echo
33848   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
33849 ## Running $as_me. ##
33850 _ASBOX
33851   $as_echo "$ac_log"
33852 } >&5
33853 
33854 _ACEOF
33855 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33856 _ACEOF
33857 
33858 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33859 
33860 # Handling of arguments.
33861 for ac_config_target in $ac_config_targets
33862 do
33863   case $ac_config_target in
33864     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
33865     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
33866     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
33867     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
33868     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
33869     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
33870     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
33871 
33872   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
33873   esac
33874 done
33875 
33876 
33877 # If the user did not use the arguments to specify the items to instantiate,
33878 # then the envvar interface is used.  Set only those that are not.
33879 # We use the long form for the default assignment because of an extremely
33880 # bizarre bug on SunOS 4.1.3.
33881 if $ac_need_defaults; then
33882   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
33883   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
33884 fi
33885 
33886 # Have a temporary directory for convenience.  Make it in the build tree
33887 # simply because there is no reason against having it here, and in addition,
33888 # creating and moving files from /tmp can sometimes cause problems.
33889 # Hook for its removal unless debugging.
33890 # Note that there is a small window in which the directory will not be cleaned:
33891 # after its creation but before its name has been assigned to `$tmp'.
33892 $debug ||
33893 {
33894   tmp= ac_tmp=
33895   trap 'exit_status=$?
33896   : "${ac_tmp:=$tmp}"
33897   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33898 ' 0
33899   trap 'as_fn_exit 1' 1 2 13 15
33900 }
33901 # Create a (secure) tmp directory for tmp files.
33902 
33903 {
33904   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33905   test -d "$tmp"
33906 }  ||
33907 {
33908   tmp=./conf$$-$RANDOM
33909   (umask 077 && mkdir "$tmp")
33910 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
33911 ac_tmp=$tmp
33912 
33913 # Set up the scripts for CONFIG_FILES section.
33914 # No need to generate them if there are no CONFIG_FILES.
33915 # This happens for instance with `./config.status config.h'.
33916 if test -n "$CONFIG_FILES"; then
33917 
33918 
33919 ac_cr=`echo X | tr X '\015'`
33920 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33921 # But we know of no other shell where ac_cr would be empty at this
33922 # point, so we can use a bashism as a fallback.
33923 if test "x$ac_cr" = x; then
33924   eval ac_cr=\$\'\\r\'
33925 fi
33926 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33927 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33928   ac_cs_awk_cr='\\r'
33929 else
33930   ac_cs_awk_cr=$ac_cr
33931 fi
33932 
33933 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33934 _ACEOF
33935 
33936 
33937 {
33938   echo "cat >conf$$subs.awk <<_ACEOF" &&
33939   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33940   echo "_ACEOF"
33941 } >conf$$subs.sh ||
33942   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33943 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33944 ac_delim='%!_!# '
33945 for ac_last_try in false false false false false :; do
33946   . ./conf$$subs.sh ||
33947     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33948 
33949   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
33950   if test $ac_delim_n = $ac_delim_num; then
33951     break
33952   elif $ac_last_try; then
33953     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
33954   else
33955     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
33956   fi
33957 done
33958 rm -f conf$$subs.sh
33959 
33960 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33961 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
33962 _ACEOF
33963 sed -n '
33964 h
33965 s/^/S["/; s/!.*/"]=/
33966 p
33967 g
33968 s/^[^!]*!//
33969 :repl
33970 t repl
33971 s/'"$ac_delim"'$//
33972 t delim
33973 :nl
33974 h
33975 s/\(.\{148\}\)..*/\1/
33976 t more1
33977 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
33978 p
33979 n
33980 b repl
33981 :more1
33982 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33983 p
33984 g
33985 s/.\{148\}//
33986 t nl
33987 :delim
33988 h
33989 s/\(.\{148\}\)..*/\1/
33990 t more2
33991 s/["\\]/\\&/g; s/^/"/; s/$/"/
33992 p
33993 b
33994 :more2
33995 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
33996 p
33997 g
33998 s/.\{148\}//
33999 t delim
34000 ' <conf$$subs.awk | sed '
34001 /^[^""]/{
34002   N
34003   s/\n//
34004 }
34005 ' >>$CONFIG_STATUS || ac_write_fail=1
34006 rm -f conf$$subs.awk
34007 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34008 _ACAWK
34009 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
34010   for (key in S) S_is_set[key] = 1
34011   FS = ""
34012 
34013 }
34014 {
34015   line = $ 0
34016   nfields = split(line, field, "@")
34017   substed = 0
34018   len = length(field[1])
34019   for (i = 2; i < nfields; i++) {
34020     key = field[i]
34021     keylen = length(key)
34022     if (S_is_set[key]) {
34023       value = S[key]
34024       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34025       len += length(value) + length(field[++i])
34026       substed = 1
34027     } else
34028       len += 1 + keylen
34029   }
34030 
34031   print line
34032 }
34033 
34034 _ACAWK
34035 _ACEOF
34036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34037 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34038   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34039 else
34040   cat
34041 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
34042   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34043 _ACEOF
34044 
34045 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34046 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34047 # trailing colons and then remove the whole line if VPATH becomes empty
34048 # (actually we leave an empty line to preserve line numbers).
34049 if test "x$srcdir" = x.; then
34050   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
34051 h
34052 s///
34053 s/^/:/
34054 s/[      ]*$/:/
34055 s/:\$(srcdir):/:/g
34056 s/:\${srcdir}:/:/g
34057 s/:@srcdir@:/:/g
34058 s/^:*//
34059 s/:*$//
34060 x
34061 s/\(=[   ]*\).*/\1/
34062 G
34063 s/\n//
34064 s/^[^=]*=[       ]*$//
34065 }'
34066 fi
34067 
34068 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34069 fi # test -n "$CONFIG_FILES"
34070 
34071 # Set up the scripts for CONFIG_HEADERS section.
34072 # No need to generate them if there are no CONFIG_HEADERS.
34073 # This happens for instance with `./config.status Makefile'.
34074 if test -n "$CONFIG_HEADERS"; then
34075 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
34076 BEGIN {
34077 _ACEOF
34078 
34079 # Transform confdefs.h into an awk script `defines.awk', embedded as
34080 # here-document in config.status, that substitutes the proper values into
34081 # config.h.in to produce config.h.
34082 
34083 # Create a delimiter string that does not exist in confdefs.h, to ease
34084 # handling of long lines.
34085 ac_delim='%!_!# '
34086 for ac_last_try in false false :; do
34087   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
34088   if test -z "$ac_tt"; then
34089     break
34090   elif $ac_last_try; then
34091     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34092   else
34093     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34094   fi
34095 done
34096 
34097 # For the awk script, D is an array of macro values keyed by name,
34098 # likewise P contains macro parameters if any.  Preserve backslash
34099 # newline sequences.
34100 
34101 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34102 sed -n '
34103 s/.\{148\}/&'"$ac_delim"'/g
34104 t rset
34105 :rset
34106 s/^[     ]*#[    ]*define[       ][      ]*/ /
34107 t def
34108 d
34109 :def
34110 s/\\$//
34111 t bsnl
34112 s/["\\]/\\&/g
34113 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34114 D["\1"]=" \3"/p
34115 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
34116 d
34117 :bsnl
34118 s/["\\]/\\&/g
34119 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
34120 D["\1"]=" \3\\\\\\n"\\/p
34121 t cont
34122 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34123 t cont
34124 d
34125 :cont
34126 n
34127 s/.\{148\}/&'"$ac_delim"'/g
34128 t clear
34129 :clear
34130 s/\\$//
34131 t bsnlc
34132 s/["\\]/\\&/g; s/^/"/; s/$/"/p
34133 d
34134 :bsnlc
34135 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34136 b cont
34137 ' <confdefs.h | sed '
34138 s/'"$ac_delim"'/"\\\
34139 "/g' >>$CONFIG_STATUS || ac_write_fail=1
34140 
34141 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34142   for (key in D) D_is_set[key] = 1
34143   FS = ""
34144 }
34145 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34146   line = \$ 0
34147   split(line, arg, " ")
34148   if (arg[1] == "#") {
34149     defundef = arg[2]
34150     mac1 = arg[3]
34151   } else {
34152     defundef = substr(arg[1], 2)
34153     mac1 = arg[2]
34154   }
34155   split(mac1, mac2, "(") #)
34156   macro = mac2[1]
34157   prefix = substr(line, 1, index(line, defundef) - 1)
34158   if (D_is_set[macro]) {
34159     # Preserve the white space surrounding the "#".
34160     print prefix "define", macro P[macro] D[macro]
34161     next
34162   } else {
34163     # Replace #undef with comments.  This is necessary, for example,
34164     # in the case of _POSIX_SOURCE, which is predefined and required
34165     # on some systems where configure will not decide to define it.
34166     if (defundef == "undef") {
34167       print "/*", prefix defundef, macro, "*/"
34168       next
34169     }
34170   }
34171 }
34172 { print }
34173 _ACAWK
34174 _ACEOF
34175 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34176   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34177 fi # test -n "$CONFIG_HEADERS"
34178 
34179 
34180 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34181 shift
34182 for ac_tag
34183 do
34184   case $ac_tag in
34185   :[FHLC]) ac_mode=$ac_tag; continue;;
34186   esac
34187   case $ac_mode$ac_tag in
34188   :[FHL]*:*);;
34189   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34190   :[FH]-) ac_tag=-:-;;
34191   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34192   esac
34193   ac_save_IFS=$IFS
34194   IFS=:
34195   set x $ac_tag
34196   IFS=$ac_save_IFS
34197   shift
34198   ac_file=$1
34199   shift
34200 
34201   case $ac_mode in
34202   :L) ac_source=$1;;
34203   :[FH])
34204     ac_file_inputs=
34205     for ac_f
34206     do
34207       case $ac_f in
34208       -) ac_f="$ac_tmp/stdin";;
34209       *) # Look for the file first in the build tree, then in the source tree
34210          # (if the path is not absolute).  The absolute path cannot be DOS-style,
34211          # because $ac_f cannot contain `:'.
34212          test -f "$ac_f" ||
34213            case $ac_f in
34214            [\\/$]*) false;;
34215            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34216            esac ||
34217            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34218       esac
34219       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34220       as_fn_append ac_file_inputs " '$ac_f'"
34221     done
34222 
34223     # Let's still pretend it is `configure' which instantiates (i.e., don't
34224     # use $as_me), people would be surprised to read:
34225     #    /* config.h.  Generated by config.status.  */
34226     configure_input='Generated from '`
34227           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34228         `' by configure.'
34229     if test x"$ac_file" != x-; then
34230       configure_input="$ac_file.  $configure_input"
34231       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34232 $as_echo "$as_me: creating $ac_file" >&6;}
34233     fi
34234     # Neutralize special characters interpreted by sed in replacement strings.
34235     case $configure_input in #(
34236     *\&* | *\|* | *\\* )
34237        ac_sed_conf_input=`$as_echo "$configure_input" |
34238        sed 's/[\\\\&|]/\\\\&/g'`;; #(
34239     *) ac_sed_conf_input=$configure_input;;
34240     esac
34241 
34242     case $ac_tag in
34243     *:-:* | *:-) cat >"$ac_tmp/stdin" \
34244       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34245     esac
34246     ;;
34247   esac
34248 
34249   ac_dir=`$as_dirname -- "$ac_file" ||
34250 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34251          X"$ac_file" : 'X\(//\)[^/]' \| \
34252          X"$ac_file" : 'X\(//\)$' \| \
34253          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34254 $as_echo X"$ac_file" |
34255     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34256             s//\1/
34257             q
34258           }
34259           /^X\(\/\/\)[^/].*/{
34260             s//\1/
34261             q
34262           }
34263           /^X\(\/\/\)$/{
34264             s//\1/
34265             q
34266           }
34267           /^X\(\/\).*/{
34268             s//\1/
34269             q
34270           }
34271           s/.*/./; q'`
34272   as_dir="$ac_dir"; as_fn_mkdir_p
34273   ac_builddir=.
34274 
34275 case "$ac_dir" in
34276 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34277 *)
34278   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34279   # A ".." for each directory in $ac_dir_suffix.
34280   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34281   case $ac_top_builddir_sub in
34282   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34283   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34284   esac ;;
34285 esac
34286 ac_abs_top_builddir=$ac_pwd
34287 ac_abs_builddir=$ac_pwd$ac_dir_suffix
34288 # for backward compatibility:
34289 ac_top_builddir=$ac_top_build_prefix
34290 
34291 case $srcdir in
34292   .)  # We are building in place.
34293     ac_srcdir=.
34294     ac_top_srcdir=$ac_top_builddir_sub
34295     ac_abs_top_srcdir=$ac_pwd ;;
34296   [\\/]* | ?:[\\/]* )  # Absolute name.
34297     ac_srcdir=$srcdir$ac_dir_suffix;
34298     ac_top_srcdir=$srcdir
34299     ac_abs_top_srcdir=$srcdir ;;
34300   *) # Relative name.
34301     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34302     ac_top_srcdir=$ac_top_build_prefix$srcdir
34303     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34304 esac
34305 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34306 
34307 
34308   case $ac_mode in
34309   :F)
34310   #
34311   # CONFIG_FILE
34312   #
34313 
34314 _ACEOF
34315 
34316 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34317 # If the template does not know about datarootdir, expand it.
34318 # FIXME: This hack should be removed a few years after 2.60.
34319 ac_datarootdir_hack=; ac_datarootdir_seen=
34320 ac_sed_dataroot='
34321 /datarootdir/ {
34322   p
34323   q
34324 }
34325 /@datadir@/p
34326 /@docdir@/p
34327 /@infodir@/p
34328 /@localedir@/p
34329 /@mandir@/p'
34330 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34331 *datarootdir*) ac_datarootdir_seen=yes;;
34332 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34333   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34334 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34335 _ACEOF
34336 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34337   ac_datarootdir_hack='
34338   s&@datadir@&$datadir&g
34339   s&@docdir@&$docdir&g
34340   s&@infodir@&$infodir&g
34341   s&@localedir@&$localedir&g
34342   s&@mandir@&$mandir&g
34343   s&\\\${datarootdir}&$datarootdir&g' ;;
34344 esac
34345 _ACEOF
34346 
34347 # Neutralize VPATH when `$srcdir' = `.'.
34348 # Shell code in configure.ac might set extrasub.
34349 # FIXME: do we really want to maintain this feature?
34350 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34351 ac_sed_extra="$ac_vpsub
34352 $extrasub
34353 _ACEOF
34354 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34355 :t
34356 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34357 s|@configure_input@|$ac_sed_conf_input|;t t
34358 s&@top_builddir@&$ac_top_builddir_sub&;t t
34359 s&@top_build_prefix@&$ac_top_build_prefix&;t t
34360 s&@srcdir@&$ac_srcdir&;t t
34361 s&@abs_srcdir@&$ac_abs_srcdir&;t t
34362 s&@top_srcdir@&$ac_top_srcdir&;t t
34363 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34364 s&@builddir@&$ac_builddir&;t t
34365 s&@abs_builddir@&$ac_abs_builddir&;t t
34366 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34367 $ac_datarootdir_hack
34368 "
34369 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
34370   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34371 
34372 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34373   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
34374   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
34375       "$ac_tmp/out"`; test -z "$ac_out"; } &&
34376   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34377 which seems to be undefined.  Please make sure it is defined" >&5
34378 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34379 which seems to be undefined.  Please make sure it is defined" >&2;}
34380 
34381   rm -f "$ac_tmp/stdin"
34382   case $ac_file in
34383   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
34384   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
34385   esac \
34386   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34387  ;;
34388   :H)
34389   #
34390   # CONFIG_HEADER
34391   #
34392   if test x"$ac_file" != x-; then
34393     {
34394       $as_echo "/* $configure_input  */" \
34395       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
34396     } >"$ac_tmp/config.h" \
34397       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34398     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
34399       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34400 $as_echo "$as_me: $ac_file is unchanged" >&6;}
34401     else
34402       rm -f "$ac_file"
34403       mv "$ac_tmp/config.h" "$ac_file" \
34404         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34405     fi
34406   else
34407     $as_echo "/* $configure_input  */" \
34408       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
34409       || as_fn_error $? "could not create -" "$LINENO" 5
34410   fi
34411  ;;
34412 
34413 
34414   esac
34415 
34416 done # for ac_tag
34417 
34418 
34419 as_fn_exit 0
34420 _ACEOF
34421 ac_clean_files=$ac_clean_files_save
34422 
34423 test $ac_write_fail = 0 ||
34424   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34425 
34426 
34427 # configure is writing to config.log, and then calls config.status.
34428 # config.status does its own redirection, appending to config.log.
34429 # Unfortunately, on DOS this fails, as config.log is still kept open
34430 # by configure, so config.status won't be able to write to it; its
34431 # output is simply discarded.  So we exec the FD to /dev/null,
34432 # effectively closing config.log, so it can be properly (re)opened and
34433 # appended to by config.status.  When coming back to configure, we
34434 # need to make the FD available again.
34435 if test "$no_create" != yes; then
34436   ac_cs_success=:
34437   ac_config_status_args=
34438   test "$silent" = yes &&
34439     ac_config_status_args="$ac_config_status_args --quiet"
34440   exec 5>/dev/null
34441   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34442   exec 5>>config.log
34443   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34444   # would make configure fail if this is the last instruction.
34445   $ac_cs_success || as_fn_exit 1
34446 fi
34447 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34448   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34449 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34450 fi
34451 
34452 
34453 # Make the compare script executable
34454 $CHMOD +x $OUTPUT_ROOT/compare.sh
34455 
34456 # Finally output some useful information to the user
34457 
34458 # Finally output some useful information to the user
34459 
34460 if test "x$CCACHE_FOUND" != x; then
34461         if  test "x$HAS_GOOD_CCACHE" = x; then
34462                 CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34463                 CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34464         else
34465                 CCACHE_STATUS="installed and in use"
34466         fi
34467 else
34468         if test "x$GCC" = xyes; then
34469                 CCACHE_STATUS="not installed (consider installing)"
34470                 CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34471         else
34472                 CCACHE_STATUS="not available for your system"
34473         fi
34474 fi
34475 
34476 printf "\n"
34477 printf "====================================================\n"
34478 printf "A new configuration has been successfully created in\n"
34479 printf "$OUTPUT_ROOT\n"
34480 if test "x$CONFIGURE_COMMAND_LINE" != x; then
34481         printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34482 else
34483         printf "using default settings.\n"
34484 fi
34485 
34486 printf "\n"
34487 printf "Configuration summary:\n"
34488 printf "* Debug level:    $DEBUG_LEVEL\n"
34489 printf "* JDK variant:    $JDK_VARIANT\n"
34490 printf "* JVM variants:   $with_jvm_variants\n"
34491 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34492 
34493 printf "\n"
34494 printf "Tools summary:\n"
34495 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34496   printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34497 fi
34498 printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34499 printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34500 printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34501 
34502 printf "\n"
34503 printf "Build performance summary:\n"
34504 printf "* Cores to use:   $JOBS\n"
34505 printf "* Memory limit:   $MEMORY_SIZE MB\n"
34506 printf "* ccache status:  $CCACHE_STATUS\n"
34507 printf "\n"
34508 
34509 if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34510         printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34511         printf "$CCACHE_HELP_MSG\n"
34512 
34513     # Print a helpful message on how to acquire the necessary build dependency.
34514     # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34515     MISSING_DEPENDENCY=ccache
34516     PKGHANDLER_COMMAND=
34517 
34518     case $PKGHANDLER in
34519         apt-get)
34520                 apt_help     $MISSING_DEPENDENCY ;;
34521     yum)
34522                 yum_help     $MISSING_DEPENDENCY ;;
34523         port)
34524                 port_help    $MISSING_DEPENDENCY ;;
34525         pkgutil)
34526                 pkgutil_help $MISSING_DEPENDENCY ;;
34527         pkgadd)
34528                 pkgadd_help  $MISSING_DEPENDENCY ;;
34529     * )
34530       break ;;
34531     esac
34532 
34533     if test "x$PKGHANDLER_COMMAND" != x; then
34534         HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34535     fi
34536 
34537         printf "$HELP_MSG\n"
34538         printf "\n"
34539 fi
34540 
34541 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34542         printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34543         printf "will result in longer build times.\n"
34544         printf "\n"
34545 fi
34546 
34547 if test "x$FOUND_ALT_VARIABLES" != "x"; then
34548         printf "WARNING: You have old-style ALT_ environment variables set.\n"
34549         printf "These are not respected, and will be ignored. It is recommended\n"
34550         printf "that you clean your environment. The following variables are set:\n"
34551         printf "$FOUND_ALT_VARIABLES\n"
34552         printf "\n"
34553 fi
34554 
34555 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34556         printf "WARNING: Your build output directory is not on a local disk.\n"
34557         printf "This will severely degrade build performance!\n"
34558         printf "It is recommended that you create an output directory on a local disk,\n"
34559         printf "and run the configure script again from that directory.\n"
34560         printf "\n"
34561 fi
34562 
34563 if test "x$IS_RECONFIGURE" = "xyes"; then
34564         printf "WARNING: The result of this configuration has overridden an older\n"
34565         printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34566         printf "proper build. Failure to do so might result in strange build problems.\n"
34567         printf "\n"
34568 fi
34569