1 #! /bin/sh
   2 # Guess values for system-dependent variables and create Makefiles.
   3 # Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
   4 #
   5 # Report bugs to <build-dev@openjdk.java.net>.
   6 #
   7 #
   8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
   9 #
  10 #
  11 # This configure script is free software; the Free Software Foundation
  12 # gives unlimited permission to copy, distribute and modify it.
  13 ## -------------------- ##
  14 ## M4sh Initialization. ##
  15 ## -------------------- ##
  16 
  17 # Be more Bourne compatible
  18 DUALCASE=1; export DUALCASE # for MKS sh
  19 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
  20   emulate sh
  21   NULLCMD=:
  22   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
  23   # is contrary to our usage.  Disable this feature.
  24   alias -g '${1+"$@"}'='"$@"'
  25   setopt NO_GLOB_SUBST
  26 else
  27   case `(set -o) 2>/dev/null` in #(
  28   *posix*) :
  29     set -o posix ;; #(
  30   *) :
  31      ;;
  32 esac
  33 fi
  34 
  35 
  36 as_nl='
  37 '
  38 export as_nl
  39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
  40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
  41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
  42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
  43 # Prefer a ksh shell builtin over an external printf program on Solaris,
  44 # but without wasting forks for bash or zsh.
  45 if test -z "$BASH_VERSION$ZSH_VERSION" \
  46     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  47   as_echo='print -r --'
  48   as_echo_n='print -rn --'
  49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  50   as_echo='printf %s\n'
  51   as_echo_n='printf %s'
  52 else
  53   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
  54     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
  55     as_echo_n='/usr/ucb/echo -n'
  56   else
  57     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
  58     as_echo_n_body='eval
  59       arg=$1;
  60       case $arg in #(
  61       *"$as_nl"*)
  62         expr "X$arg" : "X\\(.*\\)$as_nl";
  63         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
  64       esac;
  65       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
  66     '
  67     export as_echo_n_body
  68     as_echo_n='sh -c $as_echo_n_body as_echo'
  69   fi
  70   export as_echo_body
  71   as_echo='sh -c $as_echo_body as_echo'
  72 fi
  73 
  74 # The user is always right.
  75 if test "${PATH_SEPARATOR+set}" != set; then
  76   PATH_SEPARATOR=:
  77   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
  78     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
  79       PATH_SEPARATOR=';'
  80   }
  81 fi
  82 
  83 
  84 # IFS
  85 # We need space, tab and new line, in precisely that order.  Quoting is
  86 # there to prevent editors from complaining about space-tab.
  87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
  88 # splitting by setting IFS to empty value.)
  89 IFS=" ""        $as_nl"
  90 
  91 # Find who we are.  Look in the path if we contain no directory separator.
  92 as_myself=
  93 case $0 in #((
  94   *[\\/]* ) as_myself=$0 ;;
  95   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  96 for as_dir in $PATH
  97 do
  98   IFS=$as_save_IFS
  99   test -z "$as_dir" && as_dir=.
 100     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
 101   done
 102 IFS=$as_save_IFS
 103 
 104      ;;
 105 esac
 106 # We did not find ourselves, most probably we were run as `sh COMMAND'
 107 # in which case we are not to be found in the path.
 108 if test "x$as_myself" = x; then
 109   as_myself=$0
 110 fi
 111 if test ! -f "$as_myself"; then
 112   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
 113   exit 1
 114 fi
 115 
 116 # Unset variables that we do not need and which cause bugs (e.g. in
 117 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
 118 # suppresses any "Segmentation fault" message there.  '((' could
 119 # trigger a bug in pdksh 5.2.14.
 120 for as_var in BASH_ENV ENV MAIL MAILPATH
 121 do eval test x\${$as_var+set} = xset \
 122   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 123 done
 124 PS1='$ '
 125 PS2='> '
 126 PS4='+ '
 127 
 128 # NLS nuisances.
 129 LC_ALL=C
 130 export LC_ALL
 131 LANGUAGE=C
 132 export LANGUAGE
 133 
 134 # CDPATH.
 135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 136 
 137 # Use a proper internal environment variable to ensure we don't fall
 138   # into an infinite loop, continuously re-executing ourselves.
 139   if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 140     _as_can_reexec=no; export _as_can_reexec;
 141     # We cannot yet assume a decent shell, so we have to provide a
 142 # neutralization value for shells without unset; and this also
 143 # works around shells that cannot unset nonexistent variables.
 144 # Preserve -v and -x to the replacement shell.
 145 BASH_ENV=/dev/null
 146 ENV=/dev/null
 147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 148 case $- in # ((((
 149   *v*x* | *x*v* ) as_opts=-vx ;;
 150   *v* ) as_opts=-v ;;
 151   *x* ) as_opts=-x ;;
 152   * ) as_opts= ;;
 153 esac
 154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 155 # Admittedly, this is quite paranoid, since all the known shells bail
 156 # out after a failed `exec'.
 157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 158 as_fn_exit 255
 159   fi
 160   # We don't want this to propagate to other subprocesses.
 161           { _as_can_reexec=; unset _as_can_reexec;}
 162 if test "x$CONFIG_SHELL" = x; then
 163   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
 164   emulate sh
 165   NULLCMD=:
 166   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
 167   # is contrary to our usage.  Disable this feature.
 168   alias -g '\${1+\"\$@\"}'='\"\$@\"'
 169   setopt NO_GLOB_SUBST
 170 else
 171   case \`(set -o) 2>/dev/null\` in #(
 172   *posix*) :
 173     set -o posix ;; #(
 174   *) :
 175      ;;
 176 esac
 177 fi
 178 "
 179   as_required="as_fn_return () { (exit \$1); }
 180 as_fn_success () { as_fn_return 0; }
 181 as_fn_failure () { as_fn_return 1; }
 182 as_fn_ret_success () { return 0; }
 183 as_fn_ret_failure () { return 1; }
 184 
 185 exitcode=0
 186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
 187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
 188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
 189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
 190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 191 
 192 else
 193   exitcode=1; echo positional parameters were not saved.
 194 fi
 195 test x\$exitcode = x0 || exit 1
 196 test -x / || exit 1"
 197   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
 198   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
 199   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
 200   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
 201 test \$(( 1 + 1 )) = 2 || exit 1"
 202   if (eval "$as_required") 2>/dev/null; then :
 203   as_have_required=yes
 204 else
 205   as_have_required=no
 206 fi
 207   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
 208 
 209 else
 210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 211 as_found=false
 212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 213 do
 214   IFS=$as_save_IFS
 215   test -z "$as_dir" && as_dir=.
 216   as_found=:
 217   case $as_dir in #(
 218          /*)
 219            for as_base in sh bash ksh sh5; do
 220              # Try only shells that exist, to save several forks.
 221              as_shell=$as_dir/$as_base
 222              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
 223                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
 224   CONFIG_SHELL=$as_shell as_have_required=yes
 225                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
 226   break 2
 227 fi
 228 fi
 229            done;;
 230        esac
 231   as_found=false
 232 done
 233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
 234               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
 235   CONFIG_SHELL=$SHELL as_have_required=yes
 236 fi; }
 237 IFS=$as_save_IFS
 238 
 239 
 240       if test "x$CONFIG_SHELL" != x; then :
 241   export CONFIG_SHELL
 242              # We cannot yet assume a decent shell, so we have to provide a
 243 # neutralization value for shells without unset; and this also
 244 # works around shells that cannot unset nonexistent variables.
 245 # Preserve -v and -x to the replacement shell.
 246 BASH_ENV=/dev/null
 247 ENV=/dev/null
 248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 249 case $- in # ((((
 250   *v*x* | *x*v* ) as_opts=-vx ;;
 251   *v* ) as_opts=-v ;;
 252   *x* ) as_opts=-x ;;
 253   * ) as_opts= ;;
 254 esac
 255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 256 # Admittedly, this is quite paranoid, since all the known shells bail
 257 # out after a failed `exec'.
 258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 259 exit 255
 260 fi
 261 
 262     if test x$as_have_required = xno; then :
 263   $as_echo "$0: This script requires a shell more modern than all"
 264   $as_echo "$0: the shells that I found on your system."
 265   if test x${ZSH_VERSION+set} = xset ; then
 266     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
 267     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
 268   else
 269     $as_echo "$0: Please tell bug-autoconf@gnu.org and
 270 $0: build-dev@openjdk.java.net about your system, including
 271 $0: any error possibly output before this message. Then
 272 $0: install a modern shell, or manually run the script
 273 $0: under such a shell if you do have one."
 274   fi
 275   exit 1
 276 fi
 277 fi
 278 fi
 279 SHELL=${CONFIG_SHELL-/bin/sh}
 280 export SHELL
 281 # Unset more variables known to interfere with behavior of common tools.
 282 CLICOLOR_FORCE= GREP_OPTIONS=
 283 unset CLICOLOR_FORCE GREP_OPTIONS
 284 
 285 ## --------------------- ##
 286 ## M4sh Shell Functions. ##
 287 ## --------------------- ##
 288 # as_fn_unset VAR
 289 # ---------------
 290 # Portably unset VAR.
 291 as_fn_unset ()
 292 {
 293   { eval $1=; unset $1;}
 294 }
 295 as_unset=as_fn_unset
 296 
 297 # as_fn_set_status STATUS
 298 # -----------------------
 299 # Set $? to STATUS, without forking.
 300 as_fn_set_status ()
 301 {
 302   return $1
 303 } # as_fn_set_status
 304 
 305 # as_fn_exit STATUS
 306 # -----------------
 307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
 308 as_fn_exit ()
 309 {
 310   set +e
 311   as_fn_set_status $1
 312   exit $1
 313 } # as_fn_exit
 314 
 315 # as_fn_mkdir_p
 316 # -------------
 317 # Create "$as_dir" as a directory, including parents if necessary.
 318 as_fn_mkdir_p ()
 319 {
 320 
 321   case $as_dir in #(
 322   -*) as_dir=./$as_dir;;
 323   esac
 324   test -d "$as_dir" || eval $as_mkdir_p || {
 325     as_dirs=
 326     while :; do
 327       case $as_dir in #(
 328       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
 329       *) as_qdir=$as_dir;;
 330       esac
 331       as_dirs="'$as_qdir' $as_dirs"
 332       as_dir=`$as_dirname -- "$as_dir" ||
 333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 334          X"$as_dir" : 'X\(//\)[^/]' \| \
 335          X"$as_dir" : 'X\(//\)$' \| \
 336          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
 337 $as_echo X"$as_dir" |
 338     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 339             s//\1/
 340             q
 341           }
 342           /^X\(\/\/\)[^/].*/{
 343             s//\1/
 344             q
 345           }
 346           /^X\(\/\/\)$/{
 347             s//\1/
 348             q
 349           }
 350           /^X\(\/\).*/{
 351             s//\1/
 352             q
 353           }
 354           s/.*/./; q'`
 355       test -d "$as_dir" && break
 356     done
 357     test -z "$as_dirs" || eval "mkdir $as_dirs"
 358   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 359 
 360 
 361 } # as_fn_mkdir_p
 362 
 363 # as_fn_executable_p FILE
 364 # -----------------------
 365 # Test if FILE is an executable regular file.
 366 as_fn_executable_p ()
 367 {
 368   test -f "$1" && test -x "$1"
 369 } # as_fn_executable_p
 370 # as_fn_append VAR VALUE
 371 # ----------------------
 372 # Append the text in VALUE to the end of the definition contained in VAR. Take
 373 # advantage of any shell optimizations that allow amortized linear growth over
 374 # repeated appends, instead of the typical quadratic growth present in naive
 375 # implementations.
 376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
 377   eval 'as_fn_append ()
 378   {
 379     eval $1+=\$2
 380   }'
 381 else
 382   as_fn_append ()
 383   {
 384     eval $1=\$$1\$2
 385   }
 386 fi # as_fn_append
 387 
 388 # as_fn_arith ARG...
 389 # ------------------
 390 # Perform arithmetic evaluation on the ARGs, and store the result in the
 391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
 392 # must be portable across $(()) and expr.
 393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
 394   eval 'as_fn_arith ()
 395   {
 396     as_val=$(( $* ))
 397   }'
 398 else
 399   as_fn_arith ()
 400   {
 401     as_val=`expr "$@" || test $? -eq 1`
 402   }
 403 fi # as_fn_arith
 404 
 405 
 406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
 407 # ----------------------------------------
 408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
 410 # script with STATUS, using 1 if that was 0.
 411 as_fn_error ()
 412 {
 413   as_status=$1; test $as_status -eq 0 && as_status=1
 414   if test "$4"; then
 415     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 416     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
 417   fi
 418   $as_echo "$as_me: error: $2" >&2
 419   as_fn_exit $as_status
 420 } # as_fn_error
 421 
 422 if expr a : '\(a\)' >/dev/null 2>&1 &&
 423    test "X`expr 00001 : '.*\(...\)'`" = X001; then
 424   as_expr=expr
 425 else
 426   as_expr=false
 427 fi
 428 
 429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
 430   as_basename=basename
 431 else
 432   as_basename=false
 433 fi
 434 
 435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
 436   as_dirname=dirname
 437 else
 438   as_dirname=false
 439 fi
 440 
 441 as_me=`$as_basename -- "$0" ||
 442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 443          X"$0" : 'X\(//\)$' \| \
 444          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
 445 $as_echo X/"$0" |
 446     sed '/^.*\/\([^/][^/]*\)\/*$/{
 447             s//\1/
 448             q
 449           }
 450           /^X\/\(\/\/\)$/{
 451             s//\1/
 452             q
 453           }
 454           /^X\/\(\/\).*/{
 455             s//\1/
 456             q
 457           }
 458           s/.*/./; q'`
 459 
 460 # Avoid depending upon Character Ranges.
 461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
 462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
 464 as_cr_digits='0123456789'
 465 as_cr_alnum=$as_cr_Letters$as_cr_digits
 466 
 467 
 468   as_lineno_1=$LINENO as_lineno_1a=$LINENO
 469   as_lineno_2=$LINENO as_lineno_2a=$LINENO
 470   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
 471   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
 472   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
 473   sed -n '
 474     p
 475     /[$]LINENO/=
 476   ' <$as_myself |
 477     sed '
 478       s/[$]LINENO.*/&-/
 479       t lineno
 480       b
 481       :lineno
 482       N
 483       :loop
 484       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
 485       t loop
 486       s/-\n.*//
 487     ' >$as_me.lineno &&
 488   chmod +x "$as_me.lineno" ||
 489     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 490 
 491   # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 492   # already done that, so ensure we don't try to do so again and fall
 493   # in an infinite loop.  This has already happened in practice.
 494   _as_can_reexec=no; export _as_can_reexec
 495   # Don't try to exec as it changes $[0], causing all sort of problems
 496   # (the dirname of $[0] is not the place where we might find the
 497   # original and so on.  Autoconf is especially sensitive to this).
 498   . "./$as_me.lineno"
 499   # Exit status is that of the last command.
 500   exit
 501 }
 502 
 503 ECHO_C= ECHO_N= ECHO_T=
 504 case `echo -n x` in #(((((
 505 -n*)
 506   case `echo 'xy\c'` in
 507   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
 508   xy)  ECHO_C='\c';;
 509   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
 510        ECHO_T=' ';;
 511   esac;;
 512 *)
 513   ECHO_N='-n';;
 514 esac
 515 
 516 rm -f conf$$ conf$$.exe conf$$.file
 517 if test -d conf$$.dir; then
 518   rm -f conf$$.dir/conf$$.file
 519 else
 520   rm -f conf$$.dir
 521   mkdir conf$$.dir 2>/dev/null
 522 fi
 523 if (echo >conf$$.file) 2>/dev/null; then
 524   if ln -s conf$$.file conf$$ 2>/dev/null; then
 525     as_ln_s='ln -s'
 526     # ... but there are two gotchas:
 527     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
 528     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
 529     # In both cases, we have to default to `cp -pR'.
 530     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
 531       as_ln_s='cp -pR'
 532   elif ln conf$$.file conf$$ 2>/dev/null; then
 533     as_ln_s=ln
 534   else
 535     as_ln_s='cp -pR'
 536   fi
 537 else
 538   as_ln_s='cp -pR'
 539 fi
 540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 541 rmdir conf$$.dir 2>/dev/null
 542 
 543 if mkdir -p . 2>/dev/null; then
 544   as_mkdir_p='mkdir -p "$as_dir"'
 545 else
 546   test -d ./-p && rmdir ./-p
 547   as_mkdir_p=false
 548 fi
 549 
 550 as_test_x='test -x'
 551 as_executable_p=as_fn_executable_p
 552 
 553 # Sed expression to map a string onto a valid CPP name.
 554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 555 
 556 # Sed expression to map a string onto a valid variable name.
 557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 558 
 559 
 560 test -n "$DJDIR" || exec 7<&0 </dev/null
 561 exec 6>&1
 562 
 563 # Name of the host.
 564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 565 # so uname gets run too.
 566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 567 
 568 #
 569 # Initializations.
 570 #
 571 ac_default_prefix=/usr/local
 572 ac_clean_files=
 573 ac_config_libobj_dir=.
 574 LIBOBJS=
 575 cross_compiling=no
 576 subdirs=
 577 MFLAGS=
 578 MAKEFLAGS=
 579 
 580 # Identity of this package.
 581 PACKAGE_NAME='OpenJDK'
 582 PACKAGE_TARNAME='openjdk'
 583 PACKAGE_VERSION='jdk8'
 584 PACKAGE_STRING='OpenJDK jdk8'
 585 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
 586 PACKAGE_URL='http://openjdk.java.net'
 587 
 588 # Factoring default headers for most tests.
 589 ac_includes_default="\
 590 #include <stdio.h>
 591 #ifdef HAVE_SYS_TYPES_H
 592 # include <sys/types.h>
 593 #endif
 594 #ifdef HAVE_SYS_STAT_H
 595 # include <sys/stat.h>
 596 #endif
 597 #ifdef STDC_HEADERS
 598 # include <stdlib.h>
 599 # include <stddef.h>
 600 #else
 601 # ifdef HAVE_STDLIB_H
 602 #  include <stdlib.h>
 603 # endif
 604 #endif
 605 #ifdef HAVE_STRING_H
 606 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 607 #  include <memory.h>
 608 # endif
 609 # include <string.h>
 610 #endif
 611 #ifdef HAVE_STRINGS_H
 612 # include <strings.h>
 613 #endif
 614 #ifdef HAVE_INTTYPES_H
 615 # include <inttypes.h>
 616 #endif
 617 #ifdef HAVE_STDINT_H
 618 # include <stdint.h>
 619 #endif
 620 #ifdef HAVE_UNISTD_H
 621 # include <unistd.h>
 622 #endif"
 623 
 624 ac_subst_vars='LTLIBOBJS
 625 LIBOBJS
 626 CCACHE
 627 USE_PRECOMPILED_HEADER
 628 SJAVAC_SERVER_DIR
 629 ENABLE_SJAVAC
 630 SJAVAC_SERVER_JAVA
 631 JOBS
 632 MEMORY_SIZE
 633 NUM_CORES
 634 ENABLE_INTREE_EC
 635 SALIB_NAME
 636 HOTSPOT_MAKE_ARGS
 637 LIBCXX
 638 LLVM_LIBS
 639 LLVM_LDFLAGS
 640 LLVM_CFLAGS
 641 LLVM_CONFIG
 642 LIBFFI_LIBS
 643 LIBFFI_CFLAGS
 644 STATIC_CXX_SETTING
 645 LIBDL
 646 LIBM
 647 LIBZIP_CAN_USE_MMAP
 648 USE_EXTERNAL_LIBZ
 649 USE_EXTERNAL_LIBGIF
 650 USE_EXTERNAL_LIBJPEG
 651 ALSA_LIBS
 652 ALSA_CFLAGS
 653 FREETYPE_BUNDLE_LIB_PATH
 654 FREETYPE_LIBS
 655 FREETYPE_CFLAGS
 656 CUPS_CFLAGS
 657 OPENWIN_HOME
 658 X_EXTRA_LIBS
 659 X_LIBS
 660 X_PRE_LIBS
 661 X_CFLAGS
 662 XMKMF
 663 FIXPATH
 664 CXXFLAGS_DEBUG_SYMBOLS
 665 CFLAGS_DEBUG_SYMBOLS
 666 ZIP_DEBUGINFO_FILES
 667 ENABLE_DEBUG_SYMBOLS
 668 USING_BROKEN_SUSE_LD
 669 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 670 ZERO_ARCHFLAG
 671 LDFLAGS_CXX_JDK
 672 LDFLAGS_JDKEXE_SUFFIX
 673 LDFLAGS_JDKLIB_SUFFIX
 674 LDFLAGS_JDKEXE
 675 LDFLAGS_JDKLIB
 676 CXXFLAGS_JDKEXE
 677 CXXFLAGS_JDKLIB
 678 CFLAGS_JDKEXE
 679 CFLAGS_JDKLIB
 680 MACOSX_VERSION_MIN
 681 PACKAGE_PATH
 682 LEGACY_EXTRA_LDFLAGS
 683 LEGACY_EXTRA_CXXFLAGS
 684 LEGACY_EXTRA_CFLAGS
 685 CXX_FLAG_DEPS
 686 C_FLAG_DEPS
 687 CXX_O_FLAG_NONE
 688 CXX_O_FLAG_NORM
 689 CXX_O_FLAG_HI
 690 CXX_O_FLAG_HIGHEST
 691 C_O_FLAG_NONE
 692 C_O_FLAG_NORM
 693 C_O_FLAG_HI
 694 C_O_FLAG_HIGHEST
 695 POST_MCS_CMD
 696 POST_STRIP_CMD
 697 SET_EXECUTABLE_ORIGIN
 698 SET_SHARED_LIBRARY_ORIGIN
 699 CXX_FLAG_REORDER
 700 C_FLAG_REORDER
 701 SET_SHARED_LIBRARY_MAPFILE
 702 SET_SHARED_LIBRARY_NAME
 703 SHARED_LIBRARY_FLAGS
 704 EXE_SUFFIX
 705 STATIC_LIBRARY_SUFFIX
 706 SHARED_LIBRARY_SUFFIX
 707 LIBRARY_PREFIX
 708 STATIC_LIBRARY
 709 SHARED_LIBRARY
 710 OBJ_SUFFIX
 711 COMPILER_NAME
 712 JT_HOME
 713 JTREGEXE
 714 LIPO
 715 ac_ct_OBJDUMP
 716 OBJDUMP
 717 ac_ct_OBJCOPY
 718 OBJCOPY
 719 MCS
 720 STRIP
 721 GNM
 722 NM
 723 AS
 724 CXXCPP
 725 CPP
 726 COMPILER_TYPE
 727 RC_FLAGS
 728 DUMPBIN
 729 WINAR
 730 HOTSPOT_RC
 731 HOTSPOT_MT
 732 RC
 733 MT
 734 WINLD
 735 HOTSPOT_LD
 736 HOTSPOT_CXX
 737 ARFLAGS
 738 AR
 739 LDEXECXX
 740 LDCXX
 741 LDEXE
 742 LD
 743 ac_ct_OBJC
 744 OBJCFLAGS
 745 OBJC
 746 ac_ct_CXX
 747 CXXFLAGS
 748 CXX
 749 ac_ct_PROPER_COMPILER_CXX
 750 PROPER_COMPILER_CXX
 751 POTENTIAL_CXX
 752 TOOLS_DIR_CXX
 753 COMPILER_TARGET_BITS_FLAG
 754 OBJEXT
 755 EXEEXT
 756 ac_ct_CC
 757 CPPFLAGS
 758 LDFLAGS
 759 CFLAGS
 760 CC
 761 ac_ct_PROPER_COMPILER_CC
 762 PROPER_COMPILER_CC
 763 POTENTIAL_CC
 764 TOOLS_DIR_CC
 765 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 JAVA_FLAGS_SMALL
 790 JAVA_FLAGS_BIG
 791 JAVA_FLAGS
 792 JAVAC_FLAGS
 793 BOOT_JDK_SOURCETARGET
 794 BOOT_JDK
 795 BOOT_TOOLSJAR
 796 BOOT_RTJAR
 797 JAVA_CHECK
 798 JAVAC_CHECK
 799 COOKED_BUILD_NUMBER
 800 JDK_VERSION
 801 COPYRIGHT_YEAR
 802 MACOSX_BUNDLE_ID_BASE
 803 MACOSX_BUNDLE_NAME_BASE
 804 COMPANY_NAME
 805 JDK_RC_PLATFORM_NAME
 806 PRODUCT_SUFFIX
 807 PRODUCT_NAME
 808 LAUNCHER_NAME
 809 MILESTONE
 810 JDK_BUILD_NUMBER
 811 JDK_UPDATE_VERSION
 812 JDK_MICRO_VERSION
 813 JDK_MINOR_VERSION
 814 JDK_MAJOR_VERSION
 815 USER_RELEASE_SUFFIX
 816 COMPRESS_JARS
 817 UNLIMITED_CRYPTO
 818 CACERTS_FILE
 819 TEST_IN_BUILD
 820 BUILD_HEADLESS
 821 SUPPORT_HEADFUL
 822 SUPPORT_HEADLESS
 823 BDEPS_FTP
 824 BDEPS_UNZIP
 825 OS_VERSION_MICRO
 826 OS_VERSION_MINOR
 827 OS_VERSION_MAJOR
 828 PKG_CONFIG
 829 CODESIGN
 830 XATTR
 831 DSYMUTIL
 832 IS_GNU_TIME
 833 TIME
 834 STAT
 835 HG
 836 READELF
 837 OTOOL
 838 LDD
 839 ZIP
 840 UNZIP
 841 FIND_DELETE
 842 MAKE
 843 CHECK_TOOLSDIR_MAKE
 844 CHECK_TOOLSDIR_GMAKE
 845 CHECK_MAKE
 846 CHECK_GMAKE
 847 PKGHANDLER
 848 OUTPUT_ROOT
 849 CONF_NAME
 850 SPEC
 851 BUILD_VARIANT_RELEASE
 852 DEBUG_CLASSFILES
 853 FASTDEBUG
 854 VARIANT
 855 DEBUG_LEVEL
 856 MACOSX_UNIVERSAL
 857 INCLUDE_SA
 858 JVM_VARIANT_CORE
 859 JVM_VARIANT_ZEROSHARK
 860 JVM_VARIANT_ZERO
 861 JVM_VARIANT_KERNEL
 862 JVM_VARIANT_MINIMAL1
 863 JVM_VARIANT_CLIENT
 864 JVM_VARIANT_SERVER
 865 JVM_VARIANTS
 866 JVM_INTERPRETER
 867 JDK_VARIANT
 868 SET_OPENJDK
 869 BUILD_LOG_WRAPPER
 870 BUILD_LOG_PREVIOUS
 871 BUILD_LOG
 872 SYS_ROOT
 873 PATH_SEP
 874 SRC_ROOT
 875 ZERO_ARCHDEF
 876 DEFINE_CROSS_COMPILE_ARCH
 877 LP64
 878 OPENJDK_TARGET_OS_EXPORT_DIR
 879 OPENJDK_TARGET_OS_API_DIR
 880 OPENJDK_TARGET_CPU_JLI_CFLAGS
 881 OPENJDK_TARGET_CPU_OSARCH
 882 OPENJDK_TARGET_CPU_ISADIR
 883 OPENJDK_TARGET_CPU_LIBDIR
 884 OPENJDK_TARGET_CPU_LEGACY_LIB
 885 OPENJDK_TARGET_CPU_LEGACY
 886 REQUIRED_OS_VERSION
 887 REQUIRED_OS_NAME
 888 COMPILE_TYPE
 889 OPENJDK_TARGET_CPU_ENDIAN
 890 OPENJDK_TARGET_CPU_BITS
 891 OPENJDK_TARGET_CPU_ARCH
 892 OPENJDK_TARGET_CPU
 893 OPENJDK_TARGET_OS_API
 894 OPENJDK_TARGET_OS
 895 OPENJDK_BUILD_CPU_ENDIAN
 896 OPENJDK_BUILD_CPU_BITS
 897 OPENJDK_BUILD_CPU_ARCH
 898 OPENJDK_BUILD_CPU
 899 OPENJDK_BUILD_OS_API
 900 OPENJDK_BUILD_OS
 901 OPENJDK_BUILD_AUTOCONF_NAME
 902 OPENJDK_TARGET_AUTOCONF_NAME
 903 target_os
 904 target_vendor
 905 target_cpu
 906 target
 907 host_os
 908 host_vendor
 909 host_cpu
 910 host
 911 build_os
 912 build_vendor
 913 build_cpu
 914 build
 915 SETFILE
 916 DF
 917 READLINK
 918 CYGPATH
 919 NAWK
 920 SED
 921 FGREP
 922 EGREP
 923 GREP
 924 AWK
 925 XARGS
 926 WHICH
 927 WC
 928 UNIQ
 929 UNAME
 930 TR
 931 TOUCH
 932 TEE
 933 TAR
 934 TAIL
 935 SORT
 936 SH
 937 RM
 938 PRINTF
 939 MV
 940 MKTEMP
 941 MKDIR
 942 LS
 943 LN
 944 HEAD
 945 FIND
 946 FILE
 947 EXPR
 948 ECHO
 949 DIRNAME
 950 DIFF
 951 DATE
 952 CUT
 953 CPIO
 954 CP
 955 COMM
 956 CMP
 957 CHMOD
 958 CAT
 959 BASH
 960 BASENAME
 961 DATE_WHEN_CONFIGURED
 962 CONFIGURE_COMMAND_LINE
 963 CUSTOM_MAKE_DIR
 964 target_alias
 965 host_alias
 966 build_alias
 967 LIBS
 968 ECHO_T
 969 ECHO_N
 970 ECHO_C
 971 DEFS
 972 mandir
 973 localedir
 974 libdir
 975 psdir
 976 pdfdir
 977 dvidir
 978 htmldir
 979 infodir
 980 docdir
 981 oldincludedir
 982 includedir
 983 localstatedir
 984 sharedstatedir
 985 sysconfdir
 986 datadir
 987 datarootdir
 988 libexecdir
 989 sbindir
 990 bindir
 991 program_transform_name
 992 prefix
 993 exec_prefix
 994 PACKAGE_URL
 995 PACKAGE_BUGREPORT
 996 PACKAGE_STRING
 997 PACKAGE_VERSION
 998 PACKAGE_TARNAME
 999 PACKAGE_NAME
1000 PATH_SEPARATOR
1001 SHELL'
1002 ac_subst_files=''
1003 ac_user_opts='
1004 enable_option_checking
1005 with_custom_make_dir
1006 with_target_bits
1007 with_sys_root
1008 with_tools_dir
1009 with_devkit
1010 enable_openjdk_only
1011 with_jdk_variant
1012 with_jvm_interpreter
1013 with_jvm_variants
1014 enable_debug
1015 with_debug_level
1016 with_conf_name
1017 with_builddeps_conf
1018 with_builddeps_server
1019 with_builddeps_dir
1020 with_builddeps_group
1021 enable_headful
1022 enable_hotspot_test_in_build
1023 with_cacerts_file
1024 enable_unlimited_crypto
1025 with_milestone
1026 with_update_version
1027 with_user_release_suffix
1028 with_build_number
1029 with_copyright_year
1030 with_boot_jdk
1031 with_boot_jdk_jvmargs
1032 with_add_source_root
1033 with_override_source_root
1034 with_adds_and_overrides
1035 with_override_langtools
1036 with_override_corba
1037 with_override_jaxp
1038 with_override_jaxws
1039 with_override_hotspot
1040 with_override_nashorn
1041 with_override_jdk
1042 with_import_hotspot
1043 with_msvcr_dll
1044 with_dxsdk
1045 with_dxsdk_lib
1046 with_dxsdk_include
1047 with_jtreg
1048 with_extra_cflags
1049 with_extra_cxxflags
1050 with_extra_ldflags
1051 enable_debug_symbols
1052 enable_zip_debug_info
1053 enable_macosx_runtime_support
1054 with_x
1055 with_cups
1056 with_cups_include
1057 with_freetype
1058 with_freetype_include
1059 with_freetype_lib
1060 enable_freetype_bundling
1061 with_alsa
1062 with_alsa_include
1063 with_alsa_lib
1064 with_giflib
1065 with_zlib
1066 with_stdc__lib
1067 with_num_cores
1068 with_memory_size
1069 with_jobs
1070 with_sjavac_server_java
1071 enable_sjavac
1072 enable_precompiled_headers
1073 enable_ccache
1074 with_ccache_dir
1075 '
1076       ac_precious_vars='build_alias
1077 host_alias
1078 target_alias
1079 PKG_CONFIG
1080 CC
1081 CFLAGS
1082 LDFLAGS
1083 LIBS
1084 CPPFLAGS
1085 CXX
1086 CXXFLAGS
1087 CCC
1088 OBJC
1089 OBJCFLAGS
1090 CPP
1091 CXXCPP
1092 XMKMF
1093 FREETYPE_CFLAGS
1094 FREETYPE_LIBS
1095 ALSA_CFLAGS
1096 ALSA_LIBS
1097 LIBFFI_CFLAGS
1098 LIBFFI_LIBS'
1099 
1100 
1101 # Initialize some variables set by options.
1102 ac_init_help=
1103 ac_init_version=false
1104 ac_unrecognized_opts=
1105 ac_unrecognized_sep=
1106 # The variables have the same names as the options, with
1107 # dashes changed to underlines.
1108 cache_file=/dev/null
1109 exec_prefix=NONE
1110 no_create=
1111 no_recursion=
1112 prefix=NONE
1113 program_prefix=NONE
1114 program_suffix=NONE
1115 program_transform_name=s,x,x,
1116 silent=
1117 site=
1118 srcdir=
1119 verbose=
1120 x_includes=NONE
1121 x_libraries=NONE
1122 
1123 # Installation directory options.
1124 # These are left unexpanded so users can "make install exec_prefix=/foo"
1125 # and all the variables that are supposed to be based on exec_prefix
1126 # by default will actually change.
1127 # Use braces instead of parens because sh, perl, etc. also accept them.
1128 # (The list follows the same order as the GNU Coding Standards.)
1129 bindir='${exec_prefix}/bin'
1130 sbindir='${exec_prefix}/sbin'
1131 libexecdir='${exec_prefix}/libexec'
1132 datarootdir='${prefix}/share'
1133 datadir='${datarootdir}'
1134 sysconfdir='${prefix}/etc'
1135 sharedstatedir='${prefix}/com'
1136 localstatedir='${prefix}/var'
1137 includedir='${prefix}/include'
1138 oldincludedir='/usr/include'
1139 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1140 infodir='${datarootdir}/info'
1141 htmldir='${docdir}'
1142 dvidir='${docdir}'
1143 pdfdir='${docdir}'
1144 psdir='${docdir}'
1145 libdir='${exec_prefix}/lib'
1146 localedir='${datarootdir}/locale'
1147 mandir='${datarootdir}/man'
1148 
1149 ac_prev=
1150 ac_dashdash=
1151 for ac_option
1152 do
1153   # If the previous option needs an argument, assign it.
1154   if test -n "$ac_prev"; then
1155     eval $ac_prev=\$ac_option
1156     ac_prev=
1157     continue
1158   fi
1159 
1160   case $ac_option in
1161   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1162   *=)   ac_optarg= ;;
1163   *)    ac_optarg=yes ;;
1164   esac
1165 
1166   # Accept the important Cygnus configure options, so we can diagnose typos.
1167 
1168   case $ac_dashdash$ac_option in
1169   --)
1170     ac_dashdash=yes ;;
1171 
1172   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1173     ac_prev=bindir ;;
1174   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1175     bindir=$ac_optarg ;;
1176 
1177   -build | --build | --buil | --bui | --bu)
1178     ac_prev=build_alias ;;
1179   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1180     build_alias=$ac_optarg ;;
1181 
1182   -cache-file | --cache-file | --cache-fil | --cache-fi \
1183   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1184     ac_prev=cache_file ;;
1185   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1186   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1187     cache_file=$ac_optarg ;;
1188 
1189   --config-cache | -C)
1190     cache_file=config.cache ;;
1191 
1192   -datadir | --datadir | --datadi | --datad)
1193     ac_prev=datadir ;;
1194   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1195     datadir=$ac_optarg ;;
1196 
1197   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1198   | --dataroo | --dataro | --datar)
1199     ac_prev=datarootdir ;;
1200   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1201   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1202     datarootdir=$ac_optarg ;;
1203 
1204   -disable-* | --disable-*)
1205     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1206     # Reject names that are not valid shell variable names.
1207     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1208       as_fn_error $? "invalid feature name: $ac_useropt"
1209     ac_useropt_orig=$ac_useropt
1210     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211     case $ac_user_opts in
1212       *"
1213 "enable_$ac_useropt"
1214 "*) ;;
1215       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1216          ac_unrecognized_sep=', ';;
1217     esac
1218     eval enable_$ac_useropt=no ;;
1219 
1220   -docdir | --docdir | --docdi | --doc | --do)
1221     ac_prev=docdir ;;
1222   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1223     docdir=$ac_optarg ;;
1224 
1225   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1226     ac_prev=dvidir ;;
1227   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1228     dvidir=$ac_optarg ;;
1229 
1230   -enable-* | --enable-*)
1231     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1232     # Reject names that are not valid shell variable names.
1233     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1234       as_fn_error $? "invalid feature name: $ac_useropt"
1235     ac_useropt_orig=$ac_useropt
1236     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1237     case $ac_user_opts in
1238       *"
1239 "enable_$ac_useropt"
1240 "*) ;;
1241       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1242          ac_unrecognized_sep=', ';;
1243     esac
1244     eval enable_$ac_useropt=\$ac_optarg ;;
1245 
1246   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1247   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1248   | --exec | --exe | --ex)
1249     ac_prev=exec_prefix ;;
1250   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1251   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1252   | --exec=* | --exe=* | --ex=*)
1253     exec_prefix=$ac_optarg ;;
1254 
1255   -gas | --gas | --ga | --g)
1256     # Obsolete; use --with-gas.
1257     with_gas=yes ;;
1258 
1259   -help | --help | --hel | --he | -h)
1260     ac_init_help=long ;;
1261   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1262     ac_init_help=recursive ;;
1263   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1264     ac_init_help=short ;;
1265 
1266   -host | --host | --hos | --ho)
1267     ac_prev=host_alias ;;
1268   -host=* | --host=* | --hos=* | --ho=*)
1269     host_alias=$ac_optarg ;;
1270 
1271   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1272     ac_prev=htmldir ;;
1273   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1274   | --ht=*)
1275     htmldir=$ac_optarg ;;
1276 
1277   -includedir | --includedir | --includedi | --included | --include \
1278   | --includ | --inclu | --incl | --inc)
1279     ac_prev=includedir ;;
1280   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1281   | --includ=* | --inclu=* | --incl=* | --inc=*)
1282     includedir=$ac_optarg ;;
1283 
1284   -infodir | --infodir | --infodi | --infod | --info | --inf)
1285     ac_prev=infodir ;;
1286   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1287     infodir=$ac_optarg ;;
1288 
1289   -libdir | --libdir | --libdi | --libd)
1290     ac_prev=libdir ;;
1291   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1292     libdir=$ac_optarg ;;
1293 
1294   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1295   | --libexe | --libex | --libe)
1296     ac_prev=libexecdir ;;
1297   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1298   | --libexe=* | --libex=* | --libe=*)
1299     libexecdir=$ac_optarg ;;
1300 
1301   -localedir | --localedir | --localedi | --localed | --locale)
1302     ac_prev=localedir ;;
1303   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1304     localedir=$ac_optarg ;;
1305 
1306   -localstatedir | --localstatedir | --localstatedi | --localstated \
1307   | --localstate | --localstat | --localsta | --localst | --locals)
1308     ac_prev=localstatedir ;;
1309   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1310   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1311     localstatedir=$ac_optarg ;;
1312 
1313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1314     ac_prev=mandir ;;
1315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1316     mandir=$ac_optarg ;;
1317 
1318   -nfp | --nfp | --nf)
1319     # Obsolete; use --without-fp.
1320     with_fp=no ;;
1321 
1322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1323   | --no-cr | --no-c | -n)
1324     no_create=yes ;;
1325 
1326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1328     no_recursion=yes ;;
1329 
1330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1332   | --oldin | --oldi | --old | --ol | --o)
1333     ac_prev=oldincludedir ;;
1334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1337     oldincludedir=$ac_optarg ;;
1338 
1339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1340     ac_prev=prefix ;;
1341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1342     prefix=$ac_optarg ;;
1343 
1344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1345   | --program-pre | --program-pr | --program-p)
1346     ac_prev=program_prefix ;;
1347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1349     program_prefix=$ac_optarg ;;
1350 
1351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1352   | --program-suf | --program-su | --program-s)
1353     ac_prev=program_suffix ;;
1354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1356     program_suffix=$ac_optarg ;;
1357 
1358   -program-transform-name | --program-transform-name \
1359   | --program-transform-nam | --program-transform-na \
1360   | --program-transform-n | --program-transform- \
1361   | --program-transform | --program-transfor \
1362   | --program-transfo | --program-transf \
1363   | --program-trans | --program-tran \
1364   | --progr-tra | --program-tr | --program-t)
1365     ac_prev=program_transform_name ;;
1366   -program-transform-name=* | --program-transform-name=* \
1367   | --program-transform-nam=* | --program-transform-na=* \
1368   | --program-transform-n=* | --program-transform-=* \
1369   | --program-transform=* | --program-transfor=* \
1370   | --program-transfo=* | --program-transf=* \
1371   | --program-trans=* | --program-tran=* \
1372   | --progr-tra=* | --program-tr=* | --program-t=*)
1373     program_transform_name=$ac_optarg ;;
1374 
1375   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1376     ac_prev=pdfdir ;;
1377   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1378     pdfdir=$ac_optarg ;;
1379 
1380   -psdir | --psdir | --psdi | --psd | --ps)
1381     ac_prev=psdir ;;
1382   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1383     psdir=$ac_optarg ;;
1384 
1385   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1386   | -silent | --silent | --silen | --sile | --sil)
1387     silent=yes ;;
1388 
1389   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1390     ac_prev=sbindir ;;
1391   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1392   | --sbi=* | --sb=*)
1393     sbindir=$ac_optarg ;;
1394 
1395   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1396   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1397   | --sharedst | --shareds | --shared | --share | --shar \
1398   | --sha | --sh)
1399     ac_prev=sharedstatedir ;;
1400   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1401   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1402   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1403   | --sha=* | --sh=*)
1404     sharedstatedir=$ac_optarg ;;
1405 
1406   -site | --site | --sit)
1407     ac_prev=site ;;
1408   -site=* | --site=* | --sit=*)
1409     site=$ac_optarg ;;
1410 
1411   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1412     ac_prev=srcdir ;;
1413   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1414     srcdir=$ac_optarg ;;
1415 
1416   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1417   | --syscon | --sysco | --sysc | --sys | --sy)
1418     ac_prev=sysconfdir ;;
1419   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1420   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1421     sysconfdir=$ac_optarg ;;
1422 
1423   -target | --target | --targe | --targ | --tar | --ta | --t)
1424     ac_prev=target_alias ;;
1425   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1426     target_alias=$ac_optarg ;;
1427 
1428   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1429     verbose=yes ;;
1430 
1431   -version | --version | --versio | --versi | --vers | -V)
1432     ac_init_version=: ;;
1433 
1434   -with-* | --with-*)
1435     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1436     # Reject names that are not valid shell variable names.
1437     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1438       as_fn_error $? "invalid package name: $ac_useropt"
1439     ac_useropt_orig=$ac_useropt
1440     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1441     case $ac_user_opts in
1442       *"
1443 "with_$ac_useropt"
1444 "*) ;;
1445       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1446          ac_unrecognized_sep=', ';;
1447     esac
1448     eval with_$ac_useropt=\$ac_optarg ;;
1449 
1450   -without-* | --without-*)
1451     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1452     # Reject names that are not valid shell variable names.
1453     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1454       as_fn_error $? "invalid package name: $ac_useropt"
1455     ac_useropt_orig=$ac_useropt
1456     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1457     case $ac_user_opts in
1458       *"
1459 "with_$ac_useropt"
1460 "*) ;;
1461       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1462          ac_unrecognized_sep=', ';;
1463     esac
1464     eval with_$ac_useropt=no ;;
1465 
1466   --x)
1467     # Obsolete; use --with-x.
1468     with_x=yes ;;
1469 
1470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1471   | --x-incl | --x-inc | --x-in | --x-i)
1472     ac_prev=x_includes ;;
1473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1475     x_includes=$ac_optarg ;;
1476 
1477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1479     ac_prev=x_libraries ;;
1480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1482     x_libraries=$ac_optarg ;;
1483 
1484   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1485 Try \`$0 --help' for more information"
1486     ;;
1487 
1488   *=*)
1489     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1490     # Reject names that are not valid shell variable names.
1491     case $ac_envvar in #(
1492       '' | [0-9]* | *[!_$as_cr_alnum]* )
1493       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1494     esac
1495     eval $ac_envvar=\$ac_optarg
1496     export $ac_envvar ;;
1497 
1498   *)
1499     # FIXME: should be removed in autoconf 3.0.
1500     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1501     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1502       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1503     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1504     ;;
1505 
1506   esac
1507 done
1508 
1509 if test -n "$ac_prev"; then
1510   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1511   as_fn_error $? "missing argument to $ac_option"
1512 fi
1513 
1514 if test -n "$ac_unrecognized_opts"; then
1515   case $enable_option_checking in
1516     no) ;;
1517     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1518     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1519   esac
1520 fi
1521 
1522 # Check all directory arguments for consistency.
1523 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1524                 datadir sysconfdir sharedstatedir localstatedir includedir \
1525                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1526                 libdir localedir mandir
1527 do
1528   eval ac_val=\$$ac_var
1529   # Remove trailing slashes.
1530   case $ac_val in
1531     */ )
1532       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1533       eval $ac_var=\$ac_val;;
1534   esac
1535   # Be sure to have absolute directory names.
1536   case $ac_val in
1537     [\\/$]* | ?:[\\/]* )  continue;;
1538     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1539   esac
1540   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1541 done
1542 
1543 # There might be people who depend on the old broken behavior: `$host'
1544 # used to hold the argument of --host etc.
1545 # FIXME: To remove some day.
1546 build=$build_alias
1547 host=$host_alias
1548 target=$target_alias
1549 
1550 # FIXME: To remove some day.
1551 if test "x$host_alias" != x; then
1552   if test "x$build_alias" = x; then
1553     cross_compiling=maybe
1554   elif test "x$build_alias" != "x$host_alias"; then
1555     cross_compiling=yes
1556   fi
1557 fi
1558 
1559 ac_tool_prefix=
1560 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1561 
1562 test "$silent" = yes && exec 6>/dev/null
1563 
1564 
1565 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1566 ac_ls_di=`ls -di .` &&
1567 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1568   as_fn_error $? "working directory cannot be determined"
1569 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1570   as_fn_error $? "pwd does not report name of working directory"
1571 
1572 
1573 # Find the source files, if location was not specified.
1574 if test -z "$srcdir"; then
1575   ac_srcdir_defaulted=yes
1576   # Try the directory containing this script, then the parent directory.
1577   ac_confdir=`$as_dirname -- "$as_myself" ||
1578 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1579          X"$as_myself" : 'X\(//\)[^/]' \| \
1580          X"$as_myself" : 'X\(//\)$' \| \
1581          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1582 $as_echo X"$as_myself" |
1583     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1584             s//\1/
1585             q
1586           }
1587           /^X\(\/\/\)[^/].*/{
1588             s//\1/
1589             q
1590           }
1591           /^X\(\/\/\)$/{
1592             s//\1/
1593             q
1594           }
1595           /^X\(\/\).*/{
1596             s//\1/
1597             q
1598           }
1599           s/.*/./; q'`
1600   srcdir=$ac_confdir
1601   if test ! -r "$srcdir/$ac_unique_file"; then
1602     srcdir=..
1603   fi
1604 else
1605   ac_srcdir_defaulted=no
1606 fi
1607 if test ! -r "$srcdir/$ac_unique_file"; then
1608   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1609   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1610 fi
1611 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1612 ac_abs_confdir=`(
1613         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1614         pwd)`
1615 # When building in place, set srcdir=.
1616 if test "$ac_abs_confdir" = "$ac_pwd"; then
1617   srcdir=.
1618 fi
1619 # Remove unnecessary trailing slashes from srcdir.
1620 # Double slashes in file names in object file debugging info
1621 # mess up M-x gdb in Emacs.
1622 case $srcdir in
1623 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1624 esac
1625 for ac_var in $ac_precious_vars; do
1626   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1627   eval ac_env_${ac_var}_value=\$${ac_var}
1628   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1629   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1630 done
1631 
1632 #
1633 # Report the --help message.
1634 #
1635 if test "$ac_init_help" = "long"; then
1636   # Omit some internal or obsolete options to make the list less imposing.
1637   # This message is too long to be a string in the A/UX 3.1 sh.
1638   cat <<_ACEOF
1639 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1640 
1641 Usage: $0 [OPTION]... [VAR=VALUE]...
1642 
1643 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1644 VAR=VALUE.  See below for descriptions of some of the useful variables.
1645 
1646 Defaults for the options are specified in brackets.
1647 
1648 Configuration:
1649   -h, --help              display this help and exit
1650       --help=short        display options specific to this package
1651       --help=recursive    display the short help of all the included packages
1652   -V, --version           display version information and exit
1653   -q, --quiet, --silent   do not print \`checking ...' messages
1654       --cache-file=FILE   cache test results in FILE [disabled]
1655   -C, --config-cache      alias for \`--cache-file=config.cache'
1656   -n, --no-create         do not create output files
1657       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1658 
1659 Installation directories:
1660   --prefix=PREFIX         install architecture-independent files in PREFIX
1661                           [$ac_default_prefix]
1662   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1663                           [PREFIX]
1664 
1665 By default, \`make install' will install all the files in
1666 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1667 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1668 for instance \`--prefix=\$HOME'.
1669 
1670 For better control, use the options below.
1671 
1672 Fine tuning of the installation directories:
1673   --bindir=DIR            user executables [EPREFIX/bin]
1674   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1675   --libexecdir=DIR        program executables [EPREFIX/libexec]
1676   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1677   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1678   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1679   --libdir=DIR            object code libraries [EPREFIX/lib]
1680   --includedir=DIR        C header files [PREFIX/include]
1681   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1682   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1683   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1684   --infodir=DIR           info documentation [DATAROOTDIR/info]
1685   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1686   --mandir=DIR            man documentation [DATAROOTDIR/man]
1687   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1688   --htmldir=DIR           html documentation [DOCDIR]
1689   --dvidir=DIR            dvi documentation [DOCDIR]
1690   --pdfdir=DIR            pdf documentation [DOCDIR]
1691   --psdir=DIR             ps documentation [DOCDIR]
1692 _ACEOF
1693 
1694   cat <<\_ACEOF
1695 
1696 X features:
1697   --x-includes=DIR    X include files are in DIR
1698   --x-libraries=DIR   X library files are in DIR
1699 
1700 System types:
1701   --build=BUILD     configure for building on BUILD [guessed]
1702   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1703   --target=TARGET   configure for building compilers for TARGET [HOST]
1704 _ACEOF
1705 fi
1706 
1707 if test -n "$ac_init_help"; then
1708   case $ac_init_help in
1709      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1710    esac
1711   cat <<\_ACEOF
1712 
1713 Optional Features:
1714   --disable-option-checking  ignore unrecognized --enable/--with options
1715   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1716   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1717   --enable-openjdk-only   suppress building custom source even if present
1718                           [disabled]
1719   --enable-debug          set the debug level to fastdebug (shorthand for
1720                           --with-debug-level=fastdebug) [disabled]
1721   --disable-headful       disable building headful support (graphical UI
1722                           support) [enabled]
1723   --enable-hotspot-test-in-build
1724                           run the Queens test after Hotspot build [disabled]
1725   --enable-unlimited-crypto
1726                           Enable unlimited crypto policy [disabled]
1727   --disable-debug-symbols disable generation of debug symbols [enabled]
1728   --disable-zip-debug-info
1729                           disable zipping of debug-info files [enabled]
1730   --enable-macosx-runtime-support
1731                           Deprecated. Option is kept for backwards
1732                           compatibility and is ignored
1733   --disable-freetype-bundling
1734                           disable bundling of the freetype library with the
1735                           build result [enabled on Windows or when using
1736                           --with-freetype, disabled otherwise]
1737   --enable-sjavac         use sjavac to do fast incremental compiles
1738                           [disabled]
1739   --disable-precompiled-headers
1740                           disable using precompiled headers when compiling C++
1741                           [enabled]
1742   --disable-ccache        disable using ccache to speed up recompilations
1743                           [enabled]
1744 
1745 Optional Packages:
1746   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1747   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1748   --with-custom-make-dir  use this directory for custom build/make files
1749   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1750                           support it), e.g. --with-target-bits=32 [guessed]
1751   --with-sys-root         pass this sys-root to the compilers and tools (for
1752                           cross-compiling)
1753   --with-tools-dir        search this directory for compilers and tools (for
1754                           cross-compiling)
1755   --with-devkit           use this directory as base for tools-dir and
1756                           sys-root (for cross-compiling)
1757   --with-jdk-variant      JDK variant to build (normal) [normal]
1758   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1759   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1760                           client, minimal1, kernel, zero, zeroshark, core)
1761                           [server]
1762   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1763                           [release]
1764   --with-conf-name        use this as the name of the configuration [generated
1765                           from important configuration options]
1766   --with-builddeps-conf   use this configuration file for the builddeps
1767   --with-builddeps-server download and use build dependencies from this server
1768                           url
1769   --with-builddeps-dir    store downloaded build dependencies here
1770                           [/localhome/builddeps]
1771   --with-builddeps-group  chgrp the downloaded build dependencies to this
1772                           group
1773   --with-cacerts-file     specify alternative cacerts file
1774   --with-milestone        Set milestone value for build [internal]
1775   --with-update-version   Set update version value for build [b00]
1776   --with-user-release-suffix
1777                           Add a custom string to the version string if build
1778                           number isn't set.[username_builddateb00]
1779   --with-build-number     Set build number value for build [b00]
1780   --with-copyright-year   Set copyright year value for build [current year]
1781   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1782   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1783                           invocations of the Boot JDK, overriding the default
1784                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1785                           -enableassertions"
1786   --with-add-source-root  for each and every source directory, look in this
1787                           additional source root for the same directory; if it
1788                           exists and have files in it, include it in the build
1789   --with-override-source-root
1790                           for each and every source directory, look in this
1791                           override source root for the same directory; if it
1792                           exists, use that directory instead and ignore the
1793                           directory in the original source root
1794   --with-adds-and-overrides
1795                           use the subdirs 'adds' and 'overrides' in the
1796                           specified directory as add-source-root and
1797                           override-source-root
1798   --with-override-langtools
1799                           use this langtools dir for the build
1800   --with-override-corba   use this corba dir for the build
1801   --with-override-jaxp    use this jaxp dir for the build
1802   --with-override-jaxws   use this jaxws dir for the build
1803   --with-override-hotspot use this hotspot dir for the build
1804   --with-override-nashorn use this nashorn dir for the build
1805   --with-override-jdk     use this jdk dir for the build
1806   --with-import-hotspot   import hotspot binaries from this jdk image or
1807                           hotspot build dist dir instead of building from
1808                           source
1809   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1810                           only) [probed]
1811   --with-dxsdk            Deprecated. Option is kept for backwards
1812                           compatibility and is ignored
1813   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1814                           compatibility and is ignored
1815   --with-dxsdk-include    Deprecated. Option is kept for backwards
1816                           compatibility and is ignored
1817   --with-jtreg            Regression Test Harness [probed]
1818   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1819   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1820   --with-extra-ldflags    extra flags to be used when linking jdk
1821   --with-x                use the X Window System
1822   --with-cups             specify prefix directory for the cups package
1823                           (expecting the headers under PATH/include)
1824   --with-cups-include     specify directory for the cups include files
1825   --with-freetype         specify prefix directory for the freetype package
1826                           (expecting the libraries under PATH/lib and the
1827                           headers under PATH/include)
1828   --with-freetype-include specify directory for the freetype include files
1829   --with-freetype-lib     specify directory for the freetype library
1830   --with-alsa             specify prefix directory for the alsa package
1831                           (expecting the libraries under PATH/lib and the
1832                           headers under PATH/include)
1833   --with-alsa-include     specify directory for the alsa include files
1834   --with-alsa-lib         specify directory for the alsa library
1835   --with-giflib           use giflib from build system or OpenJDK source
1836                           (system, bundled) [bundled]
1837   --with-zlib             use zlib from build system or OpenJDK source
1838                           (system, bundled) [bundled]
1839   --with-stdc++lib=<static>,<dynamic>,<default>
1840                           force linking of the C++ runtime on Linux to either
1841                           static or dynamic, default is static with dynamic as
1842                           fallback
1843   --with-num-cores        number of cores in the build system, e.g.
1844                           --with-num-cores=8 [probed]
1845   --with-memory-size      memory (in MB) available in the build system, e.g.
1846                           --with-memory-size=1024 [probed]
1847   --with-jobs             number of parallel jobs to let make run [calculated
1848                           based on cores and memory]
1849   --with-sjavac-server-java
1850                           use this java binary for running the sjavac
1851                           background server [Boot JDK java]
1852   --with-ccache-dir       where to store ccache files [~/.ccache]
1853 
1854 Some influential environment variables:
1855   PKG_CONFIG  path to pkg-config utility
1856   CC          C compiler command
1857   CFLAGS      C compiler flags
1858   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1859               nonstandard directory <lib dir>
1860   LIBS        libraries to pass to the linker, e.g. -l<library>
1861   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1862               you have headers in a nonstandard directory <include dir>
1863   CXX         C++ compiler command
1864   CXXFLAGS    C++ compiler flags
1865   OBJC        Objective C compiler command
1866   OBJCFLAGS   Objective C compiler flags
1867   CPP         C preprocessor
1868   CXXCPP      C++ preprocessor
1869   XMKMF       Path to xmkmf, Makefile generator for X Window System
1870   FREETYPE_CFLAGS
1871               C compiler flags for FREETYPE, overriding pkg-config
1872   FREETYPE_LIBS
1873               linker flags for FREETYPE, overriding pkg-config
1874   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1875   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1876   LIBFFI_CFLAGS
1877               C compiler flags for LIBFFI, overriding pkg-config
1878   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1879 
1880 Use these variables to override the choices made by `configure' or to help
1881 it to find libraries and programs with nonstandard names/locations.
1882 
1883 Report bugs to <build-dev@openjdk.java.net>.
1884 OpenJDK home page: <http://openjdk.java.net>.
1885 _ACEOF
1886 ac_status=$?
1887 fi
1888 
1889 if test "$ac_init_help" = "recursive"; then
1890   # If there are subdirs, report their specific --help.
1891   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1892     test -d "$ac_dir" ||
1893       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1894       continue
1895     ac_builddir=.
1896 
1897 case "$ac_dir" in
1898 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1899 *)
1900   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1901   # A ".." for each directory in $ac_dir_suffix.
1902   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1903   case $ac_top_builddir_sub in
1904   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1905   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1906   esac ;;
1907 esac
1908 ac_abs_top_builddir=$ac_pwd
1909 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1910 # for backward compatibility:
1911 ac_top_builddir=$ac_top_build_prefix
1912 
1913 case $srcdir in
1914   .)  # We are building in place.
1915     ac_srcdir=.
1916     ac_top_srcdir=$ac_top_builddir_sub
1917     ac_abs_top_srcdir=$ac_pwd ;;
1918   [\\/]* | ?:[\\/]* )  # Absolute name.
1919     ac_srcdir=$srcdir$ac_dir_suffix;
1920     ac_top_srcdir=$srcdir
1921     ac_abs_top_srcdir=$srcdir ;;
1922   *) # Relative name.
1923     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1924     ac_top_srcdir=$ac_top_build_prefix$srcdir
1925     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1926 esac
1927 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1928 
1929     cd "$ac_dir" || { ac_status=$?; continue; }
1930     # Check for guested configure.
1931     if test -f "$ac_srcdir/configure.gnu"; then
1932       echo &&
1933       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1934     elif test -f "$ac_srcdir/configure"; then
1935       echo &&
1936       $SHELL "$ac_srcdir/configure" --help=recursive
1937     else
1938       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1939     fi || ac_status=$?
1940     cd "$ac_pwd" || { ac_status=$?; break; }
1941   done
1942 fi
1943 
1944 test -n "$ac_init_help" && exit $ac_status
1945 if $ac_init_version; then
1946   cat <<\_ACEOF
1947 OpenJDK configure jdk8
1948 generated by GNU Autoconf 2.69
1949 
1950 Copyright (C) 2012 Free Software Foundation, Inc.
1951 This configure script is free software; the Free Software Foundation
1952 gives unlimited permission to copy, distribute and modify it.
1953 _ACEOF
1954   exit
1955 fi
1956 
1957 ## ------------------------ ##
1958 ## Autoconf initialization. ##
1959 ## ------------------------ ##
1960 
1961 # ac_fn_c_try_compile LINENO
1962 # --------------------------
1963 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1964 ac_fn_c_try_compile ()
1965 {
1966   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1967   rm -f conftest.$ac_objext
1968   if { { ac_try="$ac_compile"
1969 case "(($ac_try" in
1970   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1971   *) ac_try_echo=$ac_try;;
1972 esac
1973 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1974 $as_echo "$ac_try_echo"; } >&5
1975   (eval "$ac_compile") 2>conftest.err
1976   ac_status=$?
1977   if test -s conftest.err; then
1978     grep -v '^ *+' conftest.err >conftest.er1
1979     cat conftest.er1 >&5
1980     mv -f conftest.er1 conftest.err
1981   fi
1982   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1983   test $ac_status = 0; } && {
1984          test -z "$ac_c_werror_flag" ||
1985          test ! -s conftest.err
1986        } && test -s conftest.$ac_objext; then :
1987   ac_retval=0
1988 else
1989   $as_echo "$as_me: failed program was:" >&5
1990 sed 's/^/| /' conftest.$ac_ext >&5
1991 
1992         ac_retval=1
1993 fi
1994   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1995   as_fn_set_status $ac_retval
1996 
1997 } # ac_fn_c_try_compile
1998 
1999 # ac_fn_cxx_try_compile LINENO
2000 # ----------------------------
2001 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2002 ac_fn_cxx_try_compile ()
2003 {
2004   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2005   rm -f conftest.$ac_objext
2006   if { { ac_try="$ac_compile"
2007 case "(($ac_try" in
2008   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2009   *) ac_try_echo=$ac_try;;
2010 esac
2011 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2012 $as_echo "$ac_try_echo"; } >&5
2013   (eval "$ac_compile") 2>conftest.err
2014   ac_status=$?
2015   if test -s conftest.err; then
2016     grep -v '^ *+' conftest.err >conftest.er1
2017     cat conftest.er1 >&5
2018     mv -f conftest.er1 conftest.err
2019   fi
2020   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2021   test $ac_status = 0; } && {
2022          test -z "$ac_cxx_werror_flag" ||
2023          test ! -s conftest.err
2024        } && test -s conftest.$ac_objext; then :
2025   ac_retval=0
2026 else
2027   $as_echo "$as_me: failed program was:" >&5
2028 sed 's/^/| /' conftest.$ac_ext >&5
2029 
2030         ac_retval=1
2031 fi
2032   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2033   as_fn_set_status $ac_retval
2034 
2035 } # ac_fn_cxx_try_compile
2036 
2037 # ac_fn_objc_try_compile LINENO
2038 # -----------------------------
2039 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2040 ac_fn_objc_try_compile ()
2041 {
2042   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2043   rm -f conftest.$ac_objext
2044   if { { ac_try="$ac_compile"
2045 case "(($ac_try" in
2046   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2047   *) ac_try_echo=$ac_try;;
2048 esac
2049 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2050 $as_echo "$ac_try_echo"; } >&5
2051   (eval "$ac_compile") 2>conftest.err
2052   ac_status=$?
2053   if test -s conftest.err; then
2054     grep -v '^ *+' conftest.err >conftest.er1
2055     cat conftest.er1 >&5
2056     mv -f conftest.er1 conftest.err
2057   fi
2058   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2059   test $ac_status = 0; } && {
2060          test -z "$ac_objc_werror_flag" ||
2061          test ! -s conftest.err
2062        } && test -s conftest.$ac_objext; then :
2063   ac_retval=0
2064 else
2065   $as_echo "$as_me: failed program was:" >&5
2066 sed 's/^/| /' conftest.$ac_ext >&5
2067 
2068         ac_retval=1
2069 fi
2070   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071   as_fn_set_status $ac_retval
2072 
2073 } # ac_fn_objc_try_compile
2074 
2075 # ac_fn_c_try_cpp LINENO
2076 # ----------------------
2077 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2078 ac_fn_c_try_cpp ()
2079 {
2080   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2081   if { { ac_try="$ac_cpp conftest.$ac_ext"
2082 case "(($ac_try" in
2083   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2084   *) ac_try_echo=$ac_try;;
2085 esac
2086 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2087 $as_echo "$ac_try_echo"; } >&5
2088   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2089   ac_status=$?
2090   if test -s conftest.err; then
2091     grep -v '^ *+' conftest.err >conftest.er1
2092     cat conftest.er1 >&5
2093     mv -f conftest.er1 conftest.err
2094   fi
2095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2096   test $ac_status = 0; } > conftest.i && {
2097          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2098          test ! -s conftest.err
2099        }; then :
2100   ac_retval=0
2101 else
2102   $as_echo "$as_me: failed program was:" >&5
2103 sed 's/^/| /' conftest.$ac_ext >&5
2104 
2105     ac_retval=1
2106 fi
2107   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108   as_fn_set_status $ac_retval
2109 
2110 } # ac_fn_c_try_cpp
2111 
2112 # ac_fn_cxx_try_cpp LINENO
2113 # ------------------------
2114 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2115 ac_fn_cxx_try_cpp ()
2116 {
2117   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2118   if { { ac_try="$ac_cpp conftest.$ac_ext"
2119 case "(($ac_try" in
2120   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2121   *) ac_try_echo=$ac_try;;
2122 esac
2123 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2124 $as_echo "$ac_try_echo"; } >&5
2125   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2126   ac_status=$?
2127   if test -s conftest.err; then
2128     grep -v '^ *+' conftest.err >conftest.er1
2129     cat conftest.er1 >&5
2130     mv -f conftest.er1 conftest.err
2131   fi
2132   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2133   test $ac_status = 0; } > conftest.i && {
2134          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2135          test ! -s conftest.err
2136        }; then :
2137   ac_retval=0
2138 else
2139   $as_echo "$as_me: failed program was:" >&5
2140 sed 's/^/| /' conftest.$ac_ext >&5
2141 
2142     ac_retval=1
2143 fi
2144   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2145   as_fn_set_status $ac_retval
2146 
2147 } # ac_fn_cxx_try_cpp
2148 
2149 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2150 # ---------------------------------------------------------
2151 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2152 # the include files in INCLUDES and setting the cache variable VAR
2153 # accordingly.
2154 ac_fn_cxx_check_header_mongrel ()
2155 {
2156   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2157   if eval \${$3+:} false; then :
2158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2159 $as_echo_n "checking for $2... " >&6; }
2160 if eval \${$3+:} false; then :
2161   $as_echo_n "(cached) " >&6
2162 fi
2163 eval ac_res=\$$3
2164                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2165 $as_echo "$ac_res" >&6; }
2166 else
2167   # Is the header compilable?
2168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2169 $as_echo_n "checking $2 usability... " >&6; }
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171 /* end confdefs.h.  */
2172 $4
2173 #include <$2>
2174 _ACEOF
2175 if ac_fn_cxx_try_compile "$LINENO"; then :
2176   ac_header_compiler=yes
2177 else
2178   ac_header_compiler=no
2179 fi
2180 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2182 $as_echo "$ac_header_compiler" >&6; }
2183 
2184 # Is the header present?
2185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2186 $as_echo_n "checking $2 presence... " >&6; }
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188 /* end confdefs.h.  */
2189 #include <$2>
2190 _ACEOF
2191 if ac_fn_cxx_try_cpp "$LINENO"; then :
2192   ac_header_preproc=yes
2193 else
2194   ac_header_preproc=no
2195 fi
2196 rm -f conftest.err conftest.i conftest.$ac_ext
2197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2198 $as_echo "$ac_header_preproc" >&6; }
2199 
2200 # So?  What about this header?
2201 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2202   yes:no: )
2203     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2204 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2205     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2206 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2207     ;;
2208   no:yes:* )
2209     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2210 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2211     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2212 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2213     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2214 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2215     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2216 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2217     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2218 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2219 ( $as_echo "## ----------------------------------------- ##
2220 ## Report this to build-dev@openjdk.java.net ##
2221 ## ----------------------------------------- ##"
2222      ) | sed "s/^/$as_me: WARNING:     /" >&2
2223     ;;
2224 esac
2225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2226 $as_echo_n "checking for $2... " >&6; }
2227 if eval \${$3+:} false; then :
2228   $as_echo_n "(cached) " >&6
2229 else
2230   eval "$3=\$ac_header_compiler"
2231 fi
2232 eval ac_res=\$$3
2233                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234 $as_echo "$ac_res" >&6; }
2235 fi
2236   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2237 
2238 } # ac_fn_cxx_check_header_mongrel
2239 
2240 # ac_fn_cxx_try_run LINENO
2241 # ------------------------
2242 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2243 # that executables *can* be run.
2244 ac_fn_cxx_try_run ()
2245 {
2246   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247   if { { ac_try="$ac_link"
2248 case "(($ac_try" in
2249   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2250   *) ac_try_echo=$ac_try;;
2251 esac
2252 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2253 $as_echo "$ac_try_echo"; } >&5
2254   (eval "$ac_link") 2>&5
2255   ac_status=$?
2256   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2257   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2258   { { case "(($ac_try" in
2259   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2260   *) ac_try_echo=$ac_try;;
2261 esac
2262 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2263 $as_echo "$ac_try_echo"; } >&5
2264   (eval "$ac_try") 2>&5
2265   ac_status=$?
2266   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2267   test $ac_status = 0; }; }; then :
2268   ac_retval=0
2269 else
2270   $as_echo "$as_me: program exited with status $ac_status" >&5
2271        $as_echo "$as_me: failed program was:" >&5
2272 sed 's/^/| /' conftest.$ac_ext >&5
2273 
2274        ac_retval=$ac_status
2275 fi
2276   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2277   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2278   as_fn_set_status $ac_retval
2279 
2280 } # ac_fn_cxx_try_run
2281 
2282 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2283 # ---------------------------------------------------------
2284 # Tests whether HEADER exists and can be compiled using the include files in
2285 # INCLUDES, setting the cache variable VAR accordingly.
2286 ac_fn_cxx_check_header_compile ()
2287 {
2288   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2290 $as_echo_n "checking for $2... " >&6; }
2291 if eval \${$3+:} false; then :
2292   $as_echo_n "(cached) " >&6
2293 else
2294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295 /* end confdefs.h.  */
2296 $4
2297 #include <$2>
2298 _ACEOF
2299 if ac_fn_cxx_try_compile "$LINENO"; then :
2300   eval "$3=yes"
2301 else
2302   eval "$3=no"
2303 fi
2304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2305 fi
2306 eval ac_res=\$$3
2307                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2308 $as_echo "$ac_res" >&6; }
2309   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2310 
2311 } # ac_fn_cxx_check_header_compile
2312 
2313 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2314 # ----------------------------------------------
2315 # Tries to find the compile-time value of EXPR in a program that includes
2316 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2317 # computed
2318 ac_fn_cxx_compute_int ()
2319 {
2320   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321   if test "$cross_compiling" = yes; then
2322     # Depending upon the size, compute the lo and hi bounds.
2323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2324 /* end confdefs.h.  */
2325 $4
2326 int
2327 main ()
2328 {
2329 static int test_array [1 - 2 * !(($2) >= 0)];
2330 test_array [0] = 0;
2331 return test_array [0];
2332 
2333   ;
2334   return 0;
2335 }
2336 _ACEOF
2337 if ac_fn_cxx_try_compile "$LINENO"; then :
2338   ac_lo=0 ac_mid=0
2339   while :; do
2340     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341 /* end confdefs.h.  */
2342 $4
2343 int
2344 main ()
2345 {
2346 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2347 test_array [0] = 0;
2348 return test_array [0];
2349 
2350   ;
2351   return 0;
2352 }
2353 _ACEOF
2354 if ac_fn_cxx_try_compile "$LINENO"; then :
2355   ac_hi=$ac_mid; break
2356 else
2357   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2358                         if test $ac_lo -le $ac_mid; then
2359                           ac_lo= ac_hi=
2360                           break
2361                         fi
2362                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2363 fi
2364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2365   done
2366 else
2367   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368 /* end confdefs.h.  */
2369 $4
2370 int
2371 main ()
2372 {
2373 static int test_array [1 - 2 * !(($2) < 0)];
2374 test_array [0] = 0;
2375 return test_array [0];
2376 
2377   ;
2378   return 0;
2379 }
2380 _ACEOF
2381 if ac_fn_cxx_try_compile "$LINENO"; then :
2382   ac_hi=-1 ac_mid=-1
2383   while :; do
2384     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2385 /* end confdefs.h.  */
2386 $4
2387 int
2388 main ()
2389 {
2390 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2391 test_array [0] = 0;
2392 return test_array [0];
2393 
2394   ;
2395   return 0;
2396 }
2397 _ACEOF
2398 if ac_fn_cxx_try_compile "$LINENO"; then :
2399   ac_lo=$ac_mid; break
2400 else
2401   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2402                         if test $ac_mid -le $ac_hi; then
2403                           ac_lo= ac_hi=
2404                           break
2405                         fi
2406                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2407 fi
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409   done
2410 else
2411   ac_lo= ac_hi=
2412 fi
2413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2414 fi
2415 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2416 # Binary search between lo and hi bounds.
2417 while test "x$ac_lo" != "x$ac_hi"; do
2418   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2419   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420 /* end confdefs.h.  */
2421 $4
2422 int
2423 main ()
2424 {
2425 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2426 test_array [0] = 0;
2427 return test_array [0];
2428 
2429   ;
2430   return 0;
2431 }
2432 _ACEOF
2433 if ac_fn_cxx_try_compile "$LINENO"; then :
2434   ac_hi=$ac_mid
2435 else
2436   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2437 fi
2438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439 done
2440 case $ac_lo in #((
2441 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2442 '') ac_retval=1 ;;
2443 esac
2444   else
2445     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446 /* end confdefs.h.  */
2447 $4
2448 static long int longval () { return $2; }
2449 static unsigned long int ulongval () { return $2; }
2450 #include <stdio.h>
2451 #include <stdlib.h>
2452 int
2453 main ()
2454 {
2455 
2456   FILE *f = fopen ("conftest.val", "w");
2457   if (! f)
2458     return 1;
2459   if (($2) < 0)
2460     {
2461       long int i = longval ();
2462       if (i != ($2))
2463         return 1;
2464       fprintf (f, "%ld", i);
2465     }
2466   else
2467     {
2468       unsigned long int i = ulongval ();
2469       if (i != ($2))
2470         return 1;
2471       fprintf (f, "%lu", i);
2472     }
2473   /* Do not output a trailing newline, as this causes \r\n confusion
2474      on some platforms.  */
2475   return ferror (f) || fclose (f) != 0;
2476 
2477   ;
2478   return 0;
2479 }
2480 _ACEOF
2481 if ac_fn_cxx_try_run "$LINENO"; then :
2482   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2483 else
2484   ac_retval=1
2485 fi
2486 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2487   conftest.$ac_objext conftest.beam conftest.$ac_ext
2488 rm -f conftest.val
2489 
2490   fi
2491   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2492   as_fn_set_status $ac_retval
2493 
2494 } # ac_fn_cxx_compute_int
2495 
2496 # ac_fn_cxx_try_link LINENO
2497 # -------------------------
2498 # Try to link conftest.$ac_ext, and return whether this succeeded.
2499 ac_fn_cxx_try_link ()
2500 {
2501   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2502   rm -f conftest.$ac_objext conftest$ac_exeext
2503   if { { ac_try="$ac_link"
2504 case "(($ac_try" in
2505   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2506   *) ac_try_echo=$ac_try;;
2507 esac
2508 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2509 $as_echo "$ac_try_echo"; } >&5
2510   (eval "$ac_link") 2>conftest.err
2511   ac_status=$?
2512   if test -s conftest.err; then
2513     grep -v '^ *+' conftest.err >conftest.er1
2514     cat conftest.er1 >&5
2515     mv -f conftest.er1 conftest.err
2516   fi
2517   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2518   test $ac_status = 0; } && {
2519          test -z "$ac_cxx_werror_flag" ||
2520          test ! -s conftest.err
2521        } && test -s conftest$ac_exeext && {
2522          test "$cross_compiling" = yes ||
2523          test -x conftest$ac_exeext
2524        }; then :
2525   ac_retval=0
2526 else
2527   $as_echo "$as_me: failed program was:" >&5
2528 sed 's/^/| /' conftest.$ac_ext >&5
2529 
2530         ac_retval=1
2531 fi
2532   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2533   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2534   # interfere with the next link command; also delete a directory that is
2535   # left behind by Apple's compiler.  We do this before executing the actions.
2536   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2537   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2538   as_fn_set_status $ac_retval
2539 
2540 } # ac_fn_cxx_try_link
2541 
2542 # ac_fn_cxx_check_func LINENO FUNC VAR
2543 # ------------------------------------
2544 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2545 ac_fn_cxx_check_func ()
2546 {
2547   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2548   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2549 $as_echo_n "checking for $2... " >&6; }
2550 if eval \${$3+:} false; then :
2551   $as_echo_n "(cached) " >&6
2552 else
2553   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2554 /* end confdefs.h.  */
2555 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2556    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2557 #define $2 innocuous_$2
2558 
2559 /* System header to define __stub macros and hopefully few prototypes,
2560     which can conflict with char $2 (); below.
2561     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2562     <limits.h> exists even on freestanding compilers.  */
2563 
2564 #ifdef __STDC__
2565 # include <limits.h>
2566 #else
2567 # include <assert.h>
2568 #endif
2569 
2570 #undef $2
2571 
2572 /* Override any GCC internal prototype to avoid an error.
2573    Use char because int might match the return type of a GCC
2574    builtin and then its argument prototype would still apply.  */
2575 #ifdef __cplusplus
2576 extern "C"
2577 #endif
2578 char $2 ();
2579 /* The GNU C library defines this for functions which it implements
2580     to always fail with ENOSYS.  Some functions are actually named
2581     something starting with __ and the normal name is an alias.  */
2582 #if defined __stub_$2 || defined __stub___$2
2583 choke me
2584 #endif
2585 
2586 int
2587 main ()
2588 {
2589 return $2 ();
2590   ;
2591   return 0;
2592 }
2593 _ACEOF
2594 if ac_fn_cxx_try_link "$LINENO"; then :
2595   eval "$3=yes"
2596 else
2597   eval "$3=no"
2598 fi
2599 rm -f core conftest.err conftest.$ac_objext \
2600     conftest$ac_exeext 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_cxx_check_func
2608 
2609 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2610 # -------------------------------------------------------
2611 # Tests whether HEADER exists and can be compiled using the include files in
2612 # INCLUDES, setting the cache variable VAR accordingly.
2613 ac_fn_c_check_header_compile ()
2614 {
2615   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2617 $as_echo_n "checking for $2... " >&6; }
2618 if eval \${$3+:} false; then :
2619   $as_echo_n "(cached) " >&6
2620 else
2621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622 /* end confdefs.h.  */
2623 $4
2624 #include <$2>
2625 _ACEOF
2626 if ac_fn_c_try_compile "$LINENO"; then :
2627   eval "$3=yes"
2628 else
2629   eval "$3=no"
2630 fi
2631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2632 fi
2633 eval ac_res=\$$3
2634                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2635 $as_echo "$ac_res" >&6; }
2636   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2637 
2638 } # ac_fn_c_check_header_compile
2639 cat >config.log <<_ACEOF
2640 This file contains any messages produced by compilers while
2641 running configure, to aid debugging if configure makes a mistake.
2642 
2643 It was created by OpenJDK $as_me jdk8, which was
2644 generated by GNU Autoconf 2.69.  Invocation command line was
2645 
2646   $ $0 $@
2647 
2648 _ACEOF
2649 exec 5>>config.log
2650 {
2651 cat <<_ASUNAME
2652 ## --------- ##
2653 ## Platform. ##
2654 ## --------- ##
2655 
2656 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2657 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2658 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2659 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2660 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2661 
2662 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2663 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2664 
2665 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2666 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2667 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2668 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2669 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2670 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2671 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2672 
2673 _ASUNAME
2674 
2675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2676 for as_dir in $PATH
2677 do
2678   IFS=$as_save_IFS
2679   test -z "$as_dir" && as_dir=.
2680     $as_echo "PATH: $as_dir"
2681   done
2682 IFS=$as_save_IFS
2683 
2684 } >&5
2685 
2686 cat >&5 <<_ACEOF
2687 
2688 
2689 ## ----------- ##
2690 ## Core tests. ##
2691 ## ----------- ##
2692 
2693 _ACEOF
2694 
2695 
2696 # Keep a trace of the command line.
2697 # Strip out --no-create and --no-recursion so they do not pile up.
2698 # Strip out --silent because we don't want to record it for future runs.
2699 # Also quote any args containing shell meta-characters.
2700 # Make two passes to allow for proper duplicate-argument suppression.
2701 ac_configure_args=
2702 ac_configure_args0=
2703 ac_configure_args1=
2704 ac_must_keep_next=false
2705 for ac_pass in 1 2
2706 do
2707   for ac_arg
2708   do
2709     case $ac_arg in
2710     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2711     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2712     | -silent | --silent | --silen | --sile | --sil)
2713       continue ;;
2714     *\'*)
2715       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2716     esac
2717     case $ac_pass in
2718     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2719     2)
2720       as_fn_append ac_configure_args1 " '$ac_arg'"
2721       if test $ac_must_keep_next = true; then
2722         ac_must_keep_next=false # Got value, back to normal.
2723       else
2724         case $ac_arg in
2725           *=* | --config-cache | -C | -disable-* | --disable-* \
2726           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2727           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2728           | -with-* | --with-* | -without-* | --without-* | --x)
2729             case "$ac_configure_args0 " in
2730               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2731             esac
2732             ;;
2733           -* ) ac_must_keep_next=true ;;
2734         esac
2735       fi
2736       as_fn_append ac_configure_args " '$ac_arg'"
2737       ;;
2738     esac
2739   done
2740 done
2741 { ac_configure_args0=; unset ac_configure_args0;}
2742 { ac_configure_args1=; unset ac_configure_args1;}
2743 
2744 # When interrupted or exit'd, cleanup temporary files, and complete
2745 # config.log.  We remove comments because anyway the quotes in there
2746 # would cause problems or look ugly.
2747 # WARNING: Use '\'' to represent an apostrophe within the trap.
2748 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2749 trap 'exit_status=$?
2750   # Save into config.log some information that might help in debugging.
2751   {
2752     echo
2753 
2754     $as_echo "## ---------------- ##
2755 ## Cache variables. ##
2756 ## ---------------- ##"
2757     echo
2758     # The following way of writing the cache mishandles newlines in values,
2759 (
2760   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2761     eval ac_val=\$$ac_var
2762     case $ac_val in #(
2763     *${as_nl}*)
2764       case $ac_var in #(
2765       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2766 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2767       esac
2768       case $ac_var in #(
2769       _ | IFS | as_nl) ;; #(
2770       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2771       *) { eval $ac_var=; unset $ac_var;} ;;
2772       esac ;;
2773     esac
2774   done
2775   (set) 2>&1 |
2776     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2777     *${as_nl}ac_space=\ *)
2778       sed -n \
2779         "s/'\''/'\''\\\\'\'''\''/g;
2780           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2781       ;; #(
2782     *)
2783       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2784       ;;
2785     esac |
2786     sort
2787 )
2788     echo
2789 
2790     $as_echo "## ----------------- ##
2791 ## Output variables. ##
2792 ## ----------------- ##"
2793     echo
2794     for ac_var in $ac_subst_vars
2795     do
2796       eval ac_val=\$$ac_var
2797       case $ac_val in
2798       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2799       esac
2800       $as_echo "$ac_var='\''$ac_val'\''"
2801     done | sort
2802     echo
2803 
2804     if test -n "$ac_subst_files"; then
2805       $as_echo "## ------------------- ##
2806 ## File substitutions. ##
2807 ## ------------------- ##"
2808       echo
2809       for ac_var in $ac_subst_files
2810       do
2811         eval ac_val=\$$ac_var
2812         case $ac_val in
2813         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2814         esac
2815         $as_echo "$ac_var='\''$ac_val'\''"
2816       done | sort
2817       echo
2818     fi
2819 
2820     if test -s confdefs.h; then
2821       $as_echo "## ----------- ##
2822 ## confdefs.h. ##
2823 ## ----------- ##"
2824       echo
2825       cat confdefs.h
2826       echo
2827     fi
2828     test "$ac_signal" != 0 &&
2829       $as_echo "$as_me: caught signal $ac_signal"
2830     $as_echo "$as_me: exit $exit_status"
2831   } >&5
2832   rm -f core *.core core.conftest.* &&
2833     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2834     exit $exit_status
2835 ' 0
2836 for ac_signal in 1 2 13 15; do
2837   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2838 done
2839 ac_signal=0
2840 
2841 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2842 rm -f -r conftest* confdefs.h
2843 
2844 $as_echo "/* confdefs.h */" > confdefs.h
2845 
2846 # Predefined preprocessor variables.
2847 
2848 cat >>confdefs.h <<_ACEOF
2849 #define PACKAGE_NAME "$PACKAGE_NAME"
2850 _ACEOF
2851 
2852 cat >>confdefs.h <<_ACEOF
2853 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2854 _ACEOF
2855 
2856 cat >>confdefs.h <<_ACEOF
2857 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2858 _ACEOF
2859 
2860 cat >>confdefs.h <<_ACEOF
2861 #define PACKAGE_STRING "$PACKAGE_STRING"
2862 _ACEOF
2863 
2864 cat >>confdefs.h <<_ACEOF
2865 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2866 _ACEOF
2867 
2868 cat >>confdefs.h <<_ACEOF
2869 #define PACKAGE_URL "$PACKAGE_URL"
2870 _ACEOF
2871 
2872 
2873 # Let the site file select an alternate cache file if it wants to.
2874 # Prefer an explicitly selected file to automatically selected ones.
2875 ac_site_file1=NONE
2876 ac_site_file2=NONE
2877 if test -n "$CONFIG_SITE"; then
2878   # We do not want a PATH search for config.site.
2879   case $CONFIG_SITE in #((
2880     -*)  ac_site_file1=./$CONFIG_SITE;;
2881     */*) ac_site_file1=$CONFIG_SITE;;
2882     *)   ac_site_file1=./$CONFIG_SITE;;
2883   esac
2884 elif test "x$prefix" != xNONE; then
2885   ac_site_file1=$prefix/share/config.site
2886   ac_site_file2=$prefix/etc/config.site
2887 else
2888   ac_site_file1=$ac_default_prefix/share/config.site
2889   ac_site_file2=$ac_default_prefix/etc/config.site
2890 fi
2891 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2892 do
2893   test "x$ac_site_file" = xNONE && continue
2894   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2895     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2896 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2897     sed 's/^/| /' "$ac_site_file" >&5
2898     . "$ac_site_file" \
2899       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2900 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2901 as_fn_error $? "failed to load site script $ac_site_file
2902 See \`config.log' for more details" "$LINENO" 5; }
2903   fi
2904 done
2905 
2906 if test -r "$cache_file"; then
2907   # Some versions of bash will fail to source /dev/null (special files
2908   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2909   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2910     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2911 $as_echo "$as_me: loading cache $cache_file" >&6;}
2912     case $cache_file in
2913       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2914       *)                      . "./$cache_file";;
2915     esac
2916   fi
2917 else
2918   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2919 $as_echo "$as_me: creating cache $cache_file" >&6;}
2920   >$cache_file
2921 fi
2922 
2923 # Check that the precious variables saved in the cache have kept the same
2924 # value.
2925 ac_cache_corrupted=false
2926 for ac_var in $ac_precious_vars; do
2927   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2928   eval ac_new_set=\$ac_env_${ac_var}_set
2929   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2930   eval ac_new_val=\$ac_env_${ac_var}_value
2931   case $ac_old_set,$ac_new_set in
2932     set,)
2933       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2934 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2935       ac_cache_corrupted=: ;;
2936     ,set)
2937       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2938 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2939       ac_cache_corrupted=: ;;
2940     ,);;
2941     *)
2942       if test "x$ac_old_val" != "x$ac_new_val"; then
2943         # differences in whitespace do not lead to failure.
2944         ac_old_val_w=`echo x $ac_old_val`
2945         ac_new_val_w=`echo x $ac_new_val`
2946         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2947           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2948 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2949           ac_cache_corrupted=:
2950         else
2951           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2952 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2953           eval $ac_var=\$ac_old_val
2954         fi
2955         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2956 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2957         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2958 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2959       fi;;
2960   esac
2961   # Pass precious variables to config.status.
2962   if test "$ac_new_set" = set; then
2963     case $ac_new_val in
2964     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2965     *) ac_arg=$ac_var=$ac_new_val ;;
2966     esac
2967     case " $ac_configure_args " in
2968       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2969       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2970     esac
2971   fi
2972 done
2973 if $ac_cache_corrupted; then
2974   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2976   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2977 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2978   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2979 fi
2980 ## -------------------- ##
2981 ## Main body of script. ##
2982 ## -------------------- ##
2983 
2984 ac_ext=c
2985 ac_cpp='$CPP $CPPFLAGS'
2986 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2987 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2988 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2989 
2990 
2991 
2992 ac_aux_dir=
2993 for ac_dir in build-aux "$srcdir"/build-aux; do
2994   if test -f "$ac_dir/install-sh"; then
2995     ac_aux_dir=$ac_dir
2996     ac_install_sh="$ac_aux_dir/install-sh -c"
2997     break
2998   elif test -f "$ac_dir/install.sh"; then
2999     ac_aux_dir=$ac_dir
3000     ac_install_sh="$ac_aux_dir/install.sh -c"
3001     break
3002   elif test -f "$ac_dir/shtool"; then
3003     ac_aux_dir=$ac_dir
3004     ac_install_sh="$ac_aux_dir/shtool install -c"
3005     break
3006   fi
3007 done
3008 if test -z "$ac_aux_dir"; then
3009   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3010 fi
3011 
3012 # These three variables are undocumented and unsupported,
3013 # and are intended to be withdrawn in a future Autoconf release.
3014 # They can cause serious problems if a builder's source tree is in a directory
3015 # whose full name contains unusual characters.
3016 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3017 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3018 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3019 
3020 
3021 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3022 
3023 #
3024 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3025 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3026 #
3027 # This code is free software; you can redistribute it and/or modify it
3028 # under the terms of the GNU General Public License version 2 only, as
3029 # published by the Free Software Foundation.  Oracle designates this
3030 # particular file as subject to the "Classpath" exception as provided
3031 # by Oracle in the LICENSE file that accompanied this code.
3032 #
3033 # This code is distributed in the hope that it will be useful, but WITHOUT
3034 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3035 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3036 # version 2 for more details (a copy is included in the LICENSE file that
3037 # accompanied this code).
3038 #
3039 # You should have received a copy of the GNU General Public License version
3040 # 2 along with this work; if not, write to the Free Software Foundation,
3041 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3042 #
3043 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3044 # or visit www.oracle.com if you need additional information or have any
3045 # questions.
3046 #
3047 
3048 #
3049 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3050 #
3051 # This program is free software; you can redistribute it and/or modify
3052 # it under the terms of the GNU General Public License as published by
3053 # the Free Software Foundation; either version 2 of the License, or
3054 # (at your option) any later version.
3055 #
3056 # This program is distributed in the hope that it will be useful, but
3057 # WITHOUT ANY WARRANTY; without even the implied warranty of
3058 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3059 # General Public License for more details.
3060 #
3061 # You should have received a copy of the GNU General Public License
3062 # along with this program; if not, write to the Free Software
3063 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3064 #
3065 # As a special exception to the GNU General Public License, if you
3066 # distribute this file as part of a program that contains a
3067 # configuration script generated by Autoconf, you may include it under
3068 # the same distribution terms that you use for the rest of that program.
3069 
3070 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3071 # ----------------------------------
3072 # PKG_PROG_PKG_CONFIG
3073 
3074 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3075 #
3076 # Check to see whether a particular set of modules exists.  Similar
3077 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3078 #
3079 #
3080 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3081 # this or PKG_CHECK_MODULES is called, or make sure to call
3082 # PKG_CHECK_EXISTS manually
3083 # --------------------------------------------------------------
3084 
3085 
3086 
3087 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3088 # ---------------------------------------------
3089 # _PKG_CONFIG
3090 
3091 # _PKG_SHORT_ERRORS_SUPPORTED
3092 # -----------------------------
3093 # _PKG_SHORT_ERRORS_SUPPORTED
3094 
3095 
3096 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3097 # [ACTION-IF-NOT-FOUND])
3098 #
3099 #
3100 # Note that if there is a possibility the first call to
3101 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3102 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3103 #
3104 #
3105 # --------------------------------------------------------------
3106 # PKG_CHECK_MODULES
3107 
3108 
3109 # Include these first...
3110 #
3111 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3112 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3113 #
3114 # This code is free software; you can redistribute it and/or modify it
3115 # under the terms of the GNU General Public License version 2 only, as
3116 # published by the Free Software Foundation.  Oracle designates this
3117 # particular file as subject to the "Classpath" exception as provided
3118 # by Oracle in the LICENSE file that accompanied this code.
3119 #
3120 # This code is distributed in the hope that it will be useful, but WITHOUT
3121 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3122 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3123 # version 2 for more details (a copy is included in the LICENSE file that
3124 # accompanied this code).
3125 #
3126 # You should have received a copy of the GNU General Public License version
3127 # 2 along with this work; if not, write to the Free Software Foundation,
3128 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3129 #
3130 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3131 # or visit www.oracle.com if you need additional information or have any
3132 # questions.
3133 #
3134 
3135 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3136 # If so, then append $1 to $2 \
3137 # Also set JVM_ARG_OK to true/false depending on outcome.
3138 
3139 
3140 # Appends a string to a path variable, only adding the : when needed.
3141 
3142 
3143 # This will make sure the given variable points to a full and proper
3144 # path. This means:
3145 # 1) There will be no spaces in the path. On posix platforms,
3146 #    spaces in the path will result in an error. On Windows,
3147 #    the path will be rewritten using short-style to be space-free.
3148 # 2) The path will be absolute, and it will be in unix-style (on
3149 #     cygwin).
3150 # $1: The name of the variable to fix
3151 
3152 
3153 # This will make sure the given variable points to a executable
3154 # with a full and proper path. This means:
3155 # 1) There will be no spaces in the path. On posix platforms,
3156 #    spaces in the path will result in an error. On Windows,
3157 #    the path will be rewritten using short-style to be space-free.
3158 # 2) The path will be absolute, and it will be in unix-style (on
3159 #     cygwin).
3160 # Any arguments given to the executable is preserved.
3161 # If the input variable does not have a directory specification, then
3162 # it need to be in the PATH.
3163 # $1: The name of the variable to fix
3164 
3165 
3166 
3167 
3168 # Register a --with argument but mark it as deprecated
3169 # $1: The name of the with argument to deprecate, not including --with-
3170 
3171 
3172 # Register a --enable argument but mark it as deprecated
3173 # $1: The name of the with argument to deprecate, not including --enable-
3174 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3175 
3176 
3177 
3178 
3179 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3180 # $1: variable to check
3181 # $2: executable name to print in warning (optional)
3182 
3183 
3184 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3185 # Arguments as AC_PATH_PROG:
3186 # $1: variable to set
3187 # $2: executable name to look for
3188 
3189 
3190 # Setup the most fundamental tools that relies on not much else to set up,
3191 # but is used by much of the early bootstrap code.
3192 
3193 
3194 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3195 
3196 
3197 
3198 
3199 
3200 
3201 
3202 #%%% Simple tools %%%
3203 
3204 # Check if we have found a usable version of make
3205 # $1: the path to a potential make binary (or empty)
3206 # $2: the description on how we found this
3207 
3208 
3209 # Goes looking for a usable version of GNU make.
3210 
3211 
3212 
3213 
3214 
3215 
3216 # Check if build directory is on local disk. If not possible to determine,
3217 # we prefer to claim it's local.
3218 # Argument 1: directory to test
3219 # Argument 2: what to do if it is on local disk
3220 # Argument 3: what to do otherwise (remote disk or failure)
3221 
3222 
3223 # Check that source files have basic read permissions set. This might
3224 # not be the case in cygwin in certain conditions.
3225 
3226 
3227 
3228 
3229 #
3230 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3231 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3232 #
3233 # This code is free software; you can redistribute it and/or modify it
3234 # under the terms of the GNU General Public License version 2 only, as
3235 # published by the Free Software Foundation.  Oracle designates this
3236 # particular file as subject to the "Classpath" exception as provided
3237 # by Oracle in the LICENSE file that accompanied this code.
3238 #
3239 # This code is distributed in the hope that it will be useful, but WITHOUT
3240 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3241 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3242 # version 2 for more details (a copy is included in the LICENSE file that
3243 # accompanied this code).
3244 #
3245 # You should have received a copy of the GNU General Public License version
3246 # 2 along with this work; if not, write to the Free Software Foundation,
3247 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3248 #
3249 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3250 # or visit www.oracle.com if you need additional information or have any
3251 # questions.
3252 #
3253 
3254 
3255 
3256 
3257 
3258 # Helper function which possibly converts a path using DOS-style short mode.
3259 # If so, the updated path is stored in $new_path.
3260 # $1: The path to check
3261 
3262 
3263 # Helper function which possibly converts a path using DOS-style short mode.
3264 # If so, the updated path is stored in $new_path.
3265 # $1: The path to check
3266 
3267 
3268 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3269 # and could probably be heavily simplified. However, all changes in this
3270 # area tend to need lot of testing in different scenarios, and in lack of
3271 # proper unit testing, cleaning this up has not been deemed worth the effort
3272 # at the moment.
3273 
3274 
3275 
3276 
3277 
3278 
3279 
3280 
3281 
3282 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3283 
3284 
3285 
3286 
3287 #
3288 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3289 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3290 #
3291 # This code is free software; you can redistribute it and/or modify it
3292 # under the terms of the GNU General Public License version 2 only, as
3293 # published by the Free Software Foundation.  Oracle designates this
3294 # particular file as subject to the "Classpath" exception as provided
3295 # by Oracle in the LICENSE file that accompanied this code.
3296 #
3297 # This code is distributed in the hope that it will be useful, but WITHOUT
3298 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3299 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3300 # version 2 for more details (a copy is included in the LICENSE file that
3301 # accompanied this code).
3302 #
3303 # You should have received a copy of the GNU General Public License version
3304 # 2 along with this work; if not, write to the Free Software Foundation,
3305 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3306 #
3307 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3308 # or visit www.oracle.com if you need additional information or have any
3309 # questions.
3310 #
3311 
3312 
3313 
3314 
3315 
3316 
3317 
3318 
3319 
3320 
3321 
3322 # ... then the rest
3323 #
3324 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3325 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3326 #
3327 # This code is free software; you can redistribute it and/or modify it
3328 # under the terms of the GNU General Public License version 2 only, as
3329 # published by the Free Software Foundation.  Oracle designates this
3330 # particular file as subject to the "Classpath" exception as provided
3331 # by Oracle in the LICENSE file that accompanied this code.
3332 #
3333 # This code is distributed in the hope that it will be useful, but WITHOUT
3334 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3335 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3336 # version 2 for more details (a copy is included in the LICENSE file that
3337 # accompanied this code).
3338 #
3339 # You should have received a copy of the GNU General Public License version
3340 # 2 along with this work; if not, write to the Free Software Foundation,
3341 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3342 #
3343 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3344 # or visit www.oracle.com if you need additional information or have any
3345 # questions.
3346 #
3347 
3348 # Execute the check given as argument, and verify the result
3349 # If the Boot JDK was previously found, do nothing
3350 # $1 A command line (typically autoconf macro) to execute
3351 
3352 
3353 # Test: Is bootjdk explicitely set by command line arguments?
3354 
3355 
3356 # Test: Is bootjdk available from builddeps?
3357 
3358 
3359 # Test: Is $JAVA_HOME set?
3360 
3361 
3362 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3363 
3364 
3365 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3366 
3367 
3368 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3369 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3370 # $1 = Path to directory containing jdk installations.
3371 # $2 = String to append to the found JDK directory to get the proper JDK home
3372 
3373 
3374 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3375 # environmental variable as base for where to look.
3376 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3377 
3378 
3379 # Test: Is there a JDK installed in default, well-known locations?
3380 
3381 
3382 # Check that a command-line tool in the Boot JDK is correct
3383 # $1 = name of variable to assign
3384 # $2 = name of binary
3385 
3386 
3387 ###############################################################################
3388 #
3389 # We need a Boot JDK to bootstrap the build.
3390 #
3391 
3392 
3393 
3394 
3395 
3396 #
3397 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3398 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3399 #
3400 # This code is free software; you can redistribute it and/or modify it
3401 # under the terms of the GNU General Public License version 2 only, as
3402 # published by the Free Software Foundation.  Oracle designates this
3403 # particular file as subject to the "Classpath" exception as provided
3404 # by Oracle in the LICENSE file that accompanied this code.
3405 #
3406 # This code is distributed in the hope that it will be useful, but WITHOUT
3407 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3408 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3409 # version 2 for more details (a copy is included in the LICENSE file that
3410 # accompanied this code).
3411 #
3412 # You should have received a copy of the GNU General Public License version
3413 # 2 along with this work; if not, write to the Free Software Foundation,
3414 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3415 #
3416 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3417 # or visit www.oracle.com if you need additional information or have any
3418 # questions.
3419 #
3420 
3421 
3422 
3423 
3424 
3425 
3426 
3427 
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436 
3437 
3438 
3439 
3440 #
3441 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3442 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3443 #
3444 # This code is free software; you can redistribute it and/or modify it
3445 # under the terms of the GNU General Public License version 2 only, as
3446 # published by the Free Software Foundation.  Oracle designates this
3447 # particular file as subject to the "Classpath" exception as provided
3448 # by Oracle in the LICENSE file that accompanied this code.
3449 #
3450 # This code is distributed in the hope that it will be useful, but WITHOUT
3451 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3452 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3453 # version 2 for more details (a copy is included in the LICENSE file that
3454 # accompanied this code).
3455 #
3456 # You should have received a copy of the GNU General Public License version
3457 # 2 along with this work; if not, write to the Free Software Foundation,
3458 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3459 #
3460 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3461 # or visit www.oracle.com if you need additional information or have any
3462 # questions.
3463 #
3464 
3465 
3466 
3467 
3468 
3469 cygwin_help() {
3470   case $1 in
3471     unzip)
3472       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3473       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3474       ;;
3475     zip)
3476       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3477       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3478       ;;
3479     make)
3480       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3481       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3482       ;;
3483     freetype)
3484       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3485         HELP_MSG="To install freetype, run:
3486 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3487 chmod +x /tmp/freetype-setup.exe
3488 /tmp/freetype-setup.exe
3489 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3490 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3491       else
3492         HELP_MSG="You need to build a 64-bit version of freetype.
3493 This is not readily available.
3494 You can find source code and build instructions on
3495 http://www.freetype.org/
3496 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3497       fi
3498       ;;
3499   esac
3500 }
3501 
3502 msys_help() {
3503   PKGHANDLER_COMMAND=""
3504 }
3505 
3506 apt_help() {
3507   case $1 in
3508     devkit)
3509       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3510     openjdk)
3511       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3512     alsa)
3513       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3514     cups)
3515       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3516     freetype)
3517       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3518     pulse)
3519       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3520     x11)
3521       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3522     ccache)
3523       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3524   esac
3525 }
3526 
3527 yum_help() {
3528   case $1 in
3529     devkit)
3530       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3531     openjdk)
3532       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3533     alsa)
3534       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3535     cups)
3536       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3537     freetype)
3538       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3539     pulse)
3540       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3541     x11)
3542       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3543     ccache)
3544       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3545   esac
3546 }
3547 
3548 port_help() {
3549   PKGHANDLER_COMMAND=""
3550 }
3551 
3552 pkgutil_help() {
3553   PKGHANDLER_COMMAND=""
3554 }
3555 
3556 pkgadd_help() {
3557   PKGHANDLER_COMMAND=""
3558 }
3559 
3560 
3561 
3562 #
3563 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3564 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565 #
3566 # This code is free software; you can redistribute it and/or modify it
3567 # under the terms of the GNU General Public License version 2 only, as
3568 # published by the Free Software Foundation.  Oracle designates this
3569 # particular file as subject to the "Classpath" exception as provided
3570 # by Oracle in the LICENSE file that accompanied this code.
3571 #
3572 # This code is distributed in the hope that it will be useful, but WITHOUT
3573 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575 # version 2 for more details (a copy is included in the LICENSE file that
3576 # accompanied this code).
3577 #
3578 # You should have received a copy of the GNU General Public License version
3579 # 2 along with this work; if not, write to the Free Software Foundation,
3580 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581 #
3582 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583 # or visit www.oracle.com if you need additional information or have any
3584 # questions.
3585 #
3586 
3587 
3588 
3589 
3590 
3591 
3592 
3593 
3594 
3595 
3596 ###############################################################################
3597 #
3598 # Should we build only OpenJDK even if closed sources are present?
3599 #
3600 
3601 
3602 
3603 
3604 ###############################################################################
3605 #
3606 # Setup version numbers
3607 #
3608 
3609 
3610 
3611 
3612 
3613 
3614 # Support for customization of the build process. Some build files
3615 # will include counterparts from this location, if they exist. This allows
3616 # for a degree of customization of the build targets and the rules/recipes
3617 # to create them
3618 
3619 # Check whether --with-custom-make-dir was given.
3620 if test "${with_custom_make_dir+set}" = set; then :
3621   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3622 fi
3623 
3624 
3625 
3626 #
3627 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3628 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3629 #
3630 # This code is free software; you can redistribute it and/or modify it
3631 # under the terms of the GNU General Public License version 2 only, as
3632 # published by the Free Software Foundation.  Oracle designates this
3633 # particular file as subject to the "Classpath" exception as provided
3634 # by Oracle in the LICENSE file that accompanied this code.
3635 #
3636 # This code is distributed in the hope that it will be useful, but WITHOUT
3637 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3638 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3639 # version 2 for more details (a copy is included in the LICENSE file that
3640 # accompanied this code).
3641 #
3642 # You should have received a copy of the GNU General Public License version
3643 # 2 along with this work; if not, write to the Free Software Foundation,
3644 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3645 #
3646 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3647 # or visit www.oracle.com if you need additional information or have any
3648 # questions.
3649 #
3650 
3651 
3652 
3653 
3654 
3655 
3656 
3657 
3658 
3659 
3660 
3661 
3662 
3663 
3664 
3665 
3666 
3667 #
3668 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3669 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3670 #
3671 # This code is free software; you can redistribute it and/or modify it
3672 # under the terms of the GNU General Public License version 2 only, as
3673 # published by the Free Software Foundation.  Oracle designates this
3674 # particular file as subject to the "Classpath" exception as provided
3675 # by Oracle in the LICENSE file that accompanied this code.
3676 #
3677 # This code is distributed in the hope that it will be useful, but WITHOUT
3678 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3679 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3680 # version 2 for more details (a copy is included in the LICENSE file that
3681 # accompanied this code).
3682 #
3683 # You should have received a copy of the GNU General Public License version
3684 # 2 along with this work; if not, write to the Free Software Foundation,
3685 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3686 #
3687 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3688 # or visit www.oracle.com if you need additional information or have any
3689 # questions.
3690 #
3691 
3692 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3693 # Converts autoconf style CPU name to OpenJDK style, into
3694 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3695 
3696 
3697 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3698 # Converts autoconf style OS name to OpenJDK style, into
3699 # VAR_OS and VAR_OS_API.
3700 
3701 
3702 # Expects $host_os $host_cpu $build_os and $build_cpu
3703 # and $with_target_bits to have been setup!
3704 #
3705 # Translate the standard triplet(quadruplet) definition
3706 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3707 # OPENJDK_BUILD_OS, etc.
3708 
3709 
3710 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3711 # accordingly. Must be done after setting up build and target system, but before
3712 # doing anything else with these values.
3713 
3714 
3715 # Setup the legacy variables, for controlling the old makefiles.
3716 #
3717 
3718 
3719 
3720 
3721 #%%% Build and target systems %%%
3722 
3723 
3724 
3725 
3726 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3727 # Add -mX to various FLAGS variables.
3728 
3729 
3730 
3731 
3732 
3733 
3734 #
3735 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3736 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3737 #
3738 # This code is free software; you can redistribute it and/or modify it
3739 # under the terms of the GNU General Public License version 2 only, as
3740 # published by the Free Software Foundation.  Oracle designates this
3741 # particular file as subject to the "Classpath" exception as provided
3742 # by Oracle in the LICENSE file that accompanied this code.
3743 #
3744 # This code is distributed in the hope that it will be useful, but WITHOUT
3745 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3746 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3747 # version 2 for more details (a copy is included in the LICENSE file that
3748 # accompanied this code).
3749 #
3750 # You should have received a copy of the GNU General Public License version
3751 # 2 along with this work; if not, write to the Free Software Foundation,
3752 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3753 #
3754 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3755 # or visit www.oracle.com if you need additional information or have any
3756 # questions.
3757 #
3758 
3759 
3760 
3761 
3762 
3763 
3764 
3765 
3766 #
3767 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3768 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3769 #
3770 # This code is free software; you can redistribute it and/or modify it
3771 # under the terms of the GNU General Public License version 2 only, as
3772 # published by the Free Software Foundation.  Oracle designates this
3773 # particular file as subject to the "Classpath" exception as provided
3774 # by Oracle in the LICENSE file that accompanied this code.
3775 #
3776 # This code is distributed in the hope that it will be useful, but WITHOUT
3777 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3778 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3779 # version 2 for more details (a copy is included in the LICENSE file that
3780 # accompanied this code).
3781 #
3782 # You should have received a copy of the GNU General Public License version
3783 # 2 along with this work; if not, write to the Free Software Foundation,
3784 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3785 #
3786 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3787 # or visit www.oracle.com if you need additional information or have any
3788 # questions.
3789 #
3790 
3791 # $1 = compiler to test (CC or CXX)
3792 # $2 = human readable name of compiler (C or C++)
3793 
3794 
3795 
3796 
3797 
3798 # $1 = compiler to test (CC or CXX)
3799 # $2 = human readable name of compiler (C or C++)
3800 # $3 = list of compiler names to search for
3801 
3802 
3803 
3804 
3805 
3806 
3807 
3808 
3809 
3810 
3811 
3812 
3813 
3814 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3815 #                                   [RUN-IF-FALSE])
3816 # ------------------------------------------------------------
3817 # Check that the c and c++ compilers support an argument
3818 
3819 
3820 
3821 
3822 # Setup the JTREG paths
3823 
3824 
3825 #
3826 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3827 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3828 #
3829 # This code is free software; you can redistribute it and/or modify it
3830 # under the terms of the GNU General Public License version 2 only, as
3831 # published by the Free Software Foundation.  Oracle designates this
3832 # particular file as subject to the "Classpath" exception as provided
3833 # by Oracle in the LICENSE file that accompanied this code.
3834 #
3835 # This code is distributed in the hope that it will be useful, but WITHOUT
3836 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3837 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3838 # version 2 for more details (a copy is included in the LICENSE file that
3839 # accompanied this code).
3840 #
3841 # You should have received a copy of the GNU General Public License version
3842 # 2 along with this work; if not, write to the Free Software Foundation,
3843 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3844 #
3845 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3846 # or visit www.oracle.com if you need additional information or have any
3847 # questions.
3848 #
3849 
3850 
3851 
3852 
3853 
3854 
3855 
3856 # Check if the VS env variables were setup prior to running configure.
3857 # If not, then find vcvarsall.bat and run it automatically, and integrate
3858 # the set env variables into the spec file.
3859 
3860 
3861 
3862 
3863 
3864 
3865 
3866 
3867 
3868 
3869 # This line needs to be here, verbatim, after all includes and the dummy hook
3870 # definitions. It is replaced with custom functionality when building
3871 # custom sources.
3872 #CUSTOM_AUTOCONF_INCLUDE
3873 
3874 # Do not change or remove the following line, it is needed for consistency checks:
3875 DATE_WHEN_GENERATED=1416326200
3876 
3877 ###############################################################################
3878 #
3879 # Initialization / Boot-strapping
3880 #
3881 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3882 # thus it jumps back and forth, each time gaining something needed later on.
3883 #
3884 ###############################################################################
3885 
3886 # Basic initialization that must happen first of all
3887 
3888   # Save the original command line. This is passed to us by the wrapper configure script.
3889 
3890   DATE_WHEN_CONFIGURED=`LANG=C date`
3891 
3892   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3893 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3894   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3895 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3896 
3897 
3898 
3899   # Start with tools that do not need have cross compilation support
3900   # and can be expected to be found in the default PATH. These tools are
3901   # used by configure. Nor are these tools expected to be found in the
3902   # devkit from the builddeps server either, since they are
3903   # needed to download the devkit.
3904 
3905   # First are all the simple required tools.
3906 
3907   for ac_prog in basename
3908 do
3909   # Extract the first word of "$ac_prog", so it can be a program name with args.
3910 set dummy $ac_prog; ac_word=$2
3911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3912 $as_echo_n "checking for $ac_word... " >&6; }
3913 if ${ac_cv_path_BASENAME+:} false; then :
3914   $as_echo_n "(cached) " >&6
3915 else
3916   case $BASENAME in
3917   [\\/]* | ?:[\\/]*)
3918   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3919   ;;
3920   *)
3921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3922 for as_dir in $PATH
3923 do
3924   IFS=$as_save_IFS
3925   test -z "$as_dir" && as_dir=.
3926     for ac_exec_ext in '' $ac_executable_extensions; do
3927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3928     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3930     break 2
3931   fi
3932 done
3933   done
3934 IFS=$as_save_IFS
3935 
3936   ;;
3937 esac
3938 fi
3939 BASENAME=$ac_cv_path_BASENAME
3940 if test -n "$BASENAME"; then
3941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3942 $as_echo "$BASENAME" >&6; }
3943 else
3944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3946 fi
3947 
3948 
3949   test -n "$BASENAME" && break
3950 done
3951 
3952 
3953   if test "x$BASENAME" = x; then
3954     if test "xbasename" = x; then
3955       PROG_NAME=basename
3956     else
3957       PROG_NAME=basename
3958     fi
3959     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3960 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3961     as_fn_error $? "Cannot continue" "$LINENO" 5
3962   fi
3963 
3964 
3965 
3966   for ac_prog in bash
3967 do
3968   # Extract the first word of "$ac_prog", so it can be a program name with args.
3969 set dummy $ac_prog; ac_word=$2
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3971 $as_echo_n "checking for $ac_word... " >&6; }
3972 if ${ac_cv_path_BASH+:} false; then :
3973   $as_echo_n "(cached) " >&6
3974 else
3975   case $BASH in
3976   [\\/]* | ?:[\\/]*)
3977   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3978   ;;
3979   *)
3980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3981 for as_dir in $PATH
3982 do
3983   IFS=$as_save_IFS
3984   test -z "$as_dir" && as_dir=.
3985     for ac_exec_ext in '' $ac_executable_extensions; do
3986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3987     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3989     break 2
3990   fi
3991 done
3992   done
3993 IFS=$as_save_IFS
3994 
3995   ;;
3996 esac
3997 fi
3998 BASH=$ac_cv_path_BASH
3999 if test -n "$BASH"; then
4000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4001 $as_echo "$BASH" >&6; }
4002 else
4003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004 $as_echo "no" >&6; }
4005 fi
4006 
4007 
4008   test -n "$BASH" && break
4009 done
4010 
4011 
4012   if test "x$BASH" = x; then
4013     if test "xbash" = x; then
4014       PROG_NAME=bash
4015     else
4016       PROG_NAME=bash
4017     fi
4018     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4019 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4020     as_fn_error $? "Cannot continue" "$LINENO" 5
4021   fi
4022 
4023 
4024 
4025   for ac_prog in cat
4026 do
4027   # Extract the first word of "$ac_prog", so it can be a program name with args.
4028 set dummy $ac_prog; ac_word=$2
4029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4030 $as_echo_n "checking for $ac_word... " >&6; }
4031 if ${ac_cv_path_CAT+:} false; then :
4032   $as_echo_n "(cached) " >&6
4033 else
4034   case $CAT in
4035   [\\/]* | ?:[\\/]*)
4036   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4037   ;;
4038   *)
4039   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4040 for as_dir in $PATH
4041 do
4042   IFS=$as_save_IFS
4043   test -z "$as_dir" && as_dir=.
4044     for ac_exec_ext in '' $ac_executable_extensions; do
4045   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4046     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4047     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4048     break 2
4049   fi
4050 done
4051   done
4052 IFS=$as_save_IFS
4053 
4054   ;;
4055 esac
4056 fi
4057 CAT=$ac_cv_path_CAT
4058 if test -n "$CAT"; then
4059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4060 $as_echo "$CAT" >&6; }
4061 else
4062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4063 $as_echo "no" >&6; }
4064 fi
4065 
4066 
4067   test -n "$CAT" && break
4068 done
4069 
4070 
4071   if test "x$CAT" = x; then
4072     if test "xcat" = x; then
4073       PROG_NAME=cat
4074     else
4075       PROG_NAME=cat
4076     fi
4077     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4078 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4079     as_fn_error $? "Cannot continue" "$LINENO" 5
4080   fi
4081 
4082 
4083 
4084   for ac_prog in chmod
4085 do
4086   # Extract the first word of "$ac_prog", so it can be a program name with args.
4087 set dummy $ac_prog; ac_word=$2
4088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4089 $as_echo_n "checking for $ac_word... " >&6; }
4090 if ${ac_cv_path_CHMOD+:} false; then :
4091   $as_echo_n "(cached) " >&6
4092 else
4093   case $CHMOD in
4094   [\\/]* | ?:[\\/]*)
4095   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4096   ;;
4097   *)
4098   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4099 for as_dir in $PATH
4100 do
4101   IFS=$as_save_IFS
4102   test -z "$as_dir" && as_dir=.
4103     for ac_exec_ext in '' $ac_executable_extensions; do
4104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4105     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4107     break 2
4108   fi
4109 done
4110   done
4111 IFS=$as_save_IFS
4112 
4113   ;;
4114 esac
4115 fi
4116 CHMOD=$ac_cv_path_CHMOD
4117 if test -n "$CHMOD"; then
4118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4119 $as_echo "$CHMOD" >&6; }
4120 else
4121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4122 $as_echo "no" >&6; }
4123 fi
4124 
4125 
4126   test -n "$CHMOD" && break
4127 done
4128 
4129 
4130   if test "x$CHMOD" = x; then
4131     if test "xchmod" = x; then
4132       PROG_NAME=chmod
4133     else
4134       PROG_NAME=chmod
4135     fi
4136     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4137 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4138     as_fn_error $? "Cannot continue" "$LINENO" 5
4139   fi
4140 
4141 
4142 
4143   for ac_prog in cmp
4144 do
4145   # Extract the first word of "$ac_prog", so it can be a program name with args.
4146 set dummy $ac_prog; ac_word=$2
4147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4148 $as_echo_n "checking for $ac_word... " >&6; }
4149 if ${ac_cv_path_CMP+:} false; then :
4150   $as_echo_n "(cached) " >&6
4151 else
4152   case $CMP in
4153   [\\/]* | ?:[\\/]*)
4154   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4155   ;;
4156   *)
4157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4158 for as_dir in $PATH
4159 do
4160   IFS=$as_save_IFS
4161   test -z "$as_dir" && as_dir=.
4162     for ac_exec_ext in '' $ac_executable_extensions; do
4163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4164     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4166     break 2
4167   fi
4168 done
4169   done
4170 IFS=$as_save_IFS
4171 
4172   ;;
4173 esac
4174 fi
4175 CMP=$ac_cv_path_CMP
4176 if test -n "$CMP"; then
4177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4178 $as_echo "$CMP" >&6; }
4179 else
4180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4181 $as_echo "no" >&6; }
4182 fi
4183 
4184 
4185   test -n "$CMP" && break
4186 done
4187 
4188 
4189   if test "x$CMP" = x; then
4190     if test "xcmp" = x; then
4191       PROG_NAME=cmp
4192     else
4193       PROG_NAME=cmp
4194     fi
4195     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4196 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4197     as_fn_error $? "Cannot continue" "$LINENO" 5
4198   fi
4199 
4200 
4201 
4202   for ac_prog in comm
4203 do
4204   # Extract the first word of "$ac_prog", so it can be a program name with args.
4205 set dummy $ac_prog; ac_word=$2
4206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4207 $as_echo_n "checking for $ac_word... " >&6; }
4208 if ${ac_cv_path_COMM+:} false; then :
4209   $as_echo_n "(cached) " >&6
4210 else
4211   case $COMM in
4212   [\\/]* | ?:[\\/]*)
4213   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4214   ;;
4215   *)
4216   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4217 for as_dir in $PATH
4218 do
4219   IFS=$as_save_IFS
4220   test -z "$as_dir" && as_dir=.
4221     for ac_exec_ext in '' $ac_executable_extensions; do
4222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4223     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4225     break 2
4226   fi
4227 done
4228   done
4229 IFS=$as_save_IFS
4230 
4231   ;;
4232 esac
4233 fi
4234 COMM=$ac_cv_path_COMM
4235 if test -n "$COMM"; then
4236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4237 $as_echo "$COMM" >&6; }
4238 else
4239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4240 $as_echo "no" >&6; }
4241 fi
4242 
4243 
4244   test -n "$COMM" && break
4245 done
4246 
4247 
4248   if test "x$COMM" = x; then
4249     if test "xcomm" = x; then
4250       PROG_NAME=comm
4251     else
4252       PROG_NAME=comm
4253     fi
4254     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4255 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4256     as_fn_error $? "Cannot continue" "$LINENO" 5
4257   fi
4258 
4259 
4260 
4261   for ac_prog in cp
4262 do
4263   # Extract the first word of "$ac_prog", so it can be a program name with args.
4264 set dummy $ac_prog; ac_word=$2
4265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4266 $as_echo_n "checking for $ac_word... " >&6; }
4267 if ${ac_cv_path_CP+:} false; then :
4268   $as_echo_n "(cached) " >&6
4269 else
4270   case $CP in
4271   [\\/]* | ?:[\\/]*)
4272   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4273   ;;
4274   *)
4275   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276 for as_dir in $PATH
4277 do
4278   IFS=$as_save_IFS
4279   test -z "$as_dir" && as_dir=.
4280     for ac_exec_ext in '' $ac_executable_extensions; do
4281   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4282     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4283     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4284     break 2
4285   fi
4286 done
4287   done
4288 IFS=$as_save_IFS
4289 
4290   ;;
4291 esac
4292 fi
4293 CP=$ac_cv_path_CP
4294 if test -n "$CP"; then
4295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4296 $as_echo "$CP" >&6; }
4297 else
4298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4299 $as_echo "no" >&6; }
4300 fi
4301 
4302 
4303   test -n "$CP" && break
4304 done
4305 
4306 
4307   if test "x$CP" = x; then
4308     if test "xcp" = x; then
4309       PROG_NAME=cp
4310     else
4311       PROG_NAME=cp
4312     fi
4313     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4314 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4315     as_fn_error $? "Cannot continue" "$LINENO" 5
4316   fi
4317 
4318 
4319 
4320   for ac_prog in cpio
4321 do
4322   # Extract the first word of "$ac_prog", so it can be a program name with args.
4323 set dummy $ac_prog; ac_word=$2
4324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4325 $as_echo_n "checking for $ac_word... " >&6; }
4326 if ${ac_cv_path_CPIO+:} false; then :
4327   $as_echo_n "(cached) " >&6
4328 else
4329   case $CPIO in
4330   [\\/]* | ?:[\\/]*)
4331   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4332   ;;
4333   *)
4334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4335 for as_dir in $PATH
4336 do
4337   IFS=$as_save_IFS
4338   test -z "$as_dir" && as_dir=.
4339     for ac_exec_ext in '' $ac_executable_extensions; do
4340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4341     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4343     break 2
4344   fi
4345 done
4346   done
4347 IFS=$as_save_IFS
4348 
4349   ;;
4350 esac
4351 fi
4352 CPIO=$ac_cv_path_CPIO
4353 if test -n "$CPIO"; then
4354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4355 $as_echo "$CPIO" >&6; }
4356 else
4357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4358 $as_echo "no" >&6; }
4359 fi
4360 
4361 
4362   test -n "$CPIO" && break
4363 done
4364 
4365 
4366   if test "x$CPIO" = x; then
4367     if test "xcpio" = x; then
4368       PROG_NAME=cpio
4369     else
4370       PROG_NAME=cpio
4371     fi
4372     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4373 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4374     as_fn_error $? "Cannot continue" "$LINENO" 5
4375   fi
4376 
4377 
4378 
4379   for ac_prog in cut
4380 do
4381   # Extract the first word of "$ac_prog", so it can be a program name with args.
4382 set dummy $ac_prog; ac_word=$2
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4384 $as_echo_n "checking for $ac_word... " >&6; }
4385 if ${ac_cv_path_CUT+:} false; then :
4386   $as_echo_n "(cached) " >&6
4387 else
4388   case $CUT in
4389   [\\/]* | ?:[\\/]*)
4390   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4391   ;;
4392   *)
4393   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4394 for as_dir in $PATH
4395 do
4396   IFS=$as_save_IFS
4397   test -z "$as_dir" && as_dir=.
4398     for ac_exec_ext in '' $ac_executable_extensions; do
4399   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4400     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4401     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4402     break 2
4403   fi
4404 done
4405   done
4406 IFS=$as_save_IFS
4407 
4408   ;;
4409 esac
4410 fi
4411 CUT=$ac_cv_path_CUT
4412 if test -n "$CUT"; then
4413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4414 $as_echo "$CUT" >&6; }
4415 else
4416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417 $as_echo "no" >&6; }
4418 fi
4419 
4420 
4421   test -n "$CUT" && break
4422 done
4423 
4424 
4425   if test "x$CUT" = x; then
4426     if test "xcut" = x; then
4427       PROG_NAME=cut
4428     else
4429       PROG_NAME=cut
4430     fi
4431     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4432 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4433     as_fn_error $? "Cannot continue" "$LINENO" 5
4434   fi
4435 
4436 
4437 
4438   for ac_prog in date
4439 do
4440   # Extract the first word of "$ac_prog", so it can be a program name with args.
4441 set dummy $ac_prog; ac_word=$2
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443 $as_echo_n "checking for $ac_word... " >&6; }
4444 if ${ac_cv_path_DATE+:} false; then :
4445   $as_echo_n "(cached) " >&6
4446 else
4447   case $DATE in
4448   [\\/]* | ?:[\\/]*)
4449   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4450   ;;
4451   *)
4452   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453 for as_dir in $PATH
4454 do
4455   IFS=$as_save_IFS
4456   test -z "$as_dir" && as_dir=.
4457     for ac_exec_ext in '' $ac_executable_extensions; do
4458   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4460     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4461     break 2
4462   fi
4463 done
4464   done
4465 IFS=$as_save_IFS
4466 
4467   ;;
4468 esac
4469 fi
4470 DATE=$ac_cv_path_DATE
4471 if test -n "$DATE"; then
4472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4473 $as_echo "$DATE" >&6; }
4474 else
4475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476 $as_echo "no" >&6; }
4477 fi
4478 
4479 
4480   test -n "$DATE" && break
4481 done
4482 
4483 
4484   if test "x$DATE" = x; then
4485     if test "xdate" = x; then
4486       PROG_NAME=date
4487     else
4488       PROG_NAME=date
4489     fi
4490     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4491 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4492     as_fn_error $? "Cannot continue" "$LINENO" 5
4493   fi
4494 
4495 
4496 
4497   for ac_prog in gdiff diff
4498 do
4499   # Extract the first word of "$ac_prog", so it can be a program name with args.
4500 set dummy $ac_prog; ac_word=$2
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4502 $as_echo_n "checking for $ac_word... " >&6; }
4503 if ${ac_cv_path_DIFF+:} false; then :
4504   $as_echo_n "(cached) " >&6
4505 else
4506   case $DIFF in
4507   [\\/]* | ?:[\\/]*)
4508   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4509   ;;
4510   *)
4511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4512 for as_dir in $PATH
4513 do
4514   IFS=$as_save_IFS
4515   test -z "$as_dir" && as_dir=.
4516     for ac_exec_ext in '' $ac_executable_extensions; do
4517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4518     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4520     break 2
4521   fi
4522 done
4523   done
4524 IFS=$as_save_IFS
4525 
4526   ;;
4527 esac
4528 fi
4529 DIFF=$ac_cv_path_DIFF
4530 if test -n "$DIFF"; then
4531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4532 $as_echo "$DIFF" >&6; }
4533 else
4534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4535 $as_echo "no" >&6; }
4536 fi
4537 
4538 
4539   test -n "$DIFF" && break
4540 done
4541 
4542 
4543   if test "x$DIFF" = x; then
4544     if test "xgdiff diff" = x; then
4545       PROG_NAME=diff
4546     else
4547       PROG_NAME=gdiff diff
4548     fi
4549     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4550 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4551     as_fn_error $? "Cannot continue" "$LINENO" 5
4552   fi
4553 
4554 
4555 
4556   for ac_prog in dirname
4557 do
4558   # Extract the first word of "$ac_prog", so it can be a program name with args.
4559 set dummy $ac_prog; ac_word=$2
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4561 $as_echo_n "checking for $ac_word... " >&6; }
4562 if ${ac_cv_path_DIRNAME+:} false; then :
4563   $as_echo_n "(cached) " >&6
4564 else
4565   case $DIRNAME in
4566   [\\/]* | ?:[\\/]*)
4567   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4568   ;;
4569   *)
4570   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4571 for as_dir in $PATH
4572 do
4573   IFS=$as_save_IFS
4574   test -z "$as_dir" && as_dir=.
4575     for ac_exec_ext in '' $ac_executable_extensions; do
4576   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4577     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4578     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4579     break 2
4580   fi
4581 done
4582   done
4583 IFS=$as_save_IFS
4584 
4585   ;;
4586 esac
4587 fi
4588 DIRNAME=$ac_cv_path_DIRNAME
4589 if test -n "$DIRNAME"; then
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4591 $as_echo "$DIRNAME" >&6; }
4592 else
4593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4594 $as_echo "no" >&6; }
4595 fi
4596 
4597 
4598   test -n "$DIRNAME" && break
4599 done
4600 
4601 
4602   if test "x$DIRNAME" = x; then
4603     if test "xdirname" = x; then
4604       PROG_NAME=dirname
4605     else
4606       PROG_NAME=dirname
4607     fi
4608     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4609 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4610     as_fn_error $? "Cannot continue" "$LINENO" 5
4611   fi
4612 
4613 
4614 
4615   for ac_prog in echo
4616 do
4617   # Extract the first word of "$ac_prog", so it can be a program name with args.
4618 set dummy $ac_prog; ac_word=$2
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620 $as_echo_n "checking for $ac_word... " >&6; }
4621 if ${ac_cv_path_ECHO+:} false; then :
4622   $as_echo_n "(cached) " >&6
4623 else
4624   case $ECHO in
4625   [\\/]* | ?:[\\/]*)
4626   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4627   ;;
4628   *)
4629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630 for as_dir in $PATH
4631 do
4632   IFS=$as_save_IFS
4633   test -z "$as_dir" && as_dir=.
4634     for ac_exec_ext in '' $ac_executable_extensions; do
4635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4636     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638     break 2
4639   fi
4640 done
4641   done
4642 IFS=$as_save_IFS
4643 
4644   ;;
4645 esac
4646 fi
4647 ECHO=$ac_cv_path_ECHO
4648 if test -n "$ECHO"; then
4649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4650 $as_echo "$ECHO" >&6; }
4651 else
4652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4653 $as_echo "no" >&6; }
4654 fi
4655 
4656 
4657   test -n "$ECHO" && break
4658 done
4659 
4660 
4661   if test "x$ECHO" = x; then
4662     if test "xecho" = x; then
4663       PROG_NAME=echo
4664     else
4665       PROG_NAME=echo
4666     fi
4667     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4668 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4669     as_fn_error $? "Cannot continue" "$LINENO" 5
4670   fi
4671 
4672 
4673 
4674   for ac_prog in expr
4675 do
4676   # Extract the first word of "$ac_prog", so it can be a program name with args.
4677 set dummy $ac_prog; ac_word=$2
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4679 $as_echo_n "checking for $ac_word... " >&6; }
4680 if ${ac_cv_path_EXPR+:} false; then :
4681   $as_echo_n "(cached) " >&6
4682 else
4683   case $EXPR in
4684   [\\/]* | ?:[\\/]*)
4685   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4686   ;;
4687   *)
4688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4689 for as_dir in $PATH
4690 do
4691   IFS=$as_save_IFS
4692   test -z "$as_dir" && as_dir=.
4693     for ac_exec_ext in '' $ac_executable_extensions; do
4694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4695     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4697     break 2
4698   fi
4699 done
4700   done
4701 IFS=$as_save_IFS
4702 
4703   ;;
4704 esac
4705 fi
4706 EXPR=$ac_cv_path_EXPR
4707 if test -n "$EXPR"; then
4708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4709 $as_echo "$EXPR" >&6; }
4710 else
4711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4712 $as_echo "no" >&6; }
4713 fi
4714 
4715 
4716   test -n "$EXPR" && break
4717 done
4718 
4719 
4720   if test "x$EXPR" = x; then
4721     if test "xexpr" = x; then
4722       PROG_NAME=expr
4723     else
4724       PROG_NAME=expr
4725     fi
4726     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4727 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4728     as_fn_error $? "Cannot continue" "$LINENO" 5
4729   fi
4730 
4731 
4732 
4733   for ac_prog in file
4734 do
4735   # Extract the first word of "$ac_prog", so it can be a program name with args.
4736 set dummy $ac_prog; ac_word=$2
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738 $as_echo_n "checking for $ac_word... " >&6; }
4739 if ${ac_cv_path_FILE+:} false; then :
4740   $as_echo_n "(cached) " >&6
4741 else
4742   case $FILE in
4743   [\\/]* | ?:[\\/]*)
4744   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4745   ;;
4746   *)
4747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748 for as_dir in $PATH
4749 do
4750   IFS=$as_save_IFS
4751   test -z "$as_dir" && as_dir=.
4752     for ac_exec_ext in '' $ac_executable_extensions; do
4753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4754     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756     break 2
4757   fi
4758 done
4759   done
4760 IFS=$as_save_IFS
4761 
4762   ;;
4763 esac
4764 fi
4765 FILE=$ac_cv_path_FILE
4766 if test -n "$FILE"; then
4767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4768 $as_echo "$FILE" >&6; }
4769 else
4770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771 $as_echo "no" >&6; }
4772 fi
4773 
4774 
4775   test -n "$FILE" && break
4776 done
4777 
4778 
4779   if test "x$FILE" = x; then
4780     if test "xfile" = x; then
4781       PROG_NAME=file
4782     else
4783       PROG_NAME=file
4784     fi
4785     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4786 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4787     as_fn_error $? "Cannot continue" "$LINENO" 5
4788   fi
4789 
4790 
4791 
4792   for ac_prog in find
4793 do
4794   # Extract the first word of "$ac_prog", so it can be a program name with args.
4795 set dummy $ac_prog; ac_word=$2
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4797 $as_echo_n "checking for $ac_word... " >&6; }
4798 if ${ac_cv_path_FIND+:} false; then :
4799   $as_echo_n "(cached) " >&6
4800 else
4801   case $FIND in
4802   [\\/]* | ?:[\\/]*)
4803   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4804   ;;
4805   *)
4806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4807 for as_dir in $PATH
4808 do
4809   IFS=$as_save_IFS
4810   test -z "$as_dir" && as_dir=.
4811     for ac_exec_ext in '' $ac_executable_extensions; do
4812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4813     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4815     break 2
4816   fi
4817 done
4818   done
4819 IFS=$as_save_IFS
4820 
4821   ;;
4822 esac
4823 fi
4824 FIND=$ac_cv_path_FIND
4825 if test -n "$FIND"; then
4826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4827 $as_echo "$FIND" >&6; }
4828 else
4829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4830 $as_echo "no" >&6; }
4831 fi
4832 
4833 
4834   test -n "$FIND" && break
4835 done
4836 
4837 
4838   if test "x$FIND" = x; then
4839     if test "xfind" = x; then
4840       PROG_NAME=find
4841     else
4842       PROG_NAME=find
4843     fi
4844     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4845 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4846     as_fn_error $? "Cannot continue" "$LINENO" 5
4847   fi
4848 
4849 
4850 
4851   for ac_prog in head
4852 do
4853   # Extract the first word of "$ac_prog", so it can be a program name with args.
4854 set dummy $ac_prog; ac_word=$2
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4856 $as_echo_n "checking for $ac_word... " >&6; }
4857 if ${ac_cv_path_HEAD+:} false; then :
4858   $as_echo_n "(cached) " >&6
4859 else
4860   case $HEAD in
4861   [\\/]* | ?:[\\/]*)
4862   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4863   ;;
4864   *)
4865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4866 for as_dir in $PATH
4867 do
4868   IFS=$as_save_IFS
4869   test -z "$as_dir" && as_dir=.
4870     for ac_exec_ext in '' $ac_executable_extensions; do
4871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4872     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4874     break 2
4875   fi
4876 done
4877   done
4878 IFS=$as_save_IFS
4879 
4880   ;;
4881 esac
4882 fi
4883 HEAD=$ac_cv_path_HEAD
4884 if test -n "$HEAD"; then
4885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4886 $as_echo "$HEAD" >&6; }
4887 else
4888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4889 $as_echo "no" >&6; }
4890 fi
4891 
4892 
4893   test -n "$HEAD" && break
4894 done
4895 
4896 
4897   if test "x$HEAD" = x; then
4898     if test "xhead" = x; then
4899       PROG_NAME=head
4900     else
4901       PROG_NAME=head
4902     fi
4903     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4904 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4905     as_fn_error $? "Cannot continue" "$LINENO" 5
4906   fi
4907 
4908 
4909 
4910   for ac_prog in ln
4911 do
4912   # Extract the first word of "$ac_prog", so it can be a program name with args.
4913 set dummy $ac_prog; ac_word=$2
4914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915 $as_echo_n "checking for $ac_word... " >&6; }
4916 if ${ac_cv_path_LN+:} false; then :
4917   $as_echo_n "(cached) " >&6
4918 else
4919   case $LN in
4920   [\\/]* | ?:[\\/]*)
4921   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4922   ;;
4923   *)
4924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925 for as_dir in $PATH
4926 do
4927   IFS=$as_save_IFS
4928   test -z "$as_dir" && as_dir=.
4929     for ac_exec_ext in '' $ac_executable_extensions; do
4930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4931     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933     break 2
4934   fi
4935 done
4936   done
4937 IFS=$as_save_IFS
4938 
4939   ;;
4940 esac
4941 fi
4942 LN=$ac_cv_path_LN
4943 if test -n "$LN"; then
4944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4945 $as_echo "$LN" >&6; }
4946 else
4947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4948 $as_echo "no" >&6; }
4949 fi
4950 
4951 
4952   test -n "$LN" && break
4953 done
4954 
4955 
4956   if test "x$LN" = x; then
4957     if test "xln" = x; then
4958       PROG_NAME=ln
4959     else
4960       PROG_NAME=ln
4961     fi
4962     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4963 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4964     as_fn_error $? "Cannot continue" "$LINENO" 5
4965   fi
4966 
4967 
4968 
4969   for ac_prog in ls
4970 do
4971   # Extract the first word of "$ac_prog", so it can be a program name with args.
4972 set dummy $ac_prog; ac_word=$2
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4974 $as_echo_n "checking for $ac_word... " >&6; }
4975 if ${ac_cv_path_LS+:} false; then :
4976   $as_echo_n "(cached) " >&6
4977 else
4978   case $LS in
4979   [\\/]* | ?:[\\/]*)
4980   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4981   ;;
4982   *)
4983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4984 for as_dir in $PATH
4985 do
4986   IFS=$as_save_IFS
4987   test -z "$as_dir" && as_dir=.
4988     for ac_exec_ext in '' $ac_executable_extensions; do
4989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4990     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4992     break 2
4993   fi
4994 done
4995   done
4996 IFS=$as_save_IFS
4997 
4998   ;;
4999 esac
5000 fi
5001 LS=$ac_cv_path_LS
5002 if test -n "$LS"; then
5003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5004 $as_echo "$LS" >&6; }
5005 else
5006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5007 $as_echo "no" >&6; }
5008 fi
5009 
5010 
5011   test -n "$LS" && break
5012 done
5013 
5014 
5015   if test "x$LS" = x; then
5016     if test "xls" = x; then
5017       PROG_NAME=ls
5018     else
5019       PROG_NAME=ls
5020     fi
5021     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5022 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5023     as_fn_error $? "Cannot continue" "$LINENO" 5
5024   fi
5025 
5026 
5027 
5028   for ac_prog in mkdir
5029 do
5030   # Extract the first word of "$ac_prog", so it can be a program name with args.
5031 set dummy $ac_prog; ac_word=$2
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033 $as_echo_n "checking for $ac_word... " >&6; }
5034 if ${ac_cv_path_MKDIR+:} false; then :
5035   $as_echo_n "(cached) " >&6
5036 else
5037   case $MKDIR in
5038   [\\/]* | ?:[\\/]*)
5039   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5040   ;;
5041   *)
5042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5043 for as_dir in $PATH
5044 do
5045   IFS=$as_save_IFS
5046   test -z "$as_dir" && as_dir=.
5047     for ac_exec_ext in '' $ac_executable_extensions; do
5048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5049     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5051     break 2
5052   fi
5053 done
5054   done
5055 IFS=$as_save_IFS
5056 
5057   ;;
5058 esac
5059 fi
5060 MKDIR=$ac_cv_path_MKDIR
5061 if test -n "$MKDIR"; then
5062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5063 $as_echo "$MKDIR" >&6; }
5064 else
5065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5066 $as_echo "no" >&6; }
5067 fi
5068 
5069 
5070   test -n "$MKDIR" && break
5071 done
5072 
5073 
5074   if test "x$MKDIR" = x; then
5075     if test "xmkdir" = x; then
5076       PROG_NAME=mkdir
5077     else
5078       PROG_NAME=mkdir
5079     fi
5080     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5081 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5082     as_fn_error $? "Cannot continue" "$LINENO" 5
5083   fi
5084 
5085 
5086 
5087   for ac_prog in mktemp
5088 do
5089   # Extract the first word of "$ac_prog", so it can be a program name with args.
5090 set dummy $ac_prog; ac_word=$2
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5092 $as_echo_n "checking for $ac_word... " >&6; }
5093 if ${ac_cv_path_MKTEMP+:} false; then :
5094   $as_echo_n "(cached) " >&6
5095 else
5096   case $MKTEMP in
5097   [\\/]* | ?:[\\/]*)
5098   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5099   ;;
5100   *)
5101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102 for as_dir in $PATH
5103 do
5104   IFS=$as_save_IFS
5105   test -z "$as_dir" && as_dir=.
5106     for ac_exec_ext in '' $ac_executable_extensions; do
5107   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5108     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5109     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5110     break 2
5111   fi
5112 done
5113   done
5114 IFS=$as_save_IFS
5115 
5116   ;;
5117 esac
5118 fi
5119 MKTEMP=$ac_cv_path_MKTEMP
5120 if test -n "$MKTEMP"; then
5121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5122 $as_echo "$MKTEMP" >&6; }
5123 else
5124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5125 $as_echo "no" >&6; }
5126 fi
5127 
5128 
5129   test -n "$MKTEMP" && break
5130 done
5131 
5132 
5133   if test "x$MKTEMP" = x; then
5134     if test "xmktemp" = x; then
5135       PROG_NAME=mktemp
5136     else
5137       PROG_NAME=mktemp
5138     fi
5139     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5140 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5141     as_fn_error $? "Cannot continue" "$LINENO" 5
5142   fi
5143 
5144 
5145 
5146   for ac_prog in mv
5147 do
5148   # Extract the first word of "$ac_prog", so it can be a program name with args.
5149 set dummy $ac_prog; ac_word=$2
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5151 $as_echo_n "checking for $ac_word... " >&6; }
5152 if ${ac_cv_path_MV+:} false; then :
5153   $as_echo_n "(cached) " >&6
5154 else
5155   case $MV in
5156   [\\/]* | ?:[\\/]*)
5157   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5158   ;;
5159   *)
5160   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5161 for as_dir in $PATH
5162 do
5163   IFS=$as_save_IFS
5164   test -z "$as_dir" && as_dir=.
5165     for ac_exec_ext in '' $ac_executable_extensions; do
5166   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5167     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5168     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5169     break 2
5170   fi
5171 done
5172   done
5173 IFS=$as_save_IFS
5174 
5175   ;;
5176 esac
5177 fi
5178 MV=$ac_cv_path_MV
5179 if test -n "$MV"; then
5180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5181 $as_echo "$MV" >&6; }
5182 else
5183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5184 $as_echo "no" >&6; }
5185 fi
5186 
5187 
5188   test -n "$MV" && break
5189 done
5190 
5191 
5192   if test "x$MV" = x; then
5193     if test "xmv" = x; then
5194       PROG_NAME=mv
5195     else
5196       PROG_NAME=mv
5197     fi
5198     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5199 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5200     as_fn_error $? "Cannot continue" "$LINENO" 5
5201   fi
5202 
5203 
5204 
5205   for ac_prog in printf
5206 do
5207   # Extract the first word of "$ac_prog", so it can be a program name with args.
5208 set dummy $ac_prog; ac_word=$2
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5210 $as_echo_n "checking for $ac_word... " >&6; }
5211 if ${ac_cv_path_PRINTF+:} false; then :
5212   $as_echo_n "(cached) " >&6
5213 else
5214   case $PRINTF in
5215   [\\/]* | ?:[\\/]*)
5216   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5217   ;;
5218   *)
5219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5220 for as_dir in $PATH
5221 do
5222   IFS=$as_save_IFS
5223   test -z "$as_dir" && as_dir=.
5224     for ac_exec_ext in '' $ac_executable_extensions; do
5225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5226     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5228     break 2
5229   fi
5230 done
5231   done
5232 IFS=$as_save_IFS
5233 
5234   ;;
5235 esac
5236 fi
5237 PRINTF=$ac_cv_path_PRINTF
5238 if test -n "$PRINTF"; then
5239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5240 $as_echo "$PRINTF" >&6; }
5241 else
5242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5243 $as_echo "no" >&6; }
5244 fi
5245 
5246 
5247   test -n "$PRINTF" && break
5248 done
5249 
5250 
5251   if test "x$PRINTF" = x; then
5252     if test "xprintf" = x; then
5253       PROG_NAME=printf
5254     else
5255       PROG_NAME=printf
5256     fi
5257     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5258 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5259     as_fn_error $? "Cannot continue" "$LINENO" 5
5260   fi
5261 
5262 
5263 
5264   for ac_prog in rm
5265 do
5266   # Extract the first word of "$ac_prog", so it can be a program name with args.
5267 set dummy $ac_prog; ac_word=$2
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5269 $as_echo_n "checking for $ac_word... " >&6; }
5270 if ${ac_cv_path_RM+:} false; then :
5271   $as_echo_n "(cached) " >&6
5272 else
5273   case $RM in
5274   [\\/]* | ?:[\\/]*)
5275   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5276   ;;
5277   *)
5278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279 for as_dir in $PATH
5280 do
5281   IFS=$as_save_IFS
5282   test -z "$as_dir" && as_dir=.
5283     for ac_exec_ext in '' $ac_executable_extensions; do
5284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5285     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5287     break 2
5288   fi
5289 done
5290   done
5291 IFS=$as_save_IFS
5292 
5293   ;;
5294 esac
5295 fi
5296 RM=$ac_cv_path_RM
5297 if test -n "$RM"; then
5298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5299 $as_echo "$RM" >&6; }
5300 else
5301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5302 $as_echo "no" >&6; }
5303 fi
5304 
5305 
5306   test -n "$RM" && break
5307 done
5308 
5309 
5310   if test "x$RM" = x; then
5311     if test "xrm" = x; then
5312       PROG_NAME=rm
5313     else
5314       PROG_NAME=rm
5315     fi
5316     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5317 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5318     as_fn_error $? "Cannot continue" "$LINENO" 5
5319   fi
5320 
5321 
5322 
5323   for ac_prog in sh
5324 do
5325   # Extract the first word of "$ac_prog", so it can be a program name with args.
5326 set dummy $ac_prog; ac_word=$2
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5328 $as_echo_n "checking for $ac_word... " >&6; }
5329 if ${ac_cv_path_SH+:} false; then :
5330   $as_echo_n "(cached) " >&6
5331 else
5332   case $SH in
5333   [\\/]* | ?:[\\/]*)
5334   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5335   ;;
5336   *)
5337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5338 for as_dir in $PATH
5339 do
5340   IFS=$as_save_IFS
5341   test -z "$as_dir" && as_dir=.
5342     for ac_exec_ext in '' $ac_executable_extensions; do
5343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5344     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5346     break 2
5347   fi
5348 done
5349   done
5350 IFS=$as_save_IFS
5351 
5352   ;;
5353 esac
5354 fi
5355 SH=$ac_cv_path_SH
5356 if test -n "$SH"; then
5357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5358 $as_echo "$SH" >&6; }
5359 else
5360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361 $as_echo "no" >&6; }
5362 fi
5363 
5364 
5365   test -n "$SH" && break
5366 done
5367 
5368 
5369   if test "x$SH" = x; then
5370     if test "xsh" = x; then
5371       PROG_NAME=sh
5372     else
5373       PROG_NAME=sh
5374     fi
5375     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5376 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5377     as_fn_error $? "Cannot continue" "$LINENO" 5
5378   fi
5379 
5380 
5381 
5382   for ac_prog in sort
5383 do
5384   # Extract the first word of "$ac_prog", so it can be a program name with args.
5385 set dummy $ac_prog; ac_word=$2
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5387 $as_echo_n "checking for $ac_word... " >&6; }
5388 if ${ac_cv_path_SORT+:} false; then :
5389   $as_echo_n "(cached) " >&6
5390 else
5391   case $SORT in
5392   [\\/]* | ?:[\\/]*)
5393   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5394   ;;
5395   *)
5396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5397 for as_dir in $PATH
5398 do
5399   IFS=$as_save_IFS
5400   test -z "$as_dir" && as_dir=.
5401     for ac_exec_ext in '' $ac_executable_extensions; do
5402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5403     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5405     break 2
5406   fi
5407 done
5408   done
5409 IFS=$as_save_IFS
5410 
5411   ;;
5412 esac
5413 fi
5414 SORT=$ac_cv_path_SORT
5415 if test -n "$SORT"; then
5416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5417 $as_echo "$SORT" >&6; }
5418 else
5419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5420 $as_echo "no" >&6; }
5421 fi
5422 
5423 
5424   test -n "$SORT" && break
5425 done
5426 
5427 
5428   if test "x$SORT" = x; then
5429     if test "xsort" = x; then
5430       PROG_NAME=sort
5431     else
5432       PROG_NAME=sort
5433     fi
5434     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5435 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5436     as_fn_error $? "Cannot continue" "$LINENO" 5
5437   fi
5438 
5439 
5440 
5441   for ac_prog in tail
5442 do
5443   # Extract the first word of "$ac_prog", so it can be a program name with args.
5444 set dummy $ac_prog; ac_word=$2
5445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5446 $as_echo_n "checking for $ac_word... " >&6; }
5447 if ${ac_cv_path_TAIL+:} false; then :
5448   $as_echo_n "(cached) " >&6
5449 else
5450   case $TAIL in
5451   [\\/]* | ?:[\\/]*)
5452   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5453   ;;
5454   *)
5455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5456 for as_dir in $PATH
5457 do
5458   IFS=$as_save_IFS
5459   test -z "$as_dir" && as_dir=.
5460     for ac_exec_ext in '' $ac_executable_extensions; do
5461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5462     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5464     break 2
5465   fi
5466 done
5467   done
5468 IFS=$as_save_IFS
5469 
5470   ;;
5471 esac
5472 fi
5473 TAIL=$ac_cv_path_TAIL
5474 if test -n "$TAIL"; then
5475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5476 $as_echo "$TAIL" >&6; }
5477 else
5478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5479 $as_echo "no" >&6; }
5480 fi
5481 
5482 
5483   test -n "$TAIL" && break
5484 done
5485 
5486 
5487   if test "x$TAIL" = x; then
5488     if test "xtail" = x; then
5489       PROG_NAME=tail
5490     else
5491       PROG_NAME=tail
5492     fi
5493     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5494 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5495     as_fn_error $? "Cannot continue" "$LINENO" 5
5496   fi
5497 
5498 
5499 
5500   for ac_prog in tar
5501 do
5502   # Extract the first word of "$ac_prog", so it can be a program name with args.
5503 set dummy $ac_prog; ac_word=$2
5504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5505 $as_echo_n "checking for $ac_word... " >&6; }
5506 if ${ac_cv_path_TAR+:} false; then :
5507   $as_echo_n "(cached) " >&6
5508 else
5509   case $TAR in
5510   [\\/]* | ?:[\\/]*)
5511   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5512   ;;
5513   *)
5514   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515 for as_dir in $PATH
5516 do
5517   IFS=$as_save_IFS
5518   test -z "$as_dir" && as_dir=.
5519     for ac_exec_ext in '' $ac_executable_extensions; do
5520   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5521     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5522     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5523     break 2
5524   fi
5525 done
5526   done
5527 IFS=$as_save_IFS
5528 
5529   ;;
5530 esac
5531 fi
5532 TAR=$ac_cv_path_TAR
5533 if test -n "$TAR"; then
5534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5535 $as_echo "$TAR" >&6; }
5536 else
5537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5538 $as_echo "no" >&6; }
5539 fi
5540 
5541 
5542   test -n "$TAR" && break
5543 done
5544 
5545 
5546   if test "x$TAR" = x; then
5547     if test "xtar" = x; then
5548       PROG_NAME=tar
5549     else
5550       PROG_NAME=tar
5551     fi
5552     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5553 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5554     as_fn_error $? "Cannot continue" "$LINENO" 5
5555   fi
5556 
5557 
5558 
5559   for ac_prog in tee
5560 do
5561   # Extract the first word of "$ac_prog", so it can be a program name with args.
5562 set dummy $ac_prog; ac_word=$2
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5564 $as_echo_n "checking for $ac_word... " >&6; }
5565 if ${ac_cv_path_TEE+:} false; then :
5566   $as_echo_n "(cached) " >&6
5567 else
5568   case $TEE in
5569   [\\/]* | ?:[\\/]*)
5570   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5571   ;;
5572   *)
5573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5574 for as_dir in $PATH
5575 do
5576   IFS=$as_save_IFS
5577   test -z "$as_dir" && as_dir=.
5578     for ac_exec_ext in '' $ac_executable_extensions; do
5579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5580     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5582     break 2
5583   fi
5584 done
5585   done
5586 IFS=$as_save_IFS
5587 
5588   ;;
5589 esac
5590 fi
5591 TEE=$ac_cv_path_TEE
5592 if test -n "$TEE"; then
5593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5594 $as_echo "$TEE" >&6; }
5595 else
5596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5597 $as_echo "no" >&6; }
5598 fi
5599 
5600 
5601   test -n "$TEE" && break
5602 done
5603 
5604 
5605   if test "x$TEE" = x; then
5606     if test "xtee" = x; then
5607       PROG_NAME=tee
5608     else
5609       PROG_NAME=tee
5610     fi
5611     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5612 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5613     as_fn_error $? "Cannot continue" "$LINENO" 5
5614   fi
5615 
5616 
5617 
5618   for ac_prog in touch
5619 do
5620   # Extract the first word of "$ac_prog", so it can be a program name with args.
5621 set dummy $ac_prog; ac_word=$2
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5623 $as_echo_n "checking for $ac_word... " >&6; }
5624 if ${ac_cv_path_TOUCH+:} false; then :
5625   $as_echo_n "(cached) " >&6
5626 else
5627   case $TOUCH in
5628   [\\/]* | ?:[\\/]*)
5629   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5630   ;;
5631   *)
5632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5633 for as_dir in $PATH
5634 do
5635   IFS=$as_save_IFS
5636   test -z "$as_dir" && as_dir=.
5637     for ac_exec_ext in '' $ac_executable_extensions; do
5638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5639     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5641     break 2
5642   fi
5643 done
5644   done
5645 IFS=$as_save_IFS
5646 
5647   ;;
5648 esac
5649 fi
5650 TOUCH=$ac_cv_path_TOUCH
5651 if test -n "$TOUCH"; then
5652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5653 $as_echo "$TOUCH" >&6; }
5654 else
5655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5656 $as_echo "no" >&6; }
5657 fi
5658 
5659 
5660   test -n "$TOUCH" && break
5661 done
5662 
5663 
5664   if test "x$TOUCH" = x; then
5665     if test "xtouch" = x; then
5666       PROG_NAME=touch
5667     else
5668       PROG_NAME=touch
5669     fi
5670     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5671 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5672     as_fn_error $? "Cannot continue" "$LINENO" 5
5673   fi
5674 
5675 
5676 
5677   for ac_prog in tr
5678 do
5679   # Extract the first word of "$ac_prog", so it can be a program name with args.
5680 set dummy $ac_prog; ac_word=$2
5681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5682 $as_echo_n "checking for $ac_word... " >&6; }
5683 if ${ac_cv_path_TR+:} false; then :
5684   $as_echo_n "(cached) " >&6
5685 else
5686   case $TR in
5687   [\\/]* | ?:[\\/]*)
5688   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5689   ;;
5690   *)
5691   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5692 for as_dir in $PATH
5693 do
5694   IFS=$as_save_IFS
5695   test -z "$as_dir" && as_dir=.
5696     for ac_exec_ext in '' $ac_executable_extensions; do
5697   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5698     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5699     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5700     break 2
5701   fi
5702 done
5703   done
5704 IFS=$as_save_IFS
5705 
5706   ;;
5707 esac
5708 fi
5709 TR=$ac_cv_path_TR
5710 if test -n "$TR"; then
5711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5712 $as_echo "$TR" >&6; }
5713 else
5714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715 $as_echo "no" >&6; }
5716 fi
5717 
5718 
5719   test -n "$TR" && break
5720 done
5721 
5722 
5723   if test "x$TR" = x; then
5724     if test "xtr" = x; then
5725       PROG_NAME=tr
5726     else
5727       PROG_NAME=tr
5728     fi
5729     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5730 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5731     as_fn_error $? "Cannot continue" "$LINENO" 5
5732   fi
5733 
5734 
5735 
5736   for ac_prog in uname
5737 do
5738   # Extract the first word of "$ac_prog", so it can be a program name with args.
5739 set dummy $ac_prog; ac_word=$2
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5741 $as_echo_n "checking for $ac_word... " >&6; }
5742 if ${ac_cv_path_UNAME+:} false; then :
5743   $as_echo_n "(cached) " >&6
5744 else
5745   case $UNAME in
5746   [\\/]* | ?:[\\/]*)
5747   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5748   ;;
5749   *)
5750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751 for as_dir in $PATH
5752 do
5753   IFS=$as_save_IFS
5754   test -z "$as_dir" && as_dir=.
5755     for ac_exec_ext in '' $ac_executable_extensions; do
5756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5757     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5759     break 2
5760   fi
5761 done
5762   done
5763 IFS=$as_save_IFS
5764 
5765   ;;
5766 esac
5767 fi
5768 UNAME=$ac_cv_path_UNAME
5769 if test -n "$UNAME"; then
5770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5771 $as_echo "$UNAME" >&6; }
5772 else
5773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774 $as_echo "no" >&6; }
5775 fi
5776 
5777 
5778   test -n "$UNAME" && break
5779 done
5780 
5781 
5782   if test "x$UNAME" = x; then
5783     if test "xuname" = x; then
5784       PROG_NAME=uname
5785     else
5786       PROG_NAME=uname
5787     fi
5788     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5789 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5790     as_fn_error $? "Cannot continue" "$LINENO" 5
5791   fi
5792 
5793 
5794 
5795   for ac_prog in uniq
5796 do
5797   # Extract the first word of "$ac_prog", so it can be a program name with args.
5798 set dummy $ac_prog; ac_word=$2
5799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5800 $as_echo_n "checking for $ac_word... " >&6; }
5801 if ${ac_cv_path_UNIQ+:} false; then :
5802   $as_echo_n "(cached) " >&6
5803 else
5804   case $UNIQ in
5805   [\\/]* | ?:[\\/]*)
5806   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5807   ;;
5808   *)
5809   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810 for as_dir in $PATH
5811 do
5812   IFS=$as_save_IFS
5813   test -z "$as_dir" && as_dir=.
5814     for ac_exec_ext in '' $ac_executable_extensions; do
5815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5816     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818     break 2
5819   fi
5820 done
5821   done
5822 IFS=$as_save_IFS
5823 
5824   ;;
5825 esac
5826 fi
5827 UNIQ=$ac_cv_path_UNIQ
5828 if test -n "$UNIQ"; then
5829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5830 $as_echo "$UNIQ" >&6; }
5831 else
5832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833 $as_echo "no" >&6; }
5834 fi
5835 
5836 
5837   test -n "$UNIQ" && break
5838 done
5839 
5840 
5841   if test "x$UNIQ" = x; then
5842     if test "xuniq" = x; then
5843       PROG_NAME=uniq
5844     else
5845       PROG_NAME=uniq
5846     fi
5847     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5848 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5849     as_fn_error $? "Cannot continue" "$LINENO" 5
5850   fi
5851 
5852 
5853 
5854   for ac_prog in wc
5855 do
5856   # Extract the first word of "$ac_prog", so it can be a program name with args.
5857 set dummy $ac_prog; ac_word=$2
5858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5859 $as_echo_n "checking for $ac_word... " >&6; }
5860 if ${ac_cv_path_WC+:} false; then :
5861   $as_echo_n "(cached) " >&6
5862 else
5863   case $WC in
5864   [\\/]* | ?:[\\/]*)
5865   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5866   ;;
5867   *)
5868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5869 for as_dir in $PATH
5870 do
5871   IFS=$as_save_IFS
5872   test -z "$as_dir" && as_dir=.
5873     for ac_exec_ext in '' $ac_executable_extensions; do
5874   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5875     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5877     break 2
5878   fi
5879 done
5880   done
5881 IFS=$as_save_IFS
5882 
5883   ;;
5884 esac
5885 fi
5886 WC=$ac_cv_path_WC
5887 if test -n "$WC"; then
5888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5889 $as_echo "$WC" >&6; }
5890 else
5891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5892 $as_echo "no" >&6; }
5893 fi
5894 
5895 
5896   test -n "$WC" && break
5897 done
5898 
5899 
5900   if test "x$WC" = x; then
5901     if test "xwc" = x; then
5902       PROG_NAME=wc
5903     else
5904       PROG_NAME=wc
5905     fi
5906     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5907 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5908     as_fn_error $? "Cannot continue" "$LINENO" 5
5909   fi
5910 
5911 
5912 
5913   for ac_prog in which
5914 do
5915   # Extract the first word of "$ac_prog", so it can be a program name with args.
5916 set dummy $ac_prog; ac_word=$2
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5918 $as_echo_n "checking for $ac_word... " >&6; }
5919 if ${ac_cv_path_WHICH+:} false; then :
5920   $as_echo_n "(cached) " >&6
5921 else
5922   case $WHICH in
5923   [\\/]* | ?:[\\/]*)
5924   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5925   ;;
5926   *)
5927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5928 for as_dir in $PATH
5929 do
5930   IFS=$as_save_IFS
5931   test -z "$as_dir" && as_dir=.
5932     for ac_exec_ext in '' $ac_executable_extensions; do
5933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5934     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5936     break 2
5937   fi
5938 done
5939   done
5940 IFS=$as_save_IFS
5941 
5942   ;;
5943 esac
5944 fi
5945 WHICH=$ac_cv_path_WHICH
5946 if test -n "$WHICH"; then
5947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5948 $as_echo "$WHICH" >&6; }
5949 else
5950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951 $as_echo "no" >&6; }
5952 fi
5953 
5954 
5955   test -n "$WHICH" && break
5956 done
5957 
5958 
5959   if test "x$WHICH" = x; then
5960     if test "xwhich" = x; then
5961       PROG_NAME=which
5962     else
5963       PROG_NAME=which
5964     fi
5965     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5966 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5967     as_fn_error $? "Cannot continue" "$LINENO" 5
5968   fi
5969 
5970 
5971 
5972   for ac_prog in xargs
5973 do
5974   # Extract the first word of "$ac_prog", so it can be a program name with args.
5975 set dummy $ac_prog; ac_word=$2
5976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977 $as_echo_n "checking for $ac_word... " >&6; }
5978 if ${ac_cv_path_XARGS+:} false; then :
5979   $as_echo_n "(cached) " >&6
5980 else
5981   case $XARGS in
5982   [\\/]* | ?:[\\/]*)
5983   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5984   ;;
5985   *)
5986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987 for as_dir in $PATH
5988 do
5989   IFS=$as_save_IFS
5990   test -z "$as_dir" && as_dir=.
5991     for ac_exec_ext in '' $ac_executable_extensions; do
5992   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5993     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5994     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995     break 2
5996   fi
5997 done
5998   done
5999 IFS=$as_save_IFS
6000 
6001   ;;
6002 esac
6003 fi
6004 XARGS=$ac_cv_path_XARGS
6005 if test -n "$XARGS"; then
6006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6007 $as_echo "$XARGS" >&6; }
6008 else
6009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010 $as_echo "no" >&6; }
6011 fi
6012 
6013 
6014   test -n "$XARGS" && break
6015 done
6016 
6017 
6018   if test "x$XARGS" = x; then
6019     if test "xxargs" = x; then
6020       PROG_NAME=xargs
6021     else
6022       PROG_NAME=xargs
6023     fi
6024     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6025 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6026     as_fn_error $? "Cannot continue" "$LINENO" 5
6027   fi
6028 
6029 
6030 
6031   # Then required tools that require some special treatment.
6032   for ac_prog in gawk mawk nawk awk
6033 do
6034   # Extract the first word of "$ac_prog", so it can be a program name with args.
6035 set dummy $ac_prog; ac_word=$2
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037 $as_echo_n "checking for $ac_word... " >&6; }
6038 if ${ac_cv_prog_AWK+:} false; then :
6039   $as_echo_n "(cached) " >&6
6040 else
6041   if test -n "$AWK"; then
6042   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6043 else
6044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045 for as_dir in $PATH
6046 do
6047   IFS=$as_save_IFS
6048   test -z "$as_dir" && as_dir=.
6049     for ac_exec_ext in '' $ac_executable_extensions; do
6050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6051     ac_cv_prog_AWK="$ac_prog"
6052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053     break 2
6054   fi
6055 done
6056   done
6057 IFS=$as_save_IFS
6058 
6059 fi
6060 fi
6061 AWK=$ac_cv_prog_AWK
6062 if test -n "$AWK"; then
6063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6064 $as_echo "$AWK" >&6; }
6065 else
6066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6067 $as_echo "no" >&6; }
6068 fi
6069 
6070 
6071   test -n "$AWK" && break
6072 done
6073 
6074 
6075   if test "x$AWK" = x; then
6076     if test "x" = x; then
6077       PROG_NAME=awk
6078     else
6079       PROG_NAME=
6080     fi
6081     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6082 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6083     as_fn_error $? "Cannot continue" "$LINENO" 5
6084   fi
6085 
6086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6087 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6088 if ${ac_cv_path_GREP+:} false; then :
6089   $as_echo_n "(cached) " >&6
6090 else
6091   if test -z "$GREP"; then
6092   ac_path_GREP_found=false
6093   # Loop through the user's path and test for each of PROGNAME-LIST
6094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6096 do
6097   IFS=$as_save_IFS
6098   test -z "$as_dir" && as_dir=.
6099     for ac_prog in grep ggrep; do
6100     for ac_exec_ext in '' $ac_executable_extensions; do
6101       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6102       as_fn_executable_p "$ac_path_GREP" || continue
6103 # Check for GNU ac_path_GREP and select it if it is found.
6104   # Check for GNU $ac_path_GREP
6105 case `"$ac_path_GREP" --version 2>&1` in
6106 *GNU*)
6107   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6108 *)
6109   ac_count=0
6110   $as_echo_n 0123456789 >"conftest.in"
6111   while :
6112   do
6113     cat "conftest.in" "conftest.in" >"conftest.tmp"
6114     mv "conftest.tmp" "conftest.in"
6115     cp "conftest.in" "conftest.nl"
6116     $as_echo 'GREP' >> "conftest.nl"
6117     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6118     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6119     as_fn_arith $ac_count + 1 && ac_count=$as_val
6120     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6121       # Best one so far, save it but keep looking for a better one
6122       ac_cv_path_GREP="$ac_path_GREP"
6123       ac_path_GREP_max=$ac_count
6124     fi
6125     # 10*(2^10) chars as input seems more than enough
6126     test $ac_count -gt 10 && break
6127   done
6128   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6129 esac
6130 
6131       $ac_path_GREP_found && break 3
6132     done
6133   done
6134   done
6135 IFS=$as_save_IFS
6136   if test -z "$ac_cv_path_GREP"; then
6137     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6138   fi
6139 else
6140   ac_cv_path_GREP=$GREP
6141 fi
6142 
6143 fi
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6145 $as_echo "$ac_cv_path_GREP" >&6; }
6146  GREP="$ac_cv_path_GREP"
6147 
6148 
6149 
6150   if test "x$GREP" = x; then
6151     if test "x" = x; then
6152       PROG_NAME=grep
6153     else
6154       PROG_NAME=
6155     fi
6156     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6157 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6158     as_fn_error $? "Cannot continue" "$LINENO" 5
6159   fi
6160 
6161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6162 $as_echo_n "checking for egrep... " >&6; }
6163 if ${ac_cv_path_EGREP+:} false; then :
6164   $as_echo_n "(cached) " >&6
6165 else
6166   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6167    then ac_cv_path_EGREP="$GREP -E"
6168    else
6169      if test -z "$EGREP"; then
6170   ac_path_EGREP_found=false
6171   # Loop through the user's path and test for each of PROGNAME-LIST
6172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6174 do
6175   IFS=$as_save_IFS
6176   test -z "$as_dir" && as_dir=.
6177     for ac_prog in egrep; do
6178     for ac_exec_ext in '' $ac_executable_extensions; do
6179       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6180       as_fn_executable_p "$ac_path_EGREP" || continue
6181 # Check for GNU ac_path_EGREP and select it if it is found.
6182   # Check for GNU $ac_path_EGREP
6183 case `"$ac_path_EGREP" --version 2>&1` in
6184 *GNU*)
6185   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6186 *)
6187   ac_count=0
6188   $as_echo_n 0123456789 >"conftest.in"
6189   while :
6190   do
6191     cat "conftest.in" "conftest.in" >"conftest.tmp"
6192     mv "conftest.tmp" "conftest.in"
6193     cp "conftest.in" "conftest.nl"
6194     $as_echo 'EGREP' >> "conftest.nl"
6195     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6196     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6197     as_fn_arith $ac_count + 1 && ac_count=$as_val
6198     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6199       # Best one so far, save it but keep looking for a better one
6200       ac_cv_path_EGREP="$ac_path_EGREP"
6201       ac_path_EGREP_max=$ac_count
6202     fi
6203     # 10*(2^10) chars as input seems more than enough
6204     test $ac_count -gt 10 && break
6205   done
6206   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6207 esac
6208 
6209       $ac_path_EGREP_found && break 3
6210     done
6211   done
6212   done
6213 IFS=$as_save_IFS
6214   if test -z "$ac_cv_path_EGREP"; then
6215     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6216   fi
6217 else
6218   ac_cv_path_EGREP=$EGREP
6219 fi
6220 
6221    fi
6222 fi
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6224 $as_echo "$ac_cv_path_EGREP" >&6; }
6225  EGREP="$ac_cv_path_EGREP"
6226 
6227 
6228 
6229   if test "x$EGREP" = x; then
6230     if test "x" = x; then
6231       PROG_NAME=egrep
6232     else
6233       PROG_NAME=
6234     fi
6235     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6236 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6237     as_fn_error $? "Cannot continue" "$LINENO" 5
6238   fi
6239 
6240   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6241 $as_echo_n "checking for fgrep... " >&6; }
6242 if ${ac_cv_path_FGREP+:} false; then :
6243   $as_echo_n "(cached) " >&6
6244 else
6245   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6246    then ac_cv_path_FGREP="$GREP -F"
6247    else
6248      if test -z "$FGREP"; then
6249   ac_path_FGREP_found=false
6250   # Loop through the user's path and test for each of PROGNAME-LIST
6251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6253 do
6254   IFS=$as_save_IFS
6255   test -z "$as_dir" && as_dir=.
6256     for ac_prog in fgrep; do
6257     for ac_exec_ext in '' $ac_executable_extensions; do
6258       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6259       as_fn_executable_p "$ac_path_FGREP" || continue
6260 # Check for GNU ac_path_FGREP and select it if it is found.
6261   # Check for GNU $ac_path_FGREP
6262 case `"$ac_path_FGREP" --version 2>&1` in
6263 *GNU*)
6264   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6265 *)
6266   ac_count=0
6267   $as_echo_n 0123456789 >"conftest.in"
6268   while :
6269   do
6270     cat "conftest.in" "conftest.in" >"conftest.tmp"
6271     mv "conftest.tmp" "conftest.in"
6272     cp "conftest.in" "conftest.nl"
6273     $as_echo 'FGREP' >> "conftest.nl"
6274     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6275     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6276     as_fn_arith $ac_count + 1 && ac_count=$as_val
6277     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6278       # Best one so far, save it but keep looking for a better one
6279       ac_cv_path_FGREP="$ac_path_FGREP"
6280       ac_path_FGREP_max=$ac_count
6281     fi
6282     # 10*(2^10) chars as input seems more than enough
6283     test $ac_count -gt 10 && break
6284   done
6285   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6286 esac
6287 
6288       $ac_path_FGREP_found && break 3
6289     done
6290   done
6291   done
6292 IFS=$as_save_IFS
6293   if test -z "$ac_cv_path_FGREP"; then
6294     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6295   fi
6296 else
6297   ac_cv_path_FGREP=$FGREP
6298 fi
6299 
6300    fi
6301 fi
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6303 $as_echo "$ac_cv_path_FGREP" >&6; }
6304  FGREP="$ac_cv_path_FGREP"
6305 
6306 
6307 
6308   if test "x$FGREP" = x; then
6309     if test "x" = x; then
6310       PROG_NAME=fgrep
6311     else
6312       PROG_NAME=
6313     fi
6314     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6315 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6316     as_fn_error $? "Cannot continue" "$LINENO" 5
6317   fi
6318 
6319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6320 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6321 if ${ac_cv_path_SED+:} false; then :
6322   $as_echo_n "(cached) " >&6
6323 else
6324             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6325      for ac_i in 1 2 3 4 5 6 7; do
6326        ac_script="$ac_script$as_nl$ac_script"
6327      done
6328      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6329      { ac_script=; unset ac_script;}
6330      if test -z "$SED"; then
6331   ac_path_SED_found=false
6332   # Loop through the user's path and test for each of PROGNAME-LIST
6333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6334 for as_dir in $PATH
6335 do
6336   IFS=$as_save_IFS
6337   test -z "$as_dir" && as_dir=.
6338     for ac_prog in sed gsed; do
6339     for ac_exec_ext in '' $ac_executable_extensions; do
6340       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6341       as_fn_executable_p "$ac_path_SED" || continue
6342 # Check for GNU ac_path_SED and select it if it is found.
6343   # Check for GNU $ac_path_SED
6344 case `"$ac_path_SED" --version 2>&1` in
6345 *GNU*)
6346   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6347 *)
6348   ac_count=0
6349   $as_echo_n 0123456789 >"conftest.in"
6350   while :
6351   do
6352     cat "conftest.in" "conftest.in" >"conftest.tmp"
6353     mv "conftest.tmp" "conftest.in"
6354     cp "conftest.in" "conftest.nl"
6355     $as_echo '' >> "conftest.nl"
6356     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6357     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6358     as_fn_arith $ac_count + 1 && ac_count=$as_val
6359     if test $ac_count -gt ${ac_path_SED_max-0}; then
6360       # Best one so far, save it but keep looking for a better one
6361       ac_cv_path_SED="$ac_path_SED"
6362       ac_path_SED_max=$ac_count
6363     fi
6364     # 10*(2^10) chars as input seems more than enough
6365     test $ac_count -gt 10 && break
6366   done
6367   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6368 esac
6369 
6370       $ac_path_SED_found && break 3
6371     done
6372   done
6373   done
6374 IFS=$as_save_IFS
6375   if test -z "$ac_cv_path_SED"; then
6376     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6377   fi
6378 else
6379   ac_cv_path_SED=$SED
6380 fi
6381 
6382 fi
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6384 $as_echo "$ac_cv_path_SED" >&6; }
6385  SED="$ac_cv_path_SED"
6386   rm -f conftest.sed
6387 
6388 
6389   if test "x$SED" = x; then
6390     if test "x" = x; then
6391       PROG_NAME=sed
6392     else
6393       PROG_NAME=
6394     fi
6395     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6396 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6397     as_fn_error $? "Cannot continue" "$LINENO" 5
6398   fi
6399 
6400 
6401   for ac_prog in nawk gawk awk
6402 do
6403   # Extract the first word of "$ac_prog", so it can be a program name with args.
6404 set dummy $ac_prog; ac_word=$2
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6406 $as_echo_n "checking for $ac_word... " >&6; }
6407 if ${ac_cv_path_NAWK+:} false; then :
6408   $as_echo_n "(cached) " >&6
6409 else
6410   case $NAWK in
6411   [\\/]* | ?:[\\/]*)
6412   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6413   ;;
6414   *)
6415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6416 for as_dir in $PATH
6417 do
6418   IFS=$as_save_IFS
6419   test -z "$as_dir" && as_dir=.
6420     for ac_exec_ext in '' $ac_executable_extensions; do
6421   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6422     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6423     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6424     break 2
6425   fi
6426 done
6427   done
6428 IFS=$as_save_IFS
6429 
6430   ;;
6431 esac
6432 fi
6433 NAWK=$ac_cv_path_NAWK
6434 if test -n "$NAWK"; then
6435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6436 $as_echo "$NAWK" >&6; }
6437 else
6438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439 $as_echo "no" >&6; }
6440 fi
6441 
6442 
6443   test -n "$NAWK" && break
6444 done
6445 
6446 
6447   if test "x$NAWK" = x; then
6448     if test "x" = x; then
6449       PROG_NAME=nawk
6450     else
6451       PROG_NAME=
6452     fi
6453     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6454 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6455     as_fn_error $? "Cannot continue" "$LINENO" 5
6456   fi
6457 
6458 
6459   # Always force rm.
6460   RM="$RM -f"
6461 
6462   # pwd behaves differently on various platforms and some don't support the -L flag.
6463   # Always use the bash builtin pwd to get uniform behavior.
6464   THEPWDCMD=pwd
6465 
6466   # These are not required on all platforms
6467   # Extract the first word of "cygpath", so it can be a program name with args.
6468 set dummy cygpath; ac_word=$2
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6470 $as_echo_n "checking for $ac_word... " >&6; }
6471 if ${ac_cv_path_CYGPATH+:} false; then :
6472   $as_echo_n "(cached) " >&6
6473 else
6474   case $CYGPATH in
6475   [\\/]* | ?:[\\/]*)
6476   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6477   ;;
6478   *)
6479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480 for as_dir in $PATH
6481 do
6482   IFS=$as_save_IFS
6483   test -z "$as_dir" && as_dir=.
6484     for ac_exec_ext in '' $ac_executable_extensions; do
6485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6486     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6488     break 2
6489   fi
6490 done
6491   done
6492 IFS=$as_save_IFS
6493 
6494   ;;
6495 esac
6496 fi
6497 CYGPATH=$ac_cv_path_CYGPATH
6498 if test -n "$CYGPATH"; then
6499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6500 $as_echo "$CYGPATH" >&6; }
6501 else
6502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503 $as_echo "no" >&6; }
6504 fi
6505 
6506 
6507   # Extract the first word of "readlink", so it can be a program name with args.
6508 set dummy readlink; ac_word=$2
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6510 $as_echo_n "checking for $ac_word... " >&6; }
6511 if ${ac_cv_path_READLINK+:} false; then :
6512   $as_echo_n "(cached) " >&6
6513 else
6514   case $READLINK in
6515   [\\/]* | ?:[\\/]*)
6516   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6517   ;;
6518   *)
6519   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6520 for as_dir in $PATH
6521 do
6522   IFS=$as_save_IFS
6523   test -z "$as_dir" && as_dir=.
6524     for ac_exec_ext in '' $ac_executable_extensions; do
6525   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6526     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6527     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6528     break 2
6529   fi
6530 done
6531   done
6532 IFS=$as_save_IFS
6533 
6534   ;;
6535 esac
6536 fi
6537 READLINK=$ac_cv_path_READLINK
6538 if test -n "$READLINK"; then
6539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6540 $as_echo "$READLINK" >&6; }
6541 else
6542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6543 $as_echo "no" >&6; }
6544 fi
6545 
6546 
6547   # Extract the first word of "df", so it can be a program name with args.
6548 set dummy df; ac_word=$2
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6550 $as_echo_n "checking for $ac_word... " >&6; }
6551 if ${ac_cv_path_DF+:} false; then :
6552   $as_echo_n "(cached) " >&6
6553 else
6554   case $DF in
6555   [\\/]* | ?:[\\/]*)
6556   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6557   ;;
6558   *)
6559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6560 for as_dir in $PATH
6561 do
6562   IFS=$as_save_IFS
6563   test -z "$as_dir" && as_dir=.
6564     for ac_exec_ext in '' $ac_executable_extensions; do
6565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6566     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6568     break 2
6569   fi
6570 done
6571   done
6572 IFS=$as_save_IFS
6573 
6574   ;;
6575 esac
6576 fi
6577 DF=$ac_cv_path_DF
6578 if test -n "$DF"; then
6579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6580 $as_echo "$DF" >&6; }
6581 else
6582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583 $as_echo "no" >&6; }
6584 fi
6585 
6586 
6587   # Extract the first word of "SetFile", so it can be a program name with args.
6588 set dummy SetFile; ac_word=$2
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590 $as_echo_n "checking for $ac_word... " >&6; }
6591 if ${ac_cv_path_SETFILE+:} false; then :
6592   $as_echo_n "(cached) " >&6
6593 else
6594   case $SETFILE in
6595   [\\/]* | ?:[\\/]*)
6596   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6597   ;;
6598   *)
6599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600 for as_dir in $PATH
6601 do
6602   IFS=$as_save_IFS
6603   test -z "$as_dir" && as_dir=.
6604     for ac_exec_ext in '' $ac_executable_extensions; do
6605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608     break 2
6609   fi
6610 done
6611   done
6612 IFS=$as_save_IFS
6613 
6614   ;;
6615 esac
6616 fi
6617 SETFILE=$ac_cv_path_SETFILE
6618 if test -n "$SETFILE"; then
6619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6620 $as_echo "$SETFILE" >&6; }
6621 else
6622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623 $as_echo "no" >&6; }
6624 fi
6625 
6626 
6627 
6628 
6629 # Now we can determine OpenJDK build and target platforms. This is required to
6630 # have early on.
6631 # Make sure we can run config.sub.
6632 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6633   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6634 
6635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6636 $as_echo_n "checking build system type... " >&6; }
6637 if ${ac_cv_build+:} false; then :
6638   $as_echo_n "(cached) " >&6
6639 else
6640   ac_build_alias=$build_alias
6641 test "x$ac_build_alias" = x &&
6642   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6643 test "x$ac_build_alias" = x &&
6644   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6645 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6646   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6647 
6648 fi
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6650 $as_echo "$ac_cv_build" >&6; }
6651 case $ac_cv_build in
6652 *-*-*) ;;
6653 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6654 esac
6655 build=$ac_cv_build
6656 ac_save_IFS=$IFS; IFS='-'
6657 set x $ac_cv_build
6658 shift
6659 build_cpu=$1
6660 build_vendor=$2
6661 shift; shift
6662 # Remember, the first character of IFS is used to create $*,
6663 # except with old shells:
6664 build_os=$*
6665 IFS=$ac_save_IFS
6666 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6667 
6668 
6669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6670 $as_echo_n "checking host system type... " >&6; }
6671 if ${ac_cv_host+:} false; then :
6672   $as_echo_n "(cached) " >&6
6673 else
6674   if test "x$host_alias" = x; then
6675   ac_cv_host=$ac_cv_build
6676 else
6677   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6678     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6679 fi
6680 
6681 fi
6682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6683 $as_echo "$ac_cv_host" >&6; }
6684 case $ac_cv_host in
6685 *-*-*) ;;
6686 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6687 esac
6688 host=$ac_cv_host
6689 ac_save_IFS=$IFS; IFS='-'
6690 set x $ac_cv_host
6691 shift
6692 host_cpu=$1
6693 host_vendor=$2
6694 shift; shift
6695 # Remember, the first character of IFS is used to create $*,
6696 # except with old shells:
6697 host_os=$*
6698 IFS=$ac_save_IFS
6699 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6700 
6701 
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6703 $as_echo_n "checking target system type... " >&6; }
6704 if ${ac_cv_target+:} false; then :
6705   $as_echo_n "(cached) " >&6
6706 else
6707   if test "x$target_alias" = x; then
6708   ac_cv_target=$ac_cv_host
6709 else
6710   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6711     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6712 fi
6713 
6714 fi
6715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6716 $as_echo "$ac_cv_target" >&6; }
6717 case $ac_cv_target in
6718 *-*-*) ;;
6719 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6720 esac
6721 target=$ac_cv_target
6722 ac_save_IFS=$IFS; IFS='-'
6723 set x $ac_cv_target
6724 shift
6725 target_cpu=$1
6726 target_vendor=$2
6727 shift; shift
6728 # Remember, the first character of IFS is used to create $*,
6729 # except with old shells:
6730 target_os=$*
6731 IFS=$ac_save_IFS
6732 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6733 
6734 
6735 # The aliases save the names the user supplied, while $host etc.
6736 # will get canonicalized.
6737 test -n "$target_alias" &&
6738   test "$program_prefix$program_suffix$program_transform_name" = \
6739     NONENONEs,x,x, &&
6740   program_prefix=${target_alias}-
6741 
6742   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6743   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6744   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6745   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6746   # to use the configure naming style.
6747 
6748 
6749 
6750 
6751 
6752   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6753   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6754   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6755   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6756   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6757   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6758 
6759 
6760 
6761   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6762 
6763   case "$build_os" in
6764     *linux*)
6765       VAR_OS=linux
6766       VAR_OS_API=posix
6767       VAR_OS_ENV=linux
6768       ;;
6769     *solaris*)
6770       VAR_OS=solaris
6771       VAR_OS_API=posix
6772       VAR_OS_ENV=solaris
6773       ;;
6774     *darwin*)
6775       VAR_OS=macosx
6776       VAR_OS_API=posix
6777       VAR_OS_ENV=macosx
6778       ;;
6779     *bsd*)
6780       VAR_OS=bsd
6781       VAR_OS_API=posix
6782       VAR_OS_ENV=bsd
6783       ;;
6784     *cygwin*)
6785       VAR_OS=windows
6786       VAR_OS_API=winapi
6787       VAR_OS_ENV=windows.cygwin
6788       ;;
6789     *mingw*)
6790       VAR_OS=windows
6791       VAR_OS_API=winapi
6792       VAR_OS_ENV=windows.msys
6793       ;;
6794     *aix*)
6795       VAR_OS=aix
6796       VAR_OS_API=posix
6797       VAR_OS_ENV=aix
6798       ;;
6799     *)
6800       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6801       ;;
6802   esac
6803 
6804 
6805   # First argument is the cpu name from the trip/quad
6806   case "$build_cpu" in
6807     x86_64)
6808       VAR_CPU=x86_64
6809       VAR_CPU_ARCH=x86
6810       VAR_CPU_BITS=64
6811       VAR_CPU_ENDIAN=little
6812       ;;
6813     i?86)
6814       VAR_CPU=x86
6815       VAR_CPU_ARCH=x86
6816       VAR_CPU_BITS=32
6817       VAR_CPU_ENDIAN=little
6818       ;;
6819     arm*)
6820       VAR_CPU=arm
6821       VAR_CPU_ARCH=arm
6822       VAR_CPU_BITS=32
6823       VAR_CPU_ENDIAN=little
6824       ;;
6825     powerpc)
6826       VAR_CPU=ppc
6827       VAR_CPU_ARCH=ppc
6828       VAR_CPU_BITS=32
6829       VAR_CPU_ENDIAN=big
6830       ;;
6831     powerpc64)
6832       VAR_CPU=ppc64
6833       VAR_CPU_ARCH=ppc
6834       VAR_CPU_BITS=64
6835       VAR_CPU_ENDIAN=big
6836       ;;
6837     powerpc64le)
6838       VAR_CPU=ppc64
6839       VAR_CPU_ARCH=ppc
6840       VAR_CPU_BITS=64
6841       VAR_CPU_ENDIAN=little
6842       ;;
6843     s390)
6844       VAR_CPU=s390
6845       VAR_CPU_ARCH=s390
6846       VAR_CPU_BITS=32
6847       VAR_CPU_ENDIAN=big
6848       ;;
6849     s390x)
6850       VAR_CPU=s390x
6851       VAR_CPU_ARCH=s390
6852       VAR_CPU_BITS=64
6853       VAR_CPU_ENDIAN=big
6854       ;;
6855     sparc)
6856       VAR_CPU=sparc
6857       VAR_CPU_ARCH=sparc
6858       VAR_CPU_BITS=32
6859       VAR_CPU_ENDIAN=big
6860       ;;
6861     sparcv9)
6862       VAR_CPU=sparcv9
6863       VAR_CPU_ARCH=sparc
6864       VAR_CPU_BITS=64
6865       VAR_CPU_ENDIAN=big
6866       ;;
6867     *)
6868       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6869       ;;
6870   esac
6871 
6872   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6873   OPENJDK_BUILD_OS="$VAR_OS"
6874   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6875   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6876   OPENJDK_BUILD_CPU="$VAR_CPU"
6877   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6878   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6879   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6880 
6881 
6882 
6883 
6884 
6885 
6886 
6887   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6888 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6890 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6891 
6892   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6893 
6894   case "$host_os" in
6895     *linux*)
6896       VAR_OS=linux
6897       VAR_OS_API=posix
6898       VAR_OS_ENV=linux
6899       ;;
6900     *solaris*)
6901       VAR_OS=solaris
6902       VAR_OS_API=posix
6903       VAR_OS_ENV=solaris
6904       ;;
6905     *darwin*)
6906       VAR_OS=macosx
6907       VAR_OS_API=posix
6908       VAR_OS_ENV=macosx
6909       ;;
6910     *bsd*)
6911       VAR_OS=bsd
6912       VAR_OS_API=posix
6913       VAR_OS_ENV=bsd
6914       ;;
6915     *cygwin*)
6916       VAR_OS=windows
6917       VAR_OS_API=winapi
6918       VAR_OS_ENV=windows.cygwin
6919       ;;
6920     *mingw*)
6921       VAR_OS=windows
6922       VAR_OS_API=winapi
6923       VAR_OS_ENV=windows.msys
6924       ;;
6925     *aix*)
6926       VAR_OS=aix
6927       VAR_OS_API=posix
6928       VAR_OS_ENV=aix
6929       ;;
6930     *)
6931       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6932       ;;
6933   esac
6934 
6935 
6936   # First argument is the cpu name from the trip/quad
6937   case "$host_cpu" in
6938     x86_64)
6939       VAR_CPU=x86_64
6940       VAR_CPU_ARCH=x86
6941       VAR_CPU_BITS=64
6942       VAR_CPU_ENDIAN=little
6943       ;;
6944     i?86)
6945       VAR_CPU=x86
6946       VAR_CPU_ARCH=x86
6947       VAR_CPU_BITS=32
6948       VAR_CPU_ENDIAN=little
6949       ;;
6950     arm*)
6951       VAR_CPU=arm
6952       VAR_CPU_ARCH=arm
6953       VAR_CPU_BITS=32
6954       VAR_CPU_ENDIAN=little
6955       ;;
6956     powerpc)
6957       VAR_CPU=ppc
6958       VAR_CPU_ARCH=ppc
6959       VAR_CPU_BITS=32
6960       VAR_CPU_ENDIAN=big
6961       ;;
6962     powerpc64)
6963       VAR_CPU=ppc64
6964       VAR_CPU_ARCH=ppc
6965       VAR_CPU_BITS=64
6966       VAR_CPU_ENDIAN=big
6967       ;;
6968     powerpc64le)
6969       VAR_CPU=ppc64
6970       VAR_CPU_ARCH=ppc
6971       VAR_CPU_BITS=64
6972       VAR_CPU_ENDIAN=little
6973       ;;
6974     s390)
6975       VAR_CPU=s390
6976       VAR_CPU_ARCH=s390
6977       VAR_CPU_BITS=32
6978       VAR_CPU_ENDIAN=big
6979       ;;
6980     s390x)
6981       VAR_CPU=s390x
6982       VAR_CPU_ARCH=s390
6983       VAR_CPU_BITS=64
6984       VAR_CPU_ENDIAN=big
6985       ;;
6986     sparc)
6987       VAR_CPU=sparc
6988       VAR_CPU_ARCH=sparc
6989       VAR_CPU_BITS=32
6990       VAR_CPU_ENDIAN=big
6991       ;;
6992     sparcv9)
6993       VAR_CPU=sparcv9
6994       VAR_CPU_ARCH=sparc
6995       VAR_CPU_BITS=64
6996       VAR_CPU_ENDIAN=big
6997       ;;
6998     *)
6999       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
7000       ;;
7001   esac
7002 
7003   # ... and setup our own variables. (Do this explicitely to facilitate searching)
7004   OPENJDK_TARGET_OS="$VAR_OS"
7005   OPENJDK_TARGET_OS_API="$VAR_OS_API"
7006   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
7007   OPENJDK_TARGET_CPU="$VAR_CPU"
7008   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
7009   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
7010   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
7011 
7012 
7013 
7014 
7015 
7016 
7017 
7018   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7019 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7021 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7022 
7023 
7024 
7025 # Check whether --with-target-bits was given.
7026 if test "${with_target_bits+set}" = set; then :
7027   withval=$with_target_bits;
7028 fi
7029 
7030 
7031   # We have three types of compiles:
7032   # native  == normal compilation, target system == build system
7033   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7034   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7035   #
7036   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7037     # We're doing a proper cross-compilation
7038     COMPILE_TYPE="cross"
7039   else
7040     COMPILE_TYPE="native"
7041   fi
7042 
7043   if test "x$with_target_bits" != x; then
7044     if test "x$COMPILE_TYPE" = "xcross"; then
7045       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7046     fi
7047 
7048     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7049       # A reduced build is requested
7050       COMPILE_TYPE="reduced"
7051       OPENJDK_TARGET_CPU_BITS=32
7052       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7053         OPENJDK_TARGET_CPU=x86
7054       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7055         OPENJDK_TARGET_CPU=sparc
7056       else
7057         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7058       fi
7059     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7060       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
7061     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7062       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7063 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7064     else
7065       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7066     fi
7067   fi
7068 
7069 
7070   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7071 $as_echo_n "checking compilation type... " >&6; }
7072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7073 $as_echo "$COMPILE_TYPE" >&6; }
7074 
7075 
7076   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7077     REQUIRED_OS_NAME=SunOS
7078     REQUIRED_OS_VERSION=5.10
7079   fi
7080   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7081     REQUIRED_OS_NAME=Linux
7082     REQUIRED_OS_VERSION=2.6
7083   fi
7084   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7085     REQUIRED_OS_NAME=Windows
7086     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7087       REQUIRED_OS_VERSION=5.2
7088     else
7089       REQUIRED_OS_VERSION=5.1
7090     fi
7091   fi
7092   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7093     REQUIRED_OS_NAME=Darwin
7094     REQUIRED_OS_VERSION=11.2
7095   fi
7096 
7097 
7098 
7099 
7100 
7101   # Also store the legacy naming of the cpu.
7102   # Ie i586 and amd64 instead of x86 and x86_64
7103   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7104   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7105     OPENJDK_TARGET_CPU_LEGACY="i586"
7106   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7107     # On all platforms except MacOSX replace x86_64 with amd64.
7108     OPENJDK_TARGET_CPU_LEGACY="amd64"
7109   fi
7110 
7111 
7112   # And the second legacy naming of the cpu.
7113   # Ie i386 and amd64 instead of x86 and x86_64.
7114   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7115   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7116     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7117   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7118     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7119   fi
7120 
7121 
7122   # This is the name of the cpu (but using i386 and amd64 instead of
7123   # x86 and x86_64, respectively), preceeded by a /, to be used when
7124   # locating libraries. On macosx, it's empty, though.
7125   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7126   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7127     OPENJDK_TARGET_CPU_LIBDIR=""
7128   fi
7129 
7130 
7131   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7132   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7133   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7134   OPENJDK_TARGET_CPU_ISADIR=""
7135   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7136     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7137       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7138     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7139       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7140     fi
7141   fi
7142 
7143 
7144   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7145   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7146   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7147     # On linux only, we replace x86 with i386.
7148     OPENJDK_TARGET_CPU_OSARCH="i386"
7149   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7150     # On all platforms except macosx, we replace x86_64 with amd64.
7151     OPENJDK_TARGET_CPU_OSARCH="amd64"
7152   fi
7153 
7154 
7155   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7156   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7157     OPENJDK_TARGET_CPU_JLI="i386"
7158   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7159     # On all platforms except macosx, we replace x86_64 with amd64.
7160     OPENJDK_TARGET_CPU_JLI="amd64"
7161   fi
7162   # Now setup the -D flags for building libjli.
7163   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7164   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7165     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7166       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7167     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7168       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7169     fi
7170   fi
7171 
7172 
7173   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7174   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7175     OPENJDK_TARGET_OS_API_DIR="solaris"
7176   fi
7177   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7178     OPENJDK_TARGET_OS_API_DIR="windows"
7179   fi
7180 
7181 
7182   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7183       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7184   else
7185       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7186   fi
7187 
7188 
7189   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7190     A_LP64="LP64:="
7191     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7192     # unpack200.exe
7193     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7194       ADD_LP64="-D_LP64=1"
7195     fi
7196   fi
7197   LP64=$A_LP64
7198 
7199 
7200   if test "x$COMPILE_TYPE" = "xcross"; then
7201     # FIXME: ... or should this include reduced builds..?
7202     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7203   else
7204     DEFINE_CROSS_COMPILE_ARCH=""
7205   fi
7206 
7207 
7208   # ZERO_ARCHDEF is used to enable architecture-specific code
7209   case "${OPENJDK_TARGET_CPU}" in
7210     ppc*)    ZERO_ARCHDEF=PPC   ;;
7211     s390*)   ZERO_ARCHDEF=S390  ;;
7212     sparc*)  ZERO_ARCHDEF=SPARC ;;
7213     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7214     x86)     ZERO_ARCHDEF=IA32  ;;
7215     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7216   esac
7217 
7218 
7219 
7220 
7221 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7222 
7223   # Locate the directory of this script.
7224   SCRIPT="$0"
7225   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7226 
7227   # Where is the source? It is located two levels above the configure script.
7228   CURDIR="$PWD"
7229   cd "$AUTOCONF_DIR/../.."
7230   SRC_ROOT="`$THEPWDCMD -L`"
7231 
7232   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7233     PATH_SEP=";"
7234 
7235   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7236   if test $SRC_ROOT_LENGTH -gt 100; then
7237     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7238   fi
7239 
7240   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7241     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7242 $as_echo_n "checking cygwin release... " >&6; }
7243     CYGWIN_VERSION=`$UNAME -r`
7244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7245 $as_echo "$CYGWIN_VERSION" >&6; }
7246     WINDOWS_ENV_VENDOR='cygwin'
7247     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7248 
7249     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7250     if test "x$CYGWIN_VERSION_OK" = x; then
7251       { $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
7252 $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;}
7253       as_fn_error $? "Cannot continue" "$LINENO" 5
7254     fi
7255     if test "x$CYGPATH" = x; then
7256       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7257     fi
7258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7259 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7260     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7261     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7262     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7263     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7265 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7266     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7267     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7268     if test "x$test_cygdrive_prefix" = x; then
7269       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7270     fi
7271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7273 $as_echo_n "checking msys release... " >&6; }
7274     MSYS_VERSION=`$UNAME -r`
7275     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7276 $as_echo "$MSYS_VERSION" >&6; }
7277 
7278     WINDOWS_ENV_VENDOR='msys'
7279     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7280 
7281     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7282 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7283     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7284     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7285 
7286   windows_path="$MSYS_ROOT_PATH"
7287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7288     unix_path=`$CYGPATH -u "$windows_path"`
7289     MSYS_ROOT_PATH="$unix_path"
7290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7292     MSYS_ROOT_PATH="$unix_path"
7293   fi
7294 
7295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7296 $as_echo "$MSYS_ROOT_PATH" >&6; }
7297     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7298   else
7299     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7300   fi
7301 
7302   # Test if windows or unix (cygwin/msys) find is first in path.
7303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7304 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7305   FIND_BINARY_OUTPUT=`find --version 2>&1`
7306   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7307     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7308 $as_echo "unix style" >&6; }
7309   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7311 $as_echo "Windows" >&6; }
7312     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7313 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7314     { $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
7315 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7316     as_fn_error $? "Cannot continue" "$LINENO" 5
7317   else
7318     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7319 $as_echo "unknown" >&6; }
7320     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7321 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7322   fi
7323 
7324   else
7325     PATH_SEP=":"
7326   fi
7327 
7328 
7329 
7330   cd "$CURDIR"
7331 
7332 
7333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7334 
7335   # Input might be given as Windows format, start by converting to
7336   # unix format.
7337   path="$SRC_ROOT"
7338   new_path=`$CYGPATH -u "$path"`
7339 
7340   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7341   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7342   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7343   # "foo.exe" is OK but "foo" is an error.
7344   #
7345   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7346   # It is also a way to make sure we got the proper file name for the real test later on.
7347   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7348   if test "x$test_shortpath" = x; then
7349     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7350 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7351     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7352   fi
7353 
7354   # Call helper function which possibly converts this using DOS-style short mode.
7355   # If so, the updated path is stored in $new_path.
7356 
7357   input_path="$new_path"
7358   # Check if we need to convert this using DOS-style short mode. If the path
7359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7360   # take no chances and rewrite it.
7361   # Note: m4 eats our [], so we need to use [ and ] instead.
7362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7363   if test "x$has_forbidden_chars" != x; then
7364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7365     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7366     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7367     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7368       # Going to short mode and back again did indeed matter. Since short mode is
7369       # case insensitive, let's make it lowercase to improve readability.
7370       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7371       # Now convert it back to Unix-stile (cygpath)
7372       input_path=`$CYGPATH -u "$shortmode_path"`
7373       new_path="$input_path"
7374     fi
7375   fi
7376 
7377   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7378   if test "x$test_cygdrive_prefix" = x; then
7379     # As a simple fix, exclude /usr/bin since it's not a real path.
7380     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7381       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7382       # a path prefixed by /cygdrive for fixpath to work.
7383       new_path="$CYGWIN_ROOT_PATH$input_path"
7384     fi
7385   fi
7386 
7387 
7388   if test "x$path" != "x$new_path"; then
7389     SRC_ROOT="$new_path"
7390     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7391 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7392   fi
7393 
7394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7395 
7396   path="$SRC_ROOT"
7397   has_colon=`$ECHO $path | $GREP ^.:`
7398   new_path="$path"
7399   if test "x$has_colon" = x; then
7400     # Not in mixed or Windows style, start by that.
7401     new_path=`cmd //c echo $path`
7402   fi
7403 
7404 
7405   input_path="$new_path"
7406   # Check if we need to convert this using DOS-style short mode. If the path
7407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7408   # take no chances and rewrite it.
7409   # Note: m4 eats our [], so we need to use [ and ] instead.
7410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7411   if test "x$has_forbidden_chars" != x; then
7412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7413     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7414   fi
7415 
7416 
7417   windows_path="$new_path"
7418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7419     unix_path=`$CYGPATH -u "$windows_path"`
7420     new_path="$unix_path"
7421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7423     new_path="$unix_path"
7424   fi
7425 
7426   if test "x$path" != "x$new_path"; then
7427     SRC_ROOT="$new_path"
7428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7429 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7430   fi
7431 
7432   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7433   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7434 
7435   else
7436     # We're on a posix platform. Hooray! :)
7437     path="$SRC_ROOT"
7438     has_space=`$ECHO "$path" | $GREP " "`
7439     if test "x$has_space" != x; then
7440       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7441 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7442       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7443     fi
7444 
7445     # Use eval to expand a potential ~
7446     eval path="$path"
7447     if test ! -f "$path" && test ! -d "$path"; then
7448       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7449     fi
7450 
7451     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7452   fi
7453 
7454 
7455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7456 
7457   # Input might be given as Windows format, start by converting to
7458   # unix format.
7459   path="$CURDIR"
7460   new_path=`$CYGPATH -u "$path"`
7461 
7462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7465   # "foo.exe" is OK but "foo" is an error.
7466   #
7467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7468   # It is also a way to make sure we got the proper file name for the real test later on.
7469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7470   if test "x$test_shortpath" = x; then
7471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7472 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7473     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7474   fi
7475 
7476   # Call helper function which possibly converts this using DOS-style short mode.
7477   # If so, the updated path is stored in $new_path.
7478 
7479   input_path="$new_path"
7480   # Check if we need to convert this using DOS-style short mode. If the path
7481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7482   # take no chances and rewrite it.
7483   # Note: m4 eats our [], so we need to use [ and ] instead.
7484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7485   if test "x$has_forbidden_chars" != x; then
7486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7490       # Going to short mode and back again did indeed matter. Since short mode is
7491       # case insensitive, let's make it lowercase to improve readability.
7492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7493       # Now convert it back to Unix-stile (cygpath)
7494       input_path=`$CYGPATH -u "$shortmode_path"`
7495       new_path="$input_path"
7496     fi
7497   fi
7498 
7499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7500   if test "x$test_cygdrive_prefix" = x; then
7501     # As a simple fix, exclude /usr/bin since it's not a real path.
7502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7504       # a path prefixed by /cygdrive for fixpath to work.
7505       new_path="$CYGWIN_ROOT_PATH$input_path"
7506     fi
7507   fi
7508 
7509 
7510   if test "x$path" != "x$new_path"; then
7511     CURDIR="$new_path"
7512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7513 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7514   fi
7515 
7516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7517 
7518   path="$CURDIR"
7519   has_colon=`$ECHO $path | $GREP ^.:`
7520   new_path="$path"
7521   if test "x$has_colon" = x; then
7522     # Not in mixed or Windows style, start by that.
7523     new_path=`cmd //c echo $path`
7524   fi
7525 
7526 
7527   input_path="$new_path"
7528   # Check if we need to convert this using DOS-style short mode. If the path
7529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7530   # take no chances and rewrite it.
7531   # Note: m4 eats our [], so we need to use [ and ] instead.
7532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7533   if test "x$has_forbidden_chars" != x; then
7534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7536   fi
7537 
7538 
7539   windows_path="$new_path"
7540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7541     unix_path=`$CYGPATH -u "$windows_path"`
7542     new_path="$unix_path"
7543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7545     new_path="$unix_path"
7546   fi
7547 
7548   if test "x$path" != "x$new_path"; then
7549     CURDIR="$new_path"
7550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7551 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7552   fi
7553 
7554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7556 
7557   else
7558     # We're on a posix platform. Hooray! :)
7559     path="$CURDIR"
7560     has_space=`$ECHO "$path" | $GREP " "`
7561     if test "x$has_space" != x; then
7562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7563 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7564       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7565     fi
7566 
7567     # Use eval to expand a potential ~
7568     eval path="$path"
7569     if test ! -f "$path" && test ! -d "$path"; then
7570       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7571     fi
7572 
7573     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7574   fi
7575 
7576 
7577   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7578     # Add extra search paths on solaris for utilities like ar and as etc...
7579     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7580   fi
7581 
7582   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7583   # is not correct.
7584 
7585 # Check whether --with-sys-root was given.
7586 if test "${with_sys_root+set}" = set; then :
7587   withval=$with_sys_root;
7588 fi
7589 
7590 
7591   if test "x$with_sys_root" != x; then
7592     SYS_ROOT=$with_sys_root
7593   else
7594     SYS_ROOT=/
7595   fi
7596 
7597 
7598 
7599 # Check whether --with-tools-dir was given.
7600 if test "${with_tools_dir+set}" = set; then :
7601   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7602 
7603 fi
7604 
7605 
7606 
7607 # Check whether --with-devkit was given.
7608 if test "${with_devkit+set}" = set; then :
7609   withval=$with_devkit;
7610         if test "x$with_sys_root" != x; then
7611           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7612         fi
7613 
7614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7615 
7616   # Input might be given as Windows format, start by converting to
7617   # unix format.
7618   path="$with_devkit"
7619   new_path=`$CYGPATH -u "$path"`
7620 
7621   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7622   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7623   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7624   # "foo.exe" is OK but "foo" is an error.
7625   #
7626   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7627   # It is also a way to make sure we got the proper file name for the real test later on.
7628   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7629   if test "x$test_shortpath" = x; then
7630     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7631 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7632     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7633   fi
7634 
7635   # Call helper function which possibly converts this using DOS-style short mode.
7636   # If so, the updated path is stored in $new_path.
7637 
7638   input_path="$new_path"
7639   # Check if we need to convert this using DOS-style short mode. If the path
7640   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7641   # take no chances and rewrite it.
7642   # Note: m4 eats our [], so we need to use [ and ] instead.
7643   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7644   if test "x$has_forbidden_chars" != x; then
7645     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7646     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7647     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7648     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7649       # Going to short mode and back again did indeed matter. Since short mode is
7650       # case insensitive, let's make it lowercase to improve readability.
7651       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7652       # Now convert it back to Unix-stile (cygpath)
7653       input_path=`$CYGPATH -u "$shortmode_path"`
7654       new_path="$input_path"
7655     fi
7656   fi
7657 
7658   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7659   if test "x$test_cygdrive_prefix" = x; then
7660     # As a simple fix, exclude /usr/bin since it's not a real path.
7661     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7662       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7663       # a path prefixed by /cygdrive for fixpath to work.
7664       new_path="$CYGWIN_ROOT_PATH$input_path"
7665     fi
7666   fi
7667 
7668 
7669   if test "x$path" != "x$new_path"; then
7670     with_devkit="$new_path"
7671     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7672 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7673   fi
7674 
7675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7676 
7677   path="$with_devkit"
7678   has_colon=`$ECHO $path | $GREP ^.:`
7679   new_path="$path"
7680   if test "x$has_colon" = x; then
7681     # Not in mixed or Windows style, start by that.
7682     new_path=`cmd //c echo $path`
7683   fi
7684 
7685 
7686   input_path="$new_path"
7687   # Check if we need to convert this using DOS-style short mode. If the path
7688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7689   # take no chances and rewrite it.
7690   # Note: m4 eats our [], so we need to use [ and ] instead.
7691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7692   if test "x$has_forbidden_chars" != x; then
7693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7694     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7695   fi
7696 
7697 
7698   windows_path="$new_path"
7699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7700     unix_path=`$CYGPATH -u "$windows_path"`
7701     new_path="$unix_path"
7702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7703     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7704     new_path="$unix_path"
7705   fi
7706 
7707   if test "x$path" != "x$new_path"; then
7708     with_devkit="$new_path"
7709     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7710 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7711   fi
7712 
7713   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7714   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7715 
7716   else
7717     # We're on a posix platform. Hooray! :)
7718     path="$with_devkit"
7719     has_space=`$ECHO "$path" | $GREP " "`
7720     if test "x$has_space" != x; then
7721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7722 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7723       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7724     fi
7725 
7726     # Use eval to expand a potential ~
7727     eval path="$path"
7728     if test ! -f "$path" && test ! -d "$path"; then
7729       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7730     fi
7731 
7732     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7733   fi
7734 
7735 
7736   if test "x$TOOLS_DIR" = x; then
7737     TOOLS_DIR="$with_devkit/bin"
7738   else
7739     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7740   fi
7741 
7742         if test -d "$with_devkit/$host_alias/libc"; then
7743           SYS_ROOT=$with_devkit/$host_alias/libc
7744         elif test -d "$with_devkit/$host/sys-root"; then
7745           SYS_ROOT=$with_devkit/$host/sys-root
7746         fi
7747 
7748 fi
7749 
7750 
7751 
7752   # Setup default logging of stdout and stderr to build.log in the output root.
7753   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7754   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7755   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7756 
7757 
7758 
7759 
7760 
7761 # Check if it's a pure open build or if custom sources are to be used.
7762 
7763   # Check whether --enable-openjdk-only was given.
7764 if test "${enable_openjdk_only+set}" = set; then :
7765   enableval=$enable_openjdk_only;
7766 else
7767   enable_openjdk_only="no"
7768 fi
7769 
7770 
7771   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7772 $as_echo_n "checking for presence of closed sources... " >&6; }
7773   if test -d "$SRC_ROOT/jdk/src/closed"; then
7774     CLOSED_SOURCE_PRESENT=yes
7775   else
7776     CLOSED_SOURCE_PRESENT=no
7777   fi
7778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7779 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7780 
7781   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7782 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7783   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7785 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7786 
7787   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7788     OPENJDK=true
7789     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7790       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7791 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7792     fi
7793   else
7794     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7795       OPENJDK=true
7796     else
7797       OPENJDK=false
7798     fi
7799   fi
7800 
7801   if test "x$OPENJDK" = "xtrue"; then
7802     SET_OPENJDK="OPENJDK=true"
7803   fi
7804 
7805 
7806 
7807 
7808 # These are needed to be able to create a configuration name (and thus the output directory)
7809 
7810   ###############################################################################
7811   #
7812   # Check which variant of the JDK that we want to build.
7813   # Currently we have:
7814   #    normal:   standard edition
7815   # but the custom make system may add other variants
7816   #
7817   # Effectively the JDK variant gives a name to a specific set of
7818   # modules to compile into the JDK. In the future, these modules
7819   # might even be Jigsaw modules.
7820   #
7821   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7822 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7823 
7824 # Check whether --with-jdk-variant was given.
7825 if test "${with_jdk_variant+set}" = set; then :
7826   withval=$with_jdk_variant;
7827 fi
7828 
7829 
7830   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7831     JDK_VARIANT="normal"
7832   else
7833     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7834   fi
7835 
7836 
7837 
7838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7839 $as_echo "$JDK_VARIANT" >&6; }
7840 
7841 
7842 ###############################################################################
7843 #
7844 # Check which interpreter of the JVM we want to build.
7845 # Currently we have:
7846 #    template: Template interpreter (the default)
7847 #    cpp     : C++ interpreter
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7849 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7850 
7851 # Check whether --with-jvm-interpreter was given.
7852 if test "${with_jvm_interpreter+set}" = set; then :
7853   withval=$with_jvm_interpreter;
7854 fi
7855 
7856 
7857 if test "x$with_jvm_interpreter" = x; then
7858      with_jvm_interpreter="template"
7859 fi
7860 
7861 JVM_INTERPRETER="$with_jvm_interpreter"
7862 
7863 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7864    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7865 fi
7866 
7867 
7868 
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7870 $as_echo "$with_jvm_interpreter" >&6; }
7871 
7872 
7873 
7874   ###############################################################################
7875   #
7876   # Check which variants of the JVM that we want to build.
7877   # Currently we have:
7878   #    server: normal interpreter and a tiered C1/C2 compiler
7879   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7880   #    minimal1: reduced form of client with optional VM services and features stripped out
7881   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7882   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7883   #    zero: no machine code interpreter, no compiler
7884   #    zeroshark: zero interpreter and shark/llvm compiler backend
7885 #    core: interpreter only, no compiler (only works on some platforms)
7886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7887 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7888 
7889 # Check whether --with-jvm-variants was given.
7890 if test "${with_jvm_variants+set}" = set; then :
7891   withval=$with_jvm_variants;
7892 fi
7893 
7894 
7895   if test "x$with_jvm_variants" = x; then
7896     with_jvm_variants="server"
7897   fi
7898 
7899   JVM_VARIANTS=",$with_jvm_variants,"
7900   TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
7901 
7902   if test "x$TEST_VARIANTS" != "x,"; then
7903      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7904   fi
7905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7906 $as_echo "$with_jvm_variants" >&6; }
7907 
7908   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7909   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7910   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7911   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7912   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7913   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7914   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7915 
7916   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7917     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7918       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7919     fi
7920   fi
7921   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7922     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7923       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7924     fi
7925   fi
7926   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7927     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7928       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7929     fi
7930   fi
7931 
7932   # Replace the commas with AND for use in the build directory name.
7933   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
7934   COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
7935   if test "x$COUNT_VARIANTS" != "x,1"; then
7936     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7937   else
7938     BUILDING_MULTIPLE_JVM_VARIANTS=no
7939   fi
7940 
7941 
7942 
7943 
7944 
7945 
7946 
7947 
7948 
7949 
7950   INCLUDE_SA=true
7951   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7952     INCLUDE_SA=false
7953   fi
7954   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7955     INCLUDE_SA=false
7956   fi
7957   if test "x$VAR_CPU" = xppc64 ; then
7958     INCLUDE_SA=false
7959   fi
7960 
7961 
7962   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7963     MACOSX_UNIVERSAL="true"
7964   fi
7965 
7966 
7967 
7968 
7969   ###############################################################################
7970   #
7971   # Set the debug level
7972   #    release: no debug information, all optimizations, no asserts.
7973   #    fastdebug: debug information (-g), all optimizations, all asserts
7974   #    slowdebug: debug information (-g), no optimizations, all asserts
7975   #
7976   DEBUG_LEVEL="release"
7977   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7978 $as_echo_n "checking which debug level to use... " >&6; }
7979   # Check whether --enable-debug was given.
7980 if test "${enable_debug+set}" = set; then :
7981   enableval=$enable_debug;
7982         ENABLE_DEBUG="${enableval}"
7983         DEBUG_LEVEL="fastdebug"
7984 
7985 else
7986   ENABLE_DEBUG="no"
7987 fi
7988 
7989 
7990 
7991 # Check whether --with-debug-level was given.
7992 if test "${with_debug_level+set}" = set; then :
7993   withval=$with_debug_level;
7994         DEBUG_LEVEL="${withval}"
7995         if test "x$ENABLE_DEBUG" = xyes; then
7996           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7997         fi
7998 
7999 fi
8000 
8001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
8002 $as_echo "$DEBUG_LEVEL" >&6; }
8003 
8004   if test "x$DEBUG_LEVEL" != xrelease && \
8005       test "x$DEBUG_LEVEL" != xfastdebug && \
8006       test "x$DEBUG_LEVEL" != xslowdebug; then
8007     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
8008   fi
8009 
8010 
8011   ###############################################################################
8012   #
8013   # Setup legacy vars/targets and new vars to deal with different debug levels.
8014   #
8015 
8016   case $DEBUG_LEVEL in
8017     release )
8018       VARIANT="OPT"
8019       FASTDEBUG="false"
8020       DEBUG_CLASSFILES="false"
8021       BUILD_VARIANT_RELEASE=""
8022       HOTSPOT_DEBUG_LEVEL="product"
8023       HOTSPOT_EXPORT="product"
8024       ;;
8025     fastdebug )
8026       VARIANT="DBG"
8027       FASTDEBUG="true"
8028       DEBUG_CLASSFILES="true"
8029       BUILD_VARIANT_RELEASE="-fastdebug"
8030       HOTSPOT_DEBUG_LEVEL="fastdebug"
8031       HOTSPOT_EXPORT="fastdebug"
8032       ;;
8033     slowdebug )
8034       VARIANT="DBG"
8035       FASTDEBUG="false"
8036       DEBUG_CLASSFILES="true"
8037       BUILD_VARIANT_RELEASE="-debug"
8038       HOTSPOT_DEBUG_LEVEL="jvmg"
8039       HOTSPOT_EXPORT="debug"
8040       ;;
8041   esac
8042 
8043   #####
8044   # Generate the legacy makefile targets for hotspot.
8045   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8046   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8047   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8048   # But until then ...
8049   HOTSPOT_TARGET=""
8050 
8051   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8052     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8053   fi
8054 
8055   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8056     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8057   fi
8058 
8059   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8060     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8061   fi
8062 
8063   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8064     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8065   fi
8066 
8067   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8068     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8069   fi
8070 
8071   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8072     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8073   fi
8074 
8075   if test "x$JVM_VARIANT_CORE" = xtrue; then
8076     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8077   fi
8078 
8079   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8080 
8081   # On Macosx universal binaries are produced, but they only contain
8082   # 64 bit intel. This invalidates control of which jvms are built
8083   # from configure, but only server is valid anyway. Fix this
8084   # when hotspot makefiles are rewritten.
8085   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8086     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8087   fi
8088 
8089   #####
8090 
8091 
8092 
8093 
8094 
8095 
8096 
8097 
8098 # With basic setup done, call the custom early hook.
8099 
8100 
8101 # To properly create a configuration name, we need to have the OpenJDK target
8102 # and options (variants and debug level) parsed.
8103 
8104 
8105 
8106 # Check whether --with-conf-name was given.
8107 if test "${with_conf_name+set}" = set; then :
8108   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8109 fi
8110 
8111 
8112   # Test from where we are running configure, in or outside of src root.
8113   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8114       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8115       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
8116     # We are running configure from the src root.
8117     # Create a default ./build/target-variant-debuglevel output root.
8118     if test "x${CONF_NAME}" = x; then
8119       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8120     fi
8121     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8122     $MKDIR -p "$OUTPUT_ROOT"
8123     if test ! -d "$OUTPUT_ROOT"; then
8124       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8125     fi
8126   else
8127     # We are running configure from outside of the src dir.
8128     # Then use the current directory as output dir!
8129     # If configuration is situated in normal build directory, just use the build
8130     # directory name as configuration name, otherwise use the complete path.
8131     if test "x${CONF_NAME}" = x; then
8132       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8133     fi
8134     OUTPUT_ROOT="$CURDIR"
8135 
8136     # WARNING: This might be a bad thing to do. You need to be sure you want to
8137     # have a configuration in this directory. Do some sanity checks!
8138 
8139     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8140       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8141       # other files
8142       files_present=`$LS $OUTPUT_ROOT`
8143       # Configure has already touched config.log and confdefs.h in the current dir when this check
8144       # is performed.
8145       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8146       | $TR -d '\n'`
8147       if test "x$filtered_files" != x; then
8148         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8149 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8150         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8151 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8152         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8153 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8154         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8155 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8156         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8157 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8158         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8159 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8160         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8161 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8162         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8163       fi
8164     fi
8165   fi
8166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8167 $as_echo_n "checking what configuration name to use... " >&6; }
8168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8169 $as_echo "$CONF_NAME" >&6; }
8170 
8171 
8172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8173 
8174   # Input might be given as Windows format, start by converting to
8175   # unix format.
8176   path="$OUTPUT_ROOT"
8177   new_path=`$CYGPATH -u "$path"`
8178 
8179   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8180   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8181   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8182   # "foo.exe" is OK but "foo" is an error.
8183   #
8184   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8185   # It is also a way to make sure we got the proper file name for the real test later on.
8186   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8187   if test "x$test_shortpath" = x; then
8188     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8189 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8190     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8191   fi
8192 
8193   # Call helper function which possibly converts this using DOS-style short mode.
8194   # If so, the updated path is stored in $new_path.
8195 
8196   input_path="$new_path"
8197   # Check if we need to convert this using DOS-style short mode. If the path
8198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8199   # take no chances and rewrite it.
8200   # Note: m4 eats our [], so we need to use [ and ] instead.
8201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8202   if test "x$has_forbidden_chars" != x; then
8203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8204     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8205     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8206     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8207       # Going to short mode and back again did indeed matter. Since short mode is
8208       # case insensitive, let's make it lowercase to improve readability.
8209       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8210       # Now convert it back to Unix-stile (cygpath)
8211       input_path=`$CYGPATH -u "$shortmode_path"`
8212       new_path="$input_path"
8213     fi
8214   fi
8215 
8216   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8217   if test "x$test_cygdrive_prefix" = x; then
8218     # As a simple fix, exclude /usr/bin since it's not a real path.
8219     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8220       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8221       # a path prefixed by /cygdrive for fixpath to work.
8222       new_path="$CYGWIN_ROOT_PATH$input_path"
8223     fi
8224   fi
8225 
8226 
8227   if test "x$path" != "x$new_path"; then
8228     OUTPUT_ROOT="$new_path"
8229     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8230 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8231   fi
8232 
8233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8234 
8235   path="$OUTPUT_ROOT"
8236   has_colon=`$ECHO $path | $GREP ^.:`
8237   new_path="$path"
8238   if test "x$has_colon" = x; then
8239     # Not in mixed or Windows style, start by that.
8240     new_path=`cmd //c echo $path`
8241   fi
8242 
8243 
8244   input_path="$new_path"
8245   # Check if we need to convert this using DOS-style short mode. If the path
8246   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8247   # take no chances and rewrite it.
8248   # Note: m4 eats our [], so we need to use [ and ] instead.
8249   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8250   if test "x$has_forbidden_chars" != x; then
8251     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8252     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8253   fi
8254 
8255 
8256   windows_path="$new_path"
8257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8258     unix_path=`$CYGPATH -u "$windows_path"`
8259     new_path="$unix_path"
8260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8262     new_path="$unix_path"
8263   fi
8264 
8265   if test "x$path" != "x$new_path"; then
8266     OUTPUT_ROOT="$new_path"
8267     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8268 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8269   fi
8270 
8271   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8272   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8273 
8274   else
8275     # We're on a posix platform. Hooray! :)
8276     path="$OUTPUT_ROOT"
8277     has_space=`$ECHO "$path" | $GREP " "`
8278     if test "x$has_space" != x; then
8279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8280 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8281       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8282     fi
8283 
8284     # Use eval to expand a potential ~
8285     eval path="$path"
8286     if test ! -f "$path" && test ! -d "$path"; then
8287       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8288     fi
8289 
8290     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8291   fi
8292 
8293 
8294   SPEC=$OUTPUT_ROOT/spec.gmk
8295 
8296   CONF_NAME=$CONF_NAME
8297 
8298   OUTPUT_ROOT=$OUTPUT_ROOT
8299 
8300 
8301   # Most of the probed defines are put into config.h
8302   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8303 
8304   # The spec.gmk file contains all variables for the make system.
8305   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8306 
8307   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8308   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8309 
8310   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8311   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8312 
8313   # The compare.sh is used to compare the build output to other builds.
8314   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8315 
8316   # Spec.sh is currently used by compare-objects.sh
8317   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8318 
8319   # The generated Makefile knows where the spec.gmk is and where the source is.
8320   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8321   # which will look for generated configurations
8322   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8323 
8324 
8325   # Save the arguments given to us
8326   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8327 
8328 
8329 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8330 
8331   for ac_prog in apt-get yum port pkgutil pkgadd
8332 do
8333   # Extract the first word of "$ac_prog", so it can be a program name with args.
8334 set dummy $ac_prog; ac_word=$2
8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8336 $as_echo_n "checking for $ac_word... " >&6; }
8337 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8338   $as_echo_n "(cached) " >&6
8339 else
8340   if test -n "$PKGHANDLER"; then
8341   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8342 else
8343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8344 for as_dir in $PATH
8345 do
8346   IFS=$as_save_IFS
8347   test -z "$as_dir" && as_dir=.
8348     for ac_exec_ext in '' $ac_executable_extensions; do
8349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8350     ac_cv_prog_PKGHANDLER="$ac_prog"
8351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8352     break 2
8353   fi
8354 done
8355   done
8356 IFS=$as_save_IFS
8357 
8358 fi
8359 fi
8360 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8361 if test -n "$PKGHANDLER"; then
8362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8363 $as_echo "$PKGHANDLER" >&6; }
8364 else
8365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366 $as_echo "no" >&6; }
8367 fi
8368 
8369 
8370   test -n "$PKGHANDLER" && break
8371 done
8372 
8373 
8374 
8375 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8376 
8377 
8378   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8379   if test "x$MAKE" != x; then
8380     # User has supplied a make, test it.
8381     if test ! -f "$MAKE"; then
8382       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8383     fi
8384 
8385   MAKE_CANDIDATE=""$MAKE""
8386   DESCRIPTION="user supplied MAKE=$MAKE"
8387   if test "x$MAKE_CANDIDATE" != x; then
8388     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8389 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8390     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8391     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8392     if test "x$IS_GNU_MAKE" = x; then
8393       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8394 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8395     else
8396       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8397       if test "x$IS_MODERN_MAKE" = x; then
8398         { $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
8399 $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;}
8400       else
8401         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8402           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8403             MAKE_EXPECTED_ENV='cygwin'
8404           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8405             MAKE_EXPECTED_ENV='msys'
8406           else
8407             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8408           fi
8409           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8410           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8411         else
8412           # Not relevant for non-Windows
8413           IS_MAKE_CORRECT_ENV=true
8414         fi
8415         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8416           { $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
8417 $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;}
8418         else
8419           FOUND_MAKE=$MAKE_CANDIDATE
8420 
8421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8422 
8423   # First separate the path from the arguments. This will split at the first
8424   # space.
8425   complete="$FOUND_MAKE"
8426   path="${complete%% *}"
8427   tmp="$complete EOL"
8428   arguments="${tmp#* }"
8429 
8430   # Input might be given as Windows format, start by converting to
8431   # unix format.
8432   new_path=`$CYGPATH -u "$path"`
8433 
8434   # Now try to locate executable using which
8435   new_path=`$WHICH "$new_path" 2> /dev/null`
8436   # bat and cmd files are not always considered executable in cygwin causing which
8437   # to not find them
8438   if test "x$new_path" = x \
8439       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8440       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8441     new_path=`$CYGPATH -u "$path"`
8442   fi
8443   if test "x$new_path" = x; then
8444     # Oops. Which didn't find the executable.
8445     # The splitting of arguments from the executable at a space might have been incorrect,
8446     # since paths with space are more likely in Windows. Give it another try with the whole
8447     # argument.
8448     path="$complete"
8449     arguments="EOL"
8450     new_path=`$CYGPATH -u "$path"`
8451     new_path=`$WHICH "$new_path" 2> /dev/null`
8452     # bat and cmd files are not always considered executable in cygwin causing which
8453     # to not find them
8454     if test "x$new_path" = x \
8455         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8456         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8457       new_path=`$CYGPATH -u "$path"`
8458     fi
8459     if test "x$new_path" = x; then
8460       # It's still not found. Now this is an unrecoverable error.
8461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8462 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8463       has_space=`$ECHO "$complete" | $GREP " "`
8464       if test "x$has_space" != x; then
8465         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8466 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8467       fi
8468       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8469     fi
8470   fi
8471 
8472   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8473   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8474   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8475   # "foo.exe" is OK but "foo" is an error.
8476   #
8477   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8478   # It is also a way to make sure we got the proper file name for the real test later on.
8479   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8480   if test "x$test_shortpath" = x; then
8481     # Short path failed, file does not exist as specified.
8482     # Try adding .exe or .cmd
8483     if test -f "${new_path}.exe"; then
8484       input_to_shortpath="${new_path}.exe"
8485     elif test -f "${new_path}.cmd"; then
8486       input_to_shortpath="${new_path}.cmd"
8487     else
8488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8489 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8490       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8491 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8492       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8493     fi
8494   else
8495     input_to_shortpath="$new_path"
8496   fi
8497 
8498   # Call helper function which possibly converts this using DOS-style short mode.
8499   # If so, the updated path is stored in $new_path.
8500   new_path="$input_to_shortpath"
8501 
8502   input_path="$input_to_shortpath"
8503   # Check if we need to convert this using DOS-style short mode. If the path
8504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8505   # take no chances and rewrite it.
8506   # Note: m4 eats our [], so we need to use [ and ] instead.
8507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8508   if test "x$has_forbidden_chars" != x; then
8509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8513       # Going to short mode and back again did indeed matter. Since short mode is
8514       # case insensitive, let's make it lowercase to improve readability.
8515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8516       # Now convert it back to Unix-stile (cygpath)
8517       input_path=`$CYGPATH -u "$shortmode_path"`
8518       new_path="$input_path"
8519     fi
8520   fi
8521 
8522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8523   if test "x$test_cygdrive_prefix" = x; then
8524     # As a simple fix, exclude /usr/bin since it's not a real path.
8525     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8527       # a path prefixed by /cygdrive for fixpath to work.
8528       new_path="$CYGWIN_ROOT_PATH$input_path"
8529     fi
8530   fi
8531 
8532   # remove trailing .exe if any
8533   new_path="${new_path/%.exe/}"
8534 
8535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8536 
8537   # First separate the path from the arguments. This will split at the first
8538   # space.
8539   complete="$FOUND_MAKE"
8540   path="${complete%% *}"
8541   tmp="$complete EOL"
8542   arguments="${tmp#* }"
8543 
8544   # Input might be given as Windows format, start by converting to
8545   # unix format.
8546   new_path="$path"
8547 
8548   windows_path="$new_path"
8549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8550     unix_path=`$CYGPATH -u "$windows_path"`
8551     new_path="$unix_path"
8552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8554     new_path="$unix_path"
8555   fi
8556 
8557 
8558   # Now try to locate executable using which
8559   new_path=`$WHICH "$new_path" 2> /dev/null`
8560 
8561   if test "x$new_path" = x; then
8562     # Oops. Which didn't find the executable.
8563     # The splitting of arguments from the executable at a space might have been incorrect,
8564     # since paths with space are more likely in Windows. Give it another try with the whole
8565     # argument.
8566     path="$complete"
8567     arguments="EOL"
8568     new_path="$path"
8569 
8570   windows_path="$new_path"
8571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8572     unix_path=`$CYGPATH -u "$windows_path"`
8573     new_path="$unix_path"
8574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8576     new_path="$unix_path"
8577   fi
8578 
8579 
8580     new_path=`$WHICH "$new_path" 2> /dev/null`
8581 
8582     if test "x$new_path" = x; then
8583       # It's still not found. Now this is an unrecoverable error.
8584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8585 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8586       has_space=`$ECHO "$complete" | $GREP " "`
8587       if test "x$has_space" != x; then
8588         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8589 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8590       fi
8591       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8592     fi
8593   fi
8594 
8595   # Now new_path has a complete unix path to the binary
8596   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8597     # Keep paths in /bin as-is, but remove trailing .exe if any
8598     new_path="${new_path/%.exe/}"
8599     # Do not save /bin paths to all_fixpath_prefixes!
8600   else
8601     # Not in mixed or Windows style, start by that.
8602     new_path=`cmd //c echo $new_path`
8603 
8604   input_path="$new_path"
8605   # Check if we need to convert this using DOS-style short mode. If the path
8606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8607   # take no chances and rewrite it.
8608   # Note: m4 eats our [], so we need to use [ and ] instead.
8609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8610   if test "x$has_forbidden_chars" != x; then
8611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8612     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8613   fi
8614 
8615     # Output is in $new_path
8616 
8617   windows_path="$new_path"
8618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8619     unix_path=`$CYGPATH -u "$windows_path"`
8620     new_path="$unix_path"
8621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8623     new_path="$unix_path"
8624   fi
8625 
8626     # remove trailing .exe if any
8627     new_path="${new_path/%.exe/}"
8628 
8629     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8630     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8631   fi
8632 
8633   else
8634     # We're on a posix platform. Hooray! :)
8635     # First separate the path from the arguments. This will split at the first
8636     # space.
8637     complete="$FOUND_MAKE"
8638     path="${complete%% *}"
8639     tmp="$complete EOL"
8640     arguments="${tmp#* }"
8641 
8642     # Cannot rely on the command "which" here since it doesn't always work.
8643     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8644     if test -z "$is_absolute_path"; then
8645       # Path to executable is not absolute. Find it.
8646       IFS_save="$IFS"
8647       IFS=:
8648       for p in $PATH; do
8649         if test -f "$p/$path" && test -x "$p/$path"; then
8650           new_path="$p/$path"
8651           break
8652         fi
8653       done
8654       IFS="$IFS_save"
8655     else
8656       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8657 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8658       new_path="$path"
8659     fi
8660 
8661     if test "x$new_path" = x; then
8662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8663 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8664       has_space=`$ECHO "$complete" | $GREP " "`
8665       if test "x$has_space" != x; then
8666         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8667 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8668       fi
8669       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8670     fi
8671   fi
8672 
8673   # Now join together the path and the arguments once again
8674   if test "x$arguments" != xEOL; then
8675     new_complete="$new_path ${arguments% *}"
8676   else
8677     new_complete="$new_path"
8678   fi
8679 
8680   if test "x$complete" != "x$new_complete"; then
8681     FOUND_MAKE="$new_complete"
8682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8683 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8684   fi
8685 
8686         fi
8687       fi
8688     fi
8689   fi
8690 
8691     if test "x$FOUND_MAKE" = x; then
8692       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8693     fi
8694   else
8695     # Try our hardest to locate a correct version of GNU make
8696     for ac_prog in gmake
8697 do
8698   # Extract the first word of "$ac_prog", so it can be a program name with args.
8699 set dummy $ac_prog; ac_word=$2
8700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8701 $as_echo_n "checking for $ac_word... " >&6; }
8702 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8703   $as_echo_n "(cached) " >&6
8704 else
8705   case $CHECK_GMAKE in
8706   [\\/]* | ?:[\\/]*)
8707   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8708   ;;
8709   *)
8710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8711 for as_dir in $PATH
8712 do
8713   IFS=$as_save_IFS
8714   test -z "$as_dir" && as_dir=.
8715     for ac_exec_ext in '' $ac_executable_extensions; do
8716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8717     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8719     break 2
8720   fi
8721 done
8722   done
8723 IFS=$as_save_IFS
8724 
8725   ;;
8726 esac
8727 fi
8728 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8729 if test -n "$CHECK_GMAKE"; then
8730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8731 $as_echo "$CHECK_GMAKE" >&6; }
8732 else
8733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8734 $as_echo "no" >&6; }
8735 fi
8736 
8737 
8738   test -n "$CHECK_GMAKE" && break
8739 done
8740 
8741 
8742   MAKE_CANDIDATE=""$CHECK_GMAKE""
8743   DESCRIPTION="gmake in PATH"
8744   if test "x$MAKE_CANDIDATE" != x; then
8745     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8746 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8747     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8748     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8749     if test "x$IS_GNU_MAKE" = x; then
8750       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8751 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8752     else
8753       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8754       if test "x$IS_MODERN_MAKE" = x; then
8755         { $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
8756 $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;}
8757       else
8758         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8759           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8760             MAKE_EXPECTED_ENV='cygwin'
8761           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8762             MAKE_EXPECTED_ENV='msys'
8763           else
8764             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8765           fi
8766           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8767           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8768         else
8769           # Not relevant for non-Windows
8770           IS_MAKE_CORRECT_ENV=true
8771         fi
8772         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8773           { $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
8774 $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;}
8775         else
8776           FOUND_MAKE=$MAKE_CANDIDATE
8777 
8778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8779 
8780   # First separate the path from the arguments. This will split at the first
8781   # space.
8782   complete="$FOUND_MAKE"
8783   path="${complete%% *}"
8784   tmp="$complete EOL"
8785   arguments="${tmp#* }"
8786 
8787   # Input might be given as Windows format, start by converting to
8788   # unix format.
8789   new_path=`$CYGPATH -u "$path"`
8790 
8791   # Now try to locate executable using which
8792   new_path=`$WHICH "$new_path" 2> /dev/null`
8793   # bat and cmd files are not always considered executable in cygwin causing which
8794   # to not find them
8795   if test "x$new_path" = x \
8796       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8797       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8798     new_path=`$CYGPATH -u "$path"`
8799   fi
8800   if test "x$new_path" = x; then
8801     # Oops. Which didn't find the executable.
8802     # The splitting of arguments from the executable at a space might have been incorrect,
8803     # since paths with space are more likely in Windows. Give it another try with the whole
8804     # argument.
8805     path="$complete"
8806     arguments="EOL"
8807     new_path=`$CYGPATH -u "$path"`
8808     new_path=`$WHICH "$new_path" 2> /dev/null`
8809     # bat and cmd files are not always considered executable in cygwin causing which
8810     # to not find them
8811     if test "x$new_path" = x \
8812         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8813         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8814       new_path=`$CYGPATH -u "$path"`
8815     fi
8816     if test "x$new_path" = x; then
8817       # It's still not found. Now this is an unrecoverable error.
8818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8819 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8820       has_space=`$ECHO "$complete" | $GREP " "`
8821       if test "x$has_space" != x; then
8822         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8823 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8824       fi
8825       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8826     fi
8827   fi
8828 
8829   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8830   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8831   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8832   # "foo.exe" is OK but "foo" is an error.
8833   #
8834   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8835   # It is also a way to make sure we got the proper file name for the real test later on.
8836   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8837   if test "x$test_shortpath" = x; then
8838     # Short path failed, file does not exist as specified.
8839     # Try adding .exe or .cmd
8840     if test -f "${new_path}.exe"; then
8841       input_to_shortpath="${new_path}.exe"
8842     elif test -f "${new_path}.cmd"; then
8843       input_to_shortpath="${new_path}.cmd"
8844     else
8845       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8846 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8847       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8848 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8849       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8850     fi
8851   else
8852     input_to_shortpath="$new_path"
8853   fi
8854 
8855   # Call helper function which possibly converts this using DOS-style short mode.
8856   # If so, the updated path is stored in $new_path.
8857   new_path="$input_to_shortpath"
8858 
8859   input_path="$input_to_shortpath"
8860   # Check if we need to convert this using DOS-style short mode. If the path
8861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8862   # take no chances and rewrite it.
8863   # Note: m4 eats our [], so we need to use [ and ] instead.
8864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8865   if test "x$has_forbidden_chars" != x; then
8866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8867     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8868     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8869     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8870       # Going to short mode and back again did indeed matter. Since short mode is
8871       # case insensitive, let's make it lowercase to improve readability.
8872       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8873       # Now convert it back to Unix-stile (cygpath)
8874       input_path=`$CYGPATH -u "$shortmode_path"`
8875       new_path="$input_path"
8876     fi
8877   fi
8878 
8879   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8880   if test "x$test_cygdrive_prefix" = x; then
8881     # As a simple fix, exclude /usr/bin since it's not a real path.
8882     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8883       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8884       # a path prefixed by /cygdrive for fixpath to work.
8885       new_path="$CYGWIN_ROOT_PATH$input_path"
8886     fi
8887   fi
8888 
8889   # remove trailing .exe if any
8890   new_path="${new_path/%.exe/}"
8891 
8892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8893 
8894   # First separate the path from the arguments. This will split at the first
8895   # space.
8896   complete="$FOUND_MAKE"
8897   path="${complete%% *}"
8898   tmp="$complete EOL"
8899   arguments="${tmp#* }"
8900 
8901   # Input might be given as Windows format, start by converting to
8902   # unix format.
8903   new_path="$path"
8904 
8905   windows_path="$new_path"
8906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8907     unix_path=`$CYGPATH -u "$windows_path"`
8908     new_path="$unix_path"
8909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8911     new_path="$unix_path"
8912   fi
8913 
8914 
8915   # Now try to locate executable using which
8916   new_path=`$WHICH "$new_path" 2> /dev/null`
8917 
8918   if test "x$new_path" = x; then
8919     # Oops. Which didn't find the executable.
8920     # The splitting of arguments from the executable at a space might have been incorrect,
8921     # since paths with space are more likely in Windows. Give it another try with the whole
8922     # argument.
8923     path="$complete"
8924     arguments="EOL"
8925     new_path="$path"
8926 
8927   windows_path="$new_path"
8928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8929     unix_path=`$CYGPATH -u "$windows_path"`
8930     new_path="$unix_path"
8931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8933     new_path="$unix_path"
8934   fi
8935 
8936 
8937     new_path=`$WHICH "$new_path" 2> /dev/null`
8938 
8939     if test "x$new_path" = x; then
8940       # It's still not found. Now this is an unrecoverable error.
8941       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8942 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8943       has_space=`$ECHO "$complete" | $GREP " "`
8944       if test "x$has_space" != x; then
8945         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8946 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8947       fi
8948       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8949     fi
8950   fi
8951 
8952   # Now new_path has a complete unix path to the binary
8953   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8954     # Keep paths in /bin as-is, but remove trailing .exe if any
8955     new_path="${new_path/%.exe/}"
8956     # Do not save /bin paths to all_fixpath_prefixes!
8957   else
8958     # Not in mixed or Windows style, start by that.
8959     new_path=`cmd //c echo $new_path`
8960 
8961   input_path="$new_path"
8962   # Check if we need to convert this using DOS-style short mode. If the path
8963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8964   # take no chances and rewrite it.
8965   # Note: m4 eats our [], so we need to use [ and ] instead.
8966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8967   if test "x$has_forbidden_chars" != x; then
8968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8970   fi
8971 
8972     # Output is in $new_path
8973 
8974   windows_path="$new_path"
8975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8976     unix_path=`$CYGPATH -u "$windows_path"`
8977     new_path="$unix_path"
8978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8980     new_path="$unix_path"
8981   fi
8982 
8983     # remove trailing .exe if any
8984     new_path="${new_path/%.exe/}"
8985 
8986     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8987     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8988   fi
8989 
8990   else
8991     # We're on a posix platform. Hooray! :)
8992     # First separate the path from the arguments. This will split at the first
8993     # space.
8994     complete="$FOUND_MAKE"
8995     path="${complete%% *}"
8996     tmp="$complete EOL"
8997     arguments="${tmp#* }"
8998 
8999     # Cannot rely on the command "which" here since it doesn't always work.
9000     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9001     if test -z "$is_absolute_path"; then
9002       # Path to executable is not absolute. Find it.
9003       IFS_save="$IFS"
9004       IFS=:
9005       for p in $PATH; do
9006         if test -f "$p/$path" && test -x "$p/$path"; then
9007           new_path="$p/$path"
9008           break
9009         fi
9010       done
9011       IFS="$IFS_save"
9012     else
9013       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9014 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9015       new_path="$path"
9016     fi
9017 
9018     if test "x$new_path" = x; then
9019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9020 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9021       has_space=`$ECHO "$complete" | $GREP " "`
9022       if test "x$has_space" != x; then
9023         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9024 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9025       fi
9026       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9027     fi
9028   fi
9029 
9030   # Now join together the path and the arguments once again
9031   if test "x$arguments" != xEOL; then
9032     new_complete="$new_path ${arguments% *}"
9033   else
9034     new_complete="$new_path"
9035   fi
9036 
9037   if test "x$complete" != "x$new_complete"; then
9038     FOUND_MAKE="$new_complete"
9039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9040 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9041   fi
9042 
9043         fi
9044       fi
9045     fi
9046   fi
9047 
9048 
9049     if test "x$FOUND_MAKE" = x; then
9050       for ac_prog in make
9051 do
9052   # Extract the first word of "$ac_prog", so it can be a program name with args.
9053 set dummy $ac_prog; ac_word=$2
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9055 $as_echo_n "checking for $ac_word... " >&6; }
9056 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9057   $as_echo_n "(cached) " >&6
9058 else
9059   case $CHECK_MAKE in
9060   [\\/]* | ?:[\\/]*)
9061   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9062   ;;
9063   *)
9064   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9065 for as_dir in $PATH
9066 do
9067   IFS=$as_save_IFS
9068   test -z "$as_dir" && as_dir=.
9069     for ac_exec_ext in '' $ac_executable_extensions; do
9070   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9071     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9072     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9073     break 2
9074   fi
9075 done
9076   done
9077 IFS=$as_save_IFS
9078 
9079   ;;
9080 esac
9081 fi
9082 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9083 if test -n "$CHECK_MAKE"; then
9084   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9085 $as_echo "$CHECK_MAKE" >&6; }
9086 else
9087   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9088 $as_echo "no" >&6; }
9089 fi
9090 
9091 
9092   test -n "$CHECK_MAKE" && break
9093 done
9094 
9095 
9096   MAKE_CANDIDATE=""$CHECK_MAKE""
9097   DESCRIPTION="make in PATH"
9098   if test "x$MAKE_CANDIDATE" != x; then
9099     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9100 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9101     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9102     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9103     if test "x$IS_GNU_MAKE" = x; then
9104       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9105 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9106     else
9107       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9108       if test "x$IS_MODERN_MAKE" = x; then
9109         { $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
9110 $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;}
9111       else
9112         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9113           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9114             MAKE_EXPECTED_ENV='cygwin'
9115           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9116             MAKE_EXPECTED_ENV='msys'
9117           else
9118             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9119           fi
9120           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9121           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9122         else
9123           # Not relevant for non-Windows
9124           IS_MAKE_CORRECT_ENV=true
9125         fi
9126         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9127           { $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
9128 $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;}
9129         else
9130           FOUND_MAKE=$MAKE_CANDIDATE
9131 
9132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9133 
9134   # First separate the path from the arguments. This will split at the first
9135   # space.
9136   complete="$FOUND_MAKE"
9137   path="${complete%% *}"
9138   tmp="$complete EOL"
9139   arguments="${tmp#* }"
9140 
9141   # Input might be given as Windows format, start by converting to
9142   # unix format.
9143   new_path=`$CYGPATH -u "$path"`
9144 
9145   # Now try to locate executable using which
9146   new_path=`$WHICH "$new_path" 2> /dev/null`
9147   # bat and cmd files are not always considered executable in cygwin causing which
9148   # to not find them
9149   if test "x$new_path" = x \
9150       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9151       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9152     new_path=`$CYGPATH -u "$path"`
9153   fi
9154   if test "x$new_path" = x; then
9155     # Oops. Which didn't find the executable.
9156     # The splitting of arguments from the executable at a space might have been incorrect,
9157     # since paths with space are more likely in Windows. Give it another try with the whole
9158     # argument.
9159     path="$complete"
9160     arguments="EOL"
9161     new_path=`$CYGPATH -u "$path"`
9162     new_path=`$WHICH "$new_path" 2> /dev/null`
9163     # bat and cmd files are not always considered executable in cygwin causing which
9164     # to not find them
9165     if test "x$new_path" = x \
9166         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9167         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9168       new_path=`$CYGPATH -u "$path"`
9169     fi
9170     if test "x$new_path" = x; then
9171       # It's still not found. Now this is an unrecoverable error.
9172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9173 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9174       has_space=`$ECHO "$complete" | $GREP " "`
9175       if test "x$has_space" != x; then
9176         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9177 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9178       fi
9179       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9180     fi
9181   fi
9182 
9183   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9184   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9185   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9186   # "foo.exe" is OK but "foo" is an error.
9187   #
9188   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9189   # It is also a way to make sure we got the proper file name for the real test later on.
9190   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9191   if test "x$test_shortpath" = x; then
9192     # Short path failed, file does not exist as specified.
9193     # Try adding .exe or .cmd
9194     if test -f "${new_path}.exe"; then
9195       input_to_shortpath="${new_path}.exe"
9196     elif test -f "${new_path}.cmd"; then
9197       input_to_shortpath="${new_path}.cmd"
9198     else
9199       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9200 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9201       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9202 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9203       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9204     fi
9205   else
9206     input_to_shortpath="$new_path"
9207   fi
9208 
9209   # Call helper function which possibly converts this using DOS-style short mode.
9210   # If so, the updated path is stored in $new_path.
9211   new_path="$input_to_shortpath"
9212 
9213   input_path="$input_to_shortpath"
9214   # Check if we need to convert this using DOS-style short mode. If the path
9215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9216   # take no chances and rewrite it.
9217   # Note: m4 eats our [], so we need to use [ and ] instead.
9218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9219   if test "x$has_forbidden_chars" != x; then
9220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9221     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9222     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9223     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9224       # Going to short mode and back again did indeed matter. Since short mode is
9225       # case insensitive, let's make it lowercase to improve readability.
9226       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9227       # Now convert it back to Unix-stile (cygpath)
9228       input_path=`$CYGPATH -u "$shortmode_path"`
9229       new_path="$input_path"
9230     fi
9231   fi
9232 
9233   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9234   if test "x$test_cygdrive_prefix" = x; then
9235     # As a simple fix, exclude /usr/bin since it's not a real path.
9236     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9237       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9238       # a path prefixed by /cygdrive for fixpath to work.
9239       new_path="$CYGWIN_ROOT_PATH$input_path"
9240     fi
9241   fi
9242 
9243   # remove trailing .exe if any
9244   new_path="${new_path/%.exe/}"
9245 
9246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9247 
9248   # First separate the path from the arguments. This will split at the first
9249   # space.
9250   complete="$FOUND_MAKE"
9251   path="${complete%% *}"
9252   tmp="$complete EOL"
9253   arguments="${tmp#* }"
9254 
9255   # Input might be given as Windows format, start by converting to
9256   # unix format.
9257   new_path="$path"
9258 
9259   windows_path="$new_path"
9260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9261     unix_path=`$CYGPATH -u "$windows_path"`
9262     new_path="$unix_path"
9263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9265     new_path="$unix_path"
9266   fi
9267 
9268 
9269   # Now try to locate executable using which
9270   new_path=`$WHICH "$new_path" 2> /dev/null`
9271 
9272   if test "x$new_path" = x; then
9273     # Oops. Which didn't find the executable.
9274     # The splitting of arguments from the executable at a space might have been incorrect,
9275     # since paths with space are more likely in Windows. Give it another try with the whole
9276     # argument.
9277     path="$complete"
9278     arguments="EOL"
9279     new_path="$path"
9280 
9281   windows_path="$new_path"
9282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9283     unix_path=`$CYGPATH -u "$windows_path"`
9284     new_path="$unix_path"
9285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9287     new_path="$unix_path"
9288   fi
9289 
9290 
9291     new_path=`$WHICH "$new_path" 2> /dev/null`
9292 
9293     if test "x$new_path" = x; then
9294       # It's still not found. Now this is an unrecoverable error.
9295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9296 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9297       has_space=`$ECHO "$complete" | $GREP " "`
9298       if test "x$has_space" != x; then
9299         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9300 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9301       fi
9302       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9303     fi
9304   fi
9305 
9306   # Now new_path has a complete unix path to the binary
9307   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9308     # Keep paths in /bin as-is, but remove trailing .exe if any
9309     new_path="${new_path/%.exe/}"
9310     # Do not save /bin paths to all_fixpath_prefixes!
9311   else
9312     # Not in mixed or Windows style, start by that.
9313     new_path=`cmd //c echo $new_path`
9314 
9315   input_path="$new_path"
9316   # Check if we need to convert this using DOS-style short mode. If the path
9317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9318   # take no chances and rewrite it.
9319   # Note: m4 eats our [], so we need to use [ and ] instead.
9320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9321   if test "x$has_forbidden_chars" != x; then
9322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9323     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9324   fi
9325 
9326     # Output is in $new_path
9327 
9328   windows_path="$new_path"
9329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9330     unix_path=`$CYGPATH -u "$windows_path"`
9331     new_path="$unix_path"
9332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9334     new_path="$unix_path"
9335   fi
9336 
9337     # remove trailing .exe if any
9338     new_path="${new_path/%.exe/}"
9339 
9340     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9341     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9342   fi
9343 
9344   else
9345     # We're on a posix platform. Hooray! :)
9346     # First separate the path from the arguments. This will split at the first
9347     # space.
9348     complete="$FOUND_MAKE"
9349     path="${complete%% *}"
9350     tmp="$complete EOL"
9351     arguments="${tmp#* }"
9352 
9353     # Cannot rely on the command "which" here since it doesn't always work.
9354     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9355     if test -z "$is_absolute_path"; then
9356       # Path to executable is not absolute. Find it.
9357       IFS_save="$IFS"
9358       IFS=:
9359       for p in $PATH; do
9360         if test -f "$p/$path" && test -x "$p/$path"; then
9361           new_path="$p/$path"
9362           break
9363         fi
9364       done
9365       IFS="$IFS_save"
9366     else
9367       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9368 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9369       new_path="$path"
9370     fi
9371 
9372     if test "x$new_path" = x; then
9373       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9374 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9375       has_space=`$ECHO "$complete" | $GREP " "`
9376       if test "x$has_space" != x; then
9377         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9378 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9379       fi
9380       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9381     fi
9382   fi
9383 
9384   # Now join together the path and the arguments once again
9385   if test "x$arguments" != xEOL; then
9386     new_complete="$new_path ${arguments% *}"
9387   else
9388     new_complete="$new_path"
9389   fi
9390 
9391   if test "x$complete" != "x$new_complete"; then
9392     FOUND_MAKE="$new_complete"
9393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9394 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9395   fi
9396 
9397         fi
9398       fi
9399     fi
9400   fi
9401 
9402     fi
9403 
9404     if test "x$FOUND_MAKE" = x; then
9405       if test "x$TOOLS_DIR" != x; then
9406         # We have a tools-dir, check that as well before giving up.
9407         OLD_PATH=$PATH
9408         PATH=$TOOLS_DIR:$PATH
9409         for ac_prog in gmake
9410 do
9411   # Extract the first word of "$ac_prog", so it can be a program name with args.
9412 set dummy $ac_prog; ac_word=$2
9413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9414 $as_echo_n "checking for $ac_word... " >&6; }
9415 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9416   $as_echo_n "(cached) " >&6
9417 else
9418   case $CHECK_TOOLSDIR_GMAKE in
9419   [\\/]* | ?:[\\/]*)
9420   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9421   ;;
9422   *)
9423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9424 for as_dir in $PATH
9425 do
9426   IFS=$as_save_IFS
9427   test -z "$as_dir" && as_dir=.
9428     for ac_exec_ext in '' $ac_executable_extensions; do
9429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9430     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9432     break 2
9433   fi
9434 done
9435   done
9436 IFS=$as_save_IFS
9437 
9438   ;;
9439 esac
9440 fi
9441 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9442 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9444 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9445 else
9446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447 $as_echo "no" >&6; }
9448 fi
9449 
9450 
9451   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9452 done
9453 
9454 
9455   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9456   DESCRIPTION="gmake in tools-dir"
9457   if test "x$MAKE_CANDIDATE" != x; then
9458     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9459 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9460     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9461     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9462     if test "x$IS_GNU_MAKE" = x; then
9463       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9464 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9465     else
9466       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9467       if test "x$IS_MODERN_MAKE" = x; then
9468         { $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
9469 $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;}
9470       else
9471         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9472           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9473             MAKE_EXPECTED_ENV='cygwin'
9474           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9475             MAKE_EXPECTED_ENV='msys'
9476           else
9477             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9478           fi
9479           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9480           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9481         else
9482           # Not relevant for non-Windows
9483           IS_MAKE_CORRECT_ENV=true
9484         fi
9485         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9486           { $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
9487 $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;}
9488         else
9489           FOUND_MAKE=$MAKE_CANDIDATE
9490 
9491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9492 
9493   # First separate the path from the arguments. This will split at the first
9494   # space.
9495   complete="$FOUND_MAKE"
9496   path="${complete%% *}"
9497   tmp="$complete EOL"
9498   arguments="${tmp#* }"
9499 
9500   # Input might be given as Windows format, start by converting to
9501   # unix format.
9502   new_path=`$CYGPATH -u "$path"`
9503 
9504   # Now try to locate executable using which
9505   new_path=`$WHICH "$new_path" 2> /dev/null`
9506   # bat and cmd files are not always considered executable in cygwin causing which
9507   # to not find them
9508   if test "x$new_path" = x \
9509       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9510       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9511     new_path=`$CYGPATH -u "$path"`
9512   fi
9513   if test "x$new_path" = x; then
9514     # Oops. Which didn't find the executable.
9515     # The splitting of arguments from the executable at a space might have been incorrect,
9516     # since paths with space are more likely in Windows. Give it another try with the whole
9517     # argument.
9518     path="$complete"
9519     arguments="EOL"
9520     new_path=`$CYGPATH -u "$path"`
9521     new_path=`$WHICH "$new_path" 2> /dev/null`
9522     # bat and cmd files are not always considered executable in cygwin causing which
9523     # to not find them
9524     if test "x$new_path" = x \
9525         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9526         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9527       new_path=`$CYGPATH -u "$path"`
9528     fi
9529     if test "x$new_path" = x; then
9530       # It's still not found. Now this is an unrecoverable error.
9531       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9532 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9533       has_space=`$ECHO "$complete" | $GREP " "`
9534       if test "x$has_space" != x; then
9535         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9536 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9537       fi
9538       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9539     fi
9540   fi
9541 
9542   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9543   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9544   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9545   # "foo.exe" is OK but "foo" is an error.
9546   #
9547   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9548   # It is also a way to make sure we got the proper file name for the real test later on.
9549   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9550   if test "x$test_shortpath" = x; then
9551     # Short path failed, file does not exist as specified.
9552     # Try adding .exe or .cmd
9553     if test -f "${new_path}.exe"; then
9554       input_to_shortpath="${new_path}.exe"
9555     elif test -f "${new_path}.cmd"; then
9556       input_to_shortpath="${new_path}.cmd"
9557     else
9558       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9559 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9560       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9561 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9562       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9563     fi
9564   else
9565     input_to_shortpath="$new_path"
9566   fi
9567 
9568   # Call helper function which possibly converts this using DOS-style short mode.
9569   # If so, the updated path is stored in $new_path.
9570   new_path="$input_to_shortpath"
9571 
9572   input_path="$input_to_shortpath"
9573   # Check if we need to convert this using DOS-style short mode. If the path
9574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9575   # take no chances and rewrite it.
9576   # Note: m4 eats our [], so we need to use [ and ] instead.
9577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9578   if test "x$has_forbidden_chars" != x; then
9579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9580     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9581     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9582     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9583       # Going to short mode and back again did indeed matter. Since short mode is
9584       # case insensitive, let's make it lowercase to improve readability.
9585       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9586       # Now convert it back to Unix-stile (cygpath)
9587       input_path=`$CYGPATH -u "$shortmode_path"`
9588       new_path="$input_path"
9589     fi
9590   fi
9591 
9592   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9593   if test "x$test_cygdrive_prefix" = x; then
9594     # As a simple fix, exclude /usr/bin since it's not a real path.
9595     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9596       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9597       # a path prefixed by /cygdrive for fixpath to work.
9598       new_path="$CYGWIN_ROOT_PATH$input_path"
9599     fi
9600   fi
9601 
9602   # remove trailing .exe if any
9603   new_path="${new_path/%.exe/}"
9604 
9605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9606 
9607   # First separate the path from the arguments. This will split at the first
9608   # space.
9609   complete="$FOUND_MAKE"
9610   path="${complete%% *}"
9611   tmp="$complete EOL"
9612   arguments="${tmp#* }"
9613 
9614   # Input might be given as Windows format, start by converting to
9615   # unix format.
9616   new_path="$path"
9617 
9618   windows_path="$new_path"
9619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9620     unix_path=`$CYGPATH -u "$windows_path"`
9621     new_path="$unix_path"
9622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9624     new_path="$unix_path"
9625   fi
9626 
9627 
9628   # Now try to locate executable using which
9629   new_path=`$WHICH "$new_path" 2> /dev/null`
9630 
9631   if test "x$new_path" = x; then
9632     # Oops. Which didn't find the executable.
9633     # The splitting of arguments from the executable at a space might have been incorrect,
9634     # since paths with space are more likely in Windows. Give it another try with the whole
9635     # argument.
9636     path="$complete"
9637     arguments="EOL"
9638     new_path="$path"
9639 
9640   windows_path="$new_path"
9641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9642     unix_path=`$CYGPATH -u "$windows_path"`
9643     new_path="$unix_path"
9644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9646     new_path="$unix_path"
9647   fi
9648 
9649 
9650     new_path=`$WHICH "$new_path" 2> /dev/null`
9651 
9652     if test "x$new_path" = x; then
9653       # It's still not found. Now this is an unrecoverable error.
9654       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9655 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9656       has_space=`$ECHO "$complete" | $GREP " "`
9657       if test "x$has_space" != x; then
9658         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9659 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9660       fi
9661       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9662     fi
9663   fi
9664 
9665   # Now new_path has a complete unix path to the binary
9666   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9667     # Keep paths in /bin as-is, but remove trailing .exe if any
9668     new_path="${new_path/%.exe/}"
9669     # Do not save /bin paths to all_fixpath_prefixes!
9670   else
9671     # Not in mixed or Windows style, start by that.
9672     new_path=`cmd //c echo $new_path`
9673 
9674   input_path="$new_path"
9675   # Check if we need to convert this using DOS-style short mode. If the path
9676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9677   # take no chances and rewrite it.
9678   # Note: m4 eats our [], so we need to use [ and ] instead.
9679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9680   if test "x$has_forbidden_chars" != x; then
9681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9682     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9683   fi
9684 
9685     # Output is in $new_path
9686 
9687   windows_path="$new_path"
9688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9689     unix_path=`$CYGPATH -u "$windows_path"`
9690     new_path="$unix_path"
9691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9693     new_path="$unix_path"
9694   fi
9695 
9696     # remove trailing .exe if any
9697     new_path="${new_path/%.exe/}"
9698 
9699     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9700     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9701   fi
9702 
9703   else
9704     # We're on a posix platform. Hooray! :)
9705     # First separate the path from the arguments. This will split at the first
9706     # space.
9707     complete="$FOUND_MAKE"
9708     path="${complete%% *}"
9709     tmp="$complete EOL"
9710     arguments="${tmp#* }"
9711 
9712     # Cannot rely on the command "which" here since it doesn't always work.
9713     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9714     if test -z "$is_absolute_path"; then
9715       # Path to executable is not absolute. Find it.
9716       IFS_save="$IFS"
9717       IFS=:
9718       for p in $PATH; do
9719         if test -f "$p/$path" && test -x "$p/$path"; then
9720           new_path="$p/$path"
9721           break
9722         fi
9723       done
9724       IFS="$IFS_save"
9725     else
9726       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9727 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9728       new_path="$path"
9729     fi
9730 
9731     if test "x$new_path" = x; then
9732       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9733 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9734       has_space=`$ECHO "$complete" | $GREP " "`
9735       if test "x$has_space" != x; then
9736         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9737 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9738       fi
9739       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9740     fi
9741   fi
9742 
9743   # Now join together the path and the arguments once again
9744   if test "x$arguments" != xEOL; then
9745     new_complete="$new_path ${arguments% *}"
9746   else
9747     new_complete="$new_path"
9748   fi
9749 
9750   if test "x$complete" != "x$new_complete"; then
9751     FOUND_MAKE="$new_complete"
9752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9753 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9754   fi
9755 
9756         fi
9757       fi
9758     fi
9759   fi
9760 
9761         if test "x$FOUND_MAKE" = x; then
9762           for ac_prog in make
9763 do
9764   # Extract the first word of "$ac_prog", so it can be a program name with args.
9765 set dummy $ac_prog; ac_word=$2
9766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9767 $as_echo_n "checking for $ac_word... " >&6; }
9768 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9769   $as_echo_n "(cached) " >&6
9770 else
9771   case $CHECK_TOOLSDIR_MAKE in
9772   [\\/]* | ?:[\\/]*)
9773   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9774   ;;
9775   *)
9776   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9777 for as_dir in $PATH
9778 do
9779   IFS=$as_save_IFS
9780   test -z "$as_dir" && as_dir=.
9781     for ac_exec_ext in '' $ac_executable_extensions; do
9782   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9783     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9784     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9785     break 2
9786   fi
9787 done
9788   done
9789 IFS=$as_save_IFS
9790 
9791   ;;
9792 esac
9793 fi
9794 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9795 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9797 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9798 else
9799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800 $as_echo "no" >&6; }
9801 fi
9802 
9803 
9804   test -n "$CHECK_TOOLSDIR_MAKE" && break
9805 done
9806 
9807 
9808   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9809   DESCRIPTION="make in tools-dir"
9810   if test "x$MAKE_CANDIDATE" != x; then
9811     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9812 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9813     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9814     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9815     if test "x$IS_GNU_MAKE" = x; then
9816       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9817 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9818     else
9819       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9820       if test "x$IS_MODERN_MAKE" = x; then
9821         { $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
9822 $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;}
9823       else
9824         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9825           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9826             MAKE_EXPECTED_ENV='cygwin'
9827           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9828             MAKE_EXPECTED_ENV='msys'
9829           else
9830             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9831           fi
9832           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9833           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9834         else
9835           # Not relevant for non-Windows
9836           IS_MAKE_CORRECT_ENV=true
9837         fi
9838         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9839           { $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
9840 $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;}
9841         else
9842           FOUND_MAKE=$MAKE_CANDIDATE
9843 
9844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9845 
9846   # First separate the path from the arguments. This will split at the first
9847   # space.
9848   complete="$FOUND_MAKE"
9849   path="${complete%% *}"
9850   tmp="$complete EOL"
9851   arguments="${tmp#* }"
9852 
9853   # Input might be given as Windows format, start by converting to
9854   # unix format.
9855   new_path=`$CYGPATH -u "$path"`
9856 
9857   # Now try to locate executable using which
9858   new_path=`$WHICH "$new_path" 2> /dev/null`
9859   # bat and cmd files are not always considered executable in cygwin causing which
9860   # to not find them
9861   if test "x$new_path" = x \
9862       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9863       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9864     new_path=`$CYGPATH -u "$path"`
9865   fi
9866   if test "x$new_path" = x; then
9867     # Oops. Which didn't find the executable.
9868     # The splitting of arguments from the executable at a space might have been incorrect,
9869     # since paths with space are more likely in Windows. Give it another try with the whole
9870     # argument.
9871     path="$complete"
9872     arguments="EOL"
9873     new_path=`$CYGPATH -u "$path"`
9874     new_path=`$WHICH "$new_path" 2> /dev/null`
9875     # bat and cmd files are not always considered executable in cygwin causing which
9876     # to not find them
9877     if test "x$new_path" = x \
9878         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9879         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9880       new_path=`$CYGPATH -u "$path"`
9881     fi
9882     if test "x$new_path" = x; then
9883       # It's still not found. Now this is an unrecoverable error.
9884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9885 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9886       has_space=`$ECHO "$complete" | $GREP " "`
9887       if test "x$has_space" != x; then
9888         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9889 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9890       fi
9891       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9892     fi
9893   fi
9894 
9895   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9896   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9897   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9898   # "foo.exe" is OK but "foo" is an error.
9899   #
9900   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9901   # It is also a way to make sure we got the proper file name for the real test later on.
9902   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9903   if test "x$test_shortpath" = x; then
9904     # Short path failed, file does not exist as specified.
9905     # Try adding .exe or .cmd
9906     if test -f "${new_path}.exe"; then
9907       input_to_shortpath="${new_path}.exe"
9908     elif test -f "${new_path}.cmd"; then
9909       input_to_shortpath="${new_path}.cmd"
9910     else
9911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9912 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9913       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9914 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9915       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9916     fi
9917   else
9918     input_to_shortpath="$new_path"
9919   fi
9920 
9921   # Call helper function which possibly converts this using DOS-style short mode.
9922   # If so, the updated path is stored in $new_path.
9923   new_path="$input_to_shortpath"
9924 
9925   input_path="$input_to_shortpath"
9926   # Check if we need to convert this using DOS-style short mode. If the path
9927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9928   # take no chances and rewrite it.
9929   # Note: m4 eats our [], so we need to use [ and ] instead.
9930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9931   if test "x$has_forbidden_chars" != x; then
9932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9933     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9934     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9935     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9936       # Going to short mode and back again did indeed matter. Since short mode is
9937       # case insensitive, let's make it lowercase to improve readability.
9938       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9939       # Now convert it back to Unix-stile (cygpath)
9940       input_path=`$CYGPATH -u "$shortmode_path"`
9941       new_path="$input_path"
9942     fi
9943   fi
9944 
9945   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9946   if test "x$test_cygdrive_prefix" = x; then
9947     # As a simple fix, exclude /usr/bin since it's not a real path.
9948     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9949       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9950       # a path prefixed by /cygdrive for fixpath to work.
9951       new_path="$CYGWIN_ROOT_PATH$input_path"
9952     fi
9953   fi
9954 
9955   # remove trailing .exe if any
9956   new_path="${new_path/%.exe/}"
9957 
9958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9959 
9960   # First separate the path from the arguments. This will split at the first
9961   # space.
9962   complete="$FOUND_MAKE"
9963   path="${complete%% *}"
9964   tmp="$complete EOL"
9965   arguments="${tmp#* }"
9966 
9967   # Input might be given as Windows format, start by converting to
9968   # unix format.
9969   new_path="$path"
9970 
9971   windows_path="$new_path"
9972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9973     unix_path=`$CYGPATH -u "$windows_path"`
9974     new_path="$unix_path"
9975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9977     new_path="$unix_path"
9978   fi
9979 
9980 
9981   # Now try to locate executable using which
9982   new_path=`$WHICH "$new_path" 2> /dev/null`
9983 
9984   if test "x$new_path" = x; then
9985     # Oops. Which didn't find the executable.
9986     # The splitting of arguments from the executable at a space might have been incorrect,
9987     # since paths with space are more likely in Windows. Give it another try with the whole
9988     # argument.
9989     path="$complete"
9990     arguments="EOL"
9991     new_path="$path"
9992 
9993   windows_path="$new_path"
9994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9995     unix_path=`$CYGPATH -u "$windows_path"`
9996     new_path="$unix_path"
9997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9999     new_path="$unix_path"
10000   fi
10001 
10002 
10003     new_path=`$WHICH "$new_path" 2> /dev/null`
10004 
10005     if test "x$new_path" = x; then
10006       # It's still not found. Now this is an unrecoverable error.
10007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10008 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10009       has_space=`$ECHO "$complete" | $GREP " "`
10010       if test "x$has_space" != x; then
10011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
10012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
10013       fi
10014       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10015     fi
10016   fi
10017 
10018   # Now new_path has a complete unix path to the binary
10019   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10020     # Keep paths in /bin as-is, but remove trailing .exe if any
10021     new_path="${new_path/%.exe/}"
10022     # Do not save /bin paths to all_fixpath_prefixes!
10023   else
10024     # Not in mixed or Windows style, start by that.
10025     new_path=`cmd //c echo $new_path`
10026 
10027   input_path="$new_path"
10028   # Check if we need to convert this using DOS-style short mode. If the path
10029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10030   # take no chances and rewrite it.
10031   # Note: m4 eats our [], so we need to use [ and ] instead.
10032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10033   if test "x$has_forbidden_chars" != x; then
10034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10036   fi
10037 
10038     # Output is in $new_path
10039 
10040   windows_path="$new_path"
10041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10042     unix_path=`$CYGPATH -u "$windows_path"`
10043     new_path="$unix_path"
10044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10046     new_path="$unix_path"
10047   fi
10048 
10049     # remove trailing .exe if any
10050     new_path="${new_path/%.exe/}"
10051 
10052     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10053     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10054   fi
10055 
10056   else
10057     # We're on a posix platform. Hooray! :)
10058     # First separate the path from the arguments. This will split at the first
10059     # space.
10060     complete="$FOUND_MAKE"
10061     path="${complete%% *}"
10062     tmp="$complete EOL"
10063     arguments="${tmp#* }"
10064 
10065     # Cannot rely on the command "which" here since it doesn't always work.
10066     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10067     if test -z "$is_absolute_path"; then
10068       # Path to executable is not absolute. Find it.
10069       IFS_save="$IFS"
10070       IFS=:
10071       for p in $PATH; do
10072         if test -f "$p/$path" && test -x "$p/$path"; then
10073           new_path="$p/$path"
10074           break
10075         fi
10076       done
10077       IFS="$IFS_save"
10078     else
10079       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10080 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10081       new_path="$path"
10082     fi
10083 
10084     if test "x$new_path" = x; then
10085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10086 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10087       has_space=`$ECHO "$complete" | $GREP " "`
10088       if test "x$has_space" != x; then
10089         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10090 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10091       fi
10092       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10093     fi
10094   fi
10095 
10096   # Now join together the path and the arguments once again
10097   if test "x$arguments" != xEOL; then
10098     new_complete="$new_path ${arguments% *}"
10099   else
10100     new_complete="$new_path"
10101   fi
10102 
10103   if test "x$complete" != "x$new_complete"; then
10104     FOUND_MAKE="$new_complete"
10105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10106 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10107   fi
10108 
10109         fi
10110       fi
10111     fi
10112   fi
10113 
10114         fi
10115         PATH=$OLD_PATH
10116       fi
10117     fi
10118 
10119     if test "x$FOUND_MAKE" = x; then
10120       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
10121     fi
10122   fi
10123 
10124   MAKE=$FOUND_MAKE
10125 
10126   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10127 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10128 
10129 
10130 
10131   # Test if find supports -delete
10132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10133 $as_echo_n "checking if find supports -delete... " >&6; }
10134   FIND_DELETE="-delete"
10135 
10136   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10137 
10138   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10139 
10140   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10141   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10142     # No, it does not.
10143     rm $DELETEDIR/TestIfFindSupportsDelete
10144     FIND_DELETE="-exec rm \{\} \+"
10145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10146 $as_echo "no" >&6; }
10147   else
10148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10149 $as_echo "yes" >&6; }
10150   fi
10151   rmdir $DELETEDIR
10152 
10153 
10154 
10155   # These tools might not be installed by default,
10156   # need hint on how to install them.
10157 
10158   for ac_prog in unzip
10159 do
10160   # Extract the first word of "$ac_prog", so it can be a program name with args.
10161 set dummy $ac_prog; ac_word=$2
10162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10163 $as_echo_n "checking for $ac_word... " >&6; }
10164 if ${ac_cv_path_UNZIP+:} false; then :
10165   $as_echo_n "(cached) " >&6
10166 else
10167   case $UNZIP in
10168   [\\/]* | ?:[\\/]*)
10169   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10170   ;;
10171   *)
10172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10173 for as_dir in $PATH
10174 do
10175   IFS=$as_save_IFS
10176   test -z "$as_dir" && as_dir=.
10177     for ac_exec_ext in '' $ac_executable_extensions; do
10178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10179     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10181     break 2
10182   fi
10183 done
10184   done
10185 IFS=$as_save_IFS
10186 
10187   ;;
10188 esac
10189 fi
10190 UNZIP=$ac_cv_path_UNZIP
10191 if test -n "$UNZIP"; then
10192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10193 $as_echo "$UNZIP" >&6; }
10194 else
10195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10196 $as_echo "no" >&6; }
10197 fi
10198 
10199 
10200   test -n "$UNZIP" && break
10201 done
10202 
10203 
10204   if test "x$UNZIP" = x; then
10205     if test "xunzip" = x; then
10206       PROG_NAME=unzip
10207     else
10208       PROG_NAME=unzip
10209     fi
10210     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10211 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10212     as_fn_error $? "Cannot continue" "$LINENO" 5
10213   fi
10214 
10215 
10216 
10217   for ac_prog in zip
10218 do
10219   # Extract the first word of "$ac_prog", so it can be a program name with args.
10220 set dummy $ac_prog; ac_word=$2
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10222 $as_echo_n "checking for $ac_word... " >&6; }
10223 if ${ac_cv_path_ZIP+:} false; then :
10224   $as_echo_n "(cached) " >&6
10225 else
10226   case $ZIP in
10227   [\\/]* | ?:[\\/]*)
10228   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10229   ;;
10230   *)
10231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10232 for as_dir in $PATH
10233 do
10234   IFS=$as_save_IFS
10235   test -z "$as_dir" && as_dir=.
10236     for ac_exec_ext in '' $ac_executable_extensions; do
10237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10238     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10240     break 2
10241   fi
10242 done
10243   done
10244 IFS=$as_save_IFS
10245 
10246   ;;
10247 esac
10248 fi
10249 ZIP=$ac_cv_path_ZIP
10250 if test -n "$ZIP"; then
10251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10252 $as_echo "$ZIP" >&6; }
10253 else
10254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10255 $as_echo "no" >&6; }
10256 fi
10257 
10258 
10259   test -n "$ZIP" && break
10260 done
10261 
10262 
10263   if test "x$ZIP" = x; then
10264     if test "xzip" = x; then
10265       PROG_NAME=zip
10266     else
10267       PROG_NAME=zip
10268     fi
10269     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10270 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10271     as_fn_error $? "Cannot continue" "$LINENO" 5
10272   fi
10273 
10274 
10275 
10276   # Non-required basic tools
10277 
10278   # Extract the first word of "ldd", so it can be a program name with args.
10279 set dummy ldd; ac_word=$2
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281 $as_echo_n "checking for $ac_word... " >&6; }
10282 if ${ac_cv_path_LDD+:} false; then :
10283   $as_echo_n "(cached) " >&6
10284 else
10285   case $LDD in
10286   [\\/]* | ?:[\\/]*)
10287   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10288   ;;
10289   *)
10290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291 for as_dir in $PATH
10292 do
10293   IFS=$as_save_IFS
10294   test -z "$as_dir" && as_dir=.
10295     for ac_exec_ext in '' $ac_executable_extensions; do
10296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299     break 2
10300   fi
10301 done
10302   done
10303 IFS=$as_save_IFS
10304 
10305   ;;
10306 esac
10307 fi
10308 LDD=$ac_cv_path_LDD
10309 if test -n "$LDD"; then
10310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10311 $as_echo "$LDD" >&6; }
10312 else
10313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314 $as_echo "no" >&6; }
10315 fi
10316 
10317 
10318   if test "x$LDD" = "x"; then
10319     # List shared lib dependencies is used for
10320     # debug output and checking for forbidden dependencies.
10321     # We can build without it.
10322     LDD="true"
10323   fi
10324   # Extract the first word of "otool", so it can be a program name with args.
10325 set dummy otool; ac_word=$2
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327 $as_echo_n "checking for $ac_word... " >&6; }
10328 if ${ac_cv_path_OTOOL+:} false; then :
10329   $as_echo_n "(cached) " >&6
10330 else
10331   case $OTOOL in
10332   [\\/]* | ?:[\\/]*)
10333   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10334   ;;
10335   *)
10336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337 for as_dir in $PATH
10338 do
10339   IFS=$as_save_IFS
10340   test -z "$as_dir" && as_dir=.
10341     for ac_exec_ext in '' $ac_executable_extensions; do
10342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10343     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345     break 2
10346   fi
10347 done
10348   done
10349 IFS=$as_save_IFS
10350 
10351   ;;
10352 esac
10353 fi
10354 OTOOL=$ac_cv_path_OTOOL
10355 if test -n "$OTOOL"; then
10356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10357 $as_echo "$OTOOL" >&6; }
10358 else
10359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360 $as_echo "no" >&6; }
10361 fi
10362 
10363 
10364   if test "x$OTOOL" = "x"; then
10365     OTOOL="true"
10366   fi
10367   for ac_prog in readelf greadelf
10368 do
10369   # Extract the first word of "$ac_prog", so it can be a program name with args.
10370 set dummy $ac_prog; ac_word=$2
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10372 $as_echo_n "checking for $ac_word... " >&6; }
10373 if ${ac_cv_path_READELF+:} false; then :
10374   $as_echo_n "(cached) " >&6
10375 else
10376   case $READELF in
10377   [\\/]* | ?:[\\/]*)
10378   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10379   ;;
10380   *)
10381   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10382 for as_dir in $PATH
10383 do
10384   IFS=$as_save_IFS
10385   test -z "$as_dir" && as_dir=.
10386     for ac_exec_ext in '' $ac_executable_extensions; do
10387   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10388     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10389     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10390     break 2
10391   fi
10392 done
10393   done
10394 IFS=$as_save_IFS
10395 
10396   ;;
10397 esac
10398 fi
10399 READELF=$ac_cv_path_READELF
10400 if test -n "$READELF"; then
10401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10402 $as_echo "$READELF" >&6; }
10403 else
10404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405 $as_echo "no" >&6; }
10406 fi
10407 
10408 
10409   test -n "$READELF" && break
10410 done
10411 
10412   # Extract the first word of "hg", so it can be a program name with args.
10413 set dummy hg; ac_word=$2
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10415 $as_echo_n "checking for $ac_word... " >&6; }
10416 if ${ac_cv_path_HG+:} false; then :
10417   $as_echo_n "(cached) " >&6
10418 else
10419   case $HG in
10420   [\\/]* | ?:[\\/]*)
10421   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10422   ;;
10423   *)
10424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10425 for as_dir in $PATH
10426 do
10427   IFS=$as_save_IFS
10428   test -z "$as_dir" && as_dir=.
10429     for ac_exec_ext in '' $ac_executable_extensions; do
10430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10431     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10433     break 2
10434   fi
10435 done
10436   done
10437 IFS=$as_save_IFS
10438 
10439   ;;
10440 esac
10441 fi
10442 HG=$ac_cv_path_HG
10443 if test -n "$HG"; then
10444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10445 $as_echo "$HG" >&6; }
10446 else
10447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448 $as_echo "no" >&6; }
10449 fi
10450 
10451 
10452   # Extract the first word of "stat", so it can be a program name with args.
10453 set dummy stat; ac_word=$2
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10455 $as_echo_n "checking for $ac_word... " >&6; }
10456 if ${ac_cv_path_STAT+:} false; then :
10457   $as_echo_n "(cached) " >&6
10458 else
10459   case $STAT in
10460   [\\/]* | ?:[\\/]*)
10461   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10462   ;;
10463   *)
10464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10465 for as_dir in $PATH
10466 do
10467   IFS=$as_save_IFS
10468   test -z "$as_dir" && as_dir=.
10469     for ac_exec_ext in '' $ac_executable_extensions; do
10470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10471     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10473     break 2
10474   fi
10475 done
10476   done
10477 IFS=$as_save_IFS
10478 
10479   ;;
10480 esac
10481 fi
10482 STAT=$ac_cv_path_STAT
10483 if test -n "$STAT"; then
10484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10485 $as_echo "$STAT" >&6; }
10486 else
10487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10488 $as_echo "no" >&6; }
10489 fi
10490 
10491 
10492   # Extract the first word of "time", so it can be a program name with args.
10493 set dummy time; ac_word=$2
10494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10495 $as_echo_n "checking for $ac_word... " >&6; }
10496 if ${ac_cv_path_TIME+:} false; then :
10497   $as_echo_n "(cached) " >&6
10498 else
10499   case $TIME in
10500   [\\/]* | ?:[\\/]*)
10501   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10502   ;;
10503   *)
10504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10505 for as_dir in $PATH
10506 do
10507   IFS=$as_save_IFS
10508   test -z "$as_dir" && as_dir=.
10509     for ac_exec_ext in '' $ac_executable_extensions; do
10510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10511     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10513     break 2
10514   fi
10515 done
10516   done
10517 IFS=$as_save_IFS
10518 
10519   ;;
10520 esac
10521 fi
10522 TIME=$ac_cv_path_TIME
10523 if test -n "$TIME"; then
10524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10525 $as_echo "$TIME" >&6; }
10526 else
10527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528 $as_echo "no" >&6; }
10529 fi
10530 
10531 
10532   # Check if it's GNU time
10533   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10534   if test "x$IS_GNU_TIME" != x; then
10535     IS_GNU_TIME=yes
10536   else
10537     IS_GNU_TIME=no
10538   fi
10539 
10540 
10541   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10542 
10543   for ac_prog in comm
10544 do
10545   # Extract the first word of "$ac_prog", so it can be a program name with args.
10546 set dummy $ac_prog; ac_word=$2
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548 $as_echo_n "checking for $ac_word... " >&6; }
10549 if ${ac_cv_path_COMM+:} false; then :
10550   $as_echo_n "(cached) " >&6
10551 else
10552   case $COMM in
10553   [\\/]* | ?:[\\/]*)
10554   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10555   ;;
10556   *)
10557   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558 for as_dir in $PATH
10559 do
10560   IFS=$as_save_IFS
10561   test -z "$as_dir" && as_dir=.
10562     for ac_exec_ext in '' $ac_executable_extensions; do
10563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566     break 2
10567   fi
10568 done
10569   done
10570 IFS=$as_save_IFS
10571 
10572   ;;
10573 esac
10574 fi
10575 COMM=$ac_cv_path_COMM
10576 if test -n "$COMM"; then
10577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10578 $as_echo "$COMM" >&6; }
10579 else
10580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581 $as_echo "no" >&6; }
10582 fi
10583 
10584 
10585   test -n "$COMM" && break
10586 done
10587 
10588 
10589   if test "x$COMM" = x; then
10590     if test "xcomm" = x; then
10591       PROG_NAME=comm
10592     else
10593       PROG_NAME=comm
10594     fi
10595     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10596 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10597     as_fn_error $? "Cannot continue" "$LINENO" 5
10598   fi
10599 
10600 
10601   fi
10602 
10603   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10604 
10605   for ac_prog in dsymutil
10606 do
10607   # Extract the first word of "$ac_prog", so it can be a program name with args.
10608 set dummy $ac_prog; ac_word=$2
10609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10610 $as_echo_n "checking for $ac_word... " >&6; }
10611 if ${ac_cv_path_DSYMUTIL+:} false; then :
10612   $as_echo_n "(cached) " >&6
10613 else
10614   case $DSYMUTIL in
10615   [\\/]* | ?:[\\/]*)
10616   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10617   ;;
10618   *)
10619   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10620 for as_dir in $PATH
10621 do
10622   IFS=$as_save_IFS
10623   test -z "$as_dir" && as_dir=.
10624     for ac_exec_ext in '' $ac_executable_extensions; do
10625   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10626     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10627     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10628     break 2
10629   fi
10630 done
10631   done
10632 IFS=$as_save_IFS
10633 
10634   ;;
10635 esac
10636 fi
10637 DSYMUTIL=$ac_cv_path_DSYMUTIL
10638 if test -n "$DSYMUTIL"; then
10639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10640 $as_echo "$DSYMUTIL" >&6; }
10641 else
10642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10643 $as_echo "no" >&6; }
10644 fi
10645 
10646 
10647   test -n "$DSYMUTIL" && break
10648 done
10649 
10650 
10651   if test "x$DSYMUTIL" = x; then
10652     if test "xdsymutil" = x; then
10653       PROG_NAME=dsymutil
10654     else
10655       PROG_NAME=dsymutil
10656     fi
10657     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10658 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10659     as_fn_error $? "Cannot continue" "$LINENO" 5
10660   fi
10661 
10662 
10663 
10664   for ac_prog in xattr
10665 do
10666   # Extract the first word of "$ac_prog", so it can be a program name with args.
10667 set dummy $ac_prog; ac_word=$2
10668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10669 $as_echo_n "checking for $ac_word... " >&6; }
10670 if ${ac_cv_path_XATTR+:} false; then :
10671   $as_echo_n "(cached) " >&6
10672 else
10673   case $XATTR in
10674   [\\/]* | ?:[\\/]*)
10675   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10676   ;;
10677   *)
10678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679 for as_dir in $PATH
10680 do
10681   IFS=$as_save_IFS
10682   test -z "$as_dir" && as_dir=.
10683     for ac_exec_ext in '' $ac_executable_extensions; do
10684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10685     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687     break 2
10688   fi
10689 done
10690   done
10691 IFS=$as_save_IFS
10692 
10693   ;;
10694 esac
10695 fi
10696 XATTR=$ac_cv_path_XATTR
10697 if test -n "$XATTR"; then
10698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10699 $as_echo "$XATTR" >&6; }
10700 else
10701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702 $as_echo "no" >&6; }
10703 fi
10704 
10705 
10706   test -n "$XATTR" && break
10707 done
10708 
10709 
10710   if test "x$XATTR" = x; then
10711     if test "xxattr" = x; then
10712       PROG_NAME=xattr
10713     else
10714       PROG_NAME=xattr
10715     fi
10716     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10717 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10718     as_fn_error $? "Cannot continue" "$LINENO" 5
10719   fi
10720 
10721 
10722     # Extract the first word of "codesign", so it can be a program name with args.
10723 set dummy codesign; ac_word=$2
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10725 $as_echo_n "checking for $ac_word... " >&6; }
10726 if ${ac_cv_path_CODESIGN+:} false; then :
10727   $as_echo_n "(cached) " >&6
10728 else
10729   case $CODESIGN in
10730   [\\/]* | ?:[\\/]*)
10731   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10732   ;;
10733   *)
10734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10735 for as_dir in $PATH
10736 do
10737   IFS=$as_save_IFS
10738   test -z "$as_dir" && as_dir=.
10739     for ac_exec_ext in '' $ac_executable_extensions; do
10740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10741     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10743     break 2
10744   fi
10745 done
10746   done
10747 IFS=$as_save_IFS
10748 
10749   ;;
10750 esac
10751 fi
10752 CODESIGN=$ac_cv_path_CODESIGN
10753 if test -n "$CODESIGN"; then
10754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10755 $as_echo "$CODESIGN" >&6; }
10756 else
10757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758 $as_echo "no" >&6; }
10759 fi
10760 
10761 
10762     if test "x$CODESIGN" != "x"; then
10763       # Verify that the openjdk_codesign certificate is present
10764       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10765 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10766       rm -f codesign-testfile
10767       touch codesign-testfile
10768       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10769       rm -f codesign-testfile
10770       if test "x$CODESIGN" = x; then
10771         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772 $as_echo "no" >&6; }
10773       else
10774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10775 $as_echo "yes" >&6; }
10776       fi
10777     fi
10778   fi
10779 
10780 
10781 # Check if pkg-config is available.
10782 
10783 
10784 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10785         if test -n "$ac_tool_prefix"; then
10786   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10787 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10789 $as_echo_n "checking for $ac_word... " >&6; }
10790 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10791   $as_echo_n "(cached) " >&6
10792 else
10793   case $PKG_CONFIG in
10794   [\\/]* | ?:[\\/]*)
10795   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10796   ;;
10797   *)
10798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10799 for as_dir in $PATH
10800 do
10801   IFS=$as_save_IFS
10802   test -z "$as_dir" && as_dir=.
10803     for ac_exec_ext in '' $ac_executable_extensions; do
10804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10805     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10807     break 2
10808   fi
10809 done
10810   done
10811 IFS=$as_save_IFS
10812 
10813   ;;
10814 esac
10815 fi
10816 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10817 if test -n "$PKG_CONFIG"; then
10818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10819 $as_echo "$PKG_CONFIG" >&6; }
10820 else
10821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10822 $as_echo "no" >&6; }
10823 fi
10824 
10825 
10826 fi
10827 if test -z "$ac_cv_path_PKG_CONFIG"; then
10828   ac_pt_PKG_CONFIG=$PKG_CONFIG
10829   # Extract the first word of "pkg-config", so it can be a program name with args.
10830 set dummy pkg-config; ac_word=$2
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10832 $as_echo_n "checking for $ac_word... " >&6; }
10833 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10834   $as_echo_n "(cached) " >&6
10835 else
10836   case $ac_pt_PKG_CONFIG in
10837   [\\/]* | ?:[\\/]*)
10838   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10839   ;;
10840   *)
10841   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10842 for as_dir in $PATH
10843 do
10844   IFS=$as_save_IFS
10845   test -z "$as_dir" && as_dir=.
10846     for ac_exec_ext in '' $ac_executable_extensions; do
10847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10848     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10850     break 2
10851   fi
10852 done
10853   done
10854 IFS=$as_save_IFS
10855 
10856   ;;
10857 esac
10858 fi
10859 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10860 if test -n "$ac_pt_PKG_CONFIG"; then
10861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10862 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10863 else
10864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10865 $as_echo "no" >&6; }
10866 fi
10867 
10868   if test "x$ac_pt_PKG_CONFIG" = x; then
10869     PKG_CONFIG=""
10870   else
10871     case $cross_compiling:$ac_tool_warned in
10872 yes:)
10873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10874 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10875 ac_tool_warned=yes ;;
10876 esac
10877     PKG_CONFIG=$ac_pt_PKG_CONFIG
10878   fi
10879 else
10880   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10881 fi
10882 
10883 fi
10884 if test -n "$PKG_CONFIG"; then
10885         _pkg_min_version=0.9.0
10886         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10887 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10888         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10889                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10890 $as_echo "yes" >&6; }
10891         else
10892                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893 $as_echo "no" >&6; }
10894                 PKG_CONFIG=""
10895         fi
10896 
10897 fi
10898 
10899 # After basic tools have been setup, we can check build os specific details.
10900 
10901   ###############################################################################
10902 
10903   # Note that this is the build platform OS version!
10904 
10905   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10906   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10907   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10908   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10909 
10910 
10911 
10912 
10913 
10914 # Setup builddeps, for automatic downloading of tools we need.
10915 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10916 # boot-jdk setup, but we need to have basic tools setup first.
10917 
10918 
10919 # Check whether --with-builddeps-conf was given.
10920 if test "${with_builddeps_conf+set}" = set; then :
10921   withval=$with_builddeps_conf;
10922 fi
10923 
10924 
10925 
10926 # Check whether --with-builddeps-server was given.
10927 if test "${with_builddeps_server+set}" = set; then :
10928   withval=$with_builddeps_server;
10929 fi
10930 
10931 
10932 
10933 # Check whether --with-builddeps-dir was given.
10934 if test "${with_builddeps_dir+set}" = set; then :
10935   withval=$with_builddeps_dir;
10936 else
10937   with_builddeps_dir=/localhome/builddeps
10938 fi
10939 
10940 
10941 
10942 # Check whether --with-builddeps-group was given.
10943 if test "${with_builddeps_group+set}" = set; then :
10944   withval=$with_builddeps_group;
10945 fi
10946 
10947 
10948 
10949 
10950   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10951     if test "x$with_builddeps_conf" != x; then
10952       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10953 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10954       builddepsfile=$with_builddeps_conf
10955       if test -s $builddepsfile; then
10956         . $builddepsfile
10957         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10958 $as_echo "loaded!" >&6; }
10959       else
10960         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10961       fi
10962     else
10963       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10964 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10965       builddepsfile=`mktemp`
10966       touch $builddepsfile
10967       # Put all found confs into a single file.
10968       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10969       # Source the file to acquire the variables
10970       if test -s $builddepsfile; then
10971         . $builddepsfile
10972         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10973 $as_echo "found at least one!" >&6; }
10974       else
10975         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10976       fi
10977     fi
10978     # Create build and target names that use _ instead of "-" and ".".
10979     # This is necessary to use them in variable names.
10980     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10981     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10982     # Extract rewrite information for build and target
10983     eval rewritten_build=\${REWRITE_${build_var}}
10984     if test "x$rewritten_build" = x; then
10985       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10986       echo Build stays the same $rewritten_build
10987     else
10988       echo Rewriting build for builddeps into $rewritten_build
10989     fi
10990     eval rewritten_target=\${REWRITE_${target_var}}
10991     if test "x$rewritten_target" = x; then
10992       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10993       echo Target stays the same $rewritten_target
10994     else
10995       echo Rewriting target for builddeps into $rewritten_target
10996     fi
10997     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10998     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10999   fi
11000   for ac_prog in 7z unzip
11001 do
11002   # Extract the first word of "$ac_prog", so it can be a program name with args.
11003 set dummy $ac_prog; ac_word=$2
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005 $as_echo_n "checking for $ac_word... " >&6; }
11006 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
11007   $as_echo_n "(cached) " >&6
11008 else
11009   if test -n "$BDEPS_UNZIP"; then
11010   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
11011 else
11012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11013 for as_dir in $PATH
11014 do
11015   IFS=$as_save_IFS
11016   test -z "$as_dir" && as_dir=.
11017     for ac_exec_ext in '' $ac_executable_extensions; do
11018   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11019     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11020     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11021     break 2
11022   fi
11023 done
11024   done
11025 IFS=$as_save_IFS
11026 
11027 fi
11028 fi
11029 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11030 if test -n "$BDEPS_UNZIP"; then
11031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11032 $as_echo "$BDEPS_UNZIP" >&6; }
11033 else
11034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11035 $as_echo "no" >&6; }
11036 fi
11037 
11038 
11039   test -n "$BDEPS_UNZIP" && break
11040 done
11041 
11042   if test "x$BDEPS_UNZIP" = x7z; then
11043     BDEPS_UNZIP="7z x"
11044   fi
11045 
11046   for ac_prog in wget lftp ftp
11047 do
11048   # Extract the first word of "$ac_prog", so it can be a program name with args.
11049 set dummy $ac_prog; ac_word=$2
11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11051 $as_echo_n "checking for $ac_word... " >&6; }
11052 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11053   $as_echo_n "(cached) " >&6
11054 else
11055   if test -n "$BDEPS_FTP"; then
11056   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11057 else
11058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059 for as_dir in $PATH
11060 do
11061   IFS=$as_save_IFS
11062   test -z "$as_dir" && as_dir=.
11063     for ac_exec_ext in '' $ac_executable_extensions; do
11064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11065     ac_cv_prog_BDEPS_FTP="$ac_prog"
11066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11067     break 2
11068   fi
11069 done
11070   done
11071 IFS=$as_save_IFS
11072 
11073 fi
11074 fi
11075 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11076 if test -n "$BDEPS_FTP"; then
11077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11078 $as_echo "$BDEPS_FTP" >&6; }
11079 else
11080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11081 $as_echo "no" >&6; }
11082 fi
11083 
11084 
11085   test -n "$BDEPS_FTP" && break
11086 done
11087 
11088 
11089 
11090 ###############################################################################
11091 #
11092 # Determine OpenJDK variants, options and version numbers.
11093 #
11094 ###############################################################################
11095 
11096 # We need build & target for this.
11097 
11098 
11099   ###############################################################################
11100   #
11101   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11102   # We always build headless support.
11103   #
11104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11105 $as_echo_n "checking headful support... " >&6; }
11106   # Check whether --enable-headful was given.
11107 if test "${enable_headful+set}" = set; then :
11108   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11109 else
11110   SUPPORT_HEADFUL=yes
11111 fi
11112 
11113 
11114   SUPPORT_HEADLESS=yes
11115   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11116 
11117   if test "x$SUPPORT_HEADFUL" = xyes; then
11118     # We are building both headful and headless.
11119     headful_msg="include support for both headful and headless"
11120   fi
11121 
11122   if test "x$SUPPORT_HEADFUL" = xno; then
11123     # Thus we are building headless only.
11124     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11125     headful_msg="headless only"
11126   fi
11127 
11128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11129 $as_echo "$headful_msg" >&6; }
11130 
11131 
11132 
11133 
11134 
11135   # Control wether Hotspot runs Queens test after build.
11136   # Check whether --enable-hotspot-test-in-build was given.
11137 if test "${enable_hotspot_test_in_build+set}" = set; then :
11138   enableval=$enable_hotspot_test_in_build;
11139 else
11140   enable_hotspot_test_in_build=no
11141 fi
11142 
11143   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11144     TEST_IN_BUILD=true
11145   else
11146     TEST_IN_BUILD=false
11147   fi
11148 
11149 
11150   ###############################################################################
11151   #
11152   # Choose cacerts source file
11153   #
11154 
11155 # Check whether --with-cacerts-file was given.
11156 if test "${with_cacerts_file+set}" = set; then :
11157   withval=$with_cacerts_file;
11158 fi
11159 
11160   if test "x$with_cacerts_file" != x; then
11161     CACERTS_FILE=$with_cacerts_file
11162   else
11163     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11164   fi
11165 
11166 
11167   ###############################################################################
11168   #
11169   # Enable or disable unlimited crypto
11170   #
11171   # Check whether --enable-unlimited-crypto was given.
11172 if test "${enable_unlimited_crypto+set}" = set; then :
11173   enableval=$enable_unlimited_crypto;
11174 else
11175   enable_unlimited_crypto=no
11176 fi
11177 
11178   if test "x$enable_unlimited_crypto" = "xyes"; then
11179     UNLIMITED_CRYPTO=true
11180   else
11181     UNLIMITED_CRYPTO=false
11182   fi
11183 
11184 
11185   ###############################################################################
11186   #
11187   # Enable or disable the elliptic curve crypto implementation
11188   #
11189 
11190 
11191   ###############################################################################
11192   #
11193   # Compress jars
11194   #
11195   COMPRESS_JARS=false
11196 
11197 
11198 
11199 
11200   # Source the version numbers
11201   . $AUTOCONF_DIR/version-numbers
11202 
11203   # Get the settings from parameters
11204 
11205 # Check whether --with-milestone was given.
11206 if test "${with_milestone+set}" = set; then :
11207   withval=$with_milestone;
11208 fi
11209 
11210   if test "x$with_milestone" = xyes; then
11211     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11212   elif test "x$with_milestone" != x; then
11213     MILESTONE="$with_milestone"
11214   fi
11215   if test "x$MILESTONE" = x; then
11216     MILESTONE=internal
11217   fi
11218 
11219 
11220 # Check whether --with-update-version was given.
11221 if test "${with_update_version+set}" = set; then :
11222   withval=$with_update_version;
11223 fi
11224 
11225   if test "x$with_update_version" = xyes; then
11226     as_fn_error $? "Update version must have a value" "$LINENO" 5
11227   elif test "x$with_update_version" != x; then
11228     JDK_UPDATE_VERSION="$with_update_version"
11229     # On macosx 10.7, it's not possible to set --with-update-version=0X due
11230     # to a bug in expr (which reduces it to just X). To work around this, we
11231     # always add a 0 to one digit update versions.
11232     if test "${#JDK_UPDATE_VERSION}" = "1"; then
11233       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
11234     fi
11235   fi
11236 
11237 
11238 # Check whether --with-user-release-suffix was given.
11239 if test "${with_user_release_suffix+set}" = set; then :
11240   withval=$with_user_release_suffix;
11241 fi
11242 
11243   if test "x$with_user_release_suffix" = xyes; then
11244     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11245   elif test "x$with_user_release_suffix" != x; then
11246     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11247   fi
11248 
11249 
11250 # Check whether --with-build-number was given.
11251 if test "${with_build_number+set}" = set; then :
11252   withval=$with_build_number;
11253 fi
11254 
11255   if test "x$with_build_number" = xyes; then
11256     as_fn_error $? "Build number must have a value" "$LINENO" 5
11257   elif test "x$with_build_number" != x; then
11258     JDK_BUILD_NUMBER="$with_build_number"
11259   fi
11260   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11261   if test "x$JDK_BUILD_NUMBER" = x; then
11262     JDK_BUILD_NUMBER=b00
11263     if test "x$USER_RELEASE_SUFFIX" = x; then
11264       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11265       # Avoid [:alnum:] since it depends on the locale.
11266       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11267       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11268     fi
11269   fi
11270 
11271   # Now set the JDK version, milestone, build number etc.
11272 
11273 
11274 
11275 
11276 
11277 
11278 
11279 
11280 
11281 
11282 
11283 
11284 
11285 
11286 
11287 
11288 # Check whether --with-copyright-year was given.
11289 if test "${with_copyright_year+set}" = set; then :
11290   withval=$with_copyright_year;
11291 fi
11292 
11293   if test "x$with_copyright_year" = xyes; then
11294     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
11295   elif test "x$with_copyright_year" != x; then
11296     COPYRIGHT_YEAR="$with_copyright_year"
11297   else
11298     COPYRIGHT_YEAR=`date +'%Y'`
11299   fi
11300 
11301 
11302   if test "x$JDK_UPDATE_VERSION" != x; then
11303     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11304   else
11305     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11306   fi
11307 
11308 
11309   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11310 
11311 
11312 
11313 ###############################################################################
11314 #
11315 # Setup BootJDK, used to bootstrap the build.
11316 #
11317 ###############################################################################
11318 
11319 
11320   BOOT_JDK_FOUND=no
11321 
11322 # Check whether --with-boot-jdk was given.
11323 if test "${with_boot_jdk+set}" = set; then :
11324   withval=$with_boot_jdk;
11325 fi
11326 
11327 
11328   # We look for the Boot JDK through various means, going from more certain to
11329   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11330   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11331   # must check if this is indeed valid; otherwise we'll continue looking.
11332 
11333   # Test: Is bootjdk explicitely set by command line arguments?
11334 
11335   if test "x$BOOT_JDK_FOUND" = xno; then
11336     # Now execute the test
11337 
11338   if test "x$with_boot_jdk" != x; then
11339     BOOT_JDK=$with_boot_jdk
11340     BOOT_JDK_FOUND=maybe
11341     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11342 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11343   fi
11344 
11345 
11346     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11347     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11348       # Do we have a bin/java?
11349       if test ! -x "$BOOT_JDK/bin/java"; then
11350         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11351 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11352         BOOT_JDK_FOUND=no
11353       else
11354         # Do we have a bin/javac?
11355         if test ! -x "$BOOT_JDK/bin/javac"; then
11356           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11357 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11358           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11359 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11360           BOOT_JDK_FOUND=no
11361         else
11362           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11363           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11364             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11365 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11366             BOOT_JDK_FOUND=no
11367           else
11368             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11369             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11370 
11371             # Extra M4 quote needed to protect [] in grep expression.
11372             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11373             if test "x$FOUND_VERSION_78" = x; then
11374               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11375 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11376               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11377 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11378               BOOT_JDK_FOUND=no
11379             else
11380               # We're done! :-)
11381               BOOT_JDK_FOUND=yes
11382 
11383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11384 
11385   # Input might be given as Windows format, start by converting to
11386   # unix format.
11387   path="$BOOT_JDK"
11388   new_path=`$CYGPATH -u "$path"`
11389 
11390   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11391   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11392   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11393   # "foo.exe" is OK but "foo" is an error.
11394   #
11395   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11396   # It is also a way to make sure we got the proper file name for the real test later on.
11397   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11398   if test "x$test_shortpath" = x; then
11399     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11400 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11401     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11402   fi
11403 
11404   # Call helper function which possibly converts this using DOS-style short mode.
11405   # If so, the updated path is stored in $new_path.
11406 
11407   input_path="$new_path"
11408   # Check if we need to convert this using DOS-style short mode. If the path
11409   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11410   # take no chances and rewrite it.
11411   # Note: m4 eats our [], so we need to use [ and ] instead.
11412   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11413   if test "x$has_forbidden_chars" != x; then
11414     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11415     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11416     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11417     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11418       # Going to short mode and back again did indeed matter. Since short mode is
11419       # case insensitive, let's make it lowercase to improve readability.
11420       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11421       # Now convert it back to Unix-stile (cygpath)
11422       input_path=`$CYGPATH -u "$shortmode_path"`
11423       new_path="$input_path"
11424     fi
11425   fi
11426 
11427   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11428   if test "x$test_cygdrive_prefix" = x; then
11429     # As a simple fix, exclude /usr/bin since it's not a real path.
11430     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11431       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11432       # a path prefixed by /cygdrive for fixpath to work.
11433       new_path="$CYGWIN_ROOT_PATH$input_path"
11434     fi
11435   fi
11436 
11437 
11438   if test "x$path" != "x$new_path"; then
11439     BOOT_JDK="$new_path"
11440     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11441 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11442   fi
11443 
11444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11445 
11446   path="$BOOT_JDK"
11447   has_colon=`$ECHO $path | $GREP ^.:`
11448   new_path="$path"
11449   if test "x$has_colon" = x; then
11450     # Not in mixed or Windows style, start by that.
11451     new_path=`cmd //c echo $path`
11452   fi
11453 
11454 
11455   input_path="$new_path"
11456   # Check if we need to convert this using DOS-style short mode. If the path
11457   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11458   # take no chances and rewrite it.
11459   # Note: m4 eats our [], so we need to use [ and ] instead.
11460   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11461   if test "x$has_forbidden_chars" != x; then
11462     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11463     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11464   fi
11465 
11466 
11467   windows_path="$new_path"
11468   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11469     unix_path=`$CYGPATH -u "$windows_path"`
11470     new_path="$unix_path"
11471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11472     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11473     new_path="$unix_path"
11474   fi
11475 
11476   if test "x$path" != "x$new_path"; then
11477     BOOT_JDK="$new_path"
11478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11479 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11480   fi
11481 
11482   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11483   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11484 
11485   else
11486     # We're on a posix platform. Hooray! :)
11487     path="$BOOT_JDK"
11488     has_space=`$ECHO "$path" | $GREP " "`
11489     if test "x$has_space" != x; then
11490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11491 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11492       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11493     fi
11494 
11495     # Use eval to expand a potential ~
11496     eval path="$path"
11497     if test ! -f "$path" && test ! -d "$path"; then
11498       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11499     fi
11500 
11501     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11502   fi
11503 
11504               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11505 $as_echo_n "checking for Boot JDK... " >&6; }
11506               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11507 $as_echo "$BOOT_JDK" >&6; }
11508               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11509 $as_echo_n "checking Boot JDK version... " >&6; }
11510               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11511               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11512 $as_echo "$BOOT_JDK_VERSION" >&6; }
11513             fi # end check jdk version
11514           fi # end check rt.jar
11515         fi # end check javac
11516       fi # end check java
11517     fi # end check boot jdk found
11518   fi
11519 
11520   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11521     # Having specified an argument which is incorrect will produce an instant failure;
11522     # we should not go on looking
11523     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11524   fi
11525 
11526   # Test: Is bootjdk available from builddeps?
11527 
11528   if test "x$BOOT_JDK_FOUND" = xno; then
11529     # Now execute the test
11530 
11531 
11532 
11533   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11534     # Source the builddeps file again, to make sure it uses the latest variables!
11535     . $builddepsfile
11536     # Look for a target and build machine specific resource!
11537     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11538     if test "x$resource" = x; then
11539       # Ok, lets instead look for a target specific resource
11540       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11541     fi
11542     if test "x$resource" = x; then
11543       # Ok, lets instead look for a build specific resource
11544       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11545     fi
11546     if test "x$resource" = x; then
11547       # Ok, lets instead look for a generic resource
11548       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11549       resource=${builddep_bootjdk}
11550     fi
11551     if test "x$resource" != x; then
11552       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11553 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11554       # If the resource in the builddeps.conf file is an existing directory,
11555       # for example /java/linux/cups
11556       if test -d ${resource}; then
11557         depdir=${resource}
11558       else
11559 
11560   # bootjdk is for example mymodule
11561   # $resource is for example libs/general/libmymod_1_2_3.zip
11562   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11563   # $with_builddeps_dir is for example /localhome/builddeps
11564   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11565   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11566   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11567   filename=`basename $resource`
11568   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11569   filebase=${filename%%.*}
11570   extension=${filename#*.}
11571   installdir=$with_builddeps_dir/$filebase
11572   if test ! -f $installdir/$filename.unpacked; then
11573     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11574 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11575     if test ! -d $installdir; then
11576       mkdir -p $installdir
11577     fi
11578     if test ! -d $installdir; then
11579       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11580     fi
11581     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11582     touch $tmpfile
11583     if test ! -f $tmpfile; then
11584       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11585     fi
11586 
11587   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11588   # $tmpfile is the local file name for the downloaded file.
11589   VALID_TOOL=no
11590   if test "x$BDEPS_FTP" = xwget; then
11591     VALID_TOOL=yes
11592     wget -O $tmpfile $with_builddeps_server/$resource
11593   fi
11594   if test "x$BDEPS_FTP" = xlftp; then
11595     VALID_TOOL=yes
11596     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11597   fi
11598   if test "x$BDEPS_FTP" = xftp; then
11599     VALID_TOOL=yes
11600     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11601     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11602     FTPUSERPWD=${FTPSERVER%%@*}
11603     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11604       FTPUSER=${userpwd%%:*}
11605       FTPPWD=${userpwd#*@}
11606       FTPSERVER=${FTPSERVER#*@}
11607     else
11608       FTPUSER=ftp
11609       FTPPWD=ftp
11610     fi
11611     # the "pass" command does not work on some
11612     # ftp clients (read ftp.exe) but if it works,
11613     # passive mode is better!
11614     ( \
11615         echo "user $FTPUSER $FTPPWD"        ; \
11616         echo "pass"                         ; \
11617         echo "bin"                          ; \
11618         echo "get $FTPPATH $tmpfile"              ; \
11619     ) | ftp -in $FTPSERVER
11620   fi
11621   if test "x$VALID_TOOL" != xyes; then
11622     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11623   fi
11624 
11625     mv $tmpfile $installdir/$filename
11626     if test ! -s $installdir/$filename; then
11627       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11628     fi
11629     case "$extension" in
11630       zip)  echo "Unzipping $installdir/$filename..."
11631         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11632         ;;
11633       tar.gz) echo "Untaring $installdir/$filename..."
11634         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11635         ;;
11636       tgz) echo "Untaring $installdir/$filename..."
11637         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11638         ;;
11639       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11640         ;;
11641     esac
11642   fi
11643   if test -f $installdir/$filename.unpacked; then
11644     depdir=$installdir
11645   fi
11646 
11647       fi
11648       # Source the builddeps file again, because in the previous command, the depdir
11649       # was updated to point at the current build dependency install directory.
11650       . $builddepsfile
11651       # Now extract variables from the builddeps.conf files.
11652       theroot=${builddep_bootjdk_ROOT}
11653       thecflags=${builddep_bootjdk_CFLAGS}
11654       thelibs=${builddep_bootjdk_LIBS}
11655       if test "x$depdir" = x; then
11656         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11657       fi
11658       BOOT_JDK=$depdir
11659       if test "x$theroot" != x; then
11660         BOOT_JDK="$theroot"
11661       fi
11662       if test "x$thecflags" != x; then
11663         BOOT_JDK_CFLAGS="$thecflags"
11664       fi
11665       if test "x$thelibs" != x; then
11666         BOOT_JDK_LIBS="$thelibs"
11667       fi
11668       BOOT_JDK_FOUND=maybe
11669       else BOOT_JDK_FOUND=no
11670 
11671     fi
11672     else BOOT_JDK_FOUND=no
11673 
11674   fi
11675 
11676 
11677 
11678     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11679     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11680       # Do we have a bin/java?
11681       if test ! -x "$BOOT_JDK/bin/java"; then
11682         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11683 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11684         BOOT_JDK_FOUND=no
11685       else
11686         # Do we have a bin/javac?
11687         if test ! -x "$BOOT_JDK/bin/javac"; then
11688           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11689 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11690           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11691 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11692           BOOT_JDK_FOUND=no
11693         else
11694           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11695           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11696             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11697 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11698             BOOT_JDK_FOUND=no
11699           else
11700             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11701             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11702 
11703             # Extra M4 quote needed to protect [] in grep expression.
11704             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11705             if test "x$FOUND_VERSION_78" = x; then
11706               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11707 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11708               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11709 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11710               BOOT_JDK_FOUND=no
11711             else
11712               # We're done! :-)
11713               BOOT_JDK_FOUND=yes
11714 
11715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11716 
11717   # Input might be given as Windows format, start by converting to
11718   # unix format.
11719   path="$BOOT_JDK"
11720   new_path=`$CYGPATH -u "$path"`
11721 
11722   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11723   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11724   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11725   # "foo.exe" is OK but "foo" is an error.
11726   #
11727   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11728   # It is also a way to make sure we got the proper file name for the real test later on.
11729   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11730   if test "x$test_shortpath" = x; then
11731     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11732 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11733     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11734   fi
11735 
11736   # Call helper function which possibly converts this using DOS-style short mode.
11737   # If so, the updated path is stored in $new_path.
11738 
11739   input_path="$new_path"
11740   # Check if we need to convert this using DOS-style short mode. If the path
11741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11742   # take no chances and rewrite it.
11743   # Note: m4 eats our [], so we need to use [ and ] instead.
11744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11745   if test "x$has_forbidden_chars" != x; then
11746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11747     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11748     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11749     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11750       # Going to short mode and back again did indeed matter. Since short mode is
11751       # case insensitive, let's make it lowercase to improve readability.
11752       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11753       # Now convert it back to Unix-stile (cygpath)
11754       input_path=`$CYGPATH -u "$shortmode_path"`
11755       new_path="$input_path"
11756     fi
11757   fi
11758 
11759   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11760   if test "x$test_cygdrive_prefix" = x; then
11761     # As a simple fix, exclude /usr/bin since it's not a real path.
11762     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11763       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11764       # a path prefixed by /cygdrive for fixpath to work.
11765       new_path="$CYGWIN_ROOT_PATH$input_path"
11766     fi
11767   fi
11768 
11769 
11770   if test "x$path" != "x$new_path"; then
11771     BOOT_JDK="$new_path"
11772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11773 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11774   fi
11775 
11776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11777 
11778   path="$BOOT_JDK"
11779   has_colon=`$ECHO $path | $GREP ^.:`
11780   new_path="$path"
11781   if test "x$has_colon" = x; then
11782     # Not in mixed or Windows style, start by that.
11783     new_path=`cmd //c echo $path`
11784   fi
11785 
11786 
11787   input_path="$new_path"
11788   # Check if we need to convert this using DOS-style short mode. If the path
11789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11790   # take no chances and rewrite it.
11791   # Note: m4 eats our [], so we need to use [ and ] instead.
11792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11793   if test "x$has_forbidden_chars" != x; then
11794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11795     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11796   fi
11797 
11798 
11799   windows_path="$new_path"
11800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11801     unix_path=`$CYGPATH -u "$windows_path"`
11802     new_path="$unix_path"
11803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11805     new_path="$unix_path"
11806   fi
11807 
11808   if test "x$path" != "x$new_path"; then
11809     BOOT_JDK="$new_path"
11810     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11811 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11812   fi
11813 
11814   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11815   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11816 
11817   else
11818     # We're on a posix platform. Hooray! :)
11819     path="$BOOT_JDK"
11820     has_space=`$ECHO "$path" | $GREP " "`
11821     if test "x$has_space" != x; then
11822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11823 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11824       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11825     fi
11826 
11827     # Use eval to expand a potential ~
11828     eval path="$path"
11829     if test ! -f "$path" && test ! -d "$path"; then
11830       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11831     fi
11832 
11833     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11834   fi
11835 
11836               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11837 $as_echo_n "checking for Boot JDK... " >&6; }
11838               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11839 $as_echo "$BOOT_JDK" >&6; }
11840               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11841 $as_echo_n "checking Boot JDK version... " >&6; }
11842               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11843               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11844 $as_echo "$BOOT_JDK_VERSION" >&6; }
11845             fi # end check jdk version
11846           fi # end check rt.jar
11847         fi # end check javac
11848       fi # end check java
11849     fi # end check boot jdk found
11850   fi
11851 
11852 
11853   # Test: Is $JAVA_HOME set?
11854 
11855   if test "x$BOOT_JDK_FOUND" = xno; then
11856     # Now execute the test
11857 
11858   if test "x$JAVA_HOME" != x; then
11859     JAVA_HOME_PROCESSED="$JAVA_HOME"
11860 
11861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11862 
11863   # Input might be given as Windows format, start by converting to
11864   # unix format.
11865   path="$JAVA_HOME_PROCESSED"
11866   new_path=`$CYGPATH -u "$path"`
11867 
11868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11871   # "foo.exe" is OK but "foo" is an error.
11872   #
11873   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11874   # It is also a way to make sure we got the proper file name for the real test later on.
11875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11876   if test "x$test_shortpath" = x; then
11877     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11878 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11879     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11880   fi
11881 
11882   # Call helper function which possibly converts this using DOS-style short mode.
11883   # If so, the updated path is stored in $new_path.
11884 
11885   input_path="$new_path"
11886   # Check if we need to convert this using DOS-style short mode. If the path
11887   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11888   # take no chances and rewrite it.
11889   # Note: m4 eats our [], so we need to use [ and ] instead.
11890   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11891   if test "x$has_forbidden_chars" != x; then
11892     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11893     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11894     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11895     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11896       # Going to short mode and back again did indeed matter. Since short mode is
11897       # case insensitive, let's make it lowercase to improve readability.
11898       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11899       # Now convert it back to Unix-stile (cygpath)
11900       input_path=`$CYGPATH -u "$shortmode_path"`
11901       new_path="$input_path"
11902     fi
11903   fi
11904 
11905   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11906   if test "x$test_cygdrive_prefix" = x; then
11907     # As a simple fix, exclude /usr/bin since it's not a real path.
11908     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11909       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11910       # a path prefixed by /cygdrive for fixpath to work.
11911       new_path="$CYGWIN_ROOT_PATH$input_path"
11912     fi
11913   fi
11914 
11915 
11916   if test "x$path" != "x$new_path"; then
11917     JAVA_HOME_PROCESSED="$new_path"
11918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11919 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11920   fi
11921 
11922   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11923 
11924   path="$JAVA_HOME_PROCESSED"
11925   has_colon=`$ECHO $path | $GREP ^.:`
11926   new_path="$path"
11927   if test "x$has_colon" = x; then
11928     # Not in mixed or Windows style, start by that.
11929     new_path=`cmd //c echo $path`
11930   fi
11931 
11932 
11933   input_path="$new_path"
11934   # Check if we need to convert this using DOS-style short mode. If the path
11935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11936   # take no chances and rewrite it.
11937   # Note: m4 eats our [], so we need to use [ and ] instead.
11938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11939   if test "x$has_forbidden_chars" != x; then
11940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11941     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11942   fi
11943 
11944 
11945   windows_path="$new_path"
11946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11947     unix_path=`$CYGPATH -u "$windows_path"`
11948     new_path="$unix_path"
11949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11950     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11951     new_path="$unix_path"
11952   fi
11953 
11954   if test "x$path" != "x$new_path"; then
11955     JAVA_HOME_PROCESSED="$new_path"
11956     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11957 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11958   fi
11959 
11960   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11961   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11962 
11963   else
11964     # We're on a posix platform. Hooray! :)
11965     path="$JAVA_HOME_PROCESSED"
11966     has_space=`$ECHO "$path" | $GREP " "`
11967     if test "x$has_space" != x; then
11968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11969 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11970       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11971     fi
11972 
11973     # Use eval to expand a potential ~
11974     eval path="$path"
11975     if test ! -f "$path" && test ! -d "$path"; then
11976       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11977     fi
11978 
11979     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11980   fi
11981 
11982     if test ! -d "$JAVA_HOME_PROCESSED"; then
11983       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11984 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11985     else
11986       # Aha, the user has set a JAVA_HOME
11987       # let us use that as the Boot JDK.
11988       BOOT_JDK="$JAVA_HOME_PROCESSED"
11989       BOOT_JDK_FOUND=maybe
11990       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11991 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11992     fi
11993   fi
11994 
11995 
11996     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11997     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11998       # Do we have a bin/java?
11999       if test ! -x "$BOOT_JDK/bin/java"; then
12000         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12002         BOOT_JDK_FOUND=no
12003       else
12004         # Do we have a bin/javac?
12005         if test ! -x "$BOOT_JDK/bin/javac"; then
12006           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12007 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12008           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12009 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12010           BOOT_JDK_FOUND=no
12011         else
12012           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12013           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12014             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12015 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12016             BOOT_JDK_FOUND=no
12017           else
12018             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12019             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12020 
12021             # Extra M4 quote needed to protect [] in grep expression.
12022             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12023             if test "x$FOUND_VERSION_78" = x; then
12024               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12025 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12026               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12027 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12028               BOOT_JDK_FOUND=no
12029             else
12030               # We're done! :-)
12031               BOOT_JDK_FOUND=yes
12032 
12033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12034 
12035   # Input might be given as Windows format, start by converting to
12036   # unix format.
12037   path="$BOOT_JDK"
12038   new_path=`$CYGPATH -u "$path"`
12039 
12040   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12041   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12042   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12043   # "foo.exe" is OK but "foo" is an error.
12044   #
12045   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12046   # It is also a way to make sure we got the proper file name for the real test later on.
12047   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12048   if test "x$test_shortpath" = x; then
12049     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12050 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12051     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12052   fi
12053 
12054   # Call helper function which possibly converts this using DOS-style short mode.
12055   # If so, the updated path is stored in $new_path.
12056 
12057   input_path="$new_path"
12058   # Check if we need to convert this using DOS-style short mode. If the path
12059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12060   # take no chances and rewrite it.
12061   # Note: m4 eats our [], so we need to use [ and ] instead.
12062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12063   if test "x$has_forbidden_chars" != x; then
12064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12065     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12066     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12067     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12068       # Going to short mode and back again did indeed matter. Since short mode is
12069       # case insensitive, let's make it lowercase to improve readability.
12070       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12071       # Now convert it back to Unix-stile (cygpath)
12072       input_path=`$CYGPATH -u "$shortmode_path"`
12073       new_path="$input_path"
12074     fi
12075   fi
12076 
12077   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12078   if test "x$test_cygdrive_prefix" = x; then
12079     # As a simple fix, exclude /usr/bin since it's not a real path.
12080     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12081       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12082       # a path prefixed by /cygdrive for fixpath to work.
12083       new_path="$CYGWIN_ROOT_PATH$input_path"
12084     fi
12085   fi
12086 
12087 
12088   if test "x$path" != "x$new_path"; then
12089     BOOT_JDK="$new_path"
12090     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12091 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12092   fi
12093 
12094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12095 
12096   path="$BOOT_JDK"
12097   has_colon=`$ECHO $path | $GREP ^.:`
12098   new_path="$path"
12099   if test "x$has_colon" = x; then
12100     # Not in mixed or Windows style, start by that.
12101     new_path=`cmd //c echo $path`
12102   fi
12103 
12104 
12105   input_path="$new_path"
12106   # Check if we need to convert this using DOS-style short mode. If the path
12107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12108   # take no chances and rewrite it.
12109   # Note: m4 eats our [], so we need to use [ and ] instead.
12110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12111   if test "x$has_forbidden_chars" != x; then
12112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12113     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12114   fi
12115 
12116 
12117   windows_path="$new_path"
12118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12119     unix_path=`$CYGPATH -u "$windows_path"`
12120     new_path="$unix_path"
12121   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12122     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12123     new_path="$unix_path"
12124   fi
12125 
12126   if test "x$path" != "x$new_path"; then
12127     BOOT_JDK="$new_path"
12128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12129 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12130   fi
12131 
12132   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12133   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12134 
12135   else
12136     # We're on a posix platform. Hooray! :)
12137     path="$BOOT_JDK"
12138     has_space=`$ECHO "$path" | $GREP " "`
12139     if test "x$has_space" != x; then
12140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12141 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12142       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12143     fi
12144 
12145     # Use eval to expand a potential ~
12146     eval path="$path"
12147     if test ! -f "$path" && test ! -d "$path"; then
12148       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12149     fi
12150 
12151     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12152   fi
12153 
12154               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12155 $as_echo_n "checking for Boot JDK... " >&6; }
12156               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12157 $as_echo "$BOOT_JDK" >&6; }
12158               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12159 $as_echo_n "checking Boot JDK version... " >&6; }
12160               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12161               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12162 $as_echo "$BOOT_JDK_VERSION" >&6; }
12163             fi # end check jdk version
12164           fi # end check rt.jar
12165         fi # end check javac
12166       fi # end check java
12167     fi # end check boot jdk found
12168   fi
12169 
12170 
12171   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12172 
12173   if test "x$BOOT_JDK_FOUND" = xno; then
12174     # Now execute the test
12175 
12176   if test -x /usr/libexec/java_home; then
12177     BOOT_JDK=`/usr/libexec/java_home`
12178     BOOT_JDK_FOUND=maybe
12179     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12180 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12181   fi
12182 
12183 
12184     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12185     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12186       # Do we have a bin/java?
12187       if test ! -x "$BOOT_JDK/bin/java"; then
12188         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12189 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12190         BOOT_JDK_FOUND=no
12191       else
12192         # Do we have a bin/javac?
12193         if test ! -x "$BOOT_JDK/bin/javac"; then
12194           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12196           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12197 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12198           BOOT_JDK_FOUND=no
12199         else
12200           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12201           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12202             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12203 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12204             BOOT_JDK_FOUND=no
12205           else
12206             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12207             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12208 
12209             # Extra M4 quote needed to protect [] in grep expression.
12210             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12211             if test "x$FOUND_VERSION_78" = x; then
12212               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12213 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12214               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12215 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12216               BOOT_JDK_FOUND=no
12217             else
12218               # We're done! :-)
12219               BOOT_JDK_FOUND=yes
12220 
12221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12222 
12223   # Input might be given as Windows format, start by converting to
12224   # unix format.
12225   path="$BOOT_JDK"
12226   new_path=`$CYGPATH -u "$path"`
12227 
12228   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12229   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12230   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12231   # "foo.exe" is OK but "foo" is an error.
12232   #
12233   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12234   # It is also a way to make sure we got the proper file name for the real test later on.
12235   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12236   if test "x$test_shortpath" = x; then
12237     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12238 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12239     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12240   fi
12241 
12242   # Call helper function which possibly converts this using DOS-style short mode.
12243   # If so, the updated path is stored in $new_path.
12244 
12245   input_path="$new_path"
12246   # Check if we need to convert this using DOS-style short mode. If the path
12247   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12248   # take no chances and rewrite it.
12249   # Note: m4 eats our [], so we need to use [ and ] instead.
12250   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12251   if test "x$has_forbidden_chars" != x; then
12252     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12253     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12254     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12255     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12256       # Going to short mode and back again did indeed matter. Since short mode is
12257       # case insensitive, let's make it lowercase to improve readability.
12258       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12259       # Now convert it back to Unix-stile (cygpath)
12260       input_path=`$CYGPATH -u "$shortmode_path"`
12261       new_path="$input_path"
12262     fi
12263   fi
12264 
12265   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12266   if test "x$test_cygdrive_prefix" = x; then
12267     # As a simple fix, exclude /usr/bin since it's not a real path.
12268     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12269       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12270       # a path prefixed by /cygdrive for fixpath to work.
12271       new_path="$CYGWIN_ROOT_PATH$input_path"
12272     fi
12273   fi
12274 
12275 
12276   if test "x$path" != "x$new_path"; then
12277     BOOT_JDK="$new_path"
12278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12279 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12280   fi
12281 
12282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12283 
12284   path="$BOOT_JDK"
12285   has_colon=`$ECHO $path | $GREP ^.:`
12286   new_path="$path"
12287   if test "x$has_colon" = x; then
12288     # Not in mixed or Windows style, start by that.
12289     new_path=`cmd //c echo $path`
12290   fi
12291 
12292 
12293   input_path="$new_path"
12294   # Check if we need to convert this using DOS-style short mode. If the path
12295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12296   # take no chances and rewrite it.
12297   # Note: m4 eats our [], so we need to use [ and ] instead.
12298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12299   if test "x$has_forbidden_chars" != x; then
12300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12301     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12302   fi
12303 
12304 
12305   windows_path="$new_path"
12306   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12307     unix_path=`$CYGPATH -u "$windows_path"`
12308     new_path="$unix_path"
12309   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12310     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12311     new_path="$unix_path"
12312   fi
12313 
12314   if test "x$path" != "x$new_path"; then
12315     BOOT_JDK="$new_path"
12316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12317 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12318   fi
12319 
12320   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12321   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12322 
12323   else
12324     # We're on a posix platform. Hooray! :)
12325     path="$BOOT_JDK"
12326     has_space=`$ECHO "$path" | $GREP " "`
12327     if test "x$has_space" != x; then
12328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12329 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12330       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12331     fi
12332 
12333     # Use eval to expand a potential ~
12334     eval path="$path"
12335     if test ! -f "$path" && test ! -d "$path"; then
12336       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12337     fi
12338 
12339     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12340   fi
12341 
12342               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12343 $as_echo_n "checking for Boot JDK... " >&6; }
12344               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12345 $as_echo "$BOOT_JDK" >&6; }
12346               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12347 $as_echo_n "checking Boot JDK version... " >&6; }
12348               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12349               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12350 $as_echo "$BOOT_JDK_VERSION" >&6; }
12351             fi # end check jdk version
12352           fi # end check rt.jar
12353         fi # end check javac
12354       fi # end check java
12355     fi # end check boot jdk found
12356   fi
12357 
12358 
12359   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12360 
12361   if test "x$BOOT_JDK_FOUND" = xno; then
12362     # Now execute the test
12363 
12364   # Extract the first word of "javac", so it can be a program name with args.
12365 set dummy javac; ac_word=$2
12366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12367 $as_echo_n "checking for $ac_word... " >&6; }
12368 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12369   $as_echo_n "(cached) " >&6
12370 else
12371   case $JAVAC_CHECK in
12372   [\\/]* | ?:[\\/]*)
12373   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12374   ;;
12375   *)
12376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12377 for as_dir in $PATH
12378 do
12379   IFS=$as_save_IFS
12380   test -z "$as_dir" && as_dir=.
12381     for ac_exec_ext in '' $ac_executable_extensions; do
12382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12383     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12385     break 2
12386   fi
12387 done
12388   done
12389 IFS=$as_save_IFS
12390 
12391   ;;
12392 esac
12393 fi
12394 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12395 if test -n "$JAVAC_CHECK"; then
12396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12397 $as_echo "$JAVAC_CHECK" >&6; }
12398 else
12399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400 $as_echo "no" >&6; }
12401 fi
12402 
12403 
12404   # Extract the first word of "java", so it can be a program name with args.
12405 set dummy java; ac_word=$2
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12407 $as_echo_n "checking for $ac_word... " >&6; }
12408 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12409   $as_echo_n "(cached) " >&6
12410 else
12411   case $JAVA_CHECK in
12412   [\\/]* | ?:[\\/]*)
12413   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12414   ;;
12415   *)
12416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12417 for as_dir in $PATH
12418 do
12419   IFS=$as_save_IFS
12420   test -z "$as_dir" && as_dir=.
12421     for ac_exec_ext in '' $ac_executable_extensions; do
12422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12423     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12425     break 2
12426   fi
12427 done
12428   done
12429 IFS=$as_save_IFS
12430 
12431   ;;
12432 esac
12433 fi
12434 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12435 if test -n "$JAVA_CHECK"; then
12436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12437 $as_echo "$JAVA_CHECK" >&6; }
12438 else
12439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12440 $as_echo "no" >&6; }
12441 fi
12442 
12443 
12444   BINARY="$JAVAC_CHECK"
12445   if test "x$JAVAC_CHECK" = x; then
12446     BINARY="$JAVA_CHECK"
12447   fi
12448   if test "x$BINARY" != x; then
12449     # So there is a java(c) binary, it might be part of a JDK.
12450     # Lets find the JDK/JRE directory by following symbolic links.
12451     # Linux/GNU systems often have links from /usr/bin/java to
12452     # /etc/alternatives/java to the real JDK binary.
12453 
12454   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12455     # Follow a chain of symbolic links. Use readlink
12456     # where it exists, else fall back to horribly
12457     # complicated shell code.
12458     if test "x$READLINK_TESTED" != yes; then
12459       # On MacOSX there is a readlink tool with a different
12460       # purpose than the GNU readlink tool. Check the found readlink.
12461       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12462       if test "x$ISGNU" = x; then
12463         # A readlink that we do not know how to use.
12464         # Are there other non-GNU readlinks out there?
12465         READLINK_TESTED=yes
12466         READLINK=
12467       fi
12468     fi
12469 
12470     if test "x$READLINK" != x; then
12471       BINARY=`$READLINK -f $BINARY`
12472     else
12473       # Save the current directory for restoring afterwards
12474       STARTDIR=$PWD
12475       COUNTER=0
12476       sym_link_dir=`$DIRNAME $BINARY`
12477       sym_link_file=`$BASENAME $BINARY`
12478       cd $sym_link_dir
12479       # Use -P flag to resolve symlinks in directories.
12480       cd `$THEPWDCMD -P`
12481       sym_link_dir=`$THEPWDCMD -P`
12482       # Resolve file symlinks
12483       while test $COUNTER -lt 20; do
12484         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12485         if test "x$ISLINK" == x; then
12486           # This is not a symbolic link! We are done!
12487           break
12488         fi
12489         # Again resolve directory symlinks since the target of the just found
12490         # link could be in a different directory
12491         cd `$DIRNAME $ISLINK`
12492         sym_link_dir=`$THEPWDCMD -P`
12493         sym_link_file=`$BASENAME $ISLINK`
12494         let COUNTER=COUNTER+1
12495       done
12496       cd $STARTDIR
12497       BINARY=$sym_link_dir/$sym_link_file
12498     fi
12499   fi
12500 
12501     BOOT_JDK=`dirname "$BINARY"`
12502     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12503     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12504       # Looks like we found ourselves an JDK
12505       BOOT_JDK_FOUND=maybe
12506       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12507 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12508     fi
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 
12687   # Test: Is there a JDK installed in default, well-known locations?
12688 
12689   if test "x$BOOT_JDK_FOUND" = xno; then
12690     # Now execute the test
12691 
12692   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12693 
12694   if test "x$BOOT_JDK_FOUND" = xno; then
12695     # Now execute the test
12696 
12697   if test "x$ProgramW6432" != x; then
12698     VIRTUAL_DIR="$ProgramW6432/Java"
12699 
12700   windows_path="$VIRTUAL_DIR"
12701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12702     unix_path=`$CYGPATH -u "$windows_path"`
12703     VIRTUAL_DIR="$unix_path"
12704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12706     VIRTUAL_DIR="$unix_path"
12707   fi
12708 
12709 
12710   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12711   BOOT_JDK_SUFFIX=""
12712   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12713   if test "x$ALL_JDKS_FOUND" != x; then
12714     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12715 
12716   if test "x$BOOT_JDK_FOUND" = xno; then
12717     # Now execute the test
12718 
12719         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12720         if test -d "$BOOT_JDK"; then
12721           BOOT_JDK_FOUND=maybe
12722           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12723 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12724         fi
12725 
12726 
12727     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12728     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12729       # Do we have a bin/java?
12730       if test ! -x "$BOOT_JDK/bin/java"; then
12731         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12732 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12733         BOOT_JDK_FOUND=no
12734       else
12735         # Do we have a bin/javac?
12736         if test ! -x "$BOOT_JDK/bin/javac"; then
12737           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12738 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12739           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12740 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12741           BOOT_JDK_FOUND=no
12742         else
12743           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12744           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12745             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12746 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12747             BOOT_JDK_FOUND=no
12748           else
12749             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12750             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12751 
12752             # Extra M4 quote needed to protect [] in grep expression.
12753             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12754             if test "x$FOUND_VERSION_78" = x; then
12755               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12756 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12757               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12758 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12759               BOOT_JDK_FOUND=no
12760             else
12761               # We're done! :-)
12762               BOOT_JDK_FOUND=yes
12763 
12764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12765 
12766   # Input might be given as Windows format, start by converting to
12767   # unix format.
12768   path="$BOOT_JDK"
12769   new_path=`$CYGPATH -u "$path"`
12770 
12771   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12772   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12773   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12774   # "foo.exe" is OK but "foo" is an error.
12775   #
12776   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12777   # It is also a way to make sure we got the proper file name for the real test later on.
12778   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12779   if test "x$test_shortpath" = x; then
12780     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12781 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12782     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12783   fi
12784 
12785   # Call helper function which possibly converts this using DOS-style short mode.
12786   # If so, the updated path is stored in $new_path.
12787 
12788   input_path="$new_path"
12789   # Check if we need to convert this using DOS-style short mode. If the path
12790   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12791   # take no chances and rewrite it.
12792   # Note: m4 eats our [], so we need to use [ and ] instead.
12793   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12794   if test "x$has_forbidden_chars" != x; then
12795     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12796     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12797     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12798     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12799       # Going to short mode and back again did indeed matter. Since short mode is
12800       # case insensitive, let's make it lowercase to improve readability.
12801       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12802       # Now convert it back to Unix-stile (cygpath)
12803       input_path=`$CYGPATH -u "$shortmode_path"`
12804       new_path="$input_path"
12805     fi
12806   fi
12807 
12808   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12809   if test "x$test_cygdrive_prefix" = x; then
12810     # As a simple fix, exclude /usr/bin since it's not a real path.
12811     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12812       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12813       # a path prefixed by /cygdrive for fixpath to work.
12814       new_path="$CYGWIN_ROOT_PATH$input_path"
12815     fi
12816   fi
12817 
12818 
12819   if test "x$path" != "x$new_path"; then
12820     BOOT_JDK="$new_path"
12821     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12822 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12823   fi
12824 
12825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12826 
12827   path="$BOOT_JDK"
12828   has_colon=`$ECHO $path | $GREP ^.:`
12829   new_path="$path"
12830   if test "x$has_colon" = x; then
12831     # Not in mixed or Windows style, start by that.
12832     new_path=`cmd //c echo $path`
12833   fi
12834 
12835 
12836   input_path="$new_path"
12837   # Check if we need to convert this using DOS-style short mode. If the path
12838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12839   # take no chances and rewrite it.
12840   # Note: m4 eats our [], so we need to use [ and ] instead.
12841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12842   if test "x$has_forbidden_chars" != x; then
12843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12844     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12845   fi
12846 
12847 
12848   windows_path="$new_path"
12849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12850     unix_path=`$CYGPATH -u "$windows_path"`
12851     new_path="$unix_path"
12852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12854     new_path="$unix_path"
12855   fi
12856 
12857   if test "x$path" != "x$new_path"; then
12858     BOOT_JDK="$new_path"
12859     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12860 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12861   fi
12862 
12863   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12864   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12865 
12866   else
12867     # We're on a posix platform. Hooray! :)
12868     path="$BOOT_JDK"
12869     has_space=`$ECHO "$path" | $GREP " "`
12870     if test "x$has_space" != x; then
12871       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12872 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12873       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12874     fi
12875 
12876     # Use eval to expand a potential ~
12877     eval path="$path"
12878     if test ! -f "$path" && test ! -d "$path"; then
12879       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12880     fi
12881 
12882     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12883   fi
12884 
12885               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12886 $as_echo_n "checking for Boot JDK... " >&6; }
12887               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12888 $as_echo "$BOOT_JDK" >&6; }
12889               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12890 $as_echo_n "checking Boot JDK version... " >&6; }
12891               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12892               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12893 $as_echo "$BOOT_JDK_VERSION" >&6; }
12894             fi # end check jdk version
12895           fi # end check rt.jar
12896         fi # end check javac
12897       fi # end check java
12898     fi # end check boot jdk found
12899   fi
12900 
12901     done
12902   fi
12903 
12904   fi
12905 
12906 
12907     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12908     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12909       # Do we have a bin/java?
12910       if test ! -x "$BOOT_JDK/bin/java"; then
12911         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12912 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12913         BOOT_JDK_FOUND=no
12914       else
12915         # Do we have a bin/javac?
12916         if test ! -x "$BOOT_JDK/bin/javac"; then
12917           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12918 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12919           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12920 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12921           BOOT_JDK_FOUND=no
12922         else
12923           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12924           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12925             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12926 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12927             BOOT_JDK_FOUND=no
12928           else
12929             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12930             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12931 
12932             # Extra M4 quote needed to protect [] in grep expression.
12933             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12934             if test "x$FOUND_VERSION_78" = x; then
12935               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12936 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12937               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12938 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12939               BOOT_JDK_FOUND=no
12940             else
12941               # We're done! :-)
12942               BOOT_JDK_FOUND=yes
12943 
12944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12945 
12946   # Input might be given as Windows format, start by converting to
12947   # unix format.
12948   path="$BOOT_JDK"
12949   new_path=`$CYGPATH -u "$path"`
12950 
12951   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12952   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12953   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12954   # "foo.exe" is OK but "foo" is an error.
12955   #
12956   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12957   # It is also a way to make sure we got the proper file name for the real test later on.
12958   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12959   if test "x$test_shortpath" = x; then
12960     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12961 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12962     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12963   fi
12964 
12965   # Call helper function which possibly converts this using DOS-style short mode.
12966   # If so, the updated path is stored in $new_path.
12967 
12968   input_path="$new_path"
12969   # Check if we need to convert this using DOS-style short mode. If the path
12970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12971   # take no chances and rewrite it.
12972   # Note: m4 eats our [], so we need to use [ and ] instead.
12973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12974   if test "x$has_forbidden_chars" != x; then
12975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12976     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12977     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12978     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12979       # Going to short mode and back again did indeed matter. Since short mode is
12980       # case insensitive, let's make it lowercase to improve readability.
12981       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12982       # Now convert it back to Unix-stile (cygpath)
12983       input_path=`$CYGPATH -u "$shortmode_path"`
12984       new_path="$input_path"
12985     fi
12986   fi
12987 
12988   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12989   if test "x$test_cygdrive_prefix" = x; then
12990     # As a simple fix, exclude /usr/bin since it's not a real path.
12991     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12992       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12993       # a path prefixed by /cygdrive for fixpath to work.
12994       new_path="$CYGWIN_ROOT_PATH$input_path"
12995     fi
12996   fi
12997 
12998 
12999   if test "x$path" != "x$new_path"; then
13000     BOOT_JDK="$new_path"
13001     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13002 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13003   fi
13004 
13005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13006 
13007   path="$BOOT_JDK"
13008   has_colon=`$ECHO $path | $GREP ^.:`
13009   new_path="$path"
13010   if test "x$has_colon" = x; then
13011     # Not in mixed or Windows style, start by that.
13012     new_path=`cmd //c echo $path`
13013   fi
13014 
13015 
13016   input_path="$new_path"
13017   # Check if we need to convert this using DOS-style short mode. If the path
13018   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13019   # take no chances and rewrite it.
13020   # Note: m4 eats our [], so we need to use [ and ] instead.
13021   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13022   if test "x$has_forbidden_chars" != x; then
13023     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13024     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13025   fi
13026 
13027 
13028   windows_path="$new_path"
13029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13030     unix_path=`$CYGPATH -u "$windows_path"`
13031     new_path="$unix_path"
13032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13034     new_path="$unix_path"
13035   fi
13036 
13037   if test "x$path" != "x$new_path"; then
13038     BOOT_JDK="$new_path"
13039     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13040 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13041   fi
13042 
13043   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13044   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13045 
13046   else
13047     # We're on a posix platform. Hooray! :)
13048     path="$BOOT_JDK"
13049     has_space=`$ECHO "$path" | $GREP " "`
13050     if test "x$has_space" != x; then
13051       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13052 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13053       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13054     fi
13055 
13056     # Use eval to expand a potential ~
13057     eval path="$path"
13058     if test ! -f "$path" && test ! -d "$path"; then
13059       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13060     fi
13061 
13062     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13063   fi
13064 
13065               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13066 $as_echo_n "checking for Boot JDK... " >&6; }
13067               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13068 $as_echo "$BOOT_JDK" >&6; }
13069               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13070 $as_echo_n "checking Boot JDK version... " >&6; }
13071               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13072               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13073 $as_echo "$BOOT_JDK_VERSION" >&6; }
13074             fi # end check jdk version
13075           fi # end check rt.jar
13076         fi # end check javac
13077       fi # end check java
13078     fi # end check boot jdk found
13079   fi
13080 
13081 
13082   if test "x$BOOT_JDK_FOUND" = xno; then
13083     # Now execute the test
13084 
13085   if test "x$PROGRAMW6432" != x; then
13086     VIRTUAL_DIR="$PROGRAMW6432/Java"
13087 
13088   windows_path="$VIRTUAL_DIR"
13089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13090     unix_path=`$CYGPATH -u "$windows_path"`
13091     VIRTUAL_DIR="$unix_path"
13092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13094     VIRTUAL_DIR="$unix_path"
13095   fi
13096 
13097 
13098   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13099   BOOT_JDK_SUFFIX=""
13100   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13101   if test "x$ALL_JDKS_FOUND" != x; then
13102     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13103 
13104   if test "x$BOOT_JDK_FOUND" = xno; then
13105     # Now execute the test
13106 
13107         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13108         if test -d "$BOOT_JDK"; then
13109           BOOT_JDK_FOUND=maybe
13110           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13111 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13112         fi
13113 
13114 
13115     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13116     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13117       # Do we have a bin/java?
13118       if test ! -x "$BOOT_JDK/bin/java"; then
13119         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13120 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13121         BOOT_JDK_FOUND=no
13122       else
13123         # Do we have a bin/javac?
13124         if test ! -x "$BOOT_JDK/bin/javac"; then
13125           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13126 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13127           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13128 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13129           BOOT_JDK_FOUND=no
13130         else
13131           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13132           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13133             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13134 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13135             BOOT_JDK_FOUND=no
13136           else
13137             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13138             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13139 
13140             # Extra M4 quote needed to protect [] in grep expression.
13141             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13142             if test "x$FOUND_VERSION_78" = x; then
13143               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13144 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13145               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13146 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13147               BOOT_JDK_FOUND=no
13148             else
13149               # We're done! :-)
13150               BOOT_JDK_FOUND=yes
13151 
13152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13153 
13154   # Input might be given as Windows format, start by converting to
13155   # unix format.
13156   path="$BOOT_JDK"
13157   new_path=`$CYGPATH -u "$path"`
13158 
13159   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13160   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13161   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13162   # "foo.exe" is OK but "foo" is an error.
13163   #
13164   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13165   # It is also a way to make sure we got the proper file name for the real test later on.
13166   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13167   if test "x$test_shortpath" = x; then
13168     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13169 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13170     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13171   fi
13172 
13173   # Call helper function which possibly converts this using DOS-style short mode.
13174   # If so, the updated path is stored in $new_path.
13175 
13176   input_path="$new_path"
13177   # Check if we need to convert this using DOS-style short mode. If the path
13178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13179   # take no chances and rewrite it.
13180   # Note: m4 eats our [], so we need to use [ and ] instead.
13181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13182   if test "x$has_forbidden_chars" != x; then
13183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13184     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13185     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13186     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13187       # Going to short mode and back again did indeed matter. Since short mode is
13188       # case insensitive, let's make it lowercase to improve readability.
13189       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13190       # Now convert it back to Unix-stile (cygpath)
13191       input_path=`$CYGPATH -u "$shortmode_path"`
13192       new_path="$input_path"
13193     fi
13194   fi
13195 
13196   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13197   if test "x$test_cygdrive_prefix" = x; then
13198     # As a simple fix, exclude /usr/bin since it's not a real path.
13199     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13200       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13201       # a path prefixed by /cygdrive for fixpath to work.
13202       new_path="$CYGWIN_ROOT_PATH$input_path"
13203     fi
13204   fi
13205 
13206 
13207   if test "x$path" != "x$new_path"; then
13208     BOOT_JDK="$new_path"
13209     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13210 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13211   fi
13212 
13213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13214 
13215   path="$BOOT_JDK"
13216   has_colon=`$ECHO $path | $GREP ^.:`
13217   new_path="$path"
13218   if test "x$has_colon" = x; then
13219     # Not in mixed or Windows style, start by that.
13220     new_path=`cmd //c echo $path`
13221   fi
13222 
13223 
13224   input_path="$new_path"
13225   # Check if we need to convert this using DOS-style short mode. If the path
13226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13227   # take no chances and rewrite it.
13228   # Note: m4 eats our [], so we need to use [ and ] instead.
13229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13230   if test "x$has_forbidden_chars" != x; then
13231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13232     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13233   fi
13234 
13235 
13236   windows_path="$new_path"
13237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13238     unix_path=`$CYGPATH -u "$windows_path"`
13239     new_path="$unix_path"
13240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13242     new_path="$unix_path"
13243   fi
13244 
13245   if test "x$path" != "x$new_path"; then
13246     BOOT_JDK="$new_path"
13247     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13248 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13249   fi
13250 
13251   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13252   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13253 
13254   else
13255     # We're on a posix platform. Hooray! :)
13256     path="$BOOT_JDK"
13257     has_space=`$ECHO "$path" | $GREP " "`
13258     if test "x$has_space" != x; then
13259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13260 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13261       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13262     fi
13263 
13264     # Use eval to expand a potential ~
13265     eval path="$path"
13266     if test ! -f "$path" && test ! -d "$path"; then
13267       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13268     fi
13269 
13270     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13271   fi
13272 
13273               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13274 $as_echo_n "checking for Boot JDK... " >&6; }
13275               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13276 $as_echo "$BOOT_JDK" >&6; }
13277               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13278 $as_echo_n "checking Boot JDK version... " >&6; }
13279               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13280               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13281 $as_echo "$BOOT_JDK_VERSION" >&6; }
13282             fi # end check jdk version
13283           fi # end check rt.jar
13284         fi # end check javac
13285       fi # end check java
13286     fi # end check boot jdk found
13287   fi
13288 
13289     done
13290   fi
13291 
13292   fi
13293 
13294 
13295     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13296     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13297       # Do we have a bin/java?
13298       if test ! -x "$BOOT_JDK/bin/java"; then
13299         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13300 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13301         BOOT_JDK_FOUND=no
13302       else
13303         # Do we have a bin/javac?
13304         if test ! -x "$BOOT_JDK/bin/javac"; then
13305           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13306 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13307           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13308 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13309           BOOT_JDK_FOUND=no
13310         else
13311           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13312           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13313             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13314 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13315             BOOT_JDK_FOUND=no
13316           else
13317             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13318             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13319 
13320             # Extra M4 quote needed to protect [] in grep expression.
13321             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13322             if test "x$FOUND_VERSION_78" = x; then
13323               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13325               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13326 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13327               BOOT_JDK_FOUND=no
13328             else
13329               # We're done! :-)
13330               BOOT_JDK_FOUND=yes
13331 
13332   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13333 
13334   # Input might be given as Windows format, start by converting to
13335   # unix format.
13336   path="$BOOT_JDK"
13337   new_path=`$CYGPATH -u "$path"`
13338 
13339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13342   # "foo.exe" is OK but "foo" is an error.
13343   #
13344   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13345   # It is also a way to make sure we got the proper file name for the real test later on.
13346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13347   if test "x$test_shortpath" = x; then
13348     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13349 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13350     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13351   fi
13352 
13353   # Call helper function which possibly converts this using DOS-style short mode.
13354   # If so, the updated path is stored in $new_path.
13355 
13356   input_path="$new_path"
13357   # Check if we need to convert this using DOS-style short mode. If the path
13358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13359   # take no chances and rewrite it.
13360   # Note: m4 eats our [], so we need to use [ and ] instead.
13361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13362   if test "x$has_forbidden_chars" != x; then
13363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13364     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13365     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13366     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13367       # Going to short mode and back again did indeed matter. Since short mode is
13368       # case insensitive, let's make it lowercase to improve readability.
13369       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13370       # Now convert it back to Unix-stile (cygpath)
13371       input_path=`$CYGPATH -u "$shortmode_path"`
13372       new_path="$input_path"
13373     fi
13374   fi
13375 
13376   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13377   if test "x$test_cygdrive_prefix" = x; then
13378     # As a simple fix, exclude /usr/bin since it's not a real path.
13379     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13380       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13381       # a path prefixed by /cygdrive for fixpath to work.
13382       new_path="$CYGWIN_ROOT_PATH$input_path"
13383     fi
13384   fi
13385 
13386 
13387   if test "x$path" != "x$new_path"; then
13388     BOOT_JDK="$new_path"
13389     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13390 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13391   fi
13392 
13393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13394 
13395   path="$BOOT_JDK"
13396   has_colon=`$ECHO $path | $GREP ^.:`
13397   new_path="$path"
13398   if test "x$has_colon" = x; then
13399     # Not in mixed or Windows style, start by that.
13400     new_path=`cmd //c echo $path`
13401   fi
13402 
13403 
13404   input_path="$new_path"
13405   # Check if we need to convert this using DOS-style short mode. If the path
13406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13407   # take no chances and rewrite it.
13408   # Note: m4 eats our [], so we need to use [ and ] instead.
13409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13410   if test "x$has_forbidden_chars" != x; then
13411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13412     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13413   fi
13414 
13415 
13416   windows_path="$new_path"
13417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13418     unix_path=`$CYGPATH -u "$windows_path"`
13419     new_path="$unix_path"
13420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13422     new_path="$unix_path"
13423   fi
13424 
13425   if test "x$path" != "x$new_path"; then
13426     BOOT_JDK="$new_path"
13427     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13428 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13429   fi
13430 
13431   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13432   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13433 
13434   else
13435     # We're on a posix platform. Hooray! :)
13436     path="$BOOT_JDK"
13437     has_space=`$ECHO "$path" | $GREP " "`
13438     if test "x$has_space" != x; then
13439       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13440 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13441       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13442     fi
13443 
13444     # Use eval to expand a potential ~
13445     eval path="$path"
13446     if test ! -f "$path" && test ! -d "$path"; then
13447       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13448     fi
13449 
13450     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13451   fi
13452 
13453               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13454 $as_echo_n "checking for Boot JDK... " >&6; }
13455               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13456 $as_echo "$BOOT_JDK" >&6; }
13457               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13458 $as_echo_n "checking Boot JDK version... " >&6; }
13459               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13460               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13461 $as_echo "$BOOT_JDK_VERSION" >&6; }
13462             fi # end check jdk version
13463           fi # end check rt.jar
13464         fi # end check javac
13465       fi # end check java
13466     fi # end check boot jdk found
13467   fi
13468 
13469 
13470   if test "x$BOOT_JDK_FOUND" = xno; then
13471     # Now execute the test
13472 
13473   if test "x$PROGRAMFILES" != x; then
13474     VIRTUAL_DIR="$PROGRAMFILES/Java"
13475 
13476   windows_path="$VIRTUAL_DIR"
13477   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13478     unix_path=`$CYGPATH -u "$windows_path"`
13479     VIRTUAL_DIR="$unix_path"
13480   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13481     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13482     VIRTUAL_DIR="$unix_path"
13483   fi
13484 
13485 
13486   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13487   BOOT_JDK_SUFFIX=""
13488   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13489   if test "x$ALL_JDKS_FOUND" != x; then
13490     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13491 
13492   if test "x$BOOT_JDK_FOUND" = xno; then
13493     # Now execute the test
13494 
13495         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13496         if test -d "$BOOT_JDK"; then
13497           BOOT_JDK_FOUND=maybe
13498           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13499 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13500         fi
13501 
13502 
13503     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13504     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13505       # Do we have a bin/java?
13506       if test ! -x "$BOOT_JDK/bin/java"; then
13507         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13508 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13509         BOOT_JDK_FOUND=no
13510       else
13511         # Do we have a bin/javac?
13512         if test ! -x "$BOOT_JDK/bin/javac"; then
13513           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13514 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13515           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13516 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13517           BOOT_JDK_FOUND=no
13518         else
13519           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13520           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13521             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13522 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13523             BOOT_JDK_FOUND=no
13524           else
13525             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13526             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13527 
13528             # Extra M4 quote needed to protect [] in grep expression.
13529             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13530             if test "x$FOUND_VERSION_78" = x; then
13531               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13533               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13534 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13535               BOOT_JDK_FOUND=no
13536             else
13537               # We're done! :-)
13538               BOOT_JDK_FOUND=yes
13539 
13540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13541 
13542   # Input might be given as Windows format, start by converting to
13543   # unix format.
13544   path="$BOOT_JDK"
13545   new_path=`$CYGPATH -u "$path"`
13546 
13547   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13548   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13549   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13550   # "foo.exe" is OK but "foo" is an error.
13551   #
13552   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13553   # It is also a way to make sure we got the proper file name for the real test later on.
13554   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13555   if test "x$test_shortpath" = x; then
13556     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13557 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13558     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13559   fi
13560 
13561   # Call helper function which possibly converts this using DOS-style short mode.
13562   # If so, the updated path is stored in $new_path.
13563 
13564   input_path="$new_path"
13565   # Check if we need to convert this using DOS-style short mode. If the path
13566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13567   # take no chances and rewrite it.
13568   # Note: m4 eats our [], so we need to use [ and ] instead.
13569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13570   if test "x$has_forbidden_chars" != x; then
13571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13572     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13573     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13574     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13575       # Going to short mode and back again did indeed matter. Since short mode is
13576       # case insensitive, let's make it lowercase to improve readability.
13577       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13578       # Now convert it back to Unix-stile (cygpath)
13579       input_path=`$CYGPATH -u "$shortmode_path"`
13580       new_path="$input_path"
13581     fi
13582   fi
13583 
13584   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13585   if test "x$test_cygdrive_prefix" = x; then
13586     # As a simple fix, exclude /usr/bin since it's not a real path.
13587     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13588       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13589       # a path prefixed by /cygdrive for fixpath to work.
13590       new_path="$CYGWIN_ROOT_PATH$input_path"
13591     fi
13592   fi
13593 
13594 
13595   if test "x$path" != "x$new_path"; then
13596     BOOT_JDK="$new_path"
13597     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13598 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13599   fi
13600 
13601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13602 
13603   path="$BOOT_JDK"
13604   has_colon=`$ECHO $path | $GREP ^.:`
13605   new_path="$path"
13606   if test "x$has_colon" = x; then
13607     # Not in mixed or Windows style, start by that.
13608     new_path=`cmd //c echo $path`
13609   fi
13610 
13611 
13612   input_path="$new_path"
13613   # Check if we need to convert this using DOS-style short mode. If the path
13614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13615   # take no chances and rewrite it.
13616   # Note: m4 eats our [], so we need to use [ and ] instead.
13617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13618   if test "x$has_forbidden_chars" != x; then
13619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13621   fi
13622 
13623 
13624   windows_path="$new_path"
13625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13626     unix_path=`$CYGPATH -u "$windows_path"`
13627     new_path="$unix_path"
13628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13630     new_path="$unix_path"
13631   fi
13632 
13633   if test "x$path" != "x$new_path"; then
13634     BOOT_JDK="$new_path"
13635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13636 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13637   fi
13638 
13639   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13640   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13641 
13642   else
13643     # We're on a posix platform. Hooray! :)
13644     path="$BOOT_JDK"
13645     has_space=`$ECHO "$path" | $GREP " "`
13646     if test "x$has_space" != x; then
13647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13648 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13649       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13650     fi
13651 
13652     # Use eval to expand a potential ~
13653     eval path="$path"
13654     if test ! -f "$path" && test ! -d "$path"; then
13655       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13656     fi
13657 
13658     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13659   fi
13660 
13661               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13662 $as_echo_n "checking for Boot JDK... " >&6; }
13663               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13664 $as_echo "$BOOT_JDK" >&6; }
13665               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13666 $as_echo_n "checking Boot JDK version... " >&6; }
13667               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13668               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13669 $as_echo "$BOOT_JDK_VERSION" >&6; }
13670             fi # end check jdk version
13671           fi # end check rt.jar
13672         fi # end check javac
13673       fi # end check java
13674     fi # end check boot jdk found
13675   fi
13676 
13677     done
13678   fi
13679 
13680   fi
13681 
13682 
13683     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13684     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13685       # Do we have a bin/java?
13686       if test ! -x "$BOOT_JDK/bin/java"; then
13687         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13689         BOOT_JDK_FOUND=no
13690       else
13691         # Do we have a bin/javac?
13692         if test ! -x "$BOOT_JDK/bin/javac"; then
13693           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13695           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13696 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13697           BOOT_JDK_FOUND=no
13698         else
13699           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13700           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13701             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13702 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13703             BOOT_JDK_FOUND=no
13704           else
13705             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13706             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13707 
13708             # Extra M4 quote needed to protect [] in grep expression.
13709             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13710             if test "x$FOUND_VERSION_78" = x; then
13711               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13712 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13713               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13714 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13715               BOOT_JDK_FOUND=no
13716             else
13717               # We're done! :-)
13718               BOOT_JDK_FOUND=yes
13719 
13720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13721 
13722   # Input might be given as Windows format, start by converting to
13723   # unix format.
13724   path="$BOOT_JDK"
13725   new_path=`$CYGPATH -u "$path"`
13726 
13727   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13728   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13729   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13730   # "foo.exe" is OK but "foo" is an error.
13731   #
13732   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13733   # It is also a way to make sure we got the proper file name for the real test later on.
13734   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13735   if test "x$test_shortpath" = x; then
13736     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13737 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13738     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13739   fi
13740 
13741   # Call helper function which possibly converts this using DOS-style short mode.
13742   # If so, the updated path is stored in $new_path.
13743 
13744   input_path="$new_path"
13745   # Check if we need to convert this using DOS-style short mode. If the path
13746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13747   # take no chances and rewrite it.
13748   # Note: m4 eats our [], so we need to use [ and ] instead.
13749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13750   if test "x$has_forbidden_chars" != x; then
13751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13752     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13753     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13754     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13755       # Going to short mode and back again did indeed matter. Since short mode is
13756       # case insensitive, let's make it lowercase to improve readability.
13757       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13758       # Now convert it back to Unix-stile (cygpath)
13759       input_path=`$CYGPATH -u "$shortmode_path"`
13760       new_path="$input_path"
13761     fi
13762   fi
13763 
13764   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13765   if test "x$test_cygdrive_prefix" = x; then
13766     # As a simple fix, exclude /usr/bin since it's not a real path.
13767     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13768       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13769       # a path prefixed by /cygdrive for fixpath to work.
13770       new_path="$CYGWIN_ROOT_PATH$input_path"
13771     fi
13772   fi
13773 
13774 
13775   if test "x$path" != "x$new_path"; then
13776     BOOT_JDK="$new_path"
13777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13778 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13779   fi
13780 
13781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13782 
13783   path="$BOOT_JDK"
13784   has_colon=`$ECHO $path | $GREP ^.:`
13785   new_path="$path"
13786   if test "x$has_colon" = x; then
13787     # Not in mixed or Windows style, start by that.
13788     new_path=`cmd //c echo $path`
13789   fi
13790 
13791 
13792   input_path="$new_path"
13793   # Check if we need to convert this using DOS-style short mode. If the path
13794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13795   # take no chances and rewrite it.
13796   # Note: m4 eats our [], so we need to use [ and ] instead.
13797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13798   if test "x$has_forbidden_chars" != x; then
13799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13800     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13801   fi
13802 
13803 
13804   windows_path="$new_path"
13805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13806     unix_path=`$CYGPATH -u "$windows_path"`
13807     new_path="$unix_path"
13808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13810     new_path="$unix_path"
13811   fi
13812 
13813   if test "x$path" != "x$new_path"; then
13814     BOOT_JDK="$new_path"
13815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13816 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13817   fi
13818 
13819   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13820   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13821 
13822   else
13823     # We're on a posix platform. Hooray! :)
13824     path="$BOOT_JDK"
13825     has_space=`$ECHO "$path" | $GREP " "`
13826     if test "x$has_space" != x; then
13827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13828 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13829       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13830     fi
13831 
13832     # Use eval to expand a potential ~
13833     eval path="$path"
13834     if test ! -f "$path" && test ! -d "$path"; then
13835       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13836     fi
13837 
13838     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13839   fi
13840 
13841               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13842 $as_echo_n "checking for Boot JDK... " >&6; }
13843               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13844 $as_echo "$BOOT_JDK" >&6; }
13845               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13846 $as_echo_n "checking Boot JDK version... " >&6; }
13847               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13848               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13849 $as_echo "$BOOT_JDK_VERSION" >&6; }
13850             fi # end check jdk version
13851           fi # end check rt.jar
13852         fi # end check javac
13853       fi # end check java
13854     fi # end check boot jdk found
13855   fi
13856 
13857 
13858   if test "x$BOOT_JDK_FOUND" = xno; then
13859     # Now execute the test
13860 
13861   if test "x$ProgramFiles" != x; then
13862     VIRTUAL_DIR="$ProgramFiles/Java"
13863 
13864   windows_path="$VIRTUAL_DIR"
13865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13866     unix_path=`$CYGPATH -u "$windows_path"`
13867     VIRTUAL_DIR="$unix_path"
13868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13870     VIRTUAL_DIR="$unix_path"
13871   fi
13872 
13873 
13874   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13875   BOOT_JDK_SUFFIX=""
13876   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13877   if test "x$ALL_JDKS_FOUND" != x; then
13878     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13879 
13880   if test "x$BOOT_JDK_FOUND" = xno; then
13881     # Now execute the test
13882 
13883         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13884         if test -d "$BOOT_JDK"; then
13885           BOOT_JDK_FOUND=maybe
13886           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13887 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13888         fi
13889 
13890 
13891     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13892     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13893       # Do we have a bin/java?
13894       if test ! -x "$BOOT_JDK/bin/java"; then
13895         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13896 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13897         BOOT_JDK_FOUND=no
13898       else
13899         # Do we have a bin/javac?
13900         if test ! -x "$BOOT_JDK/bin/javac"; then
13901           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13903           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13904 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13905           BOOT_JDK_FOUND=no
13906         else
13907           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13908           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13909             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13910 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13911             BOOT_JDK_FOUND=no
13912           else
13913             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13914             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13915 
13916             # Extra M4 quote needed to protect [] in grep expression.
13917             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13918             if test "x$FOUND_VERSION_78" = x; then
13919               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13920 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13921               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13922 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13923               BOOT_JDK_FOUND=no
13924             else
13925               # We're done! :-)
13926               BOOT_JDK_FOUND=yes
13927 
13928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13929 
13930   # Input might be given as Windows format, start by converting to
13931   # unix format.
13932   path="$BOOT_JDK"
13933   new_path=`$CYGPATH -u "$path"`
13934 
13935   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13936   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13937   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13938   # "foo.exe" is OK but "foo" is an error.
13939   #
13940   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13941   # It is also a way to make sure we got the proper file name for the real test later on.
13942   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13943   if test "x$test_shortpath" = x; then
13944     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13945 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13946     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13947   fi
13948 
13949   # Call helper function which possibly converts this using DOS-style short mode.
13950   # If so, the updated path is stored in $new_path.
13951 
13952   input_path="$new_path"
13953   # Check if we need to convert this using DOS-style short mode. If the path
13954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13955   # take no chances and rewrite it.
13956   # Note: m4 eats our [], so we need to use [ and ] instead.
13957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13958   if test "x$has_forbidden_chars" != x; then
13959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13960     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13961     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13962     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13963       # Going to short mode and back again did indeed matter. Since short mode is
13964       # case insensitive, let's make it lowercase to improve readability.
13965       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13966       # Now convert it back to Unix-stile (cygpath)
13967       input_path=`$CYGPATH -u "$shortmode_path"`
13968       new_path="$input_path"
13969     fi
13970   fi
13971 
13972   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13973   if test "x$test_cygdrive_prefix" = x; then
13974     # As a simple fix, exclude /usr/bin since it's not a real path.
13975     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13976       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13977       # a path prefixed by /cygdrive for fixpath to work.
13978       new_path="$CYGWIN_ROOT_PATH$input_path"
13979     fi
13980   fi
13981 
13982 
13983   if test "x$path" != "x$new_path"; then
13984     BOOT_JDK="$new_path"
13985     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13986 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13987   fi
13988 
13989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13990 
13991   path="$BOOT_JDK"
13992   has_colon=`$ECHO $path | $GREP ^.:`
13993   new_path="$path"
13994   if test "x$has_colon" = x; then
13995     # Not in mixed or Windows style, start by that.
13996     new_path=`cmd //c echo $path`
13997   fi
13998 
13999 
14000   input_path="$new_path"
14001   # Check if we need to convert this using DOS-style short mode. If the path
14002   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14003   # take no chances and rewrite it.
14004   # Note: m4 eats our [], so we need to use [ and ] instead.
14005   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14006   if test "x$has_forbidden_chars" != x; then
14007     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14008     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14009   fi
14010 
14011 
14012   windows_path="$new_path"
14013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14014     unix_path=`$CYGPATH -u "$windows_path"`
14015     new_path="$unix_path"
14016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14018     new_path="$unix_path"
14019   fi
14020 
14021   if test "x$path" != "x$new_path"; then
14022     BOOT_JDK="$new_path"
14023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14024 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14025   fi
14026 
14027   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14028   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14029 
14030   else
14031     # We're on a posix platform. Hooray! :)
14032     path="$BOOT_JDK"
14033     has_space=`$ECHO "$path" | $GREP " "`
14034     if test "x$has_space" != x; then
14035       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14036 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14037       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14038     fi
14039 
14040     # Use eval to expand a potential ~
14041     eval path="$path"
14042     if test ! -f "$path" && test ! -d "$path"; then
14043       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14044     fi
14045 
14046     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14047   fi
14048 
14049               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14050 $as_echo_n "checking for Boot JDK... " >&6; }
14051               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14052 $as_echo "$BOOT_JDK" >&6; }
14053               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14054 $as_echo_n "checking Boot JDK version... " >&6; }
14055               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14056               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14057 $as_echo "$BOOT_JDK_VERSION" >&6; }
14058             fi # end check jdk version
14059           fi # end check rt.jar
14060         fi # end check javac
14061       fi # end check java
14062     fi # end check boot jdk found
14063   fi
14064 
14065     done
14066   fi
14067 
14068   fi
14069 
14070 
14071     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14072     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14073       # Do we have a bin/java?
14074       if test ! -x "$BOOT_JDK/bin/java"; then
14075         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14077         BOOT_JDK_FOUND=no
14078       else
14079         # Do we have a bin/javac?
14080         if test ! -x "$BOOT_JDK/bin/javac"; then
14081           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14082 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14083           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14084 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14085           BOOT_JDK_FOUND=no
14086         else
14087           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14088           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14089             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14091             BOOT_JDK_FOUND=no
14092           else
14093             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14094             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14095 
14096             # Extra M4 quote needed to protect [] in grep expression.
14097             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14098             if test "x$FOUND_VERSION_78" = x; then
14099               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14101               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14102 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14103               BOOT_JDK_FOUND=no
14104             else
14105               # We're done! :-)
14106               BOOT_JDK_FOUND=yes
14107 
14108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14109 
14110   # Input might be given as Windows format, start by converting to
14111   # unix format.
14112   path="$BOOT_JDK"
14113   new_path=`$CYGPATH -u "$path"`
14114 
14115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14118   # "foo.exe" is OK but "foo" is an error.
14119   #
14120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14121   # It is also a way to make sure we got the proper file name for the real test later on.
14122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14123   if test "x$test_shortpath" = x; then
14124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14125 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14126     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14127   fi
14128 
14129   # Call helper function which possibly converts this using DOS-style short mode.
14130   # If so, the updated path is stored in $new_path.
14131 
14132   input_path="$new_path"
14133   # Check if we need to convert this using DOS-style short mode. If the path
14134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14135   # take no chances and rewrite it.
14136   # Note: m4 eats our [], so we need to use [ and ] instead.
14137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14138   if test "x$has_forbidden_chars" != x; then
14139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14143       # Going to short mode and back again did indeed matter. Since short mode is
14144       # case insensitive, let's make it lowercase to improve readability.
14145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14146       # Now convert it back to Unix-stile (cygpath)
14147       input_path=`$CYGPATH -u "$shortmode_path"`
14148       new_path="$input_path"
14149     fi
14150   fi
14151 
14152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14153   if test "x$test_cygdrive_prefix" = x; then
14154     # As a simple fix, exclude /usr/bin since it's not a real path.
14155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14157       # a path prefixed by /cygdrive for fixpath to work.
14158       new_path="$CYGWIN_ROOT_PATH$input_path"
14159     fi
14160   fi
14161 
14162 
14163   if test "x$path" != "x$new_path"; then
14164     BOOT_JDK="$new_path"
14165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14166 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14167   fi
14168 
14169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170 
14171   path="$BOOT_JDK"
14172   has_colon=`$ECHO $path | $GREP ^.:`
14173   new_path="$path"
14174   if test "x$has_colon" = x; then
14175     # Not in mixed or Windows style, start by that.
14176     new_path=`cmd //c echo $path`
14177   fi
14178 
14179 
14180   input_path="$new_path"
14181   # Check if we need to convert this using DOS-style short mode. If the path
14182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14183   # take no chances and rewrite it.
14184   # Note: m4 eats our [], so we need to use [ and ] instead.
14185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14186   if test "x$has_forbidden_chars" != x; then
14187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14189   fi
14190 
14191 
14192   windows_path="$new_path"
14193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14194     unix_path=`$CYGPATH -u "$windows_path"`
14195     new_path="$unix_path"
14196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14198     new_path="$unix_path"
14199   fi
14200 
14201   if test "x$path" != "x$new_path"; then
14202     BOOT_JDK="$new_path"
14203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14205   fi
14206 
14207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14209 
14210   else
14211     # We're on a posix platform. Hooray! :)
14212     path="$BOOT_JDK"
14213     has_space=`$ECHO "$path" | $GREP " "`
14214     if test "x$has_space" != x; then
14215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14217       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14218     fi
14219 
14220     # Use eval to expand a potential ~
14221     eval path="$path"
14222     if test ! -f "$path" && test ! -d "$path"; then
14223       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14224     fi
14225 
14226     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14227   fi
14228 
14229               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14230 $as_echo_n "checking for Boot JDK... " >&6; }
14231               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14232 $as_echo "$BOOT_JDK" >&6; }
14233               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14234 $as_echo_n "checking Boot JDK version... " >&6; }
14235               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14236               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14237 $as_echo "$BOOT_JDK_VERSION" >&6; }
14238             fi # end check jdk version
14239           fi # end check rt.jar
14240         fi # end check javac
14241       fi # end check java
14242     fi # end check boot jdk found
14243   fi
14244 
14245 
14246   if test "x$BOOT_JDK_FOUND" = xno; then
14247     # Now execute the test
14248 
14249   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14250   BOOT_JDK_SUFFIX=""
14251   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14252   if test "x$ALL_JDKS_FOUND" != x; then
14253     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14254 
14255   if test "x$BOOT_JDK_FOUND" = xno; then
14256     # Now execute the test
14257 
14258         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14259         if test -d "$BOOT_JDK"; then
14260           BOOT_JDK_FOUND=maybe
14261           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14262 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14263         fi
14264 
14265 
14266     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14267     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14268       # Do we have a bin/java?
14269       if test ! -x "$BOOT_JDK/bin/java"; then
14270         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14271 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14272         BOOT_JDK_FOUND=no
14273       else
14274         # Do we have a bin/javac?
14275         if test ! -x "$BOOT_JDK/bin/javac"; then
14276           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14277 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14278           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14279 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14280           BOOT_JDK_FOUND=no
14281         else
14282           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14283           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14284             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14285 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14286             BOOT_JDK_FOUND=no
14287           else
14288             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14289             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14290 
14291             # Extra M4 quote needed to protect [] in grep expression.
14292             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14293             if test "x$FOUND_VERSION_78" = x; then
14294               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14295 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14296               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14297 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14298               BOOT_JDK_FOUND=no
14299             else
14300               # We're done! :-)
14301               BOOT_JDK_FOUND=yes
14302 
14303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14304 
14305   # Input might be given as Windows format, start by converting to
14306   # unix format.
14307   path="$BOOT_JDK"
14308   new_path=`$CYGPATH -u "$path"`
14309 
14310   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14311   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14312   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14313   # "foo.exe" is OK but "foo" is an error.
14314   #
14315   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14316   # It is also a way to make sure we got the proper file name for the real test later on.
14317   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14318   if test "x$test_shortpath" = x; then
14319     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14320 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14321     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14322   fi
14323 
14324   # Call helper function which possibly converts this using DOS-style short mode.
14325   # If so, the updated path is stored in $new_path.
14326 
14327   input_path="$new_path"
14328   # Check if we need to convert this using DOS-style short mode. If the path
14329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14330   # take no chances and rewrite it.
14331   # Note: m4 eats our [], so we need to use [ and ] instead.
14332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14333   if test "x$has_forbidden_chars" != x; then
14334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14335     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14336     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14337     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14338       # Going to short mode and back again did indeed matter. Since short mode is
14339       # case insensitive, let's make it lowercase to improve readability.
14340       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14341       # Now convert it back to Unix-stile (cygpath)
14342       input_path=`$CYGPATH -u "$shortmode_path"`
14343       new_path="$input_path"
14344     fi
14345   fi
14346 
14347   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14348   if test "x$test_cygdrive_prefix" = x; then
14349     # As a simple fix, exclude /usr/bin since it's not a real path.
14350     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14351       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14352       # a path prefixed by /cygdrive for fixpath to work.
14353       new_path="$CYGWIN_ROOT_PATH$input_path"
14354     fi
14355   fi
14356 
14357 
14358   if test "x$path" != "x$new_path"; then
14359     BOOT_JDK="$new_path"
14360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14362   fi
14363 
14364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14365 
14366   path="$BOOT_JDK"
14367   has_colon=`$ECHO $path | $GREP ^.:`
14368   new_path="$path"
14369   if test "x$has_colon" = x; then
14370     # Not in mixed or Windows style, start by that.
14371     new_path=`cmd //c echo $path`
14372   fi
14373 
14374 
14375   input_path="$new_path"
14376   # Check if we need to convert this using DOS-style short mode. If the path
14377   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14378   # take no chances and rewrite it.
14379   # Note: m4 eats our [], so we need to use [ and ] instead.
14380   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14381   if test "x$has_forbidden_chars" != x; then
14382     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14383     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14384   fi
14385 
14386 
14387   windows_path="$new_path"
14388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14389     unix_path=`$CYGPATH -u "$windows_path"`
14390     new_path="$unix_path"
14391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14393     new_path="$unix_path"
14394   fi
14395 
14396   if test "x$path" != "x$new_path"; then
14397     BOOT_JDK="$new_path"
14398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400   fi
14401 
14402   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14403   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14404 
14405   else
14406     # We're on a posix platform. Hooray! :)
14407     path="$BOOT_JDK"
14408     has_space=`$ECHO "$path" | $GREP " "`
14409     if test "x$has_space" != x; then
14410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14411 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14412       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14413     fi
14414 
14415     # Use eval to expand a potential ~
14416     eval path="$path"
14417     if test ! -f "$path" && test ! -d "$path"; then
14418       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14419     fi
14420 
14421     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14422   fi
14423 
14424               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14425 $as_echo_n "checking for Boot JDK... " >&6; }
14426               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14427 $as_echo "$BOOT_JDK" >&6; }
14428               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14429 $as_echo_n "checking Boot JDK version... " >&6; }
14430               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14431               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14432 $as_echo "$BOOT_JDK_VERSION" >&6; }
14433             fi # end check jdk version
14434           fi # end check rt.jar
14435         fi # end check javac
14436       fi # end check java
14437     fi # end check boot jdk found
14438   fi
14439 
14440     done
14441   fi
14442 
14443 
14444     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14445     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14446       # Do we have a bin/java?
14447       if test ! -x "$BOOT_JDK/bin/java"; then
14448         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14449 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14450         BOOT_JDK_FOUND=no
14451       else
14452         # Do we have a bin/javac?
14453         if test ! -x "$BOOT_JDK/bin/javac"; then
14454           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14455 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14456           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14457 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14458           BOOT_JDK_FOUND=no
14459         else
14460           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14461           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14462             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14463 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14464             BOOT_JDK_FOUND=no
14465           else
14466             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14467             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14468 
14469             # Extra M4 quote needed to protect [] in grep expression.
14470             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14471             if test "x$FOUND_VERSION_78" = x; then
14472               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14473 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14474               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14475 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14476               BOOT_JDK_FOUND=no
14477             else
14478               # We're done! :-)
14479               BOOT_JDK_FOUND=yes
14480 
14481   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14482 
14483   # Input might be given as Windows format, start by converting to
14484   # unix format.
14485   path="$BOOT_JDK"
14486   new_path=`$CYGPATH -u "$path"`
14487 
14488   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14489   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14490   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14491   # "foo.exe" is OK but "foo" is an error.
14492   #
14493   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14494   # It is also a way to make sure we got the proper file name for the real test later on.
14495   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14496   if test "x$test_shortpath" = x; then
14497     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14498 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14499     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14500   fi
14501 
14502   # Call helper function which possibly converts this using DOS-style short mode.
14503   # If so, the updated path is stored in $new_path.
14504 
14505   input_path="$new_path"
14506   # Check if we need to convert this using DOS-style short mode. If the path
14507   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14508   # take no chances and rewrite it.
14509   # Note: m4 eats our [], so we need to use [ and ] instead.
14510   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14511   if test "x$has_forbidden_chars" != x; then
14512     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14513     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14514     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14515     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14516       # Going to short mode and back again did indeed matter. Since short mode is
14517       # case insensitive, let's make it lowercase to improve readability.
14518       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14519       # Now convert it back to Unix-stile (cygpath)
14520       input_path=`$CYGPATH -u "$shortmode_path"`
14521       new_path="$input_path"
14522     fi
14523   fi
14524 
14525   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14526   if test "x$test_cygdrive_prefix" = x; then
14527     # As a simple fix, exclude /usr/bin since it's not a real path.
14528     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14529       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14530       # a path prefixed by /cygdrive for fixpath to work.
14531       new_path="$CYGWIN_ROOT_PATH$input_path"
14532     fi
14533   fi
14534 
14535 
14536   if test "x$path" != "x$new_path"; then
14537     BOOT_JDK="$new_path"
14538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14539 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14540   fi
14541 
14542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14543 
14544   path="$BOOT_JDK"
14545   has_colon=`$ECHO $path | $GREP ^.:`
14546   new_path="$path"
14547   if test "x$has_colon" = x; then
14548     # Not in mixed or Windows style, start by that.
14549     new_path=`cmd //c echo $path`
14550   fi
14551 
14552 
14553   input_path="$new_path"
14554   # Check if we need to convert this using DOS-style short mode. If the path
14555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14556   # take no chances and rewrite it.
14557   # Note: m4 eats our [], so we need to use [ and ] instead.
14558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14559   if test "x$has_forbidden_chars" != x; then
14560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14561     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14562   fi
14563 
14564 
14565   windows_path="$new_path"
14566   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14567     unix_path=`$CYGPATH -u "$windows_path"`
14568     new_path="$unix_path"
14569   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14570     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14571     new_path="$unix_path"
14572   fi
14573 
14574   if test "x$path" != "x$new_path"; then
14575     BOOT_JDK="$new_path"
14576     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14577 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14578   fi
14579 
14580   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14581   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14582 
14583   else
14584     # We're on a posix platform. Hooray! :)
14585     path="$BOOT_JDK"
14586     has_space=`$ECHO "$path" | $GREP " "`
14587     if test "x$has_space" != x; then
14588       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14589 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14590       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14591     fi
14592 
14593     # Use eval to expand a potential ~
14594     eval path="$path"
14595     if test ! -f "$path" && test ! -d "$path"; then
14596       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14597     fi
14598 
14599     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14600   fi
14601 
14602               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14603 $as_echo_n "checking for Boot JDK... " >&6; }
14604               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14605 $as_echo "$BOOT_JDK" >&6; }
14606               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14607 $as_echo_n "checking Boot JDK version... " >&6; }
14608               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14609               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14610 $as_echo "$BOOT_JDK_VERSION" >&6; }
14611             fi # end check jdk version
14612           fi # end check rt.jar
14613         fi # end check javac
14614       fi # end check java
14615     fi # end check boot jdk found
14616   fi
14617 
14618   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14619 
14620   if test "x$BOOT_JDK_FOUND" = xno; then
14621     # Now execute the test
14622 
14623   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14624   BOOT_JDK_SUFFIX="/Contents/Home"
14625   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14626   if test "x$ALL_JDKS_FOUND" != x; then
14627     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14628 
14629   if test "x$BOOT_JDK_FOUND" = xno; then
14630     # Now execute the test
14631 
14632         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14633         if test -d "$BOOT_JDK"; then
14634           BOOT_JDK_FOUND=maybe
14635           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14636 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14637         fi
14638 
14639 
14640     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14641     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14642       # Do we have a bin/java?
14643       if test ! -x "$BOOT_JDK/bin/java"; then
14644         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14645 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14646         BOOT_JDK_FOUND=no
14647       else
14648         # Do we have a bin/javac?
14649         if test ! -x "$BOOT_JDK/bin/javac"; then
14650           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14651 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14652           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14653 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14654           BOOT_JDK_FOUND=no
14655         else
14656           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14657           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14658             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14660             BOOT_JDK_FOUND=no
14661           else
14662             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14663             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14664 
14665             # Extra M4 quote needed to protect [] in grep expression.
14666             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14667             if test "x$FOUND_VERSION_78" = x; then
14668               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14669 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14670               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14671 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14672               BOOT_JDK_FOUND=no
14673             else
14674               # We're done! :-)
14675               BOOT_JDK_FOUND=yes
14676 
14677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14678 
14679   # Input might be given as Windows format, start by converting to
14680   # unix format.
14681   path="$BOOT_JDK"
14682   new_path=`$CYGPATH -u "$path"`
14683 
14684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14687   # "foo.exe" is OK but "foo" is an error.
14688   #
14689   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14690   # It is also a way to make sure we got the proper file name for the real test later on.
14691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14692   if test "x$test_shortpath" = x; then
14693     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14694 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14695     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14696   fi
14697 
14698   # Call helper function which possibly converts this using DOS-style short mode.
14699   # If so, the updated path is stored in $new_path.
14700 
14701   input_path="$new_path"
14702   # Check if we need to convert this using DOS-style short mode. If the path
14703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14704   # take no chances and rewrite it.
14705   # Note: m4 eats our [], so we need to use [ and ] instead.
14706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14707   if test "x$has_forbidden_chars" != x; then
14708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14709     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14710     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14711     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14712       # Going to short mode and back again did indeed matter. Since short mode is
14713       # case insensitive, let's make it lowercase to improve readability.
14714       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14715       # Now convert it back to Unix-stile (cygpath)
14716       input_path=`$CYGPATH -u "$shortmode_path"`
14717       new_path="$input_path"
14718     fi
14719   fi
14720 
14721   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14722   if test "x$test_cygdrive_prefix" = x; then
14723     # As a simple fix, exclude /usr/bin since it's not a real path.
14724     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14725       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14726       # a path prefixed by /cygdrive for fixpath to work.
14727       new_path="$CYGWIN_ROOT_PATH$input_path"
14728     fi
14729   fi
14730 
14731 
14732   if test "x$path" != "x$new_path"; then
14733     BOOT_JDK="$new_path"
14734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14735 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14736   fi
14737 
14738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14739 
14740   path="$BOOT_JDK"
14741   has_colon=`$ECHO $path | $GREP ^.:`
14742   new_path="$path"
14743   if test "x$has_colon" = x; then
14744     # Not in mixed or Windows style, start by that.
14745     new_path=`cmd //c echo $path`
14746   fi
14747 
14748 
14749   input_path="$new_path"
14750   # Check if we need to convert this using DOS-style short mode. If the path
14751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14752   # take no chances and rewrite it.
14753   # Note: m4 eats our [], so we need to use [ and ] instead.
14754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14755   if test "x$has_forbidden_chars" != x; then
14756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14757     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14758   fi
14759 
14760 
14761   windows_path="$new_path"
14762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14763     unix_path=`$CYGPATH -u "$windows_path"`
14764     new_path="$unix_path"
14765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14767     new_path="$unix_path"
14768   fi
14769 
14770   if test "x$path" != "x$new_path"; then
14771     BOOT_JDK="$new_path"
14772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14773 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14774   fi
14775 
14776   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14777   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14778 
14779   else
14780     # We're on a posix platform. Hooray! :)
14781     path="$BOOT_JDK"
14782     has_space=`$ECHO "$path" | $GREP " "`
14783     if test "x$has_space" != x; then
14784       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14785 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14786       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14787     fi
14788 
14789     # Use eval to expand a potential ~
14790     eval path="$path"
14791     if test ! -f "$path" && test ! -d "$path"; then
14792       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14793     fi
14794 
14795     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14796   fi
14797 
14798               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14799 $as_echo_n "checking for Boot JDK... " >&6; }
14800               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14801 $as_echo "$BOOT_JDK" >&6; }
14802               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14803 $as_echo_n "checking Boot JDK version... " >&6; }
14804               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14805               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14806 $as_echo "$BOOT_JDK_VERSION" >&6; }
14807             fi # end check jdk version
14808           fi # end check rt.jar
14809         fi # end check javac
14810       fi # end check java
14811     fi # end check boot jdk found
14812   fi
14813 
14814     done
14815   fi
14816 
14817 
14818     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14819     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14820       # Do we have a bin/java?
14821       if test ! -x "$BOOT_JDK/bin/java"; then
14822         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14824         BOOT_JDK_FOUND=no
14825       else
14826         # Do we have a bin/javac?
14827         if test ! -x "$BOOT_JDK/bin/javac"; then
14828           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14830           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14831 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14832           BOOT_JDK_FOUND=no
14833         else
14834           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14835           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14836             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14837 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14838             BOOT_JDK_FOUND=no
14839           else
14840             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14842 
14843             # Extra M4 quote needed to protect [] in grep expression.
14844             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14845             if test "x$FOUND_VERSION_78" = x; then
14846               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14847 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14848               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14849 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14850               BOOT_JDK_FOUND=no
14851             else
14852               # We're done! :-)
14853               BOOT_JDK_FOUND=yes
14854 
14855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14856 
14857   # Input might be given as Windows format, start by converting to
14858   # unix format.
14859   path="$BOOT_JDK"
14860   new_path=`$CYGPATH -u "$path"`
14861 
14862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14865   # "foo.exe" is OK but "foo" is an error.
14866   #
14867   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14868   # It is also a way to make sure we got the proper file name for the real test later on.
14869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14870   if test "x$test_shortpath" = x; then
14871     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14872 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14873     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14874   fi
14875 
14876   # Call helper function which possibly converts this using DOS-style short mode.
14877   # If so, the updated path is stored in $new_path.
14878 
14879   input_path="$new_path"
14880   # Check if we need to convert this using DOS-style short mode. If the path
14881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14882   # take no chances and rewrite it.
14883   # Note: m4 eats our [], so we need to use [ and ] instead.
14884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14885   if test "x$has_forbidden_chars" != x; then
14886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14887     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14888     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14889     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14890       # Going to short mode and back again did indeed matter. Since short mode is
14891       # case insensitive, let's make it lowercase to improve readability.
14892       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14893       # Now convert it back to Unix-stile (cygpath)
14894       input_path=`$CYGPATH -u "$shortmode_path"`
14895       new_path="$input_path"
14896     fi
14897   fi
14898 
14899   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14900   if test "x$test_cygdrive_prefix" = x; then
14901     # As a simple fix, exclude /usr/bin since it's not a real path.
14902     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14903       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14904       # a path prefixed by /cygdrive for fixpath to work.
14905       new_path="$CYGWIN_ROOT_PATH$input_path"
14906     fi
14907   fi
14908 
14909 
14910   if test "x$path" != "x$new_path"; then
14911     BOOT_JDK="$new_path"
14912     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14914   fi
14915 
14916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14917 
14918   path="$BOOT_JDK"
14919   has_colon=`$ECHO $path | $GREP ^.:`
14920   new_path="$path"
14921   if test "x$has_colon" = x; then
14922     # Not in mixed or Windows style, start by that.
14923     new_path=`cmd //c echo $path`
14924   fi
14925 
14926 
14927   input_path="$new_path"
14928   # Check if we need to convert this using DOS-style short mode. If the path
14929   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14930   # take no chances and rewrite it.
14931   # Note: m4 eats our [], so we need to use [ and ] instead.
14932   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14933   if test "x$has_forbidden_chars" != x; then
14934     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14935     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14936   fi
14937 
14938 
14939   windows_path="$new_path"
14940   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14941     unix_path=`$CYGPATH -u "$windows_path"`
14942     new_path="$unix_path"
14943   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14944     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14945     new_path="$unix_path"
14946   fi
14947 
14948   if test "x$path" != "x$new_path"; then
14949     BOOT_JDK="$new_path"
14950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14952   fi
14953 
14954   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14955   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14956 
14957   else
14958     # We're on a posix platform. Hooray! :)
14959     path="$BOOT_JDK"
14960     has_space=`$ECHO "$path" | $GREP " "`
14961     if test "x$has_space" != x; then
14962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14963 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14964       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14965     fi
14966 
14967     # Use eval to expand a potential ~
14968     eval path="$path"
14969     if test ! -f "$path" && test ! -d "$path"; then
14970       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14971     fi
14972 
14973     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14974   fi
14975 
14976               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14977 $as_echo_n "checking for Boot JDK... " >&6; }
14978               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14979 $as_echo "$BOOT_JDK" >&6; }
14980               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14981 $as_echo_n "checking Boot JDK version... " >&6; }
14982               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14983               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14984 $as_echo "$BOOT_JDK_VERSION" >&6; }
14985             fi # end check jdk version
14986           fi # end check rt.jar
14987         fi # end check javac
14988       fi # end check java
14989     fi # end check boot jdk found
14990   fi
14991 
14992 
14993   if test "x$BOOT_JDK_FOUND" = xno; then
14994     # Now execute the test
14995 
14996   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14997   BOOT_JDK_SUFFIX="/Contents/Home"
14998   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14999   if test "x$ALL_JDKS_FOUND" != x; then
15000     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15001 
15002   if test "x$BOOT_JDK_FOUND" = xno; then
15003     # Now execute the test
15004 
15005         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15006         if test -d "$BOOT_JDK"; then
15007           BOOT_JDK_FOUND=maybe
15008           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15009 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15010         fi
15011 
15012 
15013     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15014     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15015       # Do we have a bin/java?
15016       if test ! -x "$BOOT_JDK/bin/java"; then
15017         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15019         BOOT_JDK_FOUND=no
15020       else
15021         # Do we have a bin/javac?
15022         if test ! -x "$BOOT_JDK/bin/javac"; then
15023           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15024 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15025           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15026 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15027           BOOT_JDK_FOUND=no
15028         else
15029           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15030           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15031             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15033             BOOT_JDK_FOUND=no
15034           else
15035             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15036             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15037 
15038             # Extra M4 quote needed to protect [] in grep expression.
15039             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15040             if test "x$FOUND_VERSION_78" = x; then
15041               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15042 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15043               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15044 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15045               BOOT_JDK_FOUND=no
15046             else
15047               # We're done! :-)
15048               BOOT_JDK_FOUND=yes
15049 
15050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15051 
15052   # Input might be given as Windows format, start by converting to
15053   # unix format.
15054   path="$BOOT_JDK"
15055   new_path=`$CYGPATH -u "$path"`
15056 
15057   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15058   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15059   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15060   # "foo.exe" is OK but "foo" is an error.
15061   #
15062   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15063   # It is also a way to make sure we got the proper file name for the real test later on.
15064   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15065   if test "x$test_shortpath" = x; then
15066     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15067 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15068     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15069   fi
15070 
15071   # Call helper function which possibly converts this using DOS-style short mode.
15072   # If so, the updated path is stored in $new_path.
15073 
15074   input_path="$new_path"
15075   # Check if we need to convert this using DOS-style short mode. If the path
15076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15077   # take no chances and rewrite it.
15078   # Note: m4 eats our [], so we need to use [ and ] instead.
15079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15080   if test "x$has_forbidden_chars" != x; then
15081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15082     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15083     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15084     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15085       # Going to short mode and back again did indeed matter. Since short mode is
15086       # case insensitive, let's make it lowercase to improve readability.
15087       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15088       # Now convert it back to Unix-stile (cygpath)
15089       input_path=`$CYGPATH -u "$shortmode_path"`
15090       new_path="$input_path"
15091     fi
15092   fi
15093 
15094   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15095   if test "x$test_cygdrive_prefix" = x; then
15096     # As a simple fix, exclude /usr/bin since it's not a real path.
15097     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15098       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15099       # a path prefixed by /cygdrive for fixpath to work.
15100       new_path="$CYGWIN_ROOT_PATH$input_path"
15101     fi
15102   fi
15103 
15104 
15105   if test "x$path" != "x$new_path"; then
15106     BOOT_JDK="$new_path"
15107     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15108 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15109   fi
15110 
15111   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15112 
15113   path="$BOOT_JDK"
15114   has_colon=`$ECHO $path | $GREP ^.:`
15115   new_path="$path"
15116   if test "x$has_colon" = x; then
15117     # Not in mixed or Windows style, start by that.
15118     new_path=`cmd //c echo $path`
15119   fi
15120 
15121 
15122   input_path="$new_path"
15123   # Check if we need to convert this using DOS-style short mode. If the path
15124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15125   # take no chances and rewrite it.
15126   # Note: m4 eats our [], so we need to use [ and ] instead.
15127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15128   if test "x$has_forbidden_chars" != x; then
15129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15130     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15131   fi
15132 
15133 
15134   windows_path="$new_path"
15135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15136     unix_path=`$CYGPATH -u "$windows_path"`
15137     new_path="$unix_path"
15138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15140     new_path="$unix_path"
15141   fi
15142 
15143   if test "x$path" != "x$new_path"; then
15144     BOOT_JDK="$new_path"
15145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15146 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15147   fi
15148 
15149   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15150   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15151 
15152   else
15153     # We're on a posix platform. Hooray! :)
15154     path="$BOOT_JDK"
15155     has_space=`$ECHO "$path" | $GREP " "`
15156     if test "x$has_space" != x; then
15157       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15158 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15159       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15160     fi
15161 
15162     # Use eval to expand a potential ~
15163     eval path="$path"
15164     if test ! -f "$path" && test ! -d "$path"; then
15165       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15166     fi
15167 
15168     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15169   fi
15170 
15171               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15172 $as_echo_n "checking for Boot JDK... " >&6; }
15173               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15174 $as_echo "$BOOT_JDK" >&6; }
15175               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15176 $as_echo_n "checking Boot JDK version... " >&6; }
15177               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15178               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15179 $as_echo "$BOOT_JDK_VERSION" >&6; }
15180             fi # end check jdk version
15181           fi # end check rt.jar
15182         fi # end check javac
15183       fi # end check java
15184     fi # end check boot jdk found
15185   fi
15186 
15187     done
15188   fi
15189 
15190 
15191     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15192     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15193       # Do we have a bin/java?
15194       if test ! -x "$BOOT_JDK/bin/java"; then
15195         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15196 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15197         BOOT_JDK_FOUND=no
15198       else
15199         # Do we have a bin/javac?
15200         if test ! -x "$BOOT_JDK/bin/javac"; then
15201           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15202 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15203           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15204 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15205           BOOT_JDK_FOUND=no
15206         else
15207           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15208           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15209             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15210 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15211             BOOT_JDK_FOUND=no
15212           else
15213             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15214             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15215 
15216             # Extra M4 quote needed to protect [] in grep expression.
15217             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15218             if test "x$FOUND_VERSION_78" = x; then
15219               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15220 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15221               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15222 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15223               BOOT_JDK_FOUND=no
15224             else
15225               # We're done! :-)
15226               BOOT_JDK_FOUND=yes
15227 
15228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15229 
15230   # Input might be given as Windows format, start by converting to
15231   # unix format.
15232   path="$BOOT_JDK"
15233   new_path=`$CYGPATH -u "$path"`
15234 
15235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15238   # "foo.exe" is OK but "foo" is an error.
15239   #
15240   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15241   # It is also a way to make sure we got the proper file name for the real test later on.
15242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15243   if test "x$test_shortpath" = x; then
15244     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15245 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15246     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15247   fi
15248 
15249   # Call helper function which possibly converts this using DOS-style short mode.
15250   # If so, the updated path is stored in $new_path.
15251 
15252   input_path="$new_path"
15253   # Check if we need to convert this using DOS-style short mode. If the path
15254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15255   # take no chances and rewrite it.
15256   # Note: m4 eats our [], so we need to use [ and ] instead.
15257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15258   if test "x$has_forbidden_chars" != x; then
15259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15260     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15261     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15262     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15263       # Going to short mode and back again did indeed matter. Since short mode is
15264       # case insensitive, let's make it lowercase to improve readability.
15265       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15266       # Now convert it back to Unix-stile (cygpath)
15267       input_path=`$CYGPATH -u "$shortmode_path"`
15268       new_path="$input_path"
15269     fi
15270   fi
15271 
15272   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15273   if test "x$test_cygdrive_prefix" = x; then
15274     # As a simple fix, exclude /usr/bin since it's not a real path.
15275     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15276       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15277       # a path prefixed by /cygdrive for fixpath to work.
15278       new_path="$CYGWIN_ROOT_PATH$input_path"
15279     fi
15280   fi
15281 
15282 
15283   if test "x$path" != "x$new_path"; then
15284     BOOT_JDK="$new_path"
15285     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15286 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15287   fi
15288 
15289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15290 
15291   path="$BOOT_JDK"
15292   has_colon=`$ECHO $path | $GREP ^.:`
15293   new_path="$path"
15294   if test "x$has_colon" = x; then
15295     # Not in mixed or Windows style, start by that.
15296     new_path=`cmd //c echo $path`
15297   fi
15298 
15299 
15300   input_path="$new_path"
15301   # Check if we need to convert this using DOS-style short mode. If the path
15302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15303   # take no chances and rewrite it.
15304   # Note: m4 eats our [], so we need to use [ and ] instead.
15305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15306   if test "x$has_forbidden_chars" != x; then
15307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15308     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15309   fi
15310 
15311 
15312   windows_path="$new_path"
15313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15314     unix_path=`$CYGPATH -u "$windows_path"`
15315     new_path="$unix_path"
15316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15318     new_path="$unix_path"
15319   fi
15320 
15321   if test "x$path" != "x$new_path"; then
15322     BOOT_JDK="$new_path"
15323     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15324 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15325   fi
15326 
15327   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15328   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15329 
15330   else
15331     # We're on a posix platform. Hooray! :)
15332     path="$BOOT_JDK"
15333     has_space=`$ECHO "$path" | $GREP " "`
15334     if test "x$has_space" != x; then
15335       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15336 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15337       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15338     fi
15339 
15340     # Use eval to expand a potential ~
15341     eval path="$path"
15342     if test ! -f "$path" && test ! -d "$path"; then
15343       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15344     fi
15345 
15346     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15347   fi
15348 
15349               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15350 $as_echo_n "checking for Boot JDK... " >&6; }
15351               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15352 $as_echo "$BOOT_JDK" >&6; }
15353               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15354 $as_echo_n "checking Boot JDK version... " >&6; }
15355               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15356               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15357 $as_echo "$BOOT_JDK_VERSION" >&6; }
15358             fi # end check jdk version
15359           fi # end check rt.jar
15360         fi # end check javac
15361       fi # end check java
15362     fi # end check boot jdk found
15363   fi
15364 
15365   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15366 
15367   if test "x$BOOT_JDK_FOUND" = xno; then
15368     # Now execute the test
15369 
15370   BOOT_JDK_PREFIX="/usr/lib/jvm"
15371   BOOT_JDK_SUFFIX=""
15372   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15373   if test "x$ALL_JDKS_FOUND" != x; then
15374     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15375 
15376   if test "x$BOOT_JDK_FOUND" = xno; then
15377     # Now execute the test
15378 
15379         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15380         if test -d "$BOOT_JDK"; then
15381           BOOT_JDK_FOUND=maybe
15382           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15383 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15384         fi
15385 
15386 
15387     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15388     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15389       # Do we have a bin/java?
15390       if test ! -x "$BOOT_JDK/bin/java"; then
15391         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15392 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15393         BOOT_JDK_FOUND=no
15394       else
15395         # Do we have a bin/javac?
15396         if test ! -x "$BOOT_JDK/bin/javac"; then
15397           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15398 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15399           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15400 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15401           BOOT_JDK_FOUND=no
15402         else
15403           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15404           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15405             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15407             BOOT_JDK_FOUND=no
15408           else
15409             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15410             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15411 
15412             # Extra M4 quote needed to protect [] in grep expression.
15413             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15414             if test "x$FOUND_VERSION_78" = x; then
15415               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15416 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15417               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15418 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15419               BOOT_JDK_FOUND=no
15420             else
15421               # We're done! :-)
15422               BOOT_JDK_FOUND=yes
15423 
15424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15425 
15426   # Input might be given as Windows format, start by converting to
15427   # unix format.
15428   path="$BOOT_JDK"
15429   new_path=`$CYGPATH -u "$path"`
15430 
15431   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15432   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15433   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15434   # "foo.exe" is OK but "foo" is an error.
15435   #
15436   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15437   # It is also a way to make sure we got the proper file name for the real test later on.
15438   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15439   if test "x$test_shortpath" = x; then
15440     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15441 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15442     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15443   fi
15444 
15445   # Call helper function which possibly converts this using DOS-style short mode.
15446   # If so, the updated path is stored in $new_path.
15447 
15448   input_path="$new_path"
15449   # Check if we need to convert this using DOS-style short mode. If the path
15450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15451   # take no chances and rewrite it.
15452   # Note: m4 eats our [], so we need to use [ and ] instead.
15453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15454   if test "x$has_forbidden_chars" != x; then
15455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15459       # Going to short mode and back again did indeed matter. Since short mode is
15460       # case insensitive, let's make it lowercase to improve readability.
15461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15462       # Now convert it back to Unix-stile (cygpath)
15463       input_path=`$CYGPATH -u "$shortmode_path"`
15464       new_path="$input_path"
15465     fi
15466   fi
15467 
15468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15469   if test "x$test_cygdrive_prefix" = x; then
15470     # As a simple fix, exclude /usr/bin since it's not a real path.
15471     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15473       # a path prefixed by /cygdrive for fixpath to work.
15474       new_path="$CYGWIN_ROOT_PATH$input_path"
15475     fi
15476   fi
15477 
15478 
15479   if test "x$path" != "x$new_path"; then
15480     BOOT_JDK="$new_path"
15481     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15482 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15483   fi
15484 
15485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15486 
15487   path="$BOOT_JDK"
15488   has_colon=`$ECHO $path | $GREP ^.:`
15489   new_path="$path"
15490   if test "x$has_colon" = x; then
15491     # Not in mixed or Windows style, start by that.
15492     new_path=`cmd //c echo $path`
15493   fi
15494 
15495 
15496   input_path="$new_path"
15497   # Check if we need to convert this using DOS-style short mode. If the path
15498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15499   # take no chances and rewrite it.
15500   # Note: m4 eats our [], so we need to use [ and ] instead.
15501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15502   if test "x$has_forbidden_chars" != x; then
15503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15504     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15505   fi
15506 
15507 
15508   windows_path="$new_path"
15509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15510     unix_path=`$CYGPATH -u "$windows_path"`
15511     new_path="$unix_path"
15512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15513     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15514     new_path="$unix_path"
15515   fi
15516 
15517   if test "x$path" != "x$new_path"; then
15518     BOOT_JDK="$new_path"
15519     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15520 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15521   fi
15522 
15523   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15524   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15525 
15526   else
15527     # We're on a posix platform. Hooray! :)
15528     path="$BOOT_JDK"
15529     has_space=`$ECHO "$path" | $GREP " "`
15530     if test "x$has_space" != x; then
15531       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15532 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15533       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15534     fi
15535 
15536     # Use eval to expand a potential ~
15537     eval path="$path"
15538     if test ! -f "$path" && test ! -d "$path"; then
15539       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15540     fi
15541 
15542     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15543   fi
15544 
15545               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15546 $as_echo_n "checking for Boot JDK... " >&6; }
15547               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15548 $as_echo "$BOOT_JDK" >&6; }
15549               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15550 $as_echo_n "checking Boot JDK version... " >&6; }
15551               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15552               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15553 $as_echo "$BOOT_JDK_VERSION" >&6; }
15554             fi # end check jdk version
15555           fi # end check rt.jar
15556         fi # end check javac
15557       fi # end check java
15558     fi # end check boot jdk found
15559   fi
15560 
15561     done
15562   fi
15563 
15564 
15565     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15566     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15567       # Do we have a bin/java?
15568       if test ! -x "$BOOT_JDK/bin/java"; then
15569         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15570 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15571         BOOT_JDK_FOUND=no
15572       else
15573         # Do we have a bin/javac?
15574         if test ! -x "$BOOT_JDK/bin/javac"; then
15575           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15576 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15577           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15578 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15579           BOOT_JDK_FOUND=no
15580         else
15581           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15582           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15583             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15584 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15585             BOOT_JDK_FOUND=no
15586           else
15587             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15588             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15589 
15590             # Extra M4 quote needed to protect [] in grep expression.
15591             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15592             if test "x$FOUND_VERSION_78" = x; then
15593               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15594 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15595               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15596 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15597               BOOT_JDK_FOUND=no
15598             else
15599               # We're done! :-)
15600               BOOT_JDK_FOUND=yes
15601 
15602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15603 
15604   # Input might be given as Windows format, start by converting to
15605   # unix format.
15606   path="$BOOT_JDK"
15607   new_path=`$CYGPATH -u "$path"`
15608 
15609   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15610   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15611   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15612   # "foo.exe" is OK but "foo" is an error.
15613   #
15614   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15615   # It is also a way to make sure we got the proper file name for the real test later on.
15616   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15617   if test "x$test_shortpath" = x; then
15618     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15619 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15620     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15621   fi
15622 
15623   # Call helper function which possibly converts this using DOS-style short mode.
15624   # If so, the updated path is stored in $new_path.
15625 
15626   input_path="$new_path"
15627   # Check if we need to convert this using DOS-style short mode. If the path
15628   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15629   # take no chances and rewrite it.
15630   # Note: m4 eats our [], so we need to use [ and ] instead.
15631   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15632   if test "x$has_forbidden_chars" != x; then
15633     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15634     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15635     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15636     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15637       # Going to short mode and back again did indeed matter. Since short mode is
15638       # case insensitive, let's make it lowercase to improve readability.
15639       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15640       # Now convert it back to Unix-stile (cygpath)
15641       input_path=`$CYGPATH -u "$shortmode_path"`
15642       new_path="$input_path"
15643     fi
15644   fi
15645 
15646   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15647   if test "x$test_cygdrive_prefix" = x; then
15648     # As a simple fix, exclude /usr/bin since it's not a real path.
15649     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15650       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15651       # a path prefixed by /cygdrive for fixpath to work.
15652       new_path="$CYGWIN_ROOT_PATH$input_path"
15653     fi
15654   fi
15655 
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   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15664 
15665   path="$BOOT_JDK"
15666   has_colon=`$ECHO $path | $GREP ^.:`
15667   new_path="$path"
15668   if test "x$has_colon" = x; then
15669     # Not in mixed or Windows style, start by that.
15670     new_path=`cmd //c echo $path`
15671   fi
15672 
15673 
15674   input_path="$new_path"
15675   # Check if we need to convert this using DOS-style short mode. If the path
15676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15677   # take no chances and rewrite it.
15678   # Note: m4 eats our [], so we need to use [ and ] instead.
15679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15680   if test "x$has_forbidden_chars" != x; then
15681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15682     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15683   fi
15684 
15685 
15686   windows_path="$new_path"
15687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15688     unix_path=`$CYGPATH -u "$windows_path"`
15689     new_path="$unix_path"
15690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15691     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15692     new_path="$unix_path"
15693   fi
15694 
15695   if test "x$path" != "x$new_path"; then
15696     BOOT_JDK="$new_path"
15697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15698 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15699   fi
15700 
15701   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15702   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15703 
15704   else
15705     # We're on a posix platform. Hooray! :)
15706     path="$BOOT_JDK"
15707     has_space=`$ECHO "$path" | $GREP " "`
15708     if test "x$has_space" != x; then
15709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15710 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15711       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15712     fi
15713 
15714     # Use eval to expand a potential ~
15715     eval path="$path"
15716     if test ! -f "$path" && test ! -d "$path"; then
15717       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15718     fi
15719 
15720     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15721   fi
15722 
15723               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15724 $as_echo_n "checking for Boot JDK... " >&6; }
15725               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15726 $as_echo "$BOOT_JDK" >&6; }
15727               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15728 $as_echo_n "checking Boot JDK version... " >&6; }
15729               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15730               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15731 $as_echo "$BOOT_JDK_VERSION" >&6; }
15732             fi # end check jdk version
15733           fi # end check rt.jar
15734         fi # end check javac
15735       fi # end check java
15736     fi # end check boot jdk found
15737   fi
15738 
15739   fi
15740 
15741 
15742     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15743     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15744       # Do we have a bin/java?
15745       if test ! -x "$BOOT_JDK/bin/java"; then
15746         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15747 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15748         BOOT_JDK_FOUND=no
15749       else
15750         # Do we have a bin/javac?
15751         if test ! -x "$BOOT_JDK/bin/javac"; then
15752           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15753 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15754           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15755 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15756           BOOT_JDK_FOUND=no
15757         else
15758           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15759           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15760             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15762             BOOT_JDK_FOUND=no
15763           else
15764             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15765             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15766 
15767             # Extra M4 quote needed to protect [] in grep expression.
15768             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15769             if test "x$FOUND_VERSION_78" = x; then
15770               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15771 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15772               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15773 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15774               BOOT_JDK_FOUND=no
15775             else
15776               # We're done! :-)
15777               BOOT_JDK_FOUND=yes
15778 
15779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15780 
15781   # Input might be given as Windows format, start by converting to
15782   # unix format.
15783   path="$BOOT_JDK"
15784   new_path=`$CYGPATH -u "$path"`
15785 
15786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15789   # "foo.exe" is OK but "foo" is an error.
15790   #
15791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15792   # It is also a way to make sure we got the proper file name for the real test later on.
15793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15794   if test "x$test_shortpath" = x; then
15795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15796 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15797     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15798   fi
15799 
15800   # Call helper function which possibly converts this using DOS-style short mode.
15801   # If so, the updated path is stored in $new_path.
15802 
15803   input_path="$new_path"
15804   # Check if we need to convert this using DOS-style short mode. If the path
15805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15806   # take no chances and rewrite it.
15807   # Note: m4 eats our [], so we need to use [ and ] instead.
15808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15809   if test "x$has_forbidden_chars" != x; then
15810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15814       # Going to short mode and back again did indeed matter. Since short mode is
15815       # case insensitive, let's make it lowercase to improve readability.
15816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15817       # Now convert it back to Unix-stile (cygpath)
15818       input_path=`$CYGPATH -u "$shortmode_path"`
15819       new_path="$input_path"
15820     fi
15821   fi
15822 
15823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15824   if test "x$test_cygdrive_prefix" = x; then
15825     # As a simple fix, exclude /usr/bin since it's not a real path.
15826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15828       # a path prefixed by /cygdrive for fixpath to work.
15829       new_path="$CYGWIN_ROOT_PATH$input_path"
15830     fi
15831   fi
15832 
15833 
15834   if test "x$path" != "x$new_path"; then
15835     BOOT_JDK="$new_path"
15836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15838   fi
15839 
15840   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15841 
15842   path="$BOOT_JDK"
15843   has_colon=`$ECHO $path | $GREP ^.:`
15844   new_path="$path"
15845   if test "x$has_colon" = x; then
15846     # Not in mixed or Windows style, start by that.
15847     new_path=`cmd //c echo $path`
15848   fi
15849 
15850 
15851   input_path="$new_path"
15852   # Check if we need to convert this using DOS-style short mode. If the path
15853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15854   # take no chances and rewrite it.
15855   # Note: m4 eats our [], so we need to use [ and ] instead.
15856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15857   if test "x$has_forbidden_chars" != x; then
15858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15860   fi
15861 
15862 
15863   windows_path="$new_path"
15864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15865     unix_path=`$CYGPATH -u "$windows_path"`
15866     new_path="$unix_path"
15867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15869     new_path="$unix_path"
15870   fi
15871 
15872   if test "x$path" != "x$new_path"; then
15873     BOOT_JDK="$new_path"
15874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15876   fi
15877 
15878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15880 
15881   else
15882     # We're on a posix platform. Hooray! :)
15883     path="$BOOT_JDK"
15884     has_space=`$ECHO "$path" | $GREP " "`
15885     if test "x$has_space" != x; then
15886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15887 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15888       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15889     fi
15890 
15891     # Use eval to expand a potential ~
15892     eval path="$path"
15893     if test ! -f "$path" && test ! -d "$path"; then
15894       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15895     fi
15896 
15897     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15898   fi
15899 
15900               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15901 $as_echo_n "checking for Boot JDK... " >&6; }
15902               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15903 $as_echo "$BOOT_JDK" >&6; }
15904               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15905 $as_echo_n "checking Boot JDK version... " >&6; }
15906               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15907               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15908 $as_echo "$BOOT_JDK_VERSION" >&6; }
15909             fi # end check jdk version
15910           fi # end check rt.jar
15911         fi # end check javac
15912       fi # end check java
15913     fi # end check boot jdk found
15914   fi
15915 
15916 
15917   # If we haven't found anything yet, we've truly lost. Give up.
15918   if test "x$BOOT_JDK_FOUND" = xno; then
15919 
15920   # Print a helpful message on how to acquire the necessary build dependency.
15921   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15922   MISSING_DEPENDENCY=openjdk
15923 
15924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15925     cygwin_help $MISSING_DEPENDENCY
15926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15927     msys_help $MISSING_DEPENDENCY
15928   else
15929     PKGHANDLER_COMMAND=
15930 
15931     case $PKGHANDLER in
15932       apt-get)
15933         apt_help     $MISSING_DEPENDENCY ;;
15934       yum)
15935         yum_help     $MISSING_DEPENDENCY ;;
15936       port)
15937         port_help    $MISSING_DEPENDENCY ;;
15938       pkgutil)
15939         pkgutil_help $MISSING_DEPENDENCY ;;
15940       pkgadd)
15941         pkgadd_help  $MISSING_DEPENDENCY ;;
15942     esac
15943 
15944     if test "x$PKGHANDLER_COMMAND" != x; then
15945       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15946     fi
15947   fi
15948 
15949     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15950 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15951     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15952 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15953     as_fn_error $? "Cannot continue" "$LINENO" 5
15954   fi
15955 
15956   # Setup proper paths for what we found
15957   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15958   if test ! -f "$BOOT_RTJAR"; then
15959     # On MacOSX it is called classes.jar
15960     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15961     if test -f "$BOOT_RTJAR"; then
15962       # Remove the ..
15963       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15964     fi
15965   fi
15966   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15967   BOOT_JDK="$BOOT_JDK"
15968 
15969 
15970 
15971 
15972   # Setup tools from the Boot JDK.
15973 
15974   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15975 $as_echo_n "checking for java in Boot JDK... " >&6; }
15976   JAVA=$BOOT_JDK/bin/java
15977   if test ! -x $JAVA; then
15978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15979 $as_echo "not found" >&6; }
15980     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15981 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15982     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15983   fi
15984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15985 $as_echo "ok" >&6; }
15986 
15987 
15988   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15989 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15990   JAVAC=$BOOT_JDK/bin/javac
15991   if test ! -x $JAVAC; then
15992     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15993 $as_echo "not found" >&6; }
15994     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15995 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15996     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15997   fi
15998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15999 $as_echo "ok" >&6; }
16000 
16001 
16002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
16003 $as_echo_n "checking for javah in Boot JDK... " >&6; }
16004   JAVAH=$BOOT_JDK/bin/javah
16005   if test ! -x $JAVAH; then
16006     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16007 $as_echo "not found" >&6; }
16008     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16009 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16010     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
16011   fi
16012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16013 $as_echo "ok" >&6; }
16014 
16015 
16016   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
16017 $as_echo_n "checking for javap in Boot JDK... " >&6; }
16018   JAVAP=$BOOT_JDK/bin/javap
16019   if test ! -x $JAVAP; then
16020     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16021 $as_echo "not found" >&6; }
16022     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16023 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16024     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
16025   fi
16026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16027 $as_echo "ok" >&6; }
16028 
16029 
16030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
16031 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16032   JAR=$BOOT_JDK/bin/jar
16033   if test ! -x $JAR; then
16034     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16035 $as_echo "not found" >&6; }
16036     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16037 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16038     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16039   fi
16040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16041 $as_echo "ok" >&6; }
16042 
16043 
16044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16045 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16046   RMIC=$BOOT_JDK/bin/rmic
16047   if test ! -x $RMIC; then
16048     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16049 $as_echo "not found" >&6; }
16050     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16051 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16052     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16053   fi
16054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16055 $as_echo "ok" >&6; }
16056 
16057 
16058   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16059 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16060   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16061   if test ! -x $NATIVE2ASCII; then
16062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16063 $as_echo "not found" >&6; }
16064     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16065 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16066     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16067   fi
16068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16069 $as_echo "ok" >&6; }
16070 
16071 
16072   # Finally, set some other options...
16073 
16074   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16075   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16076 
16077 
16078 
16079 
16080   ##############################################################################
16081   #
16082   # Specify options for anything that is run with the Boot JDK.
16083   #
16084 
16085 # Check whether --with-boot-jdk-jvmargs was given.
16086 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16087   withval=$with_boot_jdk_jvmargs;
16088 fi
16089 
16090 
16091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
16092 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
16093 
16094   # Disable special log output when a debug build is used as Boot JDK...
16095 
16096   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16097   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16098   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16099   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16100   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16101   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16102     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16103     JVM_ARG_OK=true
16104   else
16105     $ECHO "Arg failed:" >&5
16106     $ECHO "$OUTPUT" >&5
16107     JVM_ARG_OK=false
16108   fi
16109 
16110 
16111   # Apply user provided options.
16112 
16113   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
16114   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
16115   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
16116   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16117   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16118   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16119     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
16120     JVM_ARG_OK=true
16121   else
16122     $ECHO "Arg failed:" >&5
16123     $ECHO "$OUTPUT" >&5
16124     JVM_ARG_OK=false
16125   fi
16126 
16127 
16128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
16129 $as_echo "$boot_jdk_jvmargs" >&6; }
16130 
16131   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
16132   JAVA_FLAGS=$boot_jdk_jvmargs
16133 
16134 
16135 
16136   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
16137 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
16138 
16139   # Starting amount of heap memory.
16140 
16141   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16142   $ECHO "Command: $JAVA -Xms64M -version" >&5
16143   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16144   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16145   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16146   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16147     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
16148     JVM_ARG_OK=true
16149   else
16150     $ECHO "Arg failed:" >&5
16151     $ECHO "$OUTPUT" >&5
16152     JVM_ARG_OK=false
16153   fi
16154 
16155 
16156   # Maximum amount of heap memory.
16157   # Maximum stack size.
16158   if test "x$BUILD_NUM_BITS" = x32; then
16159     JVM_MAX_HEAP=1100M
16160     STACK_SIZE=768
16161   else
16162     # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
16163     # pointers are used. Apparently, we need to increase the heap and stack
16164     # space for the jvm. More specifically, when running javac to build huge
16165     # jdk batch
16166     JVM_MAX_HEAP=1600M
16167     STACK_SIZE=1536
16168   fi
16169 
16170   $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
16171   $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
16172   OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
16173   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16174   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16175   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16176     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
16177     JVM_ARG_OK=true
16178   else
16179     $ECHO "Arg failed:" >&5
16180     $ECHO "$OUTPUT" >&5
16181     JVM_ARG_OK=false
16182   fi
16183 
16184 
16185   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16186   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16187   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16188   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16189   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16190   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16191     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
16192     JVM_ARG_OK=true
16193   else
16194     $ECHO "Arg failed:" >&5
16195     $ECHO "$OUTPUT" >&5
16196     JVM_ARG_OK=false
16197   fi
16198 
16199 
16200   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16201   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16202   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16203   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16204   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16205   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16206     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
16207     JVM_ARG_OK=true
16208   else
16209     $ECHO "Arg failed:" >&5
16210     $ECHO "$OUTPUT" >&5
16211     JVM_ARG_OK=false
16212   fi
16213 
16214 
16215   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16216   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16217   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16218   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16219   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16220   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16221     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
16222     JVM_ARG_OK=true
16223   else
16224     $ECHO "Arg failed:" >&5
16225     $ECHO "$OUTPUT" >&5
16226     JVM_ARG_OK=false
16227   fi
16228 
16229 
16230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
16231 $as_echo "$boot_jdk_jvmargs_big" >&6; }
16232 
16233   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
16234 
16235 
16236 
16237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
16238 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
16239 
16240   # Use serial gc for small short lived tools if possible
16241 
16242   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
16243   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
16244   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
16245   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16246   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16247   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16248     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
16249     JVM_ARG_OK=true
16250   else
16251     $ECHO "Arg failed:" >&5
16252     $ECHO "$OUTPUT" >&5
16253     JVM_ARG_OK=false
16254   fi
16255 
16256 
16257   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
16258   $ECHO "Command: $JAVA -Xms32M -version" >&5
16259   OUTPUT=`$JAVA -Xms32M -version 2>&1`
16260   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16261   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16262   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16263     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
16264     JVM_ARG_OK=true
16265   else
16266     $ECHO "Arg failed:" >&5
16267     $ECHO "$OUTPUT" >&5
16268     JVM_ARG_OK=false
16269   fi
16270 
16271 
16272   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
16273   $ECHO "Command: $JAVA -Xmx512M -version" >&5
16274   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
16275   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16276   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16277   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16278     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
16279     JVM_ARG_OK=true
16280   else
16281     $ECHO "Arg failed:" >&5
16282     $ECHO "$OUTPUT" >&5
16283     JVM_ARG_OK=false
16284   fi
16285 
16286 
16287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
16288 $as_echo "$boot_jdk_jvmargs_small" >&6; }
16289 
16290   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
16291 
16292 
16293 
16294 ###############################################################################
16295 #
16296 # Configure the sources to use. We can add or override individual directories.
16297 #
16298 ###############################################################################
16299 
16300 
16301   # Where are the sources. Any of these can be overridden
16302   # using --with-override-corba and the likes.
16303   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16304   CORBA_TOPDIR="$SRC_ROOT/corba"
16305   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16306   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16307   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16308   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16309   JDK_TOPDIR="$SRC_ROOT/jdk"
16310 
16311 
16312 
16313 
16314 
16315 
16316 
16317 
16318 
16319 
16320   ###############################################################################
16321   #
16322   # Pickup additional source for a component from outside of the source root
16323   # or override source for a component.
16324   #
16325 
16326 # Check whether --with-add-source-root was given.
16327 if test "${with_add_source_root+set}" = set; then :
16328   withval=$with_add_source_root;
16329 fi
16330 
16331 
16332 
16333 # Check whether --with-override-source-root was given.
16334 if test "${with_override_source_root+set}" = set; then :
16335   withval=$with_override_source_root;
16336 fi
16337 
16338 
16339 
16340 # Check whether --with-adds-and-overrides was given.
16341 if test "${with_adds_and_overrides+set}" = set; then :
16342   withval=$with_adds_and_overrides;
16343 fi
16344 
16345 
16346   if test "x$with_adds_and_overrides" != x; then
16347     with_add_source_root="$with_adds_and_overrides/adds"
16348     with_override_source_root="$with_adds_and_overrides/overrides"
16349   fi
16350 
16351   if test "x$with_add_source_root" != x; then
16352     if ! test -d $with_add_source_root; then
16353       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16354     fi
16355     CURDIR="$PWD"
16356     cd "$with_add_source_root"
16357     ADD_SRC_ROOT="`pwd`"
16358     cd "$CURDIR"
16359     # Verify that the addon source root does not have any root makefiles.
16360     # If it does, then it is usually an error, prevent this.
16361     if test -f $with_add_source_root/langtools/make/Makefile; then
16362       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
16363     fi
16364     if test -f $with_add_source_root/corba/make/Makefile; then
16365       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
16366     fi
16367     if test -f $with_add_source_root/jaxp/make/Makefile; then
16368       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
16369     fi
16370     if test -f $with_add_source_root/jaxws/make/Makefile; then
16371       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
16372     fi
16373     if test -f $with_add_source_root/hotspot/make/Makefile; then
16374       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
16375     fi
16376     if test -f $with_add_source_root/nashorn/make/Makefile; then
16377       as_fn_error $? "Your add source root seems to contain a full nashorn repo! An add source root should only contain additional sources." "$LINENO" 5
16378     fi
16379     if test -f $with_add_source_root/jdk/make/Makefile; then
16380       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
16381     fi
16382   fi
16383 
16384 
16385   if test "x$with_override_source_root" != x; then
16386     if ! test -d $with_override_source_root; then
16387       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16388     fi
16389     CURDIR="$PWD"
16390     cd "$with_override_source_root"
16391     OVERRIDE_SRC_ROOT="`pwd`"
16392     cd "$CURDIR"
16393     if test -f $with_override_source_root/langtools/make/Makefile; then
16394       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
16395     fi
16396     if test -f $with_override_source_root/corba/make/Makefile; then
16397       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
16398     fi
16399     if test -f $with_override_source_root/jaxp/make/Makefile; then
16400       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
16401     fi
16402     if test -f $with_override_source_root/jaxws/make/Makefile; then
16403       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
16404     fi
16405     if test -f $with_override_source_root/hotspot/make/Makefile; then
16406       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
16407     fi
16408     if test -f $with_override_source_root/nashorn/make/Makefile; then
16409       as_fn_error $? "Your override source root seems to contain a full nashorn repo! An override source root should only contain sources that override." "$LINENO" 5
16410     fi
16411     if test -f $with_override_source_root/jdk/make/Makefile; then
16412       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
16413     fi
16414   fi
16415 
16416 
16417   ###############################################################################
16418   #
16419   # Override a repo completely, this is used for example when you have 3 small
16420   # development sandboxes of the langtools sources and want to avoid having 3 full
16421   # OpenJDK sources checked out on disk.
16422   #
16423   # Assuming that the 3 langtools sandboxes are located here:
16424   # /home/fredrik/sandbox1/langtools
16425   # /home/fredrik/sandbox2/langtools
16426   # /home/fredrik/sandbox3/langtools
16427   #
16428   # From the source root you create build subdirs manually:
16429   #     mkdir -p build1 build2 build3
16430   # in each build directory run:
16431   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16432   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16433   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16434   #
16435 
16436 
16437 # Check whether --with-override-langtools was given.
16438 if test "${with_override_langtools+set}" = set; then :
16439   withval=$with_override_langtools;
16440 fi
16441 
16442 
16443 
16444 # Check whether --with-override-corba was given.
16445 if test "${with_override_corba+set}" = set; then :
16446   withval=$with_override_corba;
16447 fi
16448 
16449 
16450 
16451 # Check whether --with-override-jaxp was given.
16452 if test "${with_override_jaxp+set}" = set; then :
16453   withval=$with_override_jaxp;
16454 fi
16455 
16456 
16457 
16458 # Check whether --with-override-jaxws was given.
16459 if test "${with_override_jaxws+set}" = set; then :
16460   withval=$with_override_jaxws;
16461 fi
16462 
16463 
16464 
16465 # Check whether --with-override-hotspot was given.
16466 if test "${with_override_hotspot+set}" = set; then :
16467   withval=$with_override_hotspot;
16468 fi
16469 
16470 
16471 
16472 # Check whether --with-override-nashorn was given.
16473 if test "${with_override_nashorn+set}" = set; then :
16474   withval=$with_override_nashorn;
16475 fi
16476 
16477 
16478 
16479 # Check whether --with-override-jdk was given.
16480 if test "${with_override_jdk+set}" = set; then :
16481   withval=$with_override_jdk;
16482 fi
16483 
16484 
16485   if test "x$with_override_langtools" != x; then
16486     CURDIR="$PWD"
16487     cd "$with_override_langtools"
16488     LANGTOOLS_TOPDIR="`pwd`"
16489     cd "$CURDIR"
16490     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
16491       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16492     fi
16493     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16494 $as_echo_n "checking if langtools should be overridden... " >&6; }
16495     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16496 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16497   fi
16498   if test "x$with_override_corba" != x; then
16499     CURDIR="$PWD"
16500     cd "$with_override_corba"
16501     CORBA_TOPDIR="`pwd`"
16502     cd "$CURDIR"
16503     if ! test -f $CORBA_TOPDIR/make/Makefile; then
16504       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16505     fi
16506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16507 $as_echo_n "checking if corba should be overridden... " >&6; }
16508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16509 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16510   fi
16511   if test "x$with_override_jaxp" != x; then
16512     CURDIR="$PWD"
16513     cd "$with_override_jaxp"
16514     JAXP_TOPDIR="`pwd`"
16515     cd "$CURDIR"
16516     if ! test -f $JAXP_TOPDIR/make/Makefile; then
16517       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16518     fi
16519     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16520 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16521     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16522 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16523   fi
16524   if test "x$with_override_jaxws" != x; then
16525     CURDIR="$PWD"
16526     cd "$with_override_jaxws"
16527     JAXWS_TOPDIR="`pwd`"
16528     cd "$CURDIR"
16529     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
16530       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16531     fi
16532     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16533 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16534     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16535 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16536   fi
16537   if test "x$with_override_hotspot" != x; then
16538     CURDIR="$PWD"
16539     cd "$with_override_hotspot"
16540     HOTSPOT_TOPDIR="`pwd`"
16541     cd "$CURDIR"
16542     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
16543       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16544     fi
16545     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16546 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16547     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16548 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16549   fi
16550   if test "x$with_override_nashorn" != x; then
16551     CURDIR="$PWD"
16552     cd "$with_override_nashorn"
16553     NASHORN_TOPDIR="`pwd`"
16554     cd "$CURDIR"
16555     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
16556       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16557     fi
16558     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16559 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16560     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16561 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16562   fi
16563   if test "x$with_override_jdk" != x; then
16564     CURDIR="$PWD"
16565     cd "$with_override_jdk"
16566     JDK_TOPDIR="`pwd`"
16567     cd "$CURDIR"
16568     if ! test -f $JDK_TOPDIR/make/Makefile; then
16569       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16570     fi
16571     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16572 $as_echo_n "checking if JDK should be overridden... " >&6; }
16573     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16574 $as_echo "yes with $JDK_TOPDIR" >&6; }
16575   fi
16576 
16577 
16578   BUILD_OUTPUT="$OUTPUT_ROOT"
16579 
16580 
16581   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16582   BUILD_HOTSPOT=true
16583 
16584 
16585 
16586 # Check whether --with-import-hotspot was given.
16587 if test "${with_import_hotspot+set}" = set; then :
16588   withval=$with_import_hotspot;
16589 fi
16590 
16591   if test "x$with_import_hotspot" != x; then
16592     CURDIR="$PWD"
16593     cd "$with_import_hotspot"
16594     HOTSPOT_DIST="`pwd`"
16595     cd "$CURDIR"
16596     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16597       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16598     fi
16599     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16600 $as_echo_n "checking if hotspot should be imported... " >&6; }
16601     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16602 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16603     BUILD_HOTSPOT=false
16604   fi
16605 
16606   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16607 
16608 
16609 ###############################################################################
16610 #
16611 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16612 # cross-compilation aware.
16613 #
16614 ###############################################################################
16615 
16616 
16617   ###############################################################################
16618   #
16619   # Configure the development tool paths and potential sysroot.
16620   #
16621   ac_ext=cpp
16622 ac_cpp='$CXXCPP $CPPFLAGS'
16623 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16624 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16625 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16626 
16627 
16628   # The option used to specify the target .o,.a or .so file.
16629   # When compiling, how to specify the to be created object file.
16630   CC_OUT_OPTION='-o$(SPACE)'
16631   # When linking, how to specify the to be created executable.
16632   EXE_OUT_OPTION='-o$(SPACE)'
16633   # When linking, how to specify the to be created dynamically linkable library.
16634   LD_OUT_OPTION='-o$(SPACE)'
16635   # When archiving, how to specify the to be create static archive for object files.
16636   AR_OUT_OPTION='rcs$(SPACE)'
16637 
16638 
16639 
16640 
16641 
16642 # Locate the actual tools
16643 
16644 
16645 # Check whether --with-jtreg was given.
16646 if test "${with_jtreg+set}" = set; then :
16647   withval=$with_jtreg;
16648 else
16649   with_jtreg=no
16650 fi
16651 
16652 
16653   if test "x$with_jtreg" = xno; then
16654     # jtreg disabled
16655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16656 $as_echo_n "checking for jtreg... " >&6; }
16657     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16658 $as_echo "no" >&6; }
16659   else
16660     if test "x$with_jtreg" != xyes; then
16661       # with path specified.
16662       JT_HOME="$with_jtreg"
16663     fi
16664 
16665     if test "x$JT_HOME" != x; then
16666       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16667 $as_echo_n "checking for jtreg... " >&6; }
16668 
16669       # use JT_HOME enviroment var.
16670 
16671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16672 
16673   # Input might be given as Windows format, start by converting to
16674   # unix format.
16675   path="$JT_HOME"
16676   new_path=`$CYGPATH -u "$path"`
16677 
16678   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16679   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16680   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16681   # "foo.exe" is OK but "foo" is an error.
16682   #
16683   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16684   # It is also a way to make sure we got the proper file name for the real test later on.
16685   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16686   if test "x$test_shortpath" = x; then
16687     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16688 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16689     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16690   fi
16691 
16692   # Call helper function which possibly converts this using DOS-style short mode.
16693   # If so, the updated path is stored in $new_path.
16694 
16695   input_path="$new_path"
16696   # Check if we need to convert this using DOS-style short mode. If the path
16697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16698   # take no chances and rewrite it.
16699   # Note: m4 eats our [], so we need to use [ and ] instead.
16700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16701   if test "x$has_forbidden_chars" != x; then
16702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16703     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16704     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16705     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16706       # Going to short mode and back again did indeed matter. Since short mode is
16707       # case insensitive, let's make it lowercase to improve readability.
16708       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16709       # Now convert it back to Unix-stile (cygpath)
16710       input_path=`$CYGPATH -u "$shortmode_path"`
16711       new_path="$input_path"
16712     fi
16713   fi
16714 
16715   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16716   if test "x$test_cygdrive_prefix" = x; then
16717     # As a simple fix, exclude /usr/bin since it's not a real path.
16718     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16719       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16720       # a path prefixed by /cygdrive for fixpath to work.
16721       new_path="$CYGWIN_ROOT_PATH$input_path"
16722     fi
16723   fi
16724 
16725 
16726   if test "x$path" != "x$new_path"; then
16727     JT_HOME="$new_path"
16728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16729 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16730   fi
16731 
16732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16733 
16734   path="$JT_HOME"
16735   has_colon=`$ECHO $path | $GREP ^.:`
16736   new_path="$path"
16737   if test "x$has_colon" = x; then
16738     # Not in mixed or Windows style, start by that.
16739     new_path=`cmd //c echo $path`
16740   fi
16741 
16742 
16743   input_path="$new_path"
16744   # Check if we need to convert this using DOS-style short mode. If the path
16745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16746   # take no chances and rewrite it.
16747   # Note: m4 eats our [], so we need to use [ and ] instead.
16748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16749   if test "x$has_forbidden_chars" != x; then
16750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16751     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16752   fi
16753 
16754 
16755   windows_path="$new_path"
16756   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16757     unix_path=`$CYGPATH -u "$windows_path"`
16758     new_path="$unix_path"
16759   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16760     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16761     new_path="$unix_path"
16762   fi
16763 
16764   if test "x$path" != "x$new_path"; then
16765     JT_HOME="$new_path"
16766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16767 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16768   fi
16769 
16770   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16771   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16772 
16773   else
16774     # We're on a posix platform. Hooray! :)
16775     path="$JT_HOME"
16776     has_space=`$ECHO "$path" | $GREP " "`
16777     if test "x$has_space" != x; then
16778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16779 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16780       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16781     fi
16782 
16783     # Use eval to expand a potential ~
16784     eval path="$path"
16785     if test ! -f "$path" && test ! -d "$path"; then
16786       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16787     fi
16788 
16789     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16790   fi
16791 
16792 
16793       # jtreg win32 script works for everybody
16794       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16795 
16796       if test ! -f "$JTREGEXE"; then
16797         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16798       fi
16799 
16800       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16801 $as_echo "$JTREGEXE" >&6; }
16802     else
16803       # try to find jtreg on path
16804 
16805   for ac_prog in jtreg
16806 do
16807   # Extract the first word of "$ac_prog", so it can be a program name with args.
16808 set dummy $ac_prog; ac_word=$2
16809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16810 $as_echo_n "checking for $ac_word... " >&6; }
16811 if ${ac_cv_path_JTREGEXE+:} false; then :
16812   $as_echo_n "(cached) " >&6
16813 else
16814   case $JTREGEXE in
16815   [\\/]* | ?:[\\/]*)
16816   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16817   ;;
16818   *)
16819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16820 for as_dir in $PATH
16821 do
16822   IFS=$as_save_IFS
16823   test -z "$as_dir" && as_dir=.
16824     for ac_exec_ext in '' $ac_executable_extensions; do
16825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16826     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16828     break 2
16829   fi
16830 done
16831   done
16832 IFS=$as_save_IFS
16833 
16834   ;;
16835 esac
16836 fi
16837 JTREGEXE=$ac_cv_path_JTREGEXE
16838 if test -n "$JTREGEXE"; then
16839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16840 $as_echo "$JTREGEXE" >&6; }
16841 else
16842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16843 $as_echo "no" >&6; }
16844 fi
16845 
16846 
16847   test -n "$JTREGEXE" && break
16848 done
16849 
16850 
16851   if test "x$JTREGEXE" = x; then
16852     if test "xjtreg" = x; then
16853       PROG_NAME=jtregexe
16854     else
16855       PROG_NAME=jtreg
16856     fi
16857     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16858 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16859     as_fn_error $? "Cannot continue" "$LINENO" 5
16860   fi
16861 
16862 
16863       JT_HOME="`$DIRNAME $JTREGEXE`"
16864     fi
16865   fi
16866 
16867 
16868 
16869 
16870 
16871   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16872 
16873   # Store path to cygwin link.exe to help excluding it when searching for
16874   # VS linker. This must be done before changing the PATH when looking for VS.
16875   # Extract the first word of "link", so it can be a program name with args.
16876 set dummy link; ac_word=$2
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16878 $as_echo_n "checking for $ac_word... " >&6; }
16879 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16880   $as_echo_n "(cached) " >&6
16881 else
16882   case $CYGWIN_LINK in
16883   [\\/]* | ?:[\\/]*)
16884   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16885   ;;
16886   *)
16887   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16888 for as_dir in $PATH
16889 do
16890   IFS=$as_save_IFS
16891   test -z "$as_dir" && as_dir=.
16892     for ac_exec_ext in '' $ac_executable_extensions; do
16893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16894     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16896     break 2
16897   fi
16898 done
16899   done
16900 IFS=$as_save_IFS
16901 
16902   ;;
16903 esac
16904 fi
16905 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16906 if test -n "$CYGWIN_LINK"; then
16907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16908 $as_echo "$CYGWIN_LINK" >&6; }
16909 else
16910   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16911 $as_echo "no" >&6; }
16912 fi
16913 
16914 
16915   if test "x$CYGWIN_LINK" != x; then
16916     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16917 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16918     "$CYGWIN_LINK" --version > /dev/null
16919     if test $? -eq 0 ; then
16920       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16921 $as_echo "yes" >&6; }
16922     else
16923       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16924 $as_echo "no" >&6; }
16925       # This might be the VS linker. Don't exclude it later on.
16926       CYGWIN_LINK=""
16927     fi
16928   fi
16929 
16930   # First-hand choice is to locate and run the vsvars bat file.
16931 
16932   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16933     VCVARSFILE="vc/bin/vcvars32.bat"
16934   else
16935     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16936   fi
16937 
16938   VS_ENV_CMD=""
16939   VS_ENV_ARGS=""
16940   if test "x$with_toolsdir" != x; then
16941 
16942   if test "x$VS_ENV_CMD" = x; then
16943     VS100BASE="$with_toolsdir/../.."
16944     METHOD="--with-tools-dir"
16945 
16946   windows_path="$VS100BASE"
16947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16948     unix_path=`$CYGPATH -u "$windows_path"`
16949     VS100BASE="$unix_path"
16950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16952     VS100BASE="$unix_path"
16953   fi
16954 
16955     if test -d "$VS100BASE"; then
16956       if test -f "$VS100BASE/$VCVARSFILE"; then
16957         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16958 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16959         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16960       else
16961         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16962 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16963         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16964 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16965       fi
16966     fi
16967   fi
16968 
16969   fi
16970 
16971   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16972     # Having specified an argument which is incorrect will produce an instant failure;
16973     # we should not go on looking
16974     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16975 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16976     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16977 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16978     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16979   fi
16980 
16981   if test "x$VS100COMNTOOLS" != x; then
16982 
16983   if test "x$VS_ENV_CMD" = x; then
16984     VS100BASE="$VS100COMNTOOLS/../.."
16985     METHOD="VS100COMNTOOLS variable"
16986 
16987   windows_path="$VS100BASE"
16988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16989     unix_path=`$CYGPATH -u "$windows_path"`
16990     VS100BASE="$unix_path"
16991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16993     VS100BASE="$unix_path"
16994   fi
16995 
16996     if test -d "$VS100BASE"; then
16997       if test -f "$VS100BASE/$VCVARSFILE"; then
16998         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16999 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17000         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17001       else
17002         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17003 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17004         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17005 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17006       fi
17007     fi
17008   fi
17009 
17010   fi
17011   if test "x$PROGRAMFILES" != x; then
17012 
17013   if test "x$VS_ENV_CMD" = x; then
17014     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
17015     METHOD="well-known name"
17016 
17017   windows_path="$VS100BASE"
17018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17019     unix_path=`$CYGPATH -u "$windows_path"`
17020     VS100BASE="$unix_path"
17021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17023     VS100BASE="$unix_path"
17024   fi
17025 
17026     if test -d "$VS100BASE"; then
17027       if test -f "$VS100BASE/$VCVARSFILE"; then
17028         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17029 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17030         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17031       else
17032         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17033 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17034         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17035 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17036       fi
17037     fi
17038   fi
17039 
17040   fi
17041 
17042   if test "x$VS_ENV_CMD" = x; then
17043     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
17044     METHOD="well-known name"
17045 
17046   windows_path="$VS100BASE"
17047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17048     unix_path=`$CYGPATH -u "$windows_path"`
17049     VS100BASE="$unix_path"
17050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17052     VS100BASE="$unix_path"
17053   fi
17054 
17055     if test -d "$VS100BASE"; then
17056       if test -f "$VS100BASE/$VCVARSFILE"; then
17057         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17058 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17059         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17060       else
17061         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17062 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17063         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17064 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17065       fi
17066     fi
17067   fi
17068 
17069 
17070   if test "x$VS_ENV_CMD" = x; then
17071     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
17072     METHOD="well-known name"
17073 
17074   windows_path="$VS100BASE"
17075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17076     unix_path=`$CYGPATH -u "$windows_path"`
17077     VS100BASE="$unix_path"
17078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17080     VS100BASE="$unix_path"
17081   fi
17082 
17083     if test -d "$VS100BASE"; then
17084       if test -f "$VS100BASE/$VCVARSFILE"; then
17085         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17086 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17087         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17088       else
17089         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17090 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17091         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17092 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17093       fi
17094     fi
17095   fi
17096 
17097 
17098   if test "x$ProgramW6432" != x; then
17099 
17100   if test "x$VS_ENV_CMD" = x; then
17101     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17102     METHOD="well-known name"
17103 
17104   windows_path="$WIN_SDK_BASE"
17105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17106     unix_path=`$CYGPATH -u "$windows_path"`
17107     WIN_SDK_BASE="$unix_path"
17108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17109     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17110     WIN_SDK_BASE="$unix_path"
17111   fi
17112 
17113     if test -d "$WIN_SDK_BASE"; then
17114       # There have been cases of partial or broken SDK installations. A missing
17115       # lib dir is not going to work.
17116       if test ! -d "$WIN_SDK_BASE/../lib"; then
17117         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17118 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17119         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17120 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17121       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17122         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17123 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17124         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17125         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17126           VS_ENV_ARGS="/x86"
17127         else
17128           VS_ENV_ARGS="/x64"
17129         fi
17130       else
17131         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17132 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17133         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17134 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17135       fi
17136     fi
17137   fi
17138 
17139   fi
17140   if test "x$PROGRAMW6432" != x; then
17141 
17142   if test "x$VS_ENV_CMD" = x; then
17143     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17144     METHOD="well-known name"
17145 
17146   windows_path="$WIN_SDK_BASE"
17147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17148     unix_path=`$CYGPATH -u "$windows_path"`
17149     WIN_SDK_BASE="$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     WIN_SDK_BASE="$unix_path"
17153   fi
17154 
17155     if test -d "$WIN_SDK_BASE"; then
17156       # There have been cases of partial or broken SDK installations. A missing
17157       # lib dir is not going to work.
17158       if test ! -d "$WIN_SDK_BASE/../lib"; then
17159         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17160 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17161         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17162 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17163       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17164         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17165 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17166         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17167         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17168           VS_ENV_ARGS="/x86"
17169         else
17170           VS_ENV_ARGS="/x64"
17171         fi
17172       else
17173         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17174 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17175         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17176 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17177       fi
17178     fi
17179   fi
17180 
17181   fi
17182   if test "x$PROGRAMFILES" != x; then
17183 
17184   if test "x$VS_ENV_CMD" = x; then
17185     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17186     METHOD="well-known name"
17187 
17188   windows_path="$WIN_SDK_BASE"
17189   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17190     unix_path=`$CYGPATH -u "$windows_path"`
17191     WIN_SDK_BASE="$unix_path"
17192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17193     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17194     WIN_SDK_BASE="$unix_path"
17195   fi
17196 
17197     if test -d "$WIN_SDK_BASE"; then
17198       # There have been cases of partial or broken SDK installations. A missing
17199       # lib dir is not going to work.
17200       if test ! -d "$WIN_SDK_BASE/../lib"; then
17201         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17202 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17203         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17204 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17205       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17206         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17207 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17208         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17209         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17210           VS_ENV_ARGS="/x86"
17211         else
17212           VS_ENV_ARGS="/x64"
17213         fi
17214       else
17215         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17216 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17217         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17218 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17219       fi
17220     fi
17221   fi
17222 
17223   fi
17224 
17225   if test "x$VS_ENV_CMD" = x; then
17226     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17227     METHOD="well-known name"
17228 
17229   windows_path="$WIN_SDK_BASE"
17230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17231     unix_path=`$CYGPATH -u "$windows_path"`
17232     WIN_SDK_BASE="$unix_path"
17233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17235     WIN_SDK_BASE="$unix_path"
17236   fi
17237 
17238     if test -d "$WIN_SDK_BASE"; then
17239       # There have been cases of partial or broken SDK installations. A missing
17240       # lib dir is not going to work.
17241       if test ! -d "$WIN_SDK_BASE/../lib"; then
17242         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17243 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17244         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17245 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17246       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17247         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17248 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17249         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17250         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17251           VS_ENV_ARGS="/x86"
17252         else
17253           VS_ENV_ARGS="/x64"
17254         fi
17255       else
17256         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17257 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17258         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17259 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17260       fi
17261     fi
17262   fi
17263 
17264 
17265   if test "x$VS_ENV_CMD" = x; then
17266     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17267     METHOD="well-known name"
17268 
17269   windows_path="$WIN_SDK_BASE"
17270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17271     unix_path=`$CYGPATH -u "$windows_path"`
17272     WIN_SDK_BASE="$unix_path"
17273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17275     WIN_SDK_BASE="$unix_path"
17276   fi
17277 
17278     if test -d "$WIN_SDK_BASE"; then
17279       # There have been cases of partial or broken SDK installations. A missing
17280       # lib dir is not going to work.
17281       if test ! -d "$WIN_SDK_BASE/../lib"; then
17282         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17283 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17284         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17285 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17286       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17287         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17288 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17289         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17290         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17291           VS_ENV_ARGS="/x86"
17292         else
17293           VS_ENV_ARGS="/x64"
17294         fi
17295       else
17296         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17297 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17298         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17299 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17300       fi
17301     fi
17302   fi
17303 
17304 
17305   if test "x$VS_ENV_CMD" != x; then
17306     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17307 
17308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17309 
17310   # First separate the path from the arguments. This will split at the first
17311   # space.
17312   complete="$VS_ENV_CMD"
17313   path="${complete%% *}"
17314   tmp="$complete EOL"
17315   arguments="${tmp#* }"
17316 
17317   # Input might be given as Windows format, start by converting to
17318   # unix format.
17319   new_path=`$CYGPATH -u "$path"`
17320 
17321   # Now try to locate executable using which
17322   new_path=`$WHICH "$new_path" 2> /dev/null`
17323   # bat and cmd files are not always considered executable in cygwin causing which
17324   # to not find them
17325   if test "x$new_path" = x \
17326       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17327       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17328     new_path=`$CYGPATH -u "$path"`
17329   fi
17330   if test "x$new_path" = x; then
17331     # Oops. Which didn't find the executable.
17332     # The splitting of arguments from the executable at a space might have been incorrect,
17333     # since paths with space are more likely in Windows. Give it another try with the whole
17334     # argument.
17335     path="$complete"
17336     arguments="EOL"
17337     new_path=`$CYGPATH -u "$path"`
17338     new_path=`$WHICH "$new_path" 2> /dev/null`
17339     # bat and cmd files are not always considered executable in cygwin causing which
17340     # to not find them
17341     if test "x$new_path" = x \
17342         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17343         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17344       new_path=`$CYGPATH -u "$path"`
17345     fi
17346     if test "x$new_path" = x; then
17347       # It's still not found. Now this is an unrecoverable error.
17348       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17349 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17350       has_space=`$ECHO "$complete" | $GREP " "`
17351       if test "x$has_space" != x; then
17352         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17353 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17354       fi
17355       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17356     fi
17357   fi
17358 
17359   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17360   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17361   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17362   # "foo.exe" is OK but "foo" is an error.
17363   #
17364   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17365   # It is also a way to make sure we got the proper file name for the real test later on.
17366   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17367   if test "x$test_shortpath" = x; then
17368     # Short path failed, file does not exist as specified.
17369     # Try adding .exe or .cmd
17370     if test -f "${new_path}.exe"; then
17371       input_to_shortpath="${new_path}.exe"
17372     elif test -f "${new_path}.cmd"; then
17373       input_to_shortpath="${new_path}.cmd"
17374     else
17375       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17376 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17377       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17378 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17379       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17380     fi
17381   else
17382     input_to_shortpath="$new_path"
17383   fi
17384 
17385   # Call helper function which possibly converts this using DOS-style short mode.
17386   # If so, the updated path is stored in $new_path.
17387   new_path="$input_to_shortpath"
17388 
17389   input_path="$input_to_shortpath"
17390   # Check if we need to convert this using DOS-style short mode. If the path
17391   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17392   # take no chances and rewrite it.
17393   # Note: m4 eats our [], so we need to use [ and ] instead.
17394   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17395   if test "x$has_forbidden_chars" != x; then
17396     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17397     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17398     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17399     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17400       # Going to short mode and back again did indeed matter. Since short mode is
17401       # case insensitive, let's make it lowercase to improve readability.
17402       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17403       # Now convert it back to Unix-stile (cygpath)
17404       input_path=`$CYGPATH -u "$shortmode_path"`
17405       new_path="$input_path"
17406     fi
17407   fi
17408 
17409   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17410   if test "x$test_cygdrive_prefix" = x; then
17411     # As a simple fix, exclude /usr/bin since it's not a real path.
17412     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17413       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17414       # a path prefixed by /cygdrive for fixpath to work.
17415       new_path="$CYGWIN_ROOT_PATH$input_path"
17416     fi
17417   fi
17418 
17419   # remove trailing .exe if any
17420   new_path="${new_path/%.exe/}"
17421 
17422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17423 
17424   # First separate the path from the arguments. This will split at the first
17425   # space.
17426   complete="$VS_ENV_CMD"
17427   path="${complete%% *}"
17428   tmp="$complete EOL"
17429   arguments="${tmp#* }"
17430 
17431   # Input might be given as Windows format, start by converting to
17432   # unix format.
17433   new_path="$path"
17434 
17435   windows_path="$new_path"
17436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17437     unix_path=`$CYGPATH -u "$windows_path"`
17438     new_path="$unix_path"
17439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17441     new_path="$unix_path"
17442   fi
17443 
17444 
17445   # Now try to locate executable using which
17446   new_path=`$WHICH "$new_path" 2> /dev/null`
17447 
17448   if test "x$new_path" = x; then
17449     # Oops. Which didn't find the executable.
17450     # The splitting of arguments from the executable at a space might have been incorrect,
17451     # since paths with space are more likely in Windows. Give it another try with the whole
17452     # argument.
17453     path="$complete"
17454     arguments="EOL"
17455     new_path="$path"
17456 
17457   windows_path="$new_path"
17458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17459     unix_path=`$CYGPATH -u "$windows_path"`
17460     new_path="$unix_path"
17461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17463     new_path="$unix_path"
17464   fi
17465 
17466 
17467     new_path=`$WHICH "$new_path" 2> /dev/null`
17468 
17469     if test "x$new_path" = x; then
17470       # It's still not found. Now this is an unrecoverable error.
17471       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17472 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17473       has_space=`$ECHO "$complete" | $GREP " "`
17474       if test "x$has_space" != x; then
17475         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17476 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17477       fi
17478       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17479     fi
17480   fi
17481 
17482   # Now new_path has a complete unix path to the binary
17483   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17484     # Keep paths in /bin as-is, but remove trailing .exe if any
17485     new_path="${new_path/%.exe/}"
17486     # Do not save /bin paths to all_fixpath_prefixes!
17487   else
17488     # Not in mixed or Windows style, start by that.
17489     new_path=`cmd //c echo $new_path`
17490 
17491   input_path="$new_path"
17492   # Check if we need to convert this using DOS-style short mode. If the path
17493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17494   # take no chances and rewrite it.
17495   # Note: m4 eats our [], so we need to use [ and ] instead.
17496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17497   if test "x$has_forbidden_chars" != x; then
17498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17499     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17500   fi
17501 
17502     # Output is in $new_path
17503 
17504   windows_path="$new_path"
17505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17506     unix_path=`$CYGPATH -u "$windows_path"`
17507     new_path="$unix_path"
17508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17510     new_path="$unix_path"
17511   fi
17512 
17513     # remove trailing .exe if any
17514     new_path="${new_path/%.exe/}"
17515 
17516     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17517     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17518   fi
17519 
17520   else
17521     # We're on a posix platform. Hooray! :)
17522     # First separate the path from the arguments. This will split at the first
17523     # space.
17524     complete="$VS_ENV_CMD"
17525     path="${complete%% *}"
17526     tmp="$complete EOL"
17527     arguments="${tmp#* }"
17528 
17529     # Cannot rely on the command "which" here since it doesn't always work.
17530     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17531     if test -z "$is_absolute_path"; then
17532       # Path to executable is not absolute. Find it.
17533       IFS_save="$IFS"
17534       IFS=:
17535       for p in $PATH; do
17536         if test -f "$p/$path" && test -x "$p/$path"; then
17537           new_path="$p/$path"
17538           break
17539         fi
17540       done
17541       IFS="$IFS_save"
17542     else
17543       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17544 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17545       new_path="$path"
17546     fi
17547 
17548     if test "x$new_path" = x; then
17549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17550 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17551       has_space=`$ECHO "$complete" | $GREP " "`
17552       if test "x$has_space" != x; then
17553         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17554 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17555       fi
17556       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17557     fi
17558   fi
17559 
17560   # Now join together the path and the arguments once again
17561   if test "x$arguments" != xEOL; then
17562     new_complete="$new_path ${arguments% *}"
17563   else
17564     new_complete="$new_path"
17565   fi
17566 
17567   if test "x$complete" != "x$new_complete"; then
17568     VS_ENV_CMD="$new_complete"
17569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17570 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17571   fi
17572 
17573 
17574     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17575     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17576 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17577     cd $OUTPUT_ROOT
17578     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17579     # to autoconf standards.
17580 
17581     #----
17582 
17583     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17584     # but calculate the difference in Cygwin environment before/after running it and then
17585     # apply the diff.
17586 
17587     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17588       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17589       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17590       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17591     else
17592       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17593       _dosbash=`cmd //c echo \`which bash\``
17594     fi
17595 
17596     # generate the set of exported vars before/after the vs10 setup
17597     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17598     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17599     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17600     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17601 
17602     # Now execute the newly created bat file.
17603     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17604     cmd /c localdevenvtmp.bat | cat
17605 
17606     # apply the diff (less some non-vs10 vars named by "!")
17607     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17608     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17609     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17610 
17611     # cleanup
17612     $RM localdevenvtmp*
17613     #----
17614     cd $CURDIR
17615     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17616       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17617 $as_echo "no" >&6; }
17618       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17619 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17620       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17621 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17622       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17623 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17624       as_fn_error $? "Cannot continue" "$LINENO" 5
17625     fi
17626 
17627     # Now set all paths and other env variables. This will allow the rest of
17628     # the configure script to find and run the compiler in the proper way.
17629     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17630 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17631     . $OUTPUT_ROOT/localdevenv.sh
17632   else
17633     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17634     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17635 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17636   fi
17637 
17638   # At this point, we should have corrent variables in the environment, or we can't continue.
17639   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17640 $as_echo_n "checking for Visual Studio variables... " >&6; }
17641 
17642   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17643     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17644       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17645 $as_echo "present but broken" >&6; }
17646       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17647     else
17648       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17649 $as_echo "ok" >&6; }
17650       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17651       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17652       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17653       # Remove any paths containing # (typically F#) as that messes up make
17654       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17655       VS_PATH="$PATH"
17656 
17657 
17658 
17659     fi
17660   else
17661     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17662 $as_echo "not found" >&6; }
17663 
17664     if test "x$VS_ENV_CMD" = x; then
17665       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17666 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17667       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17668 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17669     else
17670       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17671 $as_echo "$as_me: Running the extraction script failed." >&6;}
17672     fi
17673     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17674 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17675     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17676 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17677     as_fn_error $? "Cannot continue" "$LINENO" 5
17678   fi
17679 
17680 
17681 
17682 # Check whether --with-msvcr-dll was given.
17683 if test "${with_msvcr_dll+set}" = set; then :
17684   withval=$with_msvcr_dll;
17685 fi
17686 
17687 
17688   if test "x$with_msvcr_dll" != x; then
17689     # If given explicitely by user, do not probe. If not present, fail directly.
17690 
17691   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17692   METHOD="--with-msvcr-dll"
17693   if test -e "$POSSIBLE_MSVCR_DLL"; then
17694     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17695 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17696 
17697     # Need to check if the found msvcr is correct architecture
17698     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17699 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17700     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17701     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17702       CORRECT_MSVCR_ARCH=386
17703     else
17704       CORRECT_MSVCR_ARCH=x86-64
17705     fi
17706     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17707       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17708 $as_echo "ok" >&6; }
17709       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17710       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17711 $as_echo_n "checking for msvcr100.dll... " >&6; }
17712       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17713 $as_echo "$MSVCR_DLL" >&6; }
17714     else
17715       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17716 $as_echo "incorrect, ignoring" >&6; }
17717       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17718 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17719     fi
17720   fi
17721 
17722     if test "x$MSVCR_DLL" = x; then
17723       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17724     fi
17725   fi
17726 
17727   if test "x$MSVCR_DLL" = x; then
17728     # Probe: Using well-known location from Visual Studio 10.0
17729     if test "x$VCINSTALLDIR" != x; then
17730       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17731 
17732   windows_path="$CYGWIN_VC_INSTALL_DIR"
17733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17734     unix_path=`$CYGPATH -u "$windows_path"`
17735     CYGWIN_VC_INSTALL_DIR="$unix_path"
17736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17738     CYGWIN_VC_INSTALL_DIR="$unix_path"
17739   fi
17740 
17741       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17742         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17743       else
17744         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17745       fi
17746 
17747   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17748   METHOD="well-known location in VCINSTALLDIR"
17749   if test -e "$POSSIBLE_MSVCR_DLL"; then
17750     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17751 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17752 
17753     # Need to check if the found msvcr is correct architecture
17754     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17755 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17756     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17757     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17758       CORRECT_MSVCR_ARCH=386
17759     else
17760       CORRECT_MSVCR_ARCH=x86-64
17761     fi
17762     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17763       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17764 $as_echo "ok" >&6; }
17765       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17766       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17767 $as_echo_n "checking for msvcr100.dll... " >&6; }
17768       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17769 $as_echo "$MSVCR_DLL" >&6; }
17770     else
17771       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17772 $as_echo "incorrect, ignoring" >&6; }
17773       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17774 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17775     fi
17776   fi
17777 
17778     fi
17779   fi
17780 
17781   if test "x$MSVCR_DLL" = x; then
17782     # Probe: Check in the Boot JDK directory.
17783     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17784 
17785   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17786   METHOD="well-known location in Boot JDK"
17787   if test -e "$POSSIBLE_MSVCR_DLL"; then
17788     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17789 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17790 
17791     # Need to check if the found msvcr is correct architecture
17792     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17793 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17794     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17795     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17796       CORRECT_MSVCR_ARCH=386
17797     else
17798       CORRECT_MSVCR_ARCH=x86-64
17799     fi
17800     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17801       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17802 $as_echo "ok" >&6; }
17803       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17804       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17805 $as_echo_n "checking for msvcr100.dll... " >&6; }
17806       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17807 $as_echo "$MSVCR_DLL" >&6; }
17808     else
17809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17810 $as_echo "incorrect, ignoring" >&6; }
17811       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17812 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17813     fi
17814   fi
17815 
17816   fi
17817 
17818   if test "x$MSVCR_DLL" = x; then
17819     # Probe: Look in the Windows system32 directory
17820     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17821 
17822   windows_path="$CYGWIN_SYSTEMROOT"
17823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17824     unix_path=`$CYGPATH -u "$windows_path"`
17825     CYGWIN_SYSTEMROOT="$unix_path"
17826   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17827     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17828     CYGWIN_SYSTEMROOT="$unix_path"
17829   fi
17830 
17831     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17832 
17833   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17834   METHOD="well-known location in SYSTEMROOT"
17835   if test -e "$POSSIBLE_MSVCR_DLL"; then
17836     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17837 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17838 
17839     # Need to check if the found msvcr is correct architecture
17840     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17841 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17842     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17843     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17844       CORRECT_MSVCR_ARCH=386
17845     else
17846       CORRECT_MSVCR_ARCH=x86-64
17847     fi
17848     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17849       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17850 $as_echo "ok" >&6; }
17851       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17852       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17853 $as_echo_n "checking for msvcr100.dll... " >&6; }
17854       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17855 $as_echo "$MSVCR_DLL" >&6; }
17856     else
17857       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17858 $as_echo "incorrect, ignoring" >&6; }
17859       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17860 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17861     fi
17862   fi
17863 
17864   fi
17865 
17866   if test "x$MSVCR_DLL" = x; then
17867     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17868     if test "x$VS100COMNTOOLS" != x; then
17869       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17870 
17871   windows_path="$CYGWIN_VS_TOOLS_DIR"
17872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17873     unix_path=`$CYGPATH -u "$windows_path"`
17874     CYGWIN_VS_TOOLS_DIR="$unix_path"
17875   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17876     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17877     CYGWIN_VS_TOOLS_DIR="$unix_path"
17878   fi
17879 
17880       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17881         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17882       else
17883         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17884       fi
17885 
17886   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17887   METHOD="search of VS100COMNTOOLS"
17888   if test -e "$POSSIBLE_MSVCR_DLL"; then
17889     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17890 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17891 
17892     # Need to check if the found msvcr is correct architecture
17893     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17894 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17895     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17896     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17897       CORRECT_MSVCR_ARCH=386
17898     else
17899       CORRECT_MSVCR_ARCH=x86-64
17900     fi
17901     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17902       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17903 $as_echo "ok" >&6; }
17904       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17905       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17906 $as_echo_n "checking for msvcr100.dll... " >&6; }
17907       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17908 $as_echo "$MSVCR_DLL" >&6; }
17909     else
17910       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17911 $as_echo "incorrect, ignoring" >&6; }
17912       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17913 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17914     fi
17915   fi
17916 
17917     fi
17918   fi
17919 
17920   if test "x$MSVCR_DLL" = x; then
17921     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17922     # (This was the original behaviour; kept since it might turn up something)
17923     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17924       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17925         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17926       else
17927         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17928         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17929           # We're grasping at straws now...
17930           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17931         fi
17932       fi
17933 
17934 
17935   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17936   METHOD="search of VCINSTALLDIR"
17937   if test -e "$POSSIBLE_MSVCR_DLL"; then
17938     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17939 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17940 
17941     # Need to check if the found msvcr is correct architecture
17942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17943 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17944     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17945     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17946       CORRECT_MSVCR_ARCH=386
17947     else
17948       CORRECT_MSVCR_ARCH=x86-64
17949     fi
17950     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17951       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17952 $as_echo "ok" >&6; }
17953       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17954       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17955 $as_echo_n "checking for msvcr100.dll... " >&6; }
17956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17957 $as_echo "$MSVCR_DLL" >&6; }
17958     else
17959       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17960 $as_echo "incorrect, ignoring" >&6; }
17961       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17962 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17963     fi
17964   fi
17965 
17966     fi
17967   fi
17968 
17969   if test "x$MSVCR_DLL" = x; then
17970     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17971 $as_echo_n "checking for msvcr100.dll... " >&6; }
17972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17973 $as_echo "no" >&6; }
17974     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17975   fi
17976 
17977 
17978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17979 
17980   # Input might be given as Windows format, start by converting to
17981   # unix format.
17982   path="$MSVCR_DLL"
17983   new_path=`$CYGPATH -u "$path"`
17984 
17985   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17986   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17987   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17988   # "foo.exe" is OK but "foo" is an error.
17989   #
17990   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17991   # It is also a way to make sure we got the proper file name for the real test later on.
17992   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17993   if test "x$test_shortpath" = x; then
17994     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17995 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17996     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17997   fi
17998 
17999   # Call helper function which possibly converts this using DOS-style short mode.
18000   # If so, the updated path is stored in $new_path.
18001 
18002   input_path="$new_path"
18003   # Check if we need to convert this using DOS-style short mode. If the path
18004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18005   # take no chances and rewrite it.
18006   # Note: m4 eats our [], so we need to use [ and ] instead.
18007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18008   if test "x$has_forbidden_chars" != x; then
18009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18010     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18011     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18012     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18013       # Going to short mode and back again did indeed matter. Since short mode is
18014       # case insensitive, let's make it lowercase to improve readability.
18015       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18016       # Now convert it back to Unix-stile (cygpath)
18017       input_path=`$CYGPATH -u "$shortmode_path"`
18018       new_path="$input_path"
18019     fi
18020   fi
18021 
18022   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18023   if test "x$test_cygdrive_prefix" = x; then
18024     # As a simple fix, exclude /usr/bin since it's not a real path.
18025     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
18026       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18027       # a path prefixed by /cygdrive for fixpath to work.
18028       new_path="$CYGWIN_ROOT_PATH$input_path"
18029     fi
18030   fi
18031 
18032 
18033   if test "x$path" != "x$new_path"; then
18034     MSVCR_DLL="$new_path"
18035     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18036 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18037   fi
18038 
18039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18040 
18041   path="$MSVCR_DLL"
18042   has_colon=`$ECHO $path | $GREP ^.:`
18043   new_path="$path"
18044   if test "x$has_colon" = x; then
18045     # Not in mixed or Windows style, start by that.
18046     new_path=`cmd //c echo $path`
18047   fi
18048 
18049 
18050   input_path="$new_path"
18051   # Check if we need to convert this using DOS-style short mode. If the path
18052   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18053   # take no chances and rewrite it.
18054   # Note: m4 eats our [], so we need to use [ and ] instead.
18055   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18056   if test "x$has_forbidden_chars" != x; then
18057     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18058     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18059   fi
18060 
18061 
18062   windows_path="$new_path"
18063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18064     unix_path=`$CYGPATH -u "$windows_path"`
18065     new_path="$unix_path"
18066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18068     new_path="$unix_path"
18069   fi
18070 
18071   if test "x$path" != "x$new_path"; then
18072     MSVCR_DLL="$new_path"
18073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
18074 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
18075   fi
18076 
18077   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18078   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18079 
18080   else
18081     # We're on a posix platform. Hooray! :)
18082     path="$MSVCR_DLL"
18083     has_space=`$ECHO "$path" | $GREP " "`
18084     if test "x$has_space" != x; then
18085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18086 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18087       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18088     fi
18089 
18090     # Use eval to expand a potential ~
18091     eval path="$path"
18092     if test ! -f "$path" && test ! -d "$path"; then
18093       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18094     fi
18095 
18096     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18097   fi
18098 
18099 
18100 
18101 
18102 # Check whether --with-dxsdk was given.
18103 if test "${with_dxsdk+set}" = set; then :
18104   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18105 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18106 fi
18107 
18108 
18109 
18110 
18111 # Check whether --with-dxsdk-lib was given.
18112 if test "${with_dxsdk_lib+set}" = set; then :
18113   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18114 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18115 fi
18116 
18117 
18118 
18119 
18120 # Check whether --with-dxsdk-include was given.
18121 if test "${with_dxsdk_include+set}" = set; then :
18122   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18123 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18124 fi
18125 
18126 
18127   fi
18128 
18129 
18130 
18131   # If --build AND --host is set, then the configure script will find any
18132   # cross compilation tools in the PATH. Cross compilation tools
18133   # follows the cross compilation standard where they are prefixed with ${host}.
18134   # For example the binary i686-sun-solaris2.10-gcc
18135   # will cross compile for i686-sun-solaris2.10
18136   # If neither of build and host is not set, then build=host and the
18137   # default compiler found in the path will be used.
18138   # Setting only --host, does not seem to be really supported.
18139   # Please set both --build and --host if you want to cross compile.
18140 
18141   if test "x$COMPILE_TYPE" = "xcross"; then
18142     # Now we to find a C/C++ compiler that can build executables for the build
18143     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18144     # once. Also, we need to do this before adding a tools dir to the path,
18145     # otherwise we might pick up cross-compilers which don't use standard naming.
18146     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18147     # to wait until they are properly discovered.
18148     for ac_prog in cl cc gcc
18149 do
18150   # Extract the first word of "$ac_prog", so it can be a program name with args.
18151 set dummy $ac_prog; ac_word=$2
18152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18153 $as_echo_n "checking for $ac_word... " >&6; }
18154 if ${ac_cv_path_BUILD_CC+:} false; then :
18155   $as_echo_n "(cached) " >&6
18156 else
18157   case $BUILD_CC in
18158   [\\/]* | ?:[\\/]*)
18159   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18160   ;;
18161   *)
18162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18163 for as_dir in $PATH
18164 do
18165   IFS=$as_save_IFS
18166   test -z "$as_dir" && as_dir=.
18167     for ac_exec_ext in '' $ac_executable_extensions; do
18168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18169     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18171     break 2
18172   fi
18173 done
18174   done
18175 IFS=$as_save_IFS
18176 
18177   ;;
18178 esac
18179 fi
18180 BUILD_CC=$ac_cv_path_BUILD_CC
18181 if test -n "$BUILD_CC"; then
18182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18183 $as_echo "$BUILD_CC" >&6; }
18184 else
18185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18186 $as_echo "no" >&6; }
18187 fi
18188 
18189 
18190   test -n "$BUILD_CC" && break
18191 done
18192 
18193 
18194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18195 
18196   # First separate the path from the arguments. This will split at the first
18197   # space.
18198   complete="$BUILD_CC"
18199   path="${complete%% *}"
18200   tmp="$complete EOL"
18201   arguments="${tmp#* }"
18202 
18203   # Input might be given as Windows format, start by converting to
18204   # unix format.
18205   new_path=`$CYGPATH -u "$path"`
18206 
18207   # Now try to locate executable using which
18208   new_path=`$WHICH "$new_path" 2> /dev/null`
18209   # bat and cmd files are not always considered executable in cygwin causing which
18210   # to not find them
18211   if test "x$new_path" = x \
18212       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18213       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18214     new_path=`$CYGPATH -u "$path"`
18215   fi
18216   if test "x$new_path" = x; then
18217     # Oops. Which didn't find the executable.
18218     # The splitting of arguments from the executable at a space might have been incorrect,
18219     # since paths with space are more likely in Windows. Give it another try with the whole
18220     # argument.
18221     path="$complete"
18222     arguments="EOL"
18223     new_path=`$CYGPATH -u "$path"`
18224     new_path=`$WHICH "$new_path" 2> /dev/null`
18225     # bat and cmd files are not always considered executable in cygwin causing which
18226     # to not find them
18227     if test "x$new_path" = x \
18228         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18229         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18230       new_path=`$CYGPATH -u "$path"`
18231     fi
18232     if test "x$new_path" = x; then
18233       # It's still not found. Now this is an unrecoverable error.
18234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18235 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18236       has_space=`$ECHO "$complete" | $GREP " "`
18237       if test "x$has_space" != x; then
18238         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18239 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18240       fi
18241       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18242     fi
18243   fi
18244 
18245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18248   # "foo.exe" is OK but "foo" is an error.
18249   #
18250   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18251   # It is also a way to make sure we got the proper file name for the real test later on.
18252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18253   if test "x$test_shortpath" = x; then
18254     # Short path failed, file does not exist as specified.
18255     # Try adding .exe or .cmd
18256     if test -f "${new_path}.exe"; then
18257       input_to_shortpath="${new_path}.exe"
18258     elif test -f "${new_path}.cmd"; then
18259       input_to_shortpath="${new_path}.cmd"
18260     else
18261       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18262 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18263       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18264 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18265       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18266     fi
18267   else
18268     input_to_shortpath="$new_path"
18269   fi
18270 
18271   # Call helper function which possibly converts this using DOS-style short mode.
18272   # If so, the updated path is stored in $new_path.
18273   new_path="$input_to_shortpath"
18274 
18275   input_path="$input_to_shortpath"
18276   # Check if we need to convert this using DOS-style short mode. If the path
18277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18278   # take no chances and rewrite it.
18279   # Note: m4 eats our [], so we need to use [ and ] instead.
18280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18281   if test "x$has_forbidden_chars" != x; then
18282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18286       # Going to short mode and back again did indeed matter. Since short mode is
18287       # case insensitive, let's make it lowercase to improve readability.
18288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18289       # Now convert it back to Unix-stile (cygpath)
18290       input_path=`$CYGPATH -u "$shortmode_path"`
18291       new_path="$input_path"
18292     fi
18293   fi
18294 
18295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18296   if test "x$test_cygdrive_prefix" = x; then
18297     # As a simple fix, exclude /usr/bin since it's not a real path.
18298     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18300       # a path prefixed by /cygdrive for fixpath to work.
18301       new_path="$CYGWIN_ROOT_PATH$input_path"
18302     fi
18303   fi
18304 
18305   # remove trailing .exe if any
18306   new_path="${new_path/%.exe/}"
18307 
18308   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18309 
18310   # First separate the path from the arguments. This will split at the first
18311   # space.
18312   complete="$BUILD_CC"
18313   path="${complete%% *}"
18314   tmp="$complete EOL"
18315   arguments="${tmp#* }"
18316 
18317   # Input might be given as Windows format, start by converting to
18318   # unix format.
18319   new_path="$path"
18320 
18321   windows_path="$new_path"
18322   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18323     unix_path=`$CYGPATH -u "$windows_path"`
18324     new_path="$unix_path"
18325   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18326     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18327     new_path="$unix_path"
18328   fi
18329 
18330 
18331   # Now try to locate executable using which
18332   new_path=`$WHICH "$new_path" 2> /dev/null`
18333 
18334   if test "x$new_path" = x; then
18335     # Oops. Which didn't find the executable.
18336     # The splitting of arguments from the executable at a space might have been incorrect,
18337     # since paths with space are more likely in Windows. Give it another try with the whole
18338     # argument.
18339     path="$complete"
18340     arguments="EOL"
18341     new_path="$path"
18342 
18343   windows_path="$new_path"
18344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18345     unix_path=`$CYGPATH -u "$windows_path"`
18346     new_path="$unix_path"
18347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18349     new_path="$unix_path"
18350   fi
18351 
18352 
18353     new_path=`$WHICH "$new_path" 2> /dev/null`
18354 
18355     if test "x$new_path" = x; then
18356       # It's still not found. Now this is an unrecoverable error.
18357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18358 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18359       has_space=`$ECHO "$complete" | $GREP " "`
18360       if test "x$has_space" != x; then
18361         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18363       fi
18364       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18365     fi
18366   fi
18367 
18368   # Now new_path has a complete unix path to the binary
18369   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18370     # Keep paths in /bin as-is, but remove trailing .exe if any
18371     new_path="${new_path/%.exe/}"
18372     # Do not save /bin paths to all_fixpath_prefixes!
18373   else
18374     # Not in mixed or Windows style, start by that.
18375     new_path=`cmd //c echo $new_path`
18376 
18377   input_path="$new_path"
18378   # Check if we need to convert this using DOS-style short mode. If the path
18379   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18380   # take no chances and rewrite it.
18381   # Note: m4 eats our [], so we need to use [ and ] instead.
18382   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18383   if test "x$has_forbidden_chars" != x; then
18384     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18385     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18386   fi
18387 
18388     # Output is in $new_path
18389 
18390   windows_path="$new_path"
18391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18392     unix_path=`$CYGPATH -u "$windows_path"`
18393     new_path="$unix_path"
18394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18396     new_path="$unix_path"
18397   fi
18398 
18399     # remove trailing .exe if any
18400     new_path="${new_path/%.exe/}"
18401 
18402     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18403     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18404   fi
18405 
18406   else
18407     # We're on a posix platform. Hooray! :)
18408     # First separate the path from the arguments. This will split at the first
18409     # space.
18410     complete="$BUILD_CC"
18411     path="${complete%% *}"
18412     tmp="$complete EOL"
18413     arguments="${tmp#* }"
18414 
18415     # Cannot rely on the command "which" here since it doesn't always work.
18416     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18417     if test -z "$is_absolute_path"; then
18418       # Path to executable is not absolute. Find it.
18419       IFS_save="$IFS"
18420       IFS=:
18421       for p in $PATH; do
18422         if test -f "$p/$path" && test -x "$p/$path"; then
18423           new_path="$p/$path"
18424           break
18425         fi
18426       done
18427       IFS="$IFS_save"
18428     else
18429       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18430 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18431       new_path="$path"
18432     fi
18433 
18434     if test "x$new_path" = x; then
18435       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18436 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18437       has_space=`$ECHO "$complete" | $GREP " "`
18438       if test "x$has_space" != x; then
18439         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18440 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18441       fi
18442       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18443     fi
18444   fi
18445 
18446   # Now join together the path and the arguments once again
18447   if test "x$arguments" != xEOL; then
18448     new_complete="$new_path ${arguments% *}"
18449   else
18450     new_complete="$new_path"
18451   fi
18452 
18453   if test "x$complete" != "x$new_complete"; then
18454     BUILD_CC="$new_complete"
18455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18456 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18457   fi
18458 
18459     for ac_prog in cl CC g++
18460 do
18461   # Extract the first word of "$ac_prog", so it can be a program name with args.
18462 set dummy $ac_prog; ac_word=$2
18463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18464 $as_echo_n "checking for $ac_word... " >&6; }
18465 if ${ac_cv_path_BUILD_CXX+:} false; then :
18466   $as_echo_n "(cached) " >&6
18467 else
18468   case $BUILD_CXX in
18469   [\\/]* | ?:[\\/]*)
18470   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18471   ;;
18472   *)
18473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18474 for as_dir in $PATH
18475 do
18476   IFS=$as_save_IFS
18477   test -z "$as_dir" && as_dir=.
18478     for ac_exec_ext in '' $ac_executable_extensions; do
18479   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18480     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18482     break 2
18483   fi
18484 done
18485   done
18486 IFS=$as_save_IFS
18487 
18488   ;;
18489 esac
18490 fi
18491 BUILD_CXX=$ac_cv_path_BUILD_CXX
18492 if test -n "$BUILD_CXX"; then
18493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18494 $as_echo "$BUILD_CXX" >&6; }
18495 else
18496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18497 $as_echo "no" >&6; }
18498 fi
18499 
18500 
18501   test -n "$BUILD_CXX" && break
18502 done
18503 
18504 
18505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18506 
18507   # First separate the path from the arguments. This will split at the first
18508   # space.
18509   complete="$BUILD_CXX"
18510   path="${complete%% *}"
18511   tmp="$complete EOL"
18512   arguments="${tmp#* }"
18513 
18514   # Input might be given as Windows format, start by converting to
18515   # unix format.
18516   new_path=`$CYGPATH -u "$path"`
18517 
18518   # Now try to locate executable using which
18519   new_path=`$WHICH "$new_path" 2> /dev/null`
18520   # bat and cmd files are not always considered executable in cygwin causing which
18521   # to not find them
18522   if test "x$new_path" = x \
18523       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18524       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18525     new_path=`$CYGPATH -u "$path"`
18526   fi
18527   if test "x$new_path" = x; then
18528     # Oops. Which didn't find the executable.
18529     # The splitting of arguments from the executable at a space might have been incorrect,
18530     # since paths with space are more likely in Windows. Give it another try with the whole
18531     # argument.
18532     path="$complete"
18533     arguments="EOL"
18534     new_path=`$CYGPATH -u "$path"`
18535     new_path=`$WHICH "$new_path" 2> /dev/null`
18536     # bat and cmd files are not always considered executable in cygwin causing which
18537     # to not find them
18538     if test "x$new_path" = x \
18539         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18540         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18541       new_path=`$CYGPATH -u "$path"`
18542     fi
18543     if test "x$new_path" = x; then
18544       # It's still not found. Now this is an unrecoverable error.
18545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18546 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18547       has_space=`$ECHO "$complete" | $GREP " "`
18548       if test "x$has_space" != x; then
18549         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18550 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18551       fi
18552       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18553     fi
18554   fi
18555 
18556   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18557   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18558   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18559   # "foo.exe" is OK but "foo" is an error.
18560   #
18561   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18562   # It is also a way to make sure we got the proper file name for the real test later on.
18563   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18564   if test "x$test_shortpath" = x; then
18565     # Short path failed, file does not exist as specified.
18566     # Try adding .exe or .cmd
18567     if test -f "${new_path}.exe"; then
18568       input_to_shortpath="${new_path}.exe"
18569     elif test -f "${new_path}.cmd"; then
18570       input_to_shortpath="${new_path}.cmd"
18571     else
18572       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18573 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18574       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18575 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18576       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18577     fi
18578   else
18579     input_to_shortpath="$new_path"
18580   fi
18581 
18582   # Call helper function which possibly converts this using DOS-style short mode.
18583   # If so, the updated path is stored in $new_path.
18584   new_path="$input_to_shortpath"
18585 
18586   input_path="$input_to_shortpath"
18587   # Check if we need to convert this using DOS-style short mode. If the path
18588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18589   # take no chances and rewrite it.
18590   # Note: m4 eats our [], so we need to use [ and ] instead.
18591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18592   if test "x$has_forbidden_chars" != x; then
18593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18594     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18595     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18596     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18597       # Going to short mode and back again did indeed matter. Since short mode is
18598       # case insensitive, let's make it lowercase to improve readability.
18599       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18600       # Now convert it back to Unix-stile (cygpath)
18601       input_path=`$CYGPATH -u "$shortmode_path"`
18602       new_path="$input_path"
18603     fi
18604   fi
18605 
18606   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18607   if test "x$test_cygdrive_prefix" = x; then
18608     # As a simple fix, exclude /usr/bin since it's not a real path.
18609     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18610       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18611       # a path prefixed by /cygdrive for fixpath to work.
18612       new_path="$CYGWIN_ROOT_PATH$input_path"
18613     fi
18614   fi
18615 
18616   # remove trailing .exe if any
18617   new_path="${new_path/%.exe/}"
18618 
18619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18620 
18621   # First separate the path from the arguments. This will split at the first
18622   # space.
18623   complete="$BUILD_CXX"
18624   path="${complete%% *}"
18625   tmp="$complete EOL"
18626   arguments="${tmp#* }"
18627 
18628   # Input might be given as Windows format, start by converting to
18629   # unix format.
18630   new_path="$path"
18631 
18632   windows_path="$new_path"
18633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18634     unix_path=`$CYGPATH -u "$windows_path"`
18635     new_path="$unix_path"
18636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18638     new_path="$unix_path"
18639   fi
18640 
18641 
18642   # Now try to locate executable using which
18643   new_path=`$WHICH "$new_path" 2> /dev/null`
18644 
18645   if test "x$new_path" = x; then
18646     # Oops. Which didn't find the executable.
18647     # The splitting of arguments from the executable at a space might have been incorrect,
18648     # since paths with space are more likely in Windows. Give it another try with the whole
18649     # argument.
18650     path="$complete"
18651     arguments="EOL"
18652     new_path="$path"
18653 
18654   windows_path="$new_path"
18655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18656     unix_path=`$CYGPATH -u "$windows_path"`
18657     new_path="$unix_path"
18658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18660     new_path="$unix_path"
18661   fi
18662 
18663 
18664     new_path=`$WHICH "$new_path" 2> /dev/null`
18665 
18666     if test "x$new_path" = x; then
18667       # It's still not found. Now this is an unrecoverable error.
18668       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18669 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18670       has_space=`$ECHO "$complete" | $GREP " "`
18671       if test "x$has_space" != x; then
18672         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18673 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18674       fi
18675       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18676     fi
18677   fi
18678 
18679   # Now new_path has a complete unix path to the binary
18680   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18681     # Keep paths in /bin as-is, but remove trailing .exe if any
18682     new_path="${new_path/%.exe/}"
18683     # Do not save /bin paths to all_fixpath_prefixes!
18684   else
18685     # Not in mixed or Windows style, start by that.
18686     new_path=`cmd //c echo $new_path`
18687 
18688   input_path="$new_path"
18689   # Check if we need to convert this using DOS-style short mode. If the path
18690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18691   # take no chances and rewrite it.
18692   # Note: m4 eats our [], so we need to use [ and ] instead.
18693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18694   if test "x$has_forbidden_chars" != x; then
18695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18696     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18697   fi
18698 
18699     # Output is in $new_path
18700 
18701   windows_path="$new_path"
18702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18703     unix_path=`$CYGPATH -u "$windows_path"`
18704     new_path="$unix_path"
18705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18707     new_path="$unix_path"
18708   fi
18709 
18710     # remove trailing .exe if any
18711     new_path="${new_path/%.exe/}"
18712 
18713     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18714     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18715   fi
18716 
18717   else
18718     # We're on a posix platform. Hooray! :)
18719     # First separate the path from the arguments. This will split at the first
18720     # space.
18721     complete="$BUILD_CXX"
18722     path="${complete%% *}"
18723     tmp="$complete EOL"
18724     arguments="${tmp#* }"
18725 
18726     # Cannot rely on the command "which" here since it doesn't always work.
18727     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18728     if test -z "$is_absolute_path"; then
18729       # Path to executable is not absolute. Find it.
18730       IFS_save="$IFS"
18731       IFS=:
18732       for p in $PATH; do
18733         if test -f "$p/$path" && test -x "$p/$path"; then
18734           new_path="$p/$path"
18735           break
18736         fi
18737       done
18738       IFS="$IFS_save"
18739     else
18740       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18741 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18742       new_path="$path"
18743     fi
18744 
18745     if test "x$new_path" = x; then
18746       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18747 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18748       has_space=`$ECHO "$complete" | $GREP " "`
18749       if test "x$has_space" != x; then
18750         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18751 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18752       fi
18753       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18754     fi
18755   fi
18756 
18757   # Now join together the path and the arguments once again
18758   if test "x$arguments" != xEOL; then
18759     new_complete="$new_path ${arguments% *}"
18760   else
18761     new_complete="$new_path"
18762   fi
18763 
18764   if test "x$complete" != "x$new_complete"; then
18765     BUILD_CXX="$new_complete"
18766     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18767 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18768   fi
18769 
18770     # Extract the first word of "ld", so it can be a program name with args.
18771 set dummy ld; ac_word=$2
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18773 $as_echo_n "checking for $ac_word... " >&6; }
18774 if ${ac_cv_path_BUILD_LD+:} false; then :
18775   $as_echo_n "(cached) " >&6
18776 else
18777   case $BUILD_LD in
18778   [\\/]* | ?:[\\/]*)
18779   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18780   ;;
18781   *)
18782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18783 for as_dir in $PATH
18784 do
18785   IFS=$as_save_IFS
18786   test -z "$as_dir" && as_dir=.
18787     for ac_exec_ext in '' $ac_executable_extensions; do
18788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18789     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18791     break 2
18792   fi
18793 done
18794   done
18795 IFS=$as_save_IFS
18796 
18797   ;;
18798 esac
18799 fi
18800 BUILD_LD=$ac_cv_path_BUILD_LD
18801 if test -n "$BUILD_LD"; then
18802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18803 $as_echo "$BUILD_LD" >&6; }
18804 else
18805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18806 $as_echo "no" >&6; }
18807 fi
18808 
18809 
18810 
18811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18812 
18813   # First separate the path from the arguments. This will split at the first
18814   # space.
18815   complete="$BUILD_LD"
18816   path="${complete%% *}"
18817   tmp="$complete EOL"
18818   arguments="${tmp#* }"
18819 
18820   # Input might be given as Windows format, start by converting to
18821   # unix format.
18822   new_path=`$CYGPATH -u "$path"`
18823 
18824   # Now try to locate executable using which
18825   new_path=`$WHICH "$new_path" 2> /dev/null`
18826   # bat and cmd files are not always considered executable in cygwin causing which
18827   # to not find them
18828   if test "x$new_path" = x \
18829       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18830       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18831     new_path=`$CYGPATH -u "$path"`
18832   fi
18833   if test "x$new_path" = x; then
18834     # Oops. Which didn't find the executable.
18835     # The splitting of arguments from the executable at a space might have been incorrect,
18836     # since paths with space are more likely in Windows. Give it another try with the whole
18837     # argument.
18838     path="$complete"
18839     arguments="EOL"
18840     new_path=`$CYGPATH -u "$path"`
18841     new_path=`$WHICH "$new_path" 2> /dev/null`
18842     # bat and cmd files are not always considered executable in cygwin causing which
18843     # to not find them
18844     if test "x$new_path" = x \
18845         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18846         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18847       new_path=`$CYGPATH -u "$path"`
18848     fi
18849     if test "x$new_path" = x; then
18850       # It's still not found. Now this is an unrecoverable error.
18851       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18852 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18853       has_space=`$ECHO "$complete" | $GREP " "`
18854       if test "x$has_space" != x; then
18855         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18856 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18857       fi
18858       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18859     fi
18860   fi
18861 
18862   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18863   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18864   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18865   # "foo.exe" is OK but "foo" is an error.
18866   #
18867   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18868   # It is also a way to make sure we got the proper file name for the real test later on.
18869   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18870   if test "x$test_shortpath" = x; then
18871     # Short path failed, file does not exist as specified.
18872     # Try adding .exe or .cmd
18873     if test -f "${new_path}.exe"; then
18874       input_to_shortpath="${new_path}.exe"
18875     elif test -f "${new_path}.cmd"; then
18876       input_to_shortpath="${new_path}.cmd"
18877     else
18878       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18879 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18880       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18881 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18882       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18883     fi
18884   else
18885     input_to_shortpath="$new_path"
18886   fi
18887 
18888   # Call helper function which possibly converts this using DOS-style short mode.
18889   # If so, the updated path is stored in $new_path.
18890   new_path="$input_to_shortpath"
18891 
18892   input_path="$input_to_shortpath"
18893   # Check if we need to convert this using DOS-style short mode. If the path
18894   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18895   # take no chances and rewrite it.
18896   # Note: m4 eats our [], so we need to use [ and ] instead.
18897   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18898   if test "x$has_forbidden_chars" != x; then
18899     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18900     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18901     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18902     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18903       # Going to short mode and back again did indeed matter. Since short mode is
18904       # case insensitive, let's make it lowercase to improve readability.
18905       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18906       # Now convert it back to Unix-stile (cygpath)
18907       input_path=`$CYGPATH -u "$shortmode_path"`
18908       new_path="$input_path"
18909     fi
18910   fi
18911 
18912   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18913   if test "x$test_cygdrive_prefix" = x; then
18914     # As a simple fix, exclude /usr/bin since it's not a real path.
18915     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18916       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18917       # a path prefixed by /cygdrive for fixpath to work.
18918       new_path="$CYGWIN_ROOT_PATH$input_path"
18919     fi
18920   fi
18921 
18922   # remove trailing .exe if any
18923   new_path="${new_path/%.exe/}"
18924 
18925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18926 
18927   # First separate the path from the arguments. This will split at the first
18928   # space.
18929   complete="$BUILD_LD"
18930   path="${complete%% *}"
18931   tmp="$complete EOL"
18932   arguments="${tmp#* }"
18933 
18934   # Input might be given as Windows format, start by converting to
18935   # unix format.
18936   new_path="$path"
18937 
18938   windows_path="$new_path"
18939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18940     unix_path=`$CYGPATH -u "$windows_path"`
18941     new_path="$unix_path"
18942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18944     new_path="$unix_path"
18945   fi
18946 
18947 
18948   # Now try to locate executable using which
18949   new_path=`$WHICH "$new_path" 2> /dev/null`
18950 
18951   if test "x$new_path" = x; then
18952     # Oops. Which didn't find the executable.
18953     # The splitting of arguments from the executable at a space might have been incorrect,
18954     # since paths with space are more likely in Windows. Give it another try with the whole
18955     # argument.
18956     path="$complete"
18957     arguments="EOL"
18958     new_path="$path"
18959 
18960   windows_path="$new_path"
18961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18962     unix_path=`$CYGPATH -u "$windows_path"`
18963     new_path="$unix_path"
18964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18966     new_path="$unix_path"
18967   fi
18968 
18969 
18970     new_path=`$WHICH "$new_path" 2> /dev/null`
18971 
18972     if test "x$new_path" = x; then
18973       # It's still not found. Now this is an unrecoverable error.
18974       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18975 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18976       has_space=`$ECHO "$complete" | $GREP " "`
18977       if test "x$has_space" != x; then
18978         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18979 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18980       fi
18981       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18982     fi
18983   fi
18984 
18985   # Now new_path has a complete unix path to the binary
18986   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18987     # Keep paths in /bin as-is, but remove trailing .exe if any
18988     new_path="${new_path/%.exe/}"
18989     # Do not save /bin paths to all_fixpath_prefixes!
18990   else
18991     # Not in mixed or Windows style, start by that.
18992     new_path=`cmd //c echo $new_path`
18993 
18994   input_path="$new_path"
18995   # Check if we need to convert this using DOS-style short mode. If the path
18996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18997   # take no chances and rewrite it.
18998   # Note: m4 eats our [], so we need to use [ and ] instead.
18999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19000   if test "x$has_forbidden_chars" != x; then
19001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19002     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19003   fi
19004 
19005     # Output is in $new_path
19006 
19007   windows_path="$new_path"
19008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19009     unix_path=`$CYGPATH -u "$windows_path"`
19010     new_path="$unix_path"
19011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19013     new_path="$unix_path"
19014   fi
19015 
19016     # remove trailing .exe if any
19017     new_path="${new_path/%.exe/}"
19018 
19019     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19020     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19021   fi
19022 
19023   else
19024     # We're on a posix platform. Hooray! :)
19025     # First separate the path from the arguments. This will split at the first
19026     # space.
19027     complete="$BUILD_LD"
19028     path="${complete%% *}"
19029     tmp="$complete EOL"
19030     arguments="${tmp#* }"
19031 
19032     # Cannot rely on the command "which" here since it doesn't always work.
19033     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19034     if test -z "$is_absolute_path"; then
19035       # Path to executable is not absolute. Find it.
19036       IFS_save="$IFS"
19037       IFS=:
19038       for p in $PATH; do
19039         if test -f "$p/$path" && test -x "$p/$path"; then
19040           new_path="$p/$path"
19041           break
19042         fi
19043       done
19044       IFS="$IFS_save"
19045     else
19046       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
19047 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
19048       new_path="$path"
19049     fi
19050 
19051     if test "x$new_path" = x; then
19052       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
19053 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
19054       has_space=`$ECHO "$complete" | $GREP " "`
19055       if test "x$has_space" != x; then
19056         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19057 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19058       fi
19059       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
19060     fi
19061   fi
19062 
19063   # Now join together the path and the arguments once again
19064   if test "x$arguments" != xEOL; then
19065     new_complete="$new_path ${arguments% *}"
19066   else
19067     new_complete="$new_path"
19068   fi
19069 
19070   if test "x$complete" != "x$new_complete"; then
19071     BUILD_LD="$new_complete"
19072     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
19073 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
19074   fi
19075 
19076   fi
19077 
19078 
19079 
19080 
19081   # If a devkit is found on the builddeps server, then prepend its path to the
19082   # PATH variable. If there are cross compilers available in the devkit, these
19083   # will be found by AC_PROG_CC et al.
19084   DEVKIT=
19085 
19086 
19087   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19088     # Source the builddeps file again, to make sure it uses the latest variables!
19089     . $builddepsfile
19090     # Look for a target and build machine specific resource!
19091     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19092     if test "x$resource" = x; then
19093       # Ok, lets instead look for a target specific resource
19094       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19095     fi
19096     if test "x$resource" = x; then
19097       # Ok, lets instead look for a build specific resource
19098       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19099     fi
19100     if test "x$resource" = x; then
19101       # Ok, lets instead look for a generic resource
19102       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19103       resource=${builddep_devkit}
19104     fi
19105     if test "x$resource" != x; then
19106       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19107 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19108       # If the resource in the builddeps.conf file is an existing directory,
19109       # for example /java/linux/cups
19110       if test -d ${resource}; then
19111         depdir=${resource}
19112       else
19113 
19114   # devkit is for example mymodule
19115   # $resource is for example libs/general/libmymod_1_2_3.zip
19116   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19117   # $with_builddeps_dir is for example /localhome/builddeps
19118   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19119   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19120   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19121   filename=`basename $resource`
19122   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19123   filebase=${filename%%.*}
19124   extension=${filename#*.}
19125   installdir=$with_builddeps_dir/$filebase
19126   if test ! -f $installdir/$filename.unpacked; then
19127     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19128 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19129     if test ! -d $installdir; then
19130       mkdir -p $installdir
19131     fi
19132     if test ! -d $installdir; then
19133       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19134     fi
19135     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19136     touch $tmpfile
19137     if test ! -f $tmpfile; then
19138       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19139     fi
19140 
19141   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19142   # $tmpfile is the local file name for the downloaded file.
19143   VALID_TOOL=no
19144   if test "x$BDEPS_FTP" = xwget; then
19145     VALID_TOOL=yes
19146     wget -O $tmpfile $with_builddeps_server/$resource
19147   fi
19148   if test "x$BDEPS_FTP" = xlftp; then
19149     VALID_TOOL=yes
19150     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19151   fi
19152   if test "x$BDEPS_FTP" = xftp; then
19153     VALID_TOOL=yes
19154     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19155     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19156     FTPUSERPWD=${FTPSERVER%%@*}
19157     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19158       FTPUSER=${userpwd%%:*}
19159       FTPPWD=${userpwd#*@}
19160       FTPSERVER=${FTPSERVER#*@}
19161     else
19162       FTPUSER=ftp
19163       FTPPWD=ftp
19164     fi
19165     # the "pass" command does not work on some
19166     # ftp clients (read ftp.exe) but if it works,
19167     # passive mode is better!
19168     ( \
19169         echo "user $FTPUSER $FTPPWD"        ; \
19170         echo "pass"                         ; \
19171         echo "bin"                          ; \
19172         echo "get $FTPPATH $tmpfile"              ; \
19173     ) | ftp -in $FTPSERVER
19174   fi
19175   if test "x$VALID_TOOL" != xyes; then
19176     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19177   fi
19178 
19179     mv $tmpfile $installdir/$filename
19180     if test ! -s $installdir/$filename; then
19181       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19182     fi
19183     case "$extension" in
19184       zip)  echo "Unzipping $installdir/$filename..."
19185         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19186         ;;
19187       tar.gz) echo "Untaring $installdir/$filename..."
19188         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19189         ;;
19190       tgz) echo "Untaring $installdir/$filename..."
19191         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19192         ;;
19193       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19194         ;;
19195     esac
19196   fi
19197   if test -f $installdir/$filename.unpacked; then
19198     depdir=$installdir
19199   fi
19200 
19201       fi
19202       # Source the builddeps file again, because in the previous command, the depdir
19203       # was updated to point at the current build dependency install directory.
19204       . $builddepsfile
19205       # Now extract variables from the builddeps.conf files.
19206       theroot=${builddep_devkit_ROOT}
19207       thecflags=${builddep_devkit_CFLAGS}
19208       thelibs=${builddep_devkit_LIBS}
19209       if test "x$depdir" = x; then
19210         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19211       fi
19212       DEVKIT=$depdir
19213       if test "x$theroot" != x; then
19214         DEVKIT="$theroot"
19215       fi
19216       if test "x$thecflags" != x; then
19217         DEVKIT_CFLAGS="$thecflags"
19218       fi
19219       if test "x$thelibs" != x; then
19220         DEVKIT_LIBS="$thelibs"
19221       fi
19222 
19223         # Found devkit
19224         PATH="$DEVKIT/bin:$PATH"
19225         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19226         if test "x$x_includes" = "xNONE"; then
19227           x_includes="$SYS_ROOT/usr/include/X11"
19228         fi
19229         if test "x$x_libraries" = "xNONE"; then
19230           x_libraries="$SYS_ROOT/usr/lib"
19231         fi
19232 
19233 
19234     fi
19235 
19236   fi
19237 
19238 
19239   # Store the CFLAGS etal passed to the configure script.
19240   ORG_CFLAGS="$CFLAGS"
19241   ORG_CXXFLAGS="$CXXFLAGS"
19242   ORG_OBJCFLAGS="$OBJCFLAGS"
19243 
19244   # autoconf magic only relies on PATH, so update it if tools dir is specified
19245   OLD_PATH="$PATH"
19246   if test "x$TOOLS_DIR" != x; then
19247     PATH=$TOOLS_DIR:$PATH
19248   fi
19249 
19250 
19251   ### Locate C compiler (CC)
19252 
19253   # On windows, only cl.exe is supported.
19254   # On Solaris, cc is preferred to gcc.
19255   # Elsewhere, gcc is preferred to cc.
19256 
19257   if test "x$CC" != x; then
19258     COMPILER_CHECK_LIST="$CC"
19259   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19260     COMPILER_CHECK_LIST="cl"
19261   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19262     COMPILER_CHECK_LIST="cc gcc"
19263   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19264     # Do not probe for cc on AIX.
19265     COMPILER_CHECK_LIST="xlc_r"
19266   else
19267     COMPILER_CHECK_LIST="gcc cc"
19268   fi
19269 
19270 
19271   COMPILER_NAME=C
19272 
19273   CC=
19274   # If TOOLS_DIR is set, check for all compiler names in there first
19275   # before checking the rest of the PATH.
19276   if test -n "$TOOLS_DIR"; then
19277     PATH_save="$PATH"
19278     PATH="$TOOLS_DIR"
19279     for ac_prog in $COMPILER_CHECK_LIST
19280 do
19281   # Extract the first word of "$ac_prog", so it can be a program name with args.
19282 set dummy $ac_prog; ac_word=$2
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19284 $as_echo_n "checking for $ac_word... " >&6; }
19285 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19286   $as_echo_n "(cached) " >&6
19287 else
19288   case $TOOLS_DIR_CC in
19289   [\\/]* | ?:[\\/]*)
19290   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19291   ;;
19292   *)
19293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19294 for as_dir in $PATH
19295 do
19296   IFS=$as_save_IFS
19297   test -z "$as_dir" && as_dir=.
19298     for ac_exec_ext in '' $ac_executable_extensions; do
19299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19300     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19302     break 2
19303   fi
19304 done
19305   done
19306 IFS=$as_save_IFS
19307 
19308   ;;
19309 esac
19310 fi
19311 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19312 if test -n "$TOOLS_DIR_CC"; then
19313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19314 $as_echo "$TOOLS_DIR_CC" >&6; }
19315 else
19316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317 $as_echo "no" >&6; }
19318 fi
19319 
19320 
19321   test -n "$TOOLS_DIR_CC" && break
19322 done
19323 
19324     CC=$TOOLS_DIR_CC
19325     PATH="$PATH_save"
19326   fi
19327 
19328   # AC_PATH_PROGS can't be run multiple times with the same variable,
19329   # so create a new name for this run.
19330   if test "x$CC" = x; then
19331     for ac_prog in $COMPILER_CHECK_LIST
19332 do
19333   # Extract the first word of "$ac_prog", so it can be a program name with args.
19334 set dummy $ac_prog; ac_word=$2
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19336 $as_echo_n "checking for $ac_word... " >&6; }
19337 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19338   $as_echo_n "(cached) " >&6
19339 else
19340   case $POTENTIAL_CC in
19341   [\\/]* | ?:[\\/]*)
19342   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19343   ;;
19344   *)
19345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19346 for as_dir in $PATH
19347 do
19348   IFS=$as_save_IFS
19349   test -z "$as_dir" && as_dir=.
19350     for ac_exec_ext in '' $ac_executable_extensions; do
19351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19352     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19354     break 2
19355   fi
19356 done
19357   done
19358 IFS=$as_save_IFS
19359 
19360   ;;
19361 esac
19362 fi
19363 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19364 if test -n "$POTENTIAL_CC"; then
19365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19366 $as_echo "$POTENTIAL_CC" >&6; }
19367 else
19368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369 $as_echo "no" >&6; }
19370 fi
19371 
19372 
19373   test -n "$POTENTIAL_CC" && break
19374 done
19375 
19376     CC=$POTENTIAL_CC
19377   fi
19378 
19379   if test "x$CC" = x; then
19380 
19381   # Print a helpful message on how to acquire the necessary build dependency.
19382   # devkit is the help tag: freetype, cups, pulse, alsa etc
19383   MISSING_DEPENDENCY=devkit
19384 
19385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19386     cygwin_help $MISSING_DEPENDENCY
19387   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19388     msys_help $MISSING_DEPENDENCY
19389   else
19390     PKGHANDLER_COMMAND=
19391 
19392     case $PKGHANDLER in
19393       apt-get)
19394         apt_help     $MISSING_DEPENDENCY ;;
19395       yum)
19396         yum_help     $MISSING_DEPENDENCY ;;
19397       port)
19398         port_help    $MISSING_DEPENDENCY ;;
19399       pkgutil)
19400         pkgutil_help $MISSING_DEPENDENCY ;;
19401       pkgadd)
19402         pkgadd_help  $MISSING_DEPENDENCY ;;
19403     esac
19404 
19405     if test "x$PKGHANDLER_COMMAND" != x; then
19406       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19407     fi
19408   fi
19409 
19410     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19411   fi
19412 
19413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19414 
19415   # First separate the path from the arguments. This will split at the first
19416   # space.
19417   complete="$CC"
19418   path="${complete%% *}"
19419   tmp="$complete EOL"
19420   arguments="${tmp#* }"
19421 
19422   # Input might be given as Windows format, start by converting to
19423   # unix format.
19424   new_path=`$CYGPATH -u "$path"`
19425 
19426   # Now try to locate executable using which
19427   new_path=`$WHICH "$new_path" 2> /dev/null`
19428   # bat and cmd files are not always considered executable in cygwin causing which
19429   # to not find them
19430   if test "x$new_path" = x \
19431       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19432       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19433     new_path=`$CYGPATH -u "$path"`
19434   fi
19435   if test "x$new_path" = x; then
19436     # Oops. Which didn't find the executable.
19437     # The splitting of arguments from the executable at a space might have been incorrect,
19438     # since paths with space are more likely in Windows. Give it another try with the whole
19439     # argument.
19440     path="$complete"
19441     arguments="EOL"
19442     new_path=`$CYGPATH -u "$path"`
19443     new_path=`$WHICH "$new_path" 2> /dev/null`
19444     # bat and cmd files are not always considered executable in cygwin causing which
19445     # to not find them
19446     if test "x$new_path" = x \
19447         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19448         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19449       new_path=`$CYGPATH -u "$path"`
19450     fi
19451     if test "x$new_path" = x; then
19452       # It's still not found. Now this is an unrecoverable error.
19453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19454 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19455       has_space=`$ECHO "$complete" | $GREP " "`
19456       if test "x$has_space" != x; then
19457         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19458 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19459       fi
19460       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19461     fi
19462   fi
19463 
19464   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19465   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19466   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19467   # "foo.exe" is OK but "foo" is an error.
19468   #
19469   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19470   # It is also a way to make sure we got the proper file name for the real test later on.
19471   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19472   if test "x$test_shortpath" = x; then
19473     # Short path failed, file does not exist as specified.
19474     # Try adding .exe or .cmd
19475     if test -f "${new_path}.exe"; then
19476       input_to_shortpath="${new_path}.exe"
19477     elif test -f "${new_path}.cmd"; then
19478       input_to_shortpath="${new_path}.cmd"
19479     else
19480       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19481 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19482       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19483 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19484       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19485     fi
19486   else
19487     input_to_shortpath="$new_path"
19488   fi
19489 
19490   # Call helper function which possibly converts this using DOS-style short mode.
19491   # If so, the updated path is stored in $new_path.
19492   new_path="$input_to_shortpath"
19493 
19494   input_path="$input_to_shortpath"
19495   # Check if we need to convert this using DOS-style short mode. If the path
19496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19497   # take no chances and rewrite it.
19498   # Note: m4 eats our [], so we need to use [ and ] instead.
19499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19500   if test "x$has_forbidden_chars" != x; then
19501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19502     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19503     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19504     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19505       # Going to short mode and back again did indeed matter. Since short mode is
19506       # case insensitive, let's make it lowercase to improve readability.
19507       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19508       # Now convert it back to Unix-stile (cygpath)
19509       input_path=`$CYGPATH -u "$shortmode_path"`
19510       new_path="$input_path"
19511     fi
19512   fi
19513 
19514   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19515   if test "x$test_cygdrive_prefix" = x; then
19516     # As a simple fix, exclude /usr/bin since it's not a real path.
19517     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19518       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19519       # a path prefixed by /cygdrive for fixpath to work.
19520       new_path="$CYGWIN_ROOT_PATH$input_path"
19521     fi
19522   fi
19523 
19524   # remove trailing .exe if any
19525   new_path="${new_path/%.exe/}"
19526 
19527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19528 
19529   # First separate the path from the arguments. This will split at the first
19530   # space.
19531   complete="$CC"
19532   path="${complete%% *}"
19533   tmp="$complete EOL"
19534   arguments="${tmp#* }"
19535 
19536   # Input might be given as Windows format, start by converting to
19537   # unix format.
19538   new_path="$path"
19539 
19540   windows_path="$new_path"
19541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19542     unix_path=`$CYGPATH -u "$windows_path"`
19543     new_path="$unix_path"
19544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19546     new_path="$unix_path"
19547   fi
19548 
19549 
19550   # Now try to locate executable using which
19551   new_path=`$WHICH "$new_path" 2> /dev/null`
19552 
19553   if test "x$new_path" = x; then
19554     # Oops. Which didn't find the executable.
19555     # The splitting of arguments from the executable at a space might have been incorrect,
19556     # since paths with space are more likely in Windows. Give it another try with the whole
19557     # argument.
19558     path="$complete"
19559     arguments="EOL"
19560     new_path="$path"
19561 
19562   windows_path="$new_path"
19563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19564     unix_path=`$CYGPATH -u "$windows_path"`
19565     new_path="$unix_path"
19566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19568     new_path="$unix_path"
19569   fi
19570 
19571 
19572     new_path=`$WHICH "$new_path" 2> /dev/null`
19573 
19574     if test "x$new_path" = x; then
19575       # It's still not found. Now this is an unrecoverable error.
19576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19577 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19578       has_space=`$ECHO "$complete" | $GREP " "`
19579       if test "x$has_space" != x; then
19580         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19581 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19582       fi
19583       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19584     fi
19585   fi
19586 
19587   # Now new_path has a complete unix path to the binary
19588   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19589     # Keep paths in /bin as-is, but remove trailing .exe if any
19590     new_path="${new_path/%.exe/}"
19591     # Do not save /bin paths to all_fixpath_prefixes!
19592   else
19593     # Not in mixed or Windows style, start by that.
19594     new_path=`cmd //c echo $new_path`
19595 
19596   input_path="$new_path"
19597   # Check if we need to convert this using DOS-style short mode. If the path
19598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19599   # take no chances and rewrite it.
19600   # Note: m4 eats our [], so we need to use [ and ] instead.
19601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19602   if test "x$has_forbidden_chars" != x; then
19603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19604     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19605   fi
19606 
19607     # Output is in $new_path
19608 
19609   windows_path="$new_path"
19610   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19611     unix_path=`$CYGPATH -u "$windows_path"`
19612     new_path="$unix_path"
19613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19614     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19615     new_path="$unix_path"
19616   fi
19617 
19618     # remove trailing .exe if any
19619     new_path="${new_path/%.exe/}"
19620 
19621     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19622     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19623   fi
19624 
19625   else
19626     # We're on a posix platform. Hooray! :)
19627     # First separate the path from the arguments. This will split at the first
19628     # space.
19629     complete="$CC"
19630     path="${complete%% *}"
19631     tmp="$complete EOL"
19632     arguments="${tmp#* }"
19633 
19634     # Cannot rely on the command "which" here since it doesn't always work.
19635     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19636     if test -z "$is_absolute_path"; then
19637       # Path to executable is not absolute. Find it.
19638       IFS_save="$IFS"
19639       IFS=:
19640       for p in $PATH; do
19641         if test -f "$p/$path" && test -x "$p/$path"; then
19642           new_path="$p/$path"
19643           break
19644         fi
19645       done
19646       IFS="$IFS_save"
19647     else
19648       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19649 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19650       new_path="$path"
19651     fi
19652 
19653     if test "x$new_path" = x; then
19654       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19655 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19656       has_space=`$ECHO "$complete" | $GREP " "`
19657       if test "x$has_space" != x; then
19658         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19659 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19660       fi
19661       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19662     fi
19663   fi
19664 
19665   # Now join together the path and the arguments once again
19666   if test "x$arguments" != xEOL; then
19667     new_complete="$new_path ${arguments% *}"
19668   else
19669     new_complete="$new_path"
19670   fi
19671 
19672   if test "x$complete" != "x$new_complete"; then
19673     CC="$new_complete"
19674     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19675 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19676   fi
19677 
19678   TEST_COMPILER="$CC"
19679   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19680   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19681   if test "x$OPENJDK_BUILD_OS" != xaix; then
19682     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19683 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19684 
19685   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19686     # Follow a chain of symbolic links. Use readlink
19687     # where it exists, else fall back to horribly
19688     # complicated shell code.
19689     if test "x$READLINK_TESTED" != yes; then
19690       # On MacOSX there is a readlink tool with a different
19691       # purpose than the GNU readlink tool. Check the found readlink.
19692       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19693       if test "x$ISGNU" = x; then
19694         # A readlink that we do not know how to use.
19695         # Are there other non-GNU readlinks out there?
19696         READLINK_TESTED=yes
19697         READLINK=
19698       fi
19699     fi
19700 
19701     if test "x$READLINK" != x; then
19702       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19703     else
19704       # Save the current directory for restoring afterwards
19705       STARTDIR=$PWD
19706       COUNTER=0
19707       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19708       sym_link_file=`$BASENAME $TEST_COMPILER`
19709       cd $sym_link_dir
19710       # Use -P flag to resolve symlinks in directories.
19711       cd `$THEPWDCMD -P`
19712       sym_link_dir=`$THEPWDCMD -P`
19713       # Resolve file symlinks
19714       while test $COUNTER -lt 20; do
19715         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19716         if test "x$ISLINK" == x; then
19717           # This is not a symbolic link! We are done!
19718           break
19719         fi
19720         # Again resolve directory symlinks since the target of the just found
19721         # link could be in a different directory
19722         cd `$DIRNAME $ISLINK`
19723         sym_link_dir=`$THEPWDCMD -P`
19724         sym_link_file=`$BASENAME $ISLINK`
19725         let COUNTER=COUNTER+1
19726       done
19727       cd $STARTDIR
19728       TEST_COMPILER=$sym_link_dir/$sym_link_file
19729     fi
19730   fi
19731 
19732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19733 $as_echo "$TEST_COMPILER" >&6; }
19734   fi
19735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19736 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19737 
19738   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19739   if test "x$COMPILER_BASENAME" = "xccache"; then
19740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19741 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19742     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19743     # We want to control ccache invocation ourselves, so ignore this cc and try
19744     # searching again.
19745 
19746     # Remove the path to the fake ccache cc from the PATH
19747     RETRY_COMPILER_SAVED_PATH="$PATH"
19748     COMPILER_DIRNAME=`$DIRNAME $CC`
19749     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19750 
19751     # Try again looking for our compiler
19752     if test -n "$ac_tool_prefix"; then
19753   for ac_prog in $COMPILER_CHECK_LIST
19754   do
19755     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19756 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19758 $as_echo_n "checking for $ac_word... " >&6; }
19759 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19760   $as_echo_n "(cached) " >&6
19761 else
19762   if test -n "$PROPER_COMPILER_CC"; then
19763   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19764 else
19765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19766 for as_dir in $PATH
19767 do
19768   IFS=$as_save_IFS
19769   test -z "$as_dir" && as_dir=.
19770     for ac_exec_ext in '' $ac_executable_extensions; do
19771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19772     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19774     break 2
19775   fi
19776 done
19777   done
19778 IFS=$as_save_IFS
19779 
19780 fi
19781 fi
19782 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19783 if test -n "$PROPER_COMPILER_CC"; then
19784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19785 $as_echo "$PROPER_COMPILER_CC" >&6; }
19786 else
19787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19788 $as_echo "no" >&6; }
19789 fi
19790 
19791 
19792     test -n "$PROPER_COMPILER_CC" && break
19793   done
19794 fi
19795 if test -z "$PROPER_COMPILER_CC"; then
19796   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19797   for ac_prog in $COMPILER_CHECK_LIST
19798 do
19799   # Extract the first word of "$ac_prog", so it can be a program name with args.
19800 set dummy $ac_prog; ac_word=$2
19801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19802 $as_echo_n "checking for $ac_word... " >&6; }
19803 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19804   $as_echo_n "(cached) " >&6
19805 else
19806   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19807   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19808 else
19809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19810 for as_dir in $PATH
19811 do
19812   IFS=$as_save_IFS
19813   test -z "$as_dir" && as_dir=.
19814     for ac_exec_ext in '' $ac_executable_extensions; do
19815   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19816     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19817     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19818     break 2
19819   fi
19820 done
19821   done
19822 IFS=$as_save_IFS
19823 
19824 fi
19825 fi
19826 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19827 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19829 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19830 else
19831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19832 $as_echo "no" >&6; }
19833 fi
19834 
19835 
19836   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19837 done
19838 
19839   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19840     PROPER_COMPILER_CC=""
19841   else
19842     case $cross_compiling:$ac_tool_warned in
19843 yes:)
19844 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19845 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19846 ac_tool_warned=yes ;;
19847 esac
19848     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19849   fi
19850 fi
19851 
19852 
19853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19854 
19855   # First separate the path from the arguments. This will split at the first
19856   # space.
19857   complete="$PROPER_COMPILER_CC"
19858   path="${complete%% *}"
19859   tmp="$complete EOL"
19860   arguments="${tmp#* }"
19861 
19862   # Input might be given as Windows format, start by converting to
19863   # unix format.
19864   new_path=`$CYGPATH -u "$path"`
19865 
19866   # Now try to locate executable using which
19867   new_path=`$WHICH "$new_path" 2> /dev/null`
19868   # bat and cmd files are not always considered executable in cygwin causing which
19869   # to not find them
19870   if test "x$new_path" = x \
19871       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19872       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19873     new_path=`$CYGPATH -u "$path"`
19874   fi
19875   if test "x$new_path" = x; then
19876     # Oops. Which didn't find the executable.
19877     # The splitting of arguments from the executable at a space might have been incorrect,
19878     # since paths with space are more likely in Windows. Give it another try with the whole
19879     # argument.
19880     path="$complete"
19881     arguments="EOL"
19882     new_path=`$CYGPATH -u "$path"`
19883     new_path=`$WHICH "$new_path" 2> /dev/null`
19884     # bat and cmd files are not always considered executable in cygwin causing which
19885     # to not find them
19886     if test "x$new_path" = x \
19887         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19888         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19889       new_path=`$CYGPATH -u "$path"`
19890     fi
19891     if test "x$new_path" = x; then
19892       # It's still not found. Now this is an unrecoverable error.
19893       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19894 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19895       has_space=`$ECHO "$complete" | $GREP " "`
19896       if test "x$has_space" != x; then
19897         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19898 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19899       fi
19900       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19901     fi
19902   fi
19903 
19904   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19905   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19906   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19907   # "foo.exe" is OK but "foo" is an error.
19908   #
19909   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19910   # It is also a way to make sure we got the proper file name for the real test later on.
19911   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19912   if test "x$test_shortpath" = x; then
19913     # Short path failed, file does not exist as specified.
19914     # Try adding .exe or .cmd
19915     if test -f "${new_path}.exe"; then
19916       input_to_shortpath="${new_path}.exe"
19917     elif test -f "${new_path}.cmd"; then
19918       input_to_shortpath="${new_path}.cmd"
19919     else
19920       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19921 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19922       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19923 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19924       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19925     fi
19926   else
19927     input_to_shortpath="$new_path"
19928   fi
19929 
19930   # Call helper function which possibly converts this using DOS-style short mode.
19931   # If so, the updated path is stored in $new_path.
19932   new_path="$input_to_shortpath"
19933 
19934   input_path="$input_to_shortpath"
19935   # Check if we need to convert this using DOS-style short mode. If the path
19936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19937   # take no chances and rewrite it.
19938   # Note: m4 eats our [], so we need to use [ and ] instead.
19939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19940   if test "x$has_forbidden_chars" != x; then
19941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19945       # Going to short mode and back again did indeed matter. Since short mode is
19946       # case insensitive, let's make it lowercase to improve readability.
19947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19948       # Now convert it back to Unix-stile (cygpath)
19949       input_path=`$CYGPATH -u "$shortmode_path"`
19950       new_path="$input_path"
19951     fi
19952   fi
19953 
19954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19955   if test "x$test_cygdrive_prefix" = x; then
19956     # As a simple fix, exclude /usr/bin since it's not a real path.
19957     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19959       # a path prefixed by /cygdrive for fixpath to work.
19960       new_path="$CYGWIN_ROOT_PATH$input_path"
19961     fi
19962   fi
19963 
19964   # remove trailing .exe if any
19965   new_path="${new_path/%.exe/}"
19966 
19967   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968 
19969   # First separate the path from the arguments. This will split at the first
19970   # space.
19971   complete="$PROPER_COMPILER_CC"
19972   path="${complete%% *}"
19973   tmp="$complete EOL"
19974   arguments="${tmp#* }"
19975 
19976   # Input might be given as Windows format, start by converting to
19977   # unix format.
19978   new_path="$path"
19979 
19980   windows_path="$new_path"
19981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19982     unix_path=`$CYGPATH -u "$windows_path"`
19983     new_path="$unix_path"
19984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19986     new_path="$unix_path"
19987   fi
19988 
19989 
19990   # Now try to locate executable using which
19991   new_path=`$WHICH "$new_path" 2> /dev/null`
19992 
19993   if test "x$new_path" = x; then
19994     # Oops. Which didn't find the executable.
19995     # The splitting of arguments from the executable at a space might have been incorrect,
19996     # since paths with space are more likely in Windows. Give it another try with the whole
19997     # argument.
19998     path="$complete"
19999     arguments="EOL"
20000     new_path="$path"
20001 
20002   windows_path="$new_path"
20003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20004     unix_path=`$CYGPATH -u "$windows_path"`
20005     new_path="$unix_path"
20006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20008     new_path="$unix_path"
20009   fi
20010 
20011 
20012     new_path=`$WHICH "$new_path" 2> /dev/null`
20013 
20014     if test "x$new_path" = x; then
20015       # It's still not found. Now this is an unrecoverable error.
20016       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20017 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20018       has_space=`$ECHO "$complete" | $GREP " "`
20019       if test "x$has_space" != x; then
20020         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20021 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20022       fi
20023       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20024     fi
20025   fi
20026 
20027   # Now new_path has a complete unix path to the binary
20028   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20029     # Keep paths in /bin as-is, but remove trailing .exe if any
20030     new_path="${new_path/%.exe/}"
20031     # Do not save /bin paths to all_fixpath_prefixes!
20032   else
20033     # Not in mixed or Windows style, start by that.
20034     new_path=`cmd //c echo $new_path`
20035 
20036   input_path="$new_path"
20037   # Check if we need to convert this using DOS-style short mode. If the path
20038   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20039   # take no chances and rewrite it.
20040   # Note: m4 eats our [], so we need to use [ and ] instead.
20041   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20042   if test "x$has_forbidden_chars" != x; then
20043     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20044     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20045   fi
20046 
20047     # Output is in $new_path
20048 
20049   windows_path="$new_path"
20050   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20051     unix_path=`$CYGPATH -u "$windows_path"`
20052     new_path="$unix_path"
20053   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20054     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20055     new_path="$unix_path"
20056   fi
20057 
20058     # remove trailing .exe if any
20059     new_path="${new_path/%.exe/}"
20060 
20061     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20062     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20063   fi
20064 
20065   else
20066     # We're on a posix platform. Hooray! :)
20067     # First separate the path from the arguments. This will split at the first
20068     # space.
20069     complete="$PROPER_COMPILER_CC"
20070     path="${complete%% *}"
20071     tmp="$complete EOL"
20072     arguments="${tmp#* }"
20073 
20074     # Cannot rely on the command "which" here since it doesn't always work.
20075     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20076     if test -z "$is_absolute_path"; then
20077       # Path to executable is not absolute. Find it.
20078       IFS_save="$IFS"
20079       IFS=:
20080       for p in $PATH; do
20081         if test -f "$p/$path" && test -x "$p/$path"; then
20082           new_path="$p/$path"
20083           break
20084         fi
20085       done
20086       IFS="$IFS_save"
20087     else
20088       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20089 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20090       new_path="$path"
20091     fi
20092 
20093     if test "x$new_path" = x; then
20094       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20095 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20096       has_space=`$ECHO "$complete" | $GREP " "`
20097       if test "x$has_space" != x; then
20098         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20099 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20100       fi
20101       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20102     fi
20103   fi
20104 
20105   # Now join together the path and the arguments once again
20106   if test "x$arguments" != xEOL; then
20107     new_complete="$new_path ${arguments% *}"
20108   else
20109     new_complete="$new_path"
20110   fi
20111 
20112   if test "x$complete" != "x$new_complete"; then
20113     PROPER_COMPILER_CC="$new_complete"
20114     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20115 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20116   fi
20117 
20118     PATH="$RETRY_COMPILER_SAVED_PATH"
20119 
20120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20121 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20122 
20123   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20124     # Follow a chain of symbolic links. Use readlink
20125     # where it exists, else fall back to horribly
20126     # complicated shell code.
20127     if test "x$READLINK_TESTED" != yes; then
20128       # On MacOSX there is a readlink tool with a different
20129       # purpose than the GNU readlink tool. Check the found readlink.
20130       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20131       if test "x$ISGNU" = x; then
20132         # A readlink that we do not know how to use.
20133         # Are there other non-GNU readlinks out there?
20134         READLINK_TESTED=yes
20135         READLINK=
20136       fi
20137     fi
20138 
20139     if test "x$READLINK" != x; then
20140       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20141     else
20142       # Save the current directory for restoring afterwards
20143       STARTDIR=$PWD
20144       COUNTER=0
20145       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20146       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20147       cd $sym_link_dir
20148       # Use -P flag to resolve symlinks in directories.
20149       cd `$THEPWDCMD -P`
20150       sym_link_dir=`$THEPWDCMD -P`
20151       # Resolve file symlinks
20152       while test $COUNTER -lt 20; do
20153         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20154         if test "x$ISLINK" == x; then
20155           # This is not a symbolic link! We are done!
20156           break
20157         fi
20158         # Again resolve directory symlinks since the target of the just found
20159         # link could be in a different directory
20160         cd `$DIRNAME $ISLINK`
20161         sym_link_dir=`$THEPWDCMD -P`
20162         sym_link_file=`$BASENAME $ISLINK`
20163         let COUNTER=COUNTER+1
20164       done
20165       cd $STARTDIR
20166       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20167     fi
20168   fi
20169 
20170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20171 $as_echo "$PROPER_COMPILER_CC" >&6; }
20172     CC="$PROPER_COMPILER_CC"
20173   else
20174     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20175 $as_echo "no, keeping CC" >&6; }
20176     CC="$TEST_COMPILER"
20177   fi
20178 
20179   COMPILER=$CC
20180   COMPILER_NAME=$COMPILER_NAME
20181 
20182   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20183     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20184     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20185     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20186     if test $? -ne 0; then
20187       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20188 
20189       { $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
20190 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20191       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20192 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20193       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20194     else
20195       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20196       COMPILER_VENDOR="Sun Studio"
20197     fi
20198   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20199       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20200       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20201       if test $? -ne 0; then
20202         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20203       else
20204         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20205         COMPILER_VENDOR='IBM'
20206       fi
20207   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20208     # First line typically looks something like:
20209     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20210     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20211     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20212     COMPILER_VENDOR="Microsoft CL.EXE"
20213     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20214     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20215       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20216         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20217       fi
20218     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20219       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20220         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20221       fi
20222     fi
20223   else
20224     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20225     # Check that this is likely to be GCC.
20226     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20227     if test $? -ne 0; then
20228       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20229 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20230       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20231 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20232       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20233     fi
20234 
20235     # First line typically looks something like:
20236     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20237     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20238     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20239   fi
20240   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20241   CC_VERSION="$COMPILER_VERSION"
20242   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20243   CC_VENDOR="$COMPILER_VENDOR"
20244 
20245   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20246 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20247 
20248 
20249   # Now that we have resolved CC ourself, let autoconf have its go at it
20250   ac_ext=c
20251 ac_cpp='$CPP $CPPFLAGS'
20252 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20253 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20254 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20255 if test -n "$ac_tool_prefix"; then
20256   for ac_prog in $CC
20257   do
20258     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20259 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20261 $as_echo_n "checking for $ac_word... " >&6; }
20262 if ${ac_cv_prog_CC+:} false; then :
20263   $as_echo_n "(cached) " >&6
20264 else
20265   if test -n "$CC"; then
20266   ac_cv_prog_CC="$CC" # Let the user override the test.
20267 else
20268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20269 for as_dir in $PATH
20270 do
20271   IFS=$as_save_IFS
20272   test -z "$as_dir" && as_dir=.
20273     for ac_exec_ext in '' $ac_executable_extensions; do
20274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20275     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20277     break 2
20278   fi
20279 done
20280   done
20281 IFS=$as_save_IFS
20282 
20283 fi
20284 fi
20285 CC=$ac_cv_prog_CC
20286 if test -n "$CC"; then
20287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20288 $as_echo "$CC" >&6; }
20289 else
20290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20291 $as_echo "no" >&6; }
20292 fi
20293 
20294 
20295     test -n "$CC" && break
20296   done
20297 fi
20298 if test -z "$CC"; then
20299   ac_ct_CC=$CC
20300   for ac_prog in $CC
20301 do
20302   # Extract the first word of "$ac_prog", so it can be a program name with args.
20303 set dummy $ac_prog; ac_word=$2
20304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20305 $as_echo_n "checking for $ac_word... " >&6; }
20306 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20307   $as_echo_n "(cached) " >&6
20308 else
20309   if test -n "$ac_ct_CC"; then
20310   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20311 else
20312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20313 for as_dir in $PATH
20314 do
20315   IFS=$as_save_IFS
20316   test -z "$as_dir" && as_dir=.
20317     for ac_exec_ext in '' $ac_executable_extensions; do
20318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20319     ac_cv_prog_ac_ct_CC="$ac_prog"
20320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20321     break 2
20322   fi
20323 done
20324   done
20325 IFS=$as_save_IFS
20326 
20327 fi
20328 fi
20329 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20330 if test -n "$ac_ct_CC"; then
20331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20332 $as_echo "$ac_ct_CC" >&6; }
20333 else
20334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20335 $as_echo "no" >&6; }
20336 fi
20337 
20338 
20339   test -n "$ac_ct_CC" && break
20340 done
20341 
20342   if test "x$ac_ct_CC" = x; then
20343     CC=""
20344   else
20345     case $cross_compiling:$ac_tool_warned in
20346 yes:)
20347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20348 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20349 ac_tool_warned=yes ;;
20350 esac
20351     CC=$ac_ct_CC
20352   fi
20353 fi
20354 
20355 
20356 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20357 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20358 as_fn_error $? "no acceptable C compiler found in \$PATH
20359 See \`config.log' for more details" "$LINENO" 5; }
20360 
20361 # Provide some information about the compiler.
20362 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20363 set X $ac_compile
20364 ac_compiler=$2
20365 for ac_option in --version -v -V -qversion; do
20366   { { ac_try="$ac_compiler $ac_option >&5"
20367 case "(($ac_try" in
20368   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20369   *) ac_try_echo=$ac_try;;
20370 esac
20371 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20372 $as_echo "$ac_try_echo"; } >&5
20373   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20374   ac_status=$?
20375   if test -s conftest.err; then
20376     sed '10a\
20377 ... rest of stderr output deleted ...
20378          10q' conftest.err >conftest.er1
20379     cat conftest.er1 >&5
20380   fi
20381   rm -f conftest.er1 conftest.err
20382   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20383   test $ac_status = 0; }
20384 done
20385 
20386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20387 /* end confdefs.h.  */
20388 
20389 int
20390 main ()
20391 {
20392 
20393   ;
20394   return 0;
20395 }
20396 _ACEOF
20397 ac_clean_files_save=$ac_clean_files
20398 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20399 # Try to create an executable without -o first, disregard a.out.
20400 # It will help us diagnose broken compilers, and finding out an intuition
20401 # of exeext.
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20403 $as_echo_n "checking whether the C compiler works... " >&6; }
20404 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20405 
20406 # The possible output files:
20407 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20408 
20409 ac_rmfiles=
20410 for ac_file in $ac_files
20411 do
20412   case $ac_file in
20413     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20414     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20415   esac
20416 done
20417 rm -f $ac_rmfiles
20418 
20419 if { { ac_try="$ac_link_default"
20420 case "(($ac_try" in
20421   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20422   *) ac_try_echo=$ac_try;;
20423 esac
20424 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20425 $as_echo "$ac_try_echo"; } >&5
20426   (eval "$ac_link_default") 2>&5
20427   ac_status=$?
20428   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20429   test $ac_status = 0; }; then :
20430   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20431 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20432 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20433 # so that the user can short-circuit this test for compilers unknown to
20434 # Autoconf.
20435 for ac_file in $ac_files ''
20436 do
20437   test -f "$ac_file" || continue
20438   case $ac_file in
20439     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20440         ;;
20441     [ab].out )
20442         # We found the default executable, but exeext='' is most
20443         # certainly right.
20444         break;;
20445     *.* )
20446         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20447         then :; else
20448            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20449         fi
20450         # We set ac_cv_exeext here because the later test for it is not
20451         # safe: cross compilers may not add the suffix if given an `-o'
20452         # argument, so we may need to know it at that point already.
20453         # Even if this section looks crufty: it has the advantage of
20454         # actually working.
20455         break;;
20456     * )
20457         break;;
20458   esac
20459 done
20460 test "$ac_cv_exeext" = no && ac_cv_exeext=
20461 
20462 else
20463   ac_file=''
20464 fi
20465 if test -z "$ac_file"; then :
20466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20467 $as_echo "no" >&6; }
20468 $as_echo "$as_me: failed program was:" >&5
20469 sed 's/^/| /' conftest.$ac_ext >&5
20470 
20471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20473 as_fn_error 77 "C compiler cannot create executables
20474 See \`config.log' for more details" "$LINENO" 5; }
20475 else
20476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20477 $as_echo "yes" >&6; }
20478 fi
20479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20480 $as_echo_n "checking for C compiler default output file name... " >&6; }
20481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20482 $as_echo "$ac_file" >&6; }
20483 ac_exeext=$ac_cv_exeext
20484 
20485 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20486 ac_clean_files=$ac_clean_files_save
20487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20488 $as_echo_n "checking for suffix of executables... " >&6; }
20489 if { { ac_try="$ac_link"
20490 case "(($ac_try" in
20491   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20492   *) ac_try_echo=$ac_try;;
20493 esac
20494 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20495 $as_echo "$ac_try_echo"; } >&5
20496   (eval "$ac_link") 2>&5
20497   ac_status=$?
20498   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20499   test $ac_status = 0; }; then :
20500   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20501 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20502 # work properly (i.e., refer to `conftest.exe'), while it won't with
20503 # `rm'.
20504 for ac_file in conftest.exe conftest conftest.*; do
20505   test -f "$ac_file" || continue
20506   case $ac_file in
20507     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20508     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20509           break;;
20510     * ) break;;
20511   esac
20512 done
20513 else
20514   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20515 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20516 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20517 See \`config.log' for more details" "$LINENO" 5; }
20518 fi
20519 rm -f conftest conftest$ac_cv_exeext
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20521 $as_echo "$ac_cv_exeext" >&6; }
20522 
20523 rm -f conftest.$ac_ext
20524 EXEEXT=$ac_cv_exeext
20525 ac_exeext=$EXEEXT
20526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20527 /* end confdefs.h.  */
20528 #include <stdio.h>
20529 int
20530 main ()
20531 {
20532 FILE *f = fopen ("conftest.out", "w");
20533  return ferror (f) || fclose (f) != 0;
20534 
20535   ;
20536   return 0;
20537 }
20538 _ACEOF
20539 ac_clean_files="$ac_clean_files conftest.out"
20540 # Check that the compiler produces executables we can run.  If not, either
20541 # the compiler is broken, or we cross compile.
20542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20543 $as_echo_n "checking whether we are cross compiling... " >&6; }
20544 if test "$cross_compiling" != yes; then
20545   { { ac_try="$ac_link"
20546 case "(($ac_try" in
20547   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20548   *) ac_try_echo=$ac_try;;
20549 esac
20550 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20551 $as_echo "$ac_try_echo"; } >&5
20552   (eval "$ac_link") 2>&5
20553   ac_status=$?
20554   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20555   test $ac_status = 0; }
20556   if { ac_try='./conftest$ac_cv_exeext'
20557   { { case "(($ac_try" in
20558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20559   *) ac_try_echo=$ac_try;;
20560 esac
20561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20562 $as_echo "$ac_try_echo"; } >&5
20563   (eval "$ac_try") 2>&5
20564   ac_status=$?
20565   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20566   test $ac_status = 0; }; }; then
20567     cross_compiling=no
20568   else
20569     if test "$cross_compiling" = maybe; then
20570         cross_compiling=yes
20571     else
20572         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20574 as_fn_error $? "cannot run C compiled programs.
20575 If you meant to cross compile, use \`--host'.
20576 See \`config.log' for more details" "$LINENO" 5; }
20577     fi
20578   fi
20579 fi
20580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20581 $as_echo "$cross_compiling" >&6; }
20582 
20583 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20584 ac_clean_files=$ac_clean_files_save
20585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20586 $as_echo_n "checking for suffix of object files... " >&6; }
20587 if ${ac_cv_objext+:} false; then :
20588   $as_echo_n "(cached) " >&6
20589 else
20590   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20591 /* end confdefs.h.  */
20592 
20593 int
20594 main ()
20595 {
20596 
20597   ;
20598   return 0;
20599 }
20600 _ACEOF
20601 rm -f conftest.o conftest.obj
20602 if { { ac_try="$ac_compile"
20603 case "(($ac_try" in
20604   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20605   *) ac_try_echo=$ac_try;;
20606 esac
20607 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20608 $as_echo "$ac_try_echo"; } >&5
20609   (eval "$ac_compile") 2>&5
20610   ac_status=$?
20611   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20612   test $ac_status = 0; }; then :
20613   for ac_file in conftest.o conftest.obj conftest.*; do
20614   test -f "$ac_file" || continue;
20615   case $ac_file in
20616     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20617     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20618        break;;
20619   esac
20620 done
20621 else
20622   $as_echo "$as_me: failed program was:" >&5
20623 sed 's/^/| /' conftest.$ac_ext >&5
20624 
20625 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20626 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20627 as_fn_error $? "cannot compute suffix of object files: cannot compile
20628 See \`config.log' for more details" "$LINENO" 5; }
20629 fi
20630 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20631 fi
20632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20633 $as_echo "$ac_cv_objext" >&6; }
20634 OBJEXT=$ac_cv_objext
20635 ac_objext=$OBJEXT
20636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20637 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20638 if ${ac_cv_c_compiler_gnu+:} false; then :
20639   $as_echo_n "(cached) " >&6
20640 else
20641   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20642 /* end confdefs.h.  */
20643 
20644 int
20645 main ()
20646 {
20647 #ifndef __GNUC__
20648        choke me
20649 #endif
20650 
20651   ;
20652   return 0;
20653 }
20654 _ACEOF
20655 if ac_fn_c_try_compile "$LINENO"; then :
20656   ac_compiler_gnu=yes
20657 else
20658   ac_compiler_gnu=no
20659 fi
20660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20661 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20662 
20663 fi
20664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20665 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20666 if test $ac_compiler_gnu = yes; then
20667   GCC=yes
20668 else
20669   GCC=
20670 fi
20671 ac_test_CFLAGS=${CFLAGS+set}
20672 ac_save_CFLAGS=$CFLAGS
20673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20674 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20675 if ${ac_cv_prog_cc_g+:} false; then :
20676   $as_echo_n "(cached) " >&6
20677 else
20678   ac_save_c_werror_flag=$ac_c_werror_flag
20679    ac_c_werror_flag=yes
20680    ac_cv_prog_cc_g=no
20681    CFLAGS="-g"
20682    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20683 /* end confdefs.h.  */
20684 
20685 int
20686 main ()
20687 {
20688 
20689   ;
20690   return 0;
20691 }
20692 _ACEOF
20693 if ac_fn_c_try_compile "$LINENO"; then :
20694   ac_cv_prog_cc_g=yes
20695 else
20696   CFLAGS=""
20697       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20698 /* end confdefs.h.  */
20699 
20700 int
20701 main ()
20702 {
20703 
20704   ;
20705   return 0;
20706 }
20707 _ACEOF
20708 if ac_fn_c_try_compile "$LINENO"; then :
20709 
20710 else
20711   ac_c_werror_flag=$ac_save_c_werror_flag
20712          CFLAGS="-g"
20713          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20714 /* end confdefs.h.  */
20715 
20716 int
20717 main ()
20718 {
20719 
20720   ;
20721   return 0;
20722 }
20723 _ACEOF
20724 if ac_fn_c_try_compile "$LINENO"; then :
20725   ac_cv_prog_cc_g=yes
20726 fi
20727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20728 fi
20729 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20730 fi
20731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20732    ac_c_werror_flag=$ac_save_c_werror_flag
20733 fi
20734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20735 $as_echo "$ac_cv_prog_cc_g" >&6; }
20736 if test "$ac_test_CFLAGS" = set; then
20737   CFLAGS=$ac_save_CFLAGS
20738 elif test $ac_cv_prog_cc_g = yes; then
20739   if test "$GCC" = yes; then
20740     CFLAGS="-g -O2"
20741   else
20742     CFLAGS="-g"
20743   fi
20744 else
20745   if test "$GCC" = yes; then
20746     CFLAGS="-O2"
20747   else
20748     CFLAGS=
20749   fi
20750 fi
20751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20752 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20753 if ${ac_cv_prog_cc_c89+:} false; then :
20754   $as_echo_n "(cached) " >&6
20755 else
20756   ac_cv_prog_cc_c89=no
20757 ac_save_CC=$CC
20758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20759 /* end confdefs.h.  */
20760 #include <stdarg.h>
20761 #include <stdio.h>
20762 struct stat;
20763 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20764 struct buf { int x; };
20765 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20766 static char *e (p, i)
20767      char **p;
20768      int i;
20769 {
20770   return p[i];
20771 }
20772 static char *f (char * (*g) (char **, int), char **p, ...)
20773 {
20774   char *s;
20775   va_list v;
20776   va_start (v,p);
20777   s = g (p, va_arg (v,int));
20778   va_end (v);
20779   return s;
20780 }
20781 
20782 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20783    function prototypes and stuff, but not '\xHH' hex character constants.
20784    These don't provoke an error unfortunately, instead are silently treated
20785    as 'x'.  The following induces an error, until -std is added to get
20786    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20787    array size at least.  It's necessary to write '\x00'==0 to get something
20788    that's true only with -std.  */
20789 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20790 
20791 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20792    inside strings and character constants.  */
20793 #define FOO(x) 'x'
20794 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20795 
20796 int test (int i, double x);
20797 struct s1 {int (*f) (int a);};
20798 struct s2 {int (*f) (double a);};
20799 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20800 int argc;
20801 char **argv;
20802 int
20803 main ()
20804 {
20805 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20806   ;
20807   return 0;
20808 }
20809 _ACEOF
20810 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20811         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20812 do
20813   CC="$ac_save_CC $ac_arg"
20814   if ac_fn_c_try_compile "$LINENO"; then :
20815   ac_cv_prog_cc_c89=$ac_arg
20816 fi
20817 rm -f core conftest.err conftest.$ac_objext
20818   test "x$ac_cv_prog_cc_c89" != "xno" && break
20819 done
20820 rm -f conftest.$ac_ext
20821 CC=$ac_save_CC
20822 
20823 fi
20824 # AC_CACHE_VAL
20825 case "x$ac_cv_prog_cc_c89" in
20826   x)
20827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20828 $as_echo "none needed" >&6; } ;;
20829   xno)
20830     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20831 $as_echo "unsupported" >&6; } ;;
20832   *)
20833     CC="$CC $ac_cv_prog_cc_c89"
20834     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20835 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20836 esac
20837 if test "x$ac_cv_prog_cc_c89" != xno; then :
20838 
20839 fi
20840 
20841 ac_ext=cpp
20842 ac_cpp='$CXXCPP $CPPFLAGS'
20843 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20844 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20845 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20846 
20847 
20848   # Option used to tell the compiler whether to create 32- or 64-bit executables
20849   # Notice that CC contains the full compiler path at this point.
20850   case $CC in
20851     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20852     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20853   esac
20854 
20855 
20856   ### Locate C++ compiler (CXX)
20857 
20858   if test "x$CXX" != x; then
20859     COMPILER_CHECK_LIST="$CXX"
20860   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20861     COMPILER_CHECK_LIST="cl"
20862   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20863     COMPILER_CHECK_LIST="CC g++"
20864   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20865     # Do not probe for CC on AIX .
20866     COMPILER_CHECK_LIST="xlC_r"
20867   else
20868     COMPILER_CHECK_LIST="g++ CC"
20869   fi
20870 
20871 
20872   COMPILER_NAME=C++
20873 
20874   CXX=
20875   # If TOOLS_DIR is set, check for all compiler names in there first
20876   # before checking the rest of the PATH.
20877   if test -n "$TOOLS_DIR"; then
20878     PATH_save="$PATH"
20879     PATH="$TOOLS_DIR"
20880     for ac_prog in $COMPILER_CHECK_LIST
20881 do
20882   # Extract the first word of "$ac_prog", so it can be a program name with args.
20883 set dummy $ac_prog; ac_word=$2
20884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20885 $as_echo_n "checking for $ac_word... " >&6; }
20886 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20887   $as_echo_n "(cached) " >&6
20888 else
20889   case $TOOLS_DIR_CXX in
20890   [\\/]* | ?:[\\/]*)
20891   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20892   ;;
20893   *)
20894   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20895 for as_dir in $PATH
20896 do
20897   IFS=$as_save_IFS
20898   test -z "$as_dir" && as_dir=.
20899     for ac_exec_ext in '' $ac_executable_extensions; do
20900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20901     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20903     break 2
20904   fi
20905 done
20906   done
20907 IFS=$as_save_IFS
20908 
20909   ;;
20910 esac
20911 fi
20912 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20913 if test -n "$TOOLS_DIR_CXX"; then
20914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20915 $as_echo "$TOOLS_DIR_CXX" >&6; }
20916 else
20917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20918 $as_echo "no" >&6; }
20919 fi
20920 
20921 
20922   test -n "$TOOLS_DIR_CXX" && break
20923 done
20924 
20925     CXX=$TOOLS_DIR_CXX
20926     PATH="$PATH_save"
20927   fi
20928 
20929   # AC_PATH_PROGS can't be run multiple times with the same variable,
20930   # so create a new name for this run.
20931   if test "x$CXX" = x; then
20932     for ac_prog in $COMPILER_CHECK_LIST
20933 do
20934   # Extract the first word of "$ac_prog", so it can be a program name with args.
20935 set dummy $ac_prog; ac_word=$2
20936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20937 $as_echo_n "checking for $ac_word... " >&6; }
20938 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20939   $as_echo_n "(cached) " >&6
20940 else
20941   case $POTENTIAL_CXX in
20942   [\\/]* | ?:[\\/]*)
20943   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20944   ;;
20945   *)
20946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20947 for as_dir in $PATH
20948 do
20949   IFS=$as_save_IFS
20950   test -z "$as_dir" && as_dir=.
20951     for ac_exec_ext in '' $ac_executable_extensions; do
20952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20953     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20955     break 2
20956   fi
20957 done
20958   done
20959 IFS=$as_save_IFS
20960 
20961   ;;
20962 esac
20963 fi
20964 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20965 if test -n "$POTENTIAL_CXX"; then
20966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20967 $as_echo "$POTENTIAL_CXX" >&6; }
20968 else
20969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20970 $as_echo "no" >&6; }
20971 fi
20972 
20973 
20974   test -n "$POTENTIAL_CXX" && break
20975 done
20976 
20977     CXX=$POTENTIAL_CXX
20978   fi
20979 
20980   if test "x$CXX" = x; then
20981 
20982   # Print a helpful message on how to acquire the necessary build dependency.
20983   # devkit is the help tag: freetype, cups, pulse, alsa etc
20984   MISSING_DEPENDENCY=devkit
20985 
20986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20987     cygwin_help $MISSING_DEPENDENCY
20988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20989     msys_help $MISSING_DEPENDENCY
20990   else
20991     PKGHANDLER_COMMAND=
20992 
20993     case $PKGHANDLER in
20994       apt-get)
20995         apt_help     $MISSING_DEPENDENCY ;;
20996       yum)
20997         yum_help     $MISSING_DEPENDENCY ;;
20998       port)
20999         port_help    $MISSING_DEPENDENCY ;;
21000       pkgutil)
21001         pkgutil_help $MISSING_DEPENDENCY ;;
21002       pkgadd)
21003         pkgadd_help  $MISSING_DEPENDENCY ;;
21004     esac
21005 
21006     if test "x$PKGHANDLER_COMMAND" != x; then
21007       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
21008     fi
21009   fi
21010 
21011     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
21012   fi
21013 
21014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21015 
21016   # First separate the path from the arguments. This will split at the first
21017   # space.
21018   complete="$CXX"
21019   path="${complete%% *}"
21020   tmp="$complete EOL"
21021   arguments="${tmp#* }"
21022 
21023   # Input might be given as Windows format, start by converting to
21024   # unix format.
21025   new_path=`$CYGPATH -u "$path"`
21026 
21027   # Now try to locate executable using which
21028   new_path=`$WHICH "$new_path" 2> /dev/null`
21029   # bat and cmd files are not always considered executable in cygwin causing which
21030   # to not find them
21031   if test "x$new_path" = x \
21032       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21033       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21034     new_path=`$CYGPATH -u "$path"`
21035   fi
21036   if test "x$new_path" = x; then
21037     # Oops. Which didn't find the executable.
21038     # The splitting of arguments from the executable at a space might have been incorrect,
21039     # since paths with space are more likely in Windows. Give it another try with the whole
21040     # argument.
21041     path="$complete"
21042     arguments="EOL"
21043     new_path=`$CYGPATH -u "$path"`
21044     new_path=`$WHICH "$new_path" 2> /dev/null`
21045     # bat and cmd files are not always considered executable in cygwin causing which
21046     # to not find them
21047     if test "x$new_path" = x \
21048         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21049         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21050       new_path=`$CYGPATH -u "$path"`
21051     fi
21052     if test "x$new_path" = x; then
21053       # It's still not found. Now this is an unrecoverable error.
21054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21055 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21056       has_space=`$ECHO "$complete" | $GREP " "`
21057       if test "x$has_space" != x; then
21058         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21059 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21060       fi
21061       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21062     fi
21063   fi
21064 
21065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21068   # "foo.exe" is OK but "foo" is an error.
21069   #
21070   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21071   # It is also a way to make sure we got the proper file name for the real test later on.
21072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21073   if test "x$test_shortpath" = x; then
21074     # Short path failed, file does not exist as specified.
21075     # Try adding .exe or .cmd
21076     if test -f "${new_path}.exe"; then
21077       input_to_shortpath="${new_path}.exe"
21078     elif test -f "${new_path}.cmd"; then
21079       input_to_shortpath="${new_path}.cmd"
21080     else
21081       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21082 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21083       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21084 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21085       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21086     fi
21087   else
21088     input_to_shortpath="$new_path"
21089   fi
21090 
21091   # Call helper function which possibly converts this using DOS-style short mode.
21092   # If so, the updated path is stored in $new_path.
21093   new_path="$input_to_shortpath"
21094 
21095   input_path="$input_to_shortpath"
21096   # Check if we need to convert this using DOS-style short mode. If the path
21097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21098   # take no chances and rewrite it.
21099   # Note: m4 eats our [], so we need to use [ and ] instead.
21100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21101   if test "x$has_forbidden_chars" != x; then
21102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21106       # Going to short mode and back again did indeed matter. Since short mode is
21107       # case insensitive, let's make it lowercase to improve readability.
21108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21109       # Now convert it back to Unix-stile (cygpath)
21110       input_path=`$CYGPATH -u "$shortmode_path"`
21111       new_path="$input_path"
21112     fi
21113   fi
21114 
21115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21116   if test "x$test_cygdrive_prefix" = x; then
21117     # As a simple fix, exclude /usr/bin since it's not a real path.
21118     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21120       # a path prefixed by /cygdrive for fixpath to work.
21121       new_path="$CYGWIN_ROOT_PATH$input_path"
21122     fi
21123   fi
21124 
21125   # remove trailing .exe if any
21126   new_path="${new_path/%.exe/}"
21127 
21128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21129 
21130   # First separate the path from the arguments. This will split at the first
21131   # space.
21132   complete="$CXX"
21133   path="${complete%% *}"
21134   tmp="$complete EOL"
21135   arguments="${tmp#* }"
21136 
21137   # Input might be given as Windows format, start by converting to
21138   # unix format.
21139   new_path="$path"
21140 
21141   windows_path="$new_path"
21142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21143     unix_path=`$CYGPATH -u "$windows_path"`
21144     new_path="$unix_path"
21145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21147     new_path="$unix_path"
21148   fi
21149 
21150 
21151   # Now try to locate executable using which
21152   new_path=`$WHICH "$new_path" 2> /dev/null`
21153 
21154   if test "x$new_path" = x; then
21155     # Oops. Which didn't find the executable.
21156     # The splitting of arguments from the executable at a space might have been incorrect,
21157     # since paths with space are more likely in Windows. Give it another try with the whole
21158     # argument.
21159     path="$complete"
21160     arguments="EOL"
21161     new_path="$path"
21162 
21163   windows_path="$new_path"
21164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21165     unix_path=`$CYGPATH -u "$windows_path"`
21166     new_path="$unix_path"
21167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21169     new_path="$unix_path"
21170   fi
21171 
21172 
21173     new_path=`$WHICH "$new_path" 2> /dev/null`
21174 
21175     if test "x$new_path" = x; then
21176       # It's still not found. Now this is an unrecoverable error.
21177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21178 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21179       has_space=`$ECHO "$complete" | $GREP " "`
21180       if test "x$has_space" != x; then
21181         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21182 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21183       fi
21184       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21185     fi
21186   fi
21187 
21188   # Now new_path has a complete unix path to the binary
21189   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21190     # Keep paths in /bin as-is, but remove trailing .exe if any
21191     new_path="${new_path/%.exe/}"
21192     # Do not save /bin paths to all_fixpath_prefixes!
21193   else
21194     # Not in mixed or Windows style, start by that.
21195     new_path=`cmd //c echo $new_path`
21196 
21197   input_path="$new_path"
21198   # Check if we need to convert this using DOS-style short mode. If the path
21199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21200   # take no chances and rewrite it.
21201   # Note: m4 eats our [], so we need to use [ and ] instead.
21202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21203   if test "x$has_forbidden_chars" != x; then
21204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21206   fi
21207 
21208     # Output is in $new_path
21209 
21210   windows_path="$new_path"
21211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21212     unix_path=`$CYGPATH -u "$windows_path"`
21213     new_path="$unix_path"
21214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21216     new_path="$unix_path"
21217   fi
21218 
21219     # remove trailing .exe if any
21220     new_path="${new_path/%.exe/}"
21221 
21222     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21223     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21224   fi
21225 
21226   else
21227     # We're on a posix platform. Hooray! :)
21228     # First separate the path from the arguments. This will split at the first
21229     # space.
21230     complete="$CXX"
21231     path="${complete%% *}"
21232     tmp="$complete EOL"
21233     arguments="${tmp#* }"
21234 
21235     # Cannot rely on the command "which" here since it doesn't always work.
21236     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21237     if test -z "$is_absolute_path"; then
21238       # Path to executable is not absolute. Find it.
21239       IFS_save="$IFS"
21240       IFS=:
21241       for p in $PATH; do
21242         if test -f "$p/$path" && test -x "$p/$path"; then
21243           new_path="$p/$path"
21244           break
21245         fi
21246       done
21247       IFS="$IFS_save"
21248     else
21249       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21250 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21251       new_path="$path"
21252     fi
21253 
21254     if test "x$new_path" = x; then
21255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21256 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21257       has_space=`$ECHO "$complete" | $GREP " "`
21258       if test "x$has_space" != x; then
21259         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21260 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21261       fi
21262       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21263     fi
21264   fi
21265 
21266   # Now join together the path and the arguments once again
21267   if test "x$arguments" != xEOL; then
21268     new_complete="$new_path ${arguments% *}"
21269   else
21270     new_complete="$new_path"
21271   fi
21272 
21273   if test "x$complete" != "x$new_complete"; then
21274     CXX="$new_complete"
21275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21276 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21277   fi
21278 
21279   TEST_COMPILER="$CXX"
21280   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21281   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21282   if test "x$OPENJDK_BUILD_OS" != xaix; then
21283     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21284 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21285 
21286   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21287     # Follow a chain of symbolic links. Use readlink
21288     # where it exists, else fall back to horribly
21289     # complicated shell code.
21290     if test "x$READLINK_TESTED" != yes; then
21291       # On MacOSX there is a readlink tool with a different
21292       # purpose than the GNU readlink tool. Check the found readlink.
21293       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21294       if test "x$ISGNU" = x; then
21295         # A readlink that we do not know how to use.
21296         # Are there other non-GNU readlinks out there?
21297         READLINK_TESTED=yes
21298         READLINK=
21299       fi
21300     fi
21301 
21302     if test "x$READLINK" != x; then
21303       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21304     else
21305       # Save the current directory for restoring afterwards
21306       STARTDIR=$PWD
21307       COUNTER=0
21308       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21309       sym_link_file=`$BASENAME $TEST_COMPILER`
21310       cd $sym_link_dir
21311       # Use -P flag to resolve symlinks in directories.
21312       cd `$THEPWDCMD -P`
21313       sym_link_dir=`$THEPWDCMD -P`
21314       # Resolve file symlinks
21315       while test $COUNTER -lt 20; do
21316         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21317         if test "x$ISLINK" == x; then
21318           # This is not a symbolic link! We are done!
21319           break
21320         fi
21321         # Again resolve directory symlinks since the target of the just found
21322         # link could be in a different directory
21323         cd `$DIRNAME $ISLINK`
21324         sym_link_dir=`$THEPWDCMD -P`
21325         sym_link_file=`$BASENAME $ISLINK`
21326         let COUNTER=COUNTER+1
21327       done
21328       cd $STARTDIR
21329       TEST_COMPILER=$sym_link_dir/$sym_link_file
21330     fi
21331   fi
21332 
21333     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21334 $as_echo "$TEST_COMPILER" >&6; }
21335   fi
21336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21337 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21338 
21339   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21340   if test "x$COMPILER_BASENAME" = "xccache"; then
21341     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21342 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21343     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21344     # We want to control ccache invocation ourselves, so ignore this cc and try
21345     # searching again.
21346 
21347     # Remove the path to the fake ccache cc from the PATH
21348     RETRY_COMPILER_SAVED_PATH="$PATH"
21349     COMPILER_DIRNAME=`$DIRNAME $CXX`
21350     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21351 
21352     # Try again looking for our compiler
21353     if test -n "$ac_tool_prefix"; then
21354   for ac_prog in $COMPILER_CHECK_LIST
21355   do
21356     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21357 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21359 $as_echo_n "checking for $ac_word... " >&6; }
21360 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21361   $as_echo_n "(cached) " >&6
21362 else
21363   if test -n "$PROPER_COMPILER_CXX"; then
21364   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21365 else
21366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21367 for as_dir in $PATH
21368 do
21369   IFS=$as_save_IFS
21370   test -z "$as_dir" && as_dir=.
21371     for ac_exec_ext in '' $ac_executable_extensions; do
21372   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21373     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21375     break 2
21376   fi
21377 done
21378   done
21379 IFS=$as_save_IFS
21380 
21381 fi
21382 fi
21383 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21384 if test -n "$PROPER_COMPILER_CXX"; then
21385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21386 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21387 else
21388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21389 $as_echo "no" >&6; }
21390 fi
21391 
21392 
21393     test -n "$PROPER_COMPILER_CXX" && break
21394   done
21395 fi
21396 if test -z "$PROPER_COMPILER_CXX"; then
21397   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21398   for ac_prog in $COMPILER_CHECK_LIST
21399 do
21400   # Extract the first word of "$ac_prog", so it can be a program name with args.
21401 set dummy $ac_prog; ac_word=$2
21402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21403 $as_echo_n "checking for $ac_word... " >&6; }
21404 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21405   $as_echo_n "(cached) " >&6
21406 else
21407   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21408   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21409 else
21410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21411 for as_dir in $PATH
21412 do
21413   IFS=$as_save_IFS
21414   test -z "$as_dir" && as_dir=.
21415     for ac_exec_ext in '' $ac_executable_extensions; do
21416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21417     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21419     break 2
21420   fi
21421 done
21422   done
21423 IFS=$as_save_IFS
21424 
21425 fi
21426 fi
21427 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21428 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21430 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21431 else
21432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21433 $as_echo "no" >&6; }
21434 fi
21435 
21436 
21437   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21438 done
21439 
21440   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21441     PROPER_COMPILER_CXX=""
21442   else
21443     case $cross_compiling:$ac_tool_warned in
21444 yes:)
21445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21446 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21447 ac_tool_warned=yes ;;
21448 esac
21449     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21450   fi
21451 fi
21452 
21453 
21454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21455 
21456   # First separate the path from the arguments. This will split at the first
21457   # space.
21458   complete="$PROPER_COMPILER_CXX"
21459   path="${complete%% *}"
21460   tmp="$complete EOL"
21461   arguments="${tmp#* }"
21462 
21463   # Input might be given as Windows format, start by converting to
21464   # unix format.
21465   new_path=`$CYGPATH -u "$path"`
21466 
21467   # Now try to locate executable using which
21468   new_path=`$WHICH "$new_path" 2> /dev/null`
21469   # bat and cmd files are not always considered executable in cygwin causing which
21470   # to not find them
21471   if test "x$new_path" = x \
21472       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21473       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21474     new_path=`$CYGPATH -u "$path"`
21475   fi
21476   if test "x$new_path" = x; then
21477     # Oops. Which didn't find the executable.
21478     # The splitting of arguments from the executable at a space might have been incorrect,
21479     # since paths with space are more likely in Windows. Give it another try with the whole
21480     # argument.
21481     path="$complete"
21482     arguments="EOL"
21483     new_path=`$CYGPATH -u "$path"`
21484     new_path=`$WHICH "$new_path" 2> /dev/null`
21485     # bat and cmd files are not always considered executable in cygwin causing which
21486     # to not find them
21487     if test "x$new_path" = x \
21488         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21489         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21490       new_path=`$CYGPATH -u "$path"`
21491     fi
21492     if test "x$new_path" = x; then
21493       # It's still not found. Now this is an unrecoverable error.
21494       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21495 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21496       has_space=`$ECHO "$complete" | $GREP " "`
21497       if test "x$has_space" != x; then
21498         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21499 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21500       fi
21501       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21502     fi
21503   fi
21504 
21505   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21506   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21507   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21508   # "foo.exe" is OK but "foo" is an error.
21509   #
21510   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21511   # It is also a way to make sure we got the proper file name for the real test later on.
21512   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21513   if test "x$test_shortpath" = x; then
21514     # Short path failed, file does not exist as specified.
21515     # Try adding .exe or .cmd
21516     if test -f "${new_path}.exe"; then
21517       input_to_shortpath="${new_path}.exe"
21518     elif test -f "${new_path}.cmd"; then
21519       input_to_shortpath="${new_path}.cmd"
21520     else
21521       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21522 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21523       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21524 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21525       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21526     fi
21527   else
21528     input_to_shortpath="$new_path"
21529   fi
21530 
21531   # Call helper function which possibly converts this using DOS-style short mode.
21532   # If so, the updated path is stored in $new_path.
21533   new_path="$input_to_shortpath"
21534 
21535   input_path="$input_to_shortpath"
21536   # Check if we need to convert this using DOS-style short mode. If the path
21537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21538   # take no chances and rewrite it.
21539   # Note: m4 eats our [], so we need to use [ and ] instead.
21540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21541   if test "x$has_forbidden_chars" != x; then
21542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21546       # Going to short mode and back again did indeed matter. Since short mode is
21547       # case insensitive, let's make it lowercase to improve readability.
21548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21549       # Now convert it back to Unix-stile (cygpath)
21550       input_path=`$CYGPATH -u "$shortmode_path"`
21551       new_path="$input_path"
21552     fi
21553   fi
21554 
21555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21556   if test "x$test_cygdrive_prefix" = x; then
21557     # As a simple fix, exclude /usr/bin since it's not a real path.
21558     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21560       # a path prefixed by /cygdrive for fixpath to work.
21561       new_path="$CYGWIN_ROOT_PATH$input_path"
21562     fi
21563   fi
21564 
21565   # remove trailing .exe if any
21566   new_path="${new_path/%.exe/}"
21567 
21568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21569 
21570   # First separate the path from the arguments. This will split at the first
21571   # space.
21572   complete="$PROPER_COMPILER_CXX"
21573   path="${complete%% *}"
21574   tmp="$complete EOL"
21575   arguments="${tmp#* }"
21576 
21577   # Input might be given as Windows format, start by converting to
21578   # unix format.
21579   new_path="$path"
21580 
21581   windows_path="$new_path"
21582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21583     unix_path=`$CYGPATH -u "$windows_path"`
21584     new_path="$unix_path"
21585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21587     new_path="$unix_path"
21588   fi
21589 
21590 
21591   # Now try to locate executable using which
21592   new_path=`$WHICH "$new_path" 2> /dev/null`
21593 
21594   if test "x$new_path" = x; then
21595     # Oops. Which didn't find the executable.
21596     # The splitting of arguments from the executable at a space might have been incorrect,
21597     # since paths with space are more likely in Windows. Give it another try with the whole
21598     # argument.
21599     path="$complete"
21600     arguments="EOL"
21601     new_path="$path"
21602 
21603   windows_path="$new_path"
21604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21605     unix_path=`$CYGPATH -u "$windows_path"`
21606     new_path="$unix_path"
21607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21609     new_path="$unix_path"
21610   fi
21611 
21612 
21613     new_path=`$WHICH "$new_path" 2> /dev/null`
21614 
21615     if test "x$new_path" = x; then
21616       # It's still not found. Now this is an unrecoverable error.
21617       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21618 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21619       has_space=`$ECHO "$complete" | $GREP " "`
21620       if test "x$has_space" != x; then
21621         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21622 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21623       fi
21624       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21625     fi
21626   fi
21627 
21628   # Now new_path has a complete unix path to the binary
21629   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21630     # Keep paths in /bin as-is, but remove trailing .exe if any
21631     new_path="${new_path/%.exe/}"
21632     # Do not save /bin paths to all_fixpath_prefixes!
21633   else
21634     # Not in mixed or Windows style, start by that.
21635     new_path=`cmd //c echo $new_path`
21636 
21637   input_path="$new_path"
21638   # Check if we need to convert this using DOS-style short mode. If the path
21639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21640   # take no chances and rewrite it.
21641   # Note: m4 eats our [], so we need to use [ and ] instead.
21642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21643   if test "x$has_forbidden_chars" != x; then
21644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21645     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21646   fi
21647 
21648     # Output is in $new_path
21649 
21650   windows_path="$new_path"
21651   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21652     unix_path=`$CYGPATH -u "$windows_path"`
21653     new_path="$unix_path"
21654   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21655     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21656     new_path="$unix_path"
21657   fi
21658 
21659     # remove trailing .exe if any
21660     new_path="${new_path/%.exe/}"
21661 
21662     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21663     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21664   fi
21665 
21666   else
21667     # We're on a posix platform. Hooray! :)
21668     # First separate the path from the arguments. This will split at the first
21669     # space.
21670     complete="$PROPER_COMPILER_CXX"
21671     path="${complete%% *}"
21672     tmp="$complete EOL"
21673     arguments="${tmp#* }"
21674 
21675     # Cannot rely on the command "which" here since it doesn't always work.
21676     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21677     if test -z "$is_absolute_path"; then
21678       # Path to executable is not absolute. Find it.
21679       IFS_save="$IFS"
21680       IFS=:
21681       for p in $PATH; do
21682         if test -f "$p/$path" && test -x "$p/$path"; then
21683           new_path="$p/$path"
21684           break
21685         fi
21686       done
21687       IFS="$IFS_save"
21688     else
21689       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21690 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21691       new_path="$path"
21692     fi
21693 
21694     if test "x$new_path" = x; then
21695       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21696 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21697       has_space=`$ECHO "$complete" | $GREP " "`
21698       if test "x$has_space" != x; then
21699         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21700 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21701       fi
21702       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21703     fi
21704   fi
21705 
21706   # Now join together the path and the arguments once again
21707   if test "x$arguments" != xEOL; then
21708     new_complete="$new_path ${arguments% *}"
21709   else
21710     new_complete="$new_path"
21711   fi
21712 
21713   if test "x$complete" != "x$new_complete"; then
21714     PROPER_COMPILER_CXX="$new_complete"
21715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21716 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21717   fi
21718 
21719     PATH="$RETRY_COMPILER_SAVED_PATH"
21720 
21721     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21722 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21723 
21724   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21725     # Follow a chain of symbolic links. Use readlink
21726     # where it exists, else fall back to horribly
21727     # complicated shell code.
21728     if test "x$READLINK_TESTED" != yes; then
21729       # On MacOSX there is a readlink tool with a different
21730       # purpose than the GNU readlink tool. Check the found readlink.
21731       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21732       if test "x$ISGNU" = x; then
21733         # A readlink that we do not know how to use.
21734         # Are there other non-GNU readlinks out there?
21735         READLINK_TESTED=yes
21736         READLINK=
21737       fi
21738     fi
21739 
21740     if test "x$READLINK" != x; then
21741       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21742     else
21743       # Save the current directory for restoring afterwards
21744       STARTDIR=$PWD
21745       COUNTER=0
21746       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21747       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21748       cd $sym_link_dir
21749       # Use -P flag to resolve symlinks in directories.
21750       cd `$THEPWDCMD -P`
21751       sym_link_dir=`$THEPWDCMD -P`
21752       # Resolve file symlinks
21753       while test $COUNTER -lt 20; do
21754         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21755         if test "x$ISLINK" == x; then
21756           # This is not a symbolic link! We are done!
21757           break
21758         fi
21759         # Again resolve directory symlinks since the target of the just found
21760         # link could be in a different directory
21761         cd `$DIRNAME $ISLINK`
21762         sym_link_dir=`$THEPWDCMD -P`
21763         sym_link_file=`$BASENAME $ISLINK`
21764         let COUNTER=COUNTER+1
21765       done
21766       cd $STARTDIR
21767       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21768     fi
21769   fi
21770 
21771     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21772 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21773     CXX="$PROPER_COMPILER_CXX"
21774   else
21775     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21776 $as_echo "no, keeping CXX" >&6; }
21777     CXX="$TEST_COMPILER"
21778   fi
21779 
21780   COMPILER=$CXX
21781   COMPILER_NAME=$COMPILER_NAME
21782 
21783   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21784     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21785     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21786     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21787     if test $? -ne 0; then
21788       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21789 
21790       { $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
21791 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21792       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21793 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21794       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21795     else
21796       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21797       COMPILER_VENDOR="Sun Studio"
21798     fi
21799   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21800       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21801       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21802       if test $? -ne 0; then
21803         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21804       else
21805         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21806         COMPILER_VENDOR='IBM'
21807       fi
21808   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21809     # First line typically looks something like:
21810     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21811     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21812     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21813     COMPILER_VENDOR="Microsoft CL.EXE"
21814     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21815     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21816       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21817         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21818       fi
21819     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21820       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21821         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21822       fi
21823     fi
21824   else
21825     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21826     # Check that this is likely to be GCC.
21827     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21828     if test $? -ne 0; then
21829       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21830 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21831       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21832 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21833       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21834     fi
21835 
21836     # First line typically looks something like:
21837     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21838     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21839     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21840   fi
21841   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21842   CXX_VERSION="$COMPILER_VERSION"
21843   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21844   CXX_VENDOR="$COMPILER_VENDOR"
21845 
21846   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21847 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21848 
21849 
21850   # Now that we have resolved CXX ourself, let autoconf have its go at it
21851   ac_ext=cpp
21852 ac_cpp='$CXXCPP $CPPFLAGS'
21853 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21854 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21855 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21856 if test -z "$CXX"; then
21857   if test -n "$CCC"; then
21858     CXX=$CCC
21859   else
21860     if test -n "$ac_tool_prefix"; then
21861   for ac_prog in $CXX
21862   do
21863     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21864 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21866 $as_echo_n "checking for $ac_word... " >&6; }
21867 if ${ac_cv_prog_CXX+:} false; then :
21868   $as_echo_n "(cached) " >&6
21869 else
21870   if test -n "$CXX"; then
21871   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21872 else
21873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21874 for as_dir in $PATH
21875 do
21876   IFS=$as_save_IFS
21877   test -z "$as_dir" && as_dir=.
21878     for ac_exec_ext in '' $ac_executable_extensions; do
21879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21880     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21882     break 2
21883   fi
21884 done
21885   done
21886 IFS=$as_save_IFS
21887 
21888 fi
21889 fi
21890 CXX=$ac_cv_prog_CXX
21891 if test -n "$CXX"; then
21892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21893 $as_echo "$CXX" >&6; }
21894 else
21895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21896 $as_echo "no" >&6; }
21897 fi
21898 
21899 
21900     test -n "$CXX" && break
21901   done
21902 fi
21903 if test -z "$CXX"; then
21904   ac_ct_CXX=$CXX
21905   for ac_prog in $CXX
21906 do
21907   # Extract the first word of "$ac_prog", so it can be a program name with args.
21908 set dummy $ac_prog; ac_word=$2
21909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21910 $as_echo_n "checking for $ac_word... " >&6; }
21911 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21912   $as_echo_n "(cached) " >&6
21913 else
21914   if test -n "$ac_ct_CXX"; then
21915   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21916 else
21917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21918 for as_dir in $PATH
21919 do
21920   IFS=$as_save_IFS
21921   test -z "$as_dir" && as_dir=.
21922     for ac_exec_ext in '' $ac_executable_extensions; do
21923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21924     ac_cv_prog_ac_ct_CXX="$ac_prog"
21925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21926     break 2
21927   fi
21928 done
21929   done
21930 IFS=$as_save_IFS
21931 
21932 fi
21933 fi
21934 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21935 if test -n "$ac_ct_CXX"; then
21936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21937 $as_echo "$ac_ct_CXX" >&6; }
21938 else
21939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21940 $as_echo "no" >&6; }
21941 fi
21942 
21943 
21944   test -n "$ac_ct_CXX" && break
21945 done
21946 
21947   if test "x$ac_ct_CXX" = x; then
21948     CXX="g++"
21949   else
21950     case $cross_compiling:$ac_tool_warned in
21951 yes:)
21952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21953 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21954 ac_tool_warned=yes ;;
21955 esac
21956     CXX=$ac_ct_CXX
21957   fi
21958 fi
21959 
21960   fi
21961 fi
21962 # Provide some information about the compiler.
21963 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21964 set X $ac_compile
21965 ac_compiler=$2
21966 for ac_option in --version -v -V -qversion; do
21967   { { ac_try="$ac_compiler $ac_option >&5"
21968 case "(($ac_try" in
21969   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21970   *) ac_try_echo=$ac_try;;
21971 esac
21972 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21973 $as_echo "$ac_try_echo"; } >&5
21974   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21975   ac_status=$?
21976   if test -s conftest.err; then
21977     sed '10a\
21978 ... rest of stderr output deleted ...
21979          10q' conftest.err >conftest.er1
21980     cat conftest.er1 >&5
21981   fi
21982   rm -f conftest.er1 conftest.err
21983   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21984   test $ac_status = 0; }
21985 done
21986 
21987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21988 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21989 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21990   $as_echo_n "(cached) " >&6
21991 else
21992   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21993 /* end confdefs.h.  */
21994 
21995 int
21996 main ()
21997 {
21998 #ifndef __GNUC__
21999        choke me
22000 #endif
22001 
22002   ;
22003   return 0;
22004 }
22005 _ACEOF
22006 if ac_fn_cxx_try_compile "$LINENO"; then :
22007   ac_compiler_gnu=yes
22008 else
22009   ac_compiler_gnu=no
22010 fi
22011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22012 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
22013 
22014 fi
22015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
22016 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
22017 if test $ac_compiler_gnu = yes; then
22018   GXX=yes
22019 else
22020   GXX=
22021 fi
22022 ac_test_CXXFLAGS=${CXXFLAGS+set}
22023 ac_save_CXXFLAGS=$CXXFLAGS
22024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
22025 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
22026 if ${ac_cv_prog_cxx_g+:} false; then :
22027   $as_echo_n "(cached) " >&6
22028 else
22029   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
22030    ac_cxx_werror_flag=yes
22031    ac_cv_prog_cxx_g=no
22032    CXXFLAGS="-g"
22033    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22034 /* end confdefs.h.  */
22035 
22036 int
22037 main ()
22038 {
22039 
22040   ;
22041   return 0;
22042 }
22043 _ACEOF
22044 if ac_fn_cxx_try_compile "$LINENO"; then :
22045   ac_cv_prog_cxx_g=yes
22046 else
22047   CXXFLAGS=""
22048       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22049 /* end confdefs.h.  */
22050 
22051 int
22052 main ()
22053 {
22054 
22055   ;
22056   return 0;
22057 }
22058 _ACEOF
22059 if ac_fn_cxx_try_compile "$LINENO"; then :
22060 
22061 else
22062   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22063          CXXFLAGS="-g"
22064          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22065 /* end confdefs.h.  */
22066 
22067 int
22068 main ()
22069 {
22070 
22071   ;
22072   return 0;
22073 }
22074 _ACEOF
22075 if ac_fn_cxx_try_compile "$LINENO"; then :
22076   ac_cv_prog_cxx_g=yes
22077 fi
22078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22079 fi
22080 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22081 fi
22082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22083    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22084 fi
22085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22086 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22087 if test "$ac_test_CXXFLAGS" = set; then
22088   CXXFLAGS=$ac_save_CXXFLAGS
22089 elif test $ac_cv_prog_cxx_g = yes; then
22090   if test "$GXX" = yes; then
22091     CXXFLAGS="-g -O2"
22092   else
22093     CXXFLAGS="-g"
22094   fi
22095 else
22096   if test "$GXX" = yes; then
22097     CXXFLAGS="-O2"
22098   else
22099     CXXFLAGS=
22100   fi
22101 fi
22102 ac_ext=cpp
22103 ac_cpp='$CXXCPP $CPPFLAGS'
22104 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22105 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22106 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22107 
22108 
22109   ### Locate other tools
22110 
22111   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22112     ac_ext=m
22113 ac_cpp='$OBJCPP $CPPFLAGS'
22114 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22115 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22116 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22117 if test -n "$ac_tool_prefix"; then
22118   for ac_prog in gcc objcc objc cc CC
22119   do
22120     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22121 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123 $as_echo_n "checking for $ac_word... " >&6; }
22124 if ${ac_cv_prog_OBJC+:} false; then :
22125   $as_echo_n "(cached) " >&6
22126 else
22127   if test -n "$OBJC"; then
22128   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22129 else
22130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22131 for as_dir in $PATH
22132 do
22133   IFS=$as_save_IFS
22134   test -z "$as_dir" && as_dir=.
22135     for ac_exec_ext in '' $ac_executable_extensions; do
22136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22137     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22139     break 2
22140   fi
22141 done
22142   done
22143 IFS=$as_save_IFS
22144 
22145 fi
22146 fi
22147 OBJC=$ac_cv_prog_OBJC
22148 if test -n "$OBJC"; then
22149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22150 $as_echo "$OBJC" >&6; }
22151 else
22152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22153 $as_echo "no" >&6; }
22154 fi
22155 
22156 
22157     test -n "$OBJC" && break
22158   done
22159 fi
22160 if test -z "$OBJC"; then
22161   ac_ct_OBJC=$OBJC
22162   for ac_prog in gcc objcc objc cc CC
22163 do
22164   # Extract the first word of "$ac_prog", so it can be a program name with args.
22165 set dummy $ac_prog; ac_word=$2
22166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22167 $as_echo_n "checking for $ac_word... " >&6; }
22168 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22169   $as_echo_n "(cached) " >&6
22170 else
22171   if test -n "$ac_ct_OBJC"; then
22172   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22173 else
22174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22175 for as_dir in $PATH
22176 do
22177   IFS=$as_save_IFS
22178   test -z "$as_dir" && as_dir=.
22179     for ac_exec_ext in '' $ac_executable_extensions; do
22180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22181     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22183     break 2
22184   fi
22185 done
22186   done
22187 IFS=$as_save_IFS
22188 
22189 fi
22190 fi
22191 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22192 if test -n "$ac_ct_OBJC"; then
22193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22194 $as_echo "$ac_ct_OBJC" >&6; }
22195 else
22196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22197 $as_echo "no" >&6; }
22198 fi
22199 
22200 
22201   test -n "$ac_ct_OBJC" && break
22202 done
22203 
22204   if test "x$ac_ct_OBJC" = x; then
22205     OBJC="gcc"
22206   else
22207     case $cross_compiling:$ac_tool_warned in
22208 yes:)
22209 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22210 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22211 ac_tool_warned=yes ;;
22212 esac
22213     OBJC=$ac_ct_OBJC
22214   fi
22215 fi
22216 
22217 # Provide some information about the compiler.
22218 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22219 set X $ac_compile
22220 ac_compiler=$2
22221 for ac_option in --version -v -V -qversion; do
22222   { { ac_try="$ac_compiler $ac_option >&5"
22223 case "(($ac_try" in
22224   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22225   *) ac_try_echo=$ac_try;;
22226 esac
22227 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22228 $as_echo "$ac_try_echo"; } >&5
22229   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22230   ac_status=$?
22231   if test -s conftest.err; then
22232     sed '10a\
22233 ... rest of stderr output deleted ...
22234          10q' conftest.err >conftest.er1
22235     cat conftest.er1 >&5
22236   fi
22237   rm -f conftest.er1 conftest.err
22238   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22239   test $ac_status = 0; }
22240 done
22241 
22242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22243 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22244 if ${ac_cv_objc_compiler_gnu+:} false; then :
22245   $as_echo_n "(cached) " >&6
22246 else
22247   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22248 /* end confdefs.h.  */
22249 
22250 int
22251 main ()
22252 {
22253 #ifndef __GNUC__
22254        choke me
22255 #endif
22256 
22257   ;
22258   return 0;
22259 }
22260 _ACEOF
22261 if ac_fn_objc_try_compile "$LINENO"; then :
22262   ac_compiler_gnu=yes
22263 else
22264   ac_compiler_gnu=no
22265 fi
22266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22267 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22268 
22269 fi
22270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22271 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22272 if test $ac_compiler_gnu = yes; then
22273   GOBJC=yes
22274 else
22275   GOBJC=
22276 fi
22277 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22278 ac_save_OBJCFLAGS=$OBJCFLAGS
22279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22280 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22281 if ${ac_cv_prog_objc_g+:} false; then :
22282   $as_echo_n "(cached) " >&6
22283 else
22284   ac_save_objc_werror_flag=$ac_objc_werror_flag
22285    ac_objc_werror_flag=yes
22286    ac_cv_prog_objc_g=no
22287    OBJCFLAGS="-g"
22288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22289 /* end confdefs.h.  */
22290 
22291 int
22292 main ()
22293 {
22294 
22295   ;
22296   return 0;
22297 }
22298 _ACEOF
22299 if ac_fn_objc_try_compile "$LINENO"; then :
22300   ac_cv_prog_objc_g=yes
22301 else
22302   OBJCFLAGS=""
22303       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22304 /* end confdefs.h.  */
22305 
22306 int
22307 main ()
22308 {
22309 
22310   ;
22311   return 0;
22312 }
22313 _ACEOF
22314 if ac_fn_objc_try_compile "$LINENO"; then :
22315 
22316 else
22317   ac_objc_werror_flag=$ac_save_objc_werror_flag
22318          OBJCFLAGS="-g"
22319          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22320 /* end confdefs.h.  */
22321 
22322 int
22323 main ()
22324 {
22325 
22326   ;
22327   return 0;
22328 }
22329 _ACEOF
22330 if ac_fn_objc_try_compile "$LINENO"; then :
22331   ac_cv_prog_objc_g=yes
22332 fi
22333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22334 fi
22335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22336 fi
22337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22338    ac_objc_werror_flag=$ac_save_objc_werror_flag
22339 fi
22340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22341 $as_echo "$ac_cv_prog_objc_g" >&6; }
22342 if test "$ac_test_OBJCFLAGS" = set; then
22343   OBJCFLAGS=$ac_save_OBJCFLAGS
22344 elif test $ac_cv_prog_objc_g = yes; then
22345   if test "$GOBJC" = yes; then
22346     OBJCFLAGS="-g -O2"
22347   else
22348     OBJCFLAGS="-g"
22349   fi
22350 else
22351   if test "$GOBJC" = yes; then
22352     OBJCFLAGS="-O2"
22353   else
22354     OBJCFLAGS=
22355   fi
22356 fi
22357 ac_ext=cpp
22358 ac_cpp='$CXXCPP $CPPFLAGS'
22359 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22360 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22361 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22362 
22363 
22364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22365 
22366   # First separate the path from the arguments. This will split at the first
22367   # space.
22368   complete="$OBJC"
22369   path="${complete%% *}"
22370   tmp="$complete EOL"
22371   arguments="${tmp#* }"
22372 
22373   # Input might be given as Windows format, start by converting to
22374   # unix format.
22375   new_path=`$CYGPATH -u "$path"`
22376 
22377   # Now try to locate executable using which
22378   new_path=`$WHICH "$new_path" 2> /dev/null`
22379   # bat and cmd files are not always considered executable in cygwin causing which
22380   # to not find them
22381   if test "x$new_path" = x \
22382       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22383       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22384     new_path=`$CYGPATH -u "$path"`
22385   fi
22386   if test "x$new_path" = x; then
22387     # Oops. Which didn't find the executable.
22388     # The splitting of arguments from the executable at a space might have been incorrect,
22389     # since paths with space are more likely in Windows. Give it another try with the whole
22390     # argument.
22391     path="$complete"
22392     arguments="EOL"
22393     new_path=`$CYGPATH -u "$path"`
22394     new_path=`$WHICH "$new_path" 2> /dev/null`
22395     # bat and cmd files are not always considered executable in cygwin causing which
22396     # to not find them
22397     if test "x$new_path" = x \
22398         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22399         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22400       new_path=`$CYGPATH -u "$path"`
22401     fi
22402     if test "x$new_path" = x; then
22403       # It's still not found. Now this is an unrecoverable error.
22404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22405 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22406       has_space=`$ECHO "$complete" | $GREP " "`
22407       if test "x$has_space" != x; then
22408         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22409 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22410       fi
22411       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22412     fi
22413   fi
22414 
22415   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22416   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22417   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22418   # "foo.exe" is OK but "foo" is an error.
22419   #
22420   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22421   # It is also a way to make sure we got the proper file name for the real test later on.
22422   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22423   if test "x$test_shortpath" = x; then
22424     # Short path failed, file does not exist as specified.
22425     # Try adding .exe or .cmd
22426     if test -f "${new_path}.exe"; then
22427       input_to_shortpath="${new_path}.exe"
22428     elif test -f "${new_path}.cmd"; then
22429       input_to_shortpath="${new_path}.cmd"
22430     else
22431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22432 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22433       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22434 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22435       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22436     fi
22437   else
22438     input_to_shortpath="$new_path"
22439   fi
22440 
22441   # Call helper function which possibly converts this using DOS-style short mode.
22442   # If so, the updated path is stored in $new_path.
22443   new_path="$input_to_shortpath"
22444 
22445   input_path="$input_to_shortpath"
22446   # Check if we need to convert this using DOS-style short mode. If the path
22447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22448   # take no chances and rewrite it.
22449   # Note: m4 eats our [], so we need to use [ and ] instead.
22450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22451   if test "x$has_forbidden_chars" != x; then
22452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22456       # Going to short mode and back again did indeed matter. Since short mode is
22457       # case insensitive, let's make it lowercase to improve readability.
22458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22459       # Now convert it back to Unix-stile (cygpath)
22460       input_path=`$CYGPATH -u "$shortmode_path"`
22461       new_path="$input_path"
22462     fi
22463   fi
22464 
22465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22466   if test "x$test_cygdrive_prefix" = x; then
22467     # As a simple fix, exclude /usr/bin since it's not a real path.
22468     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22470       # a path prefixed by /cygdrive for fixpath to work.
22471       new_path="$CYGWIN_ROOT_PATH$input_path"
22472     fi
22473   fi
22474 
22475   # remove trailing .exe if any
22476   new_path="${new_path/%.exe/}"
22477 
22478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22479 
22480   # First separate the path from the arguments. This will split at the first
22481   # space.
22482   complete="$OBJC"
22483   path="${complete%% *}"
22484   tmp="$complete EOL"
22485   arguments="${tmp#* }"
22486 
22487   # Input might be given as Windows format, start by converting to
22488   # unix format.
22489   new_path="$path"
22490 
22491   windows_path="$new_path"
22492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22493     unix_path=`$CYGPATH -u "$windows_path"`
22494     new_path="$unix_path"
22495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22497     new_path="$unix_path"
22498   fi
22499 
22500 
22501   # Now try to locate executable using which
22502   new_path=`$WHICH "$new_path" 2> /dev/null`
22503 
22504   if test "x$new_path" = x; then
22505     # Oops. Which didn't find the executable.
22506     # The splitting of arguments from the executable at a space might have been incorrect,
22507     # since paths with space are more likely in Windows. Give it another try with the whole
22508     # argument.
22509     path="$complete"
22510     arguments="EOL"
22511     new_path="$path"
22512 
22513   windows_path="$new_path"
22514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22515     unix_path=`$CYGPATH -u "$windows_path"`
22516     new_path="$unix_path"
22517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22519     new_path="$unix_path"
22520   fi
22521 
22522 
22523     new_path=`$WHICH "$new_path" 2> /dev/null`
22524 
22525     if test "x$new_path" = x; then
22526       # It's still not found. Now this is an unrecoverable error.
22527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22528 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22529       has_space=`$ECHO "$complete" | $GREP " "`
22530       if test "x$has_space" != x; then
22531         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22533       fi
22534       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22535     fi
22536   fi
22537 
22538   # Now new_path has a complete unix path to the binary
22539   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22540     # Keep paths in /bin as-is, but remove trailing .exe if any
22541     new_path="${new_path/%.exe/}"
22542     # Do not save /bin paths to all_fixpath_prefixes!
22543   else
22544     # Not in mixed or Windows style, start by that.
22545     new_path=`cmd //c echo $new_path`
22546 
22547   input_path="$new_path"
22548   # Check if we need to convert this using DOS-style short mode. If the path
22549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22550   # take no chances and rewrite it.
22551   # Note: m4 eats our [], so we need to use [ and ] instead.
22552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22553   if test "x$has_forbidden_chars" != x; then
22554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22555     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22556   fi
22557 
22558     # Output is in $new_path
22559 
22560   windows_path="$new_path"
22561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22562     unix_path=`$CYGPATH -u "$windows_path"`
22563     new_path="$unix_path"
22564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22566     new_path="$unix_path"
22567   fi
22568 
22569     # remove trailing .exe if any
22570     new_path="${new_path/%.exe/}"
22571 
22572     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22573     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22574   fi
22575 
22576   else
22577     # We're on a posix platform. Hooray! :)
22578     # First separate the path from the arguments. This will split at the first
22579     # space.
22580     complete="$OBJC"
22581     path="${complete%% *}"
22582     tmp="$complete EOL"
22583     arguments="${tmp#* }"
22584 
22585     # Cannot rely on the command "which" here since it doesn't always work.
22586     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22587     if test -z "$is_absolute_path"; then
22588       # Path to executable is not absolute. Find it.
22589       IFS_save="$IFS"
22590       IFS=:
22591       for p in $PATH; do
22592         if test -f "$p/$path" && test -x "$p/$path"; then
22593           new_path="$p/$path"
22594           break
22595         fi
22596       done
22597       IFS="$IFS_save"
22598     else
22599       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22600 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22601       new_path="$path"
22602     fi
22603 
22604     if test "x$new_path" = x; then
22605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22606 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22607       has_space=`$ECHO "$complete" | $GREP " "`
22608       if test "x$has_space" != x; then
22609         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22610 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22611       fi
22612       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22613     fi
22614   fi
22615 
22616   # Now join together the path and the arguments once again
22617   if test "x$arguments" != xEOL; then
22618     new_complete="$new_path ${arguments% *}"
22619   else
22620     new_complete="$new_path"
22621   fi
22622 
22623   if test "x$complete" != "x$new_complete"; then
22624     OBJC="$new_complete"
22625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22626 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22627   fi
22628 
22629   else
22630     OBJC=
22631   fi
22632 
22633   # Restore the flags to the user specified values.
22634   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22635   CFLAGS="$ORG_CFLAGS"
22636   CXXFLAGS="$ORG_CXXFLAGS"
22637   OBJCFLAGS="$ORG_OBJCFLAGS"
22638 
22639   LD="$CC"
22640   LDEXE="$CC"
22641   LDCXX="$CXX"
22642   LDEXECXX="$CXX"
22643 
22644   # LDEXE is the linker to use, when creating executables.
22645 
22646   # Linking C++ libraries.
22647 
22648   # Linking C++ executables.
22649 
22650 
22651   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22652     if test -n "$ac_tool_prefix"; then
22653   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22654 set dummy ${ac_tool_prefix}ar; ac_word=$2
22655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22656 $as_echo_n "checking for $ac_word... " >&6; }
22657 if ${ac_cv_prog_AR+:} false; then :
22658   $as_echo_n "(cached) " >&6
22659 else
22660   if test -n "$AR"; then
22661   ac_cv_prog_AR="$AR" # Let the user override the test.
22662 else
22663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22664 for as_dir in $PATH
22665 do
22666   IFS=$as_save_IFS
22667   test -z "$as_dir" && as_dir=.
22668     for ac_exec_ext in '' $ac_executable_extensions; do
22669   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22670     ac_cv_prog_AR="${ac_tool_prefix}ar"
22671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22672     break 2
22673   fi
22674 done
22675   done
22676 IFS=$as_save_IFS
22677 
22678 fi
22679 fi
22680 AR=$ac_cv_prog_AR
22681 if test -n "$AR"; then
22682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22683 $as_echo "$AR" >&6; }
22684 else
22685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22686 $as_echo "no" >&6; }
22687 fi
22688 
22689 
22690 fi
22691 if test -z "$ac_cv_prog_AR"; then
22692   ac_ct_AR=$AR
22693   # Extract the first word of "ar", so it can be a program name with args.
22694 set dummy ar; ac_word=$2
22695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22696 $as_echo_n "checking for $ac_word... " >&6; }
22697 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22698   $as_echo_n "(cached) " >&6
22699 else
22700   if test -n "$ac_ct_AR"; then
22701   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22702 else
22703 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22704 for as_dir in $PATH
22705 do
22706   IFS=$as_save_IFS
22707   test -z "$as_dir" && as_dir=.
22708     for ac_exec_ext in '' $ac_executable_extensions; do
22709   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22710     ac_cv_prog_ac_ct_AR="ar"
22711     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22712     break 2
22713   fi
22714 done
22715   done
22716 IFS=$as_save_IFS
22717 
22718 fi
22719 fi
22720 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22721 if test -n "$ac_ct_AR"; then
22722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22723 $as_echo "$ac_ct_AR" >&6; }
22724 else
22725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22726 $as_echo "no" >&6; }
22727 fi
22728 
22729   if test "x$ac_ct_AR" = x; then
22730     AR=""
22731   else
22732     case $cross_compiling:$ac_tool_warned in
22733 yes:)
22734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22735 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22736 ac_tool_warned=yes ;;
22737 esac
22738     AR=$ac_ct_AR
22739   fi
22740 else
22741   AR="$ac_cv_prog_AR"
22742 fi
22743 
22744 
22745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22746 
22747   # First separate the path from the arguments. This will split at the first
22748   # space.
22749   complete="$AR"
22750   path="${complete%% *}"
22751   tmp="$complete EOL"
22752   arguments="${tmp#* }"
22753 
22754   # Input might be given as Windows format, start by converting to
22755   # unix format.
22756   new_path=`$CYGPATH -u "$path"`
22757 
22758   # Now try to locate executable using which
22759   new_path=`$WHICH "$new_path" 2> /dev/null`
22760   # bat and cmd files are not always considered executable in cygwin causing which
22761   # to not find them
22762   if test "x$new_path" = x \
22763       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22764       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22765     new_path=`$CYGPATH -u "$path"`
22766   fi
22767   if test "x$new_path" = x; then
22768     # Oops. Which didn't find the executable.
22769     # The splitting of arguments from the executable at a space might have been incorrect,
22770     # since paths with space are more likely in Windows. Give it another try with the whole
22771     # argument.
22772     path="$complete"
22773     arguments="EOL"
22774     new_path=`$CYGPATH -u "$path"`
22775     new_path=`$WHICH "$new_path" 2> /dev/null`
22776     # bat and cmd files are not always considered executable in cygwin causing which
22777     # to not find them
22778     if test "x$new_path" = x \
22779         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22780         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22781       new_path=`$CYGPATH -u "$path"`
22782     fi
22783     if test "x$new_path" = x; then
22784       # It's still not found. Now this is an unrecoverable error.
22785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22786 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22787       has_space=`$ECHO "$complete" | $GREP " "`
22788       if test "x$has_space" != x; then
22789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22791       fi
22792       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22793     fi
22794   fi
22795 
22796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22799   # "foo.exe" is OK but "foo" is an error.
22800   #
22801   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22802   # It is also a way to make sure we got the proper file name for the real test later on.
22803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22804   if test "x$test_shortpath" = x; then
22805     # Short path failed, file does not exist as specified.
22806     # Try adding .exe or .cmd
22807     if test -f "${new_path}.exe"; then
22808       input_to_shortpath="${new_path}.exe"
22809     elif test -f "${new_path}.cmd"; then
22810       input_to_shortpath="${new_path}.cmd"
22811     else
22812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22813 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22814       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22815 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22816       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22817     fi
22818   else
22819     input_to_shortpath="$new_path"
22820   fi
22821 
22822   # Call helper function which possibly converts this using DOS-style short mode.
22823   # If so, the updated path is stored in $new_path.
22824   new_path="$input_to_shortpath"
22825 
22826   input_path="$input_to_shortpath"
22827   # Check if we need to convert this using DOS-style short mode. If the path
22828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22829   # take no chances and rewrite it.
22830   # Note: m4 eats our [], so we need to use [ and ] instead.
22831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22832   if test "x$has_forbidden_chars" != x; then
22833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22837       # Going to short mode and back again did indeed matter. Since short mode is
22838       # case insensitive, let's make it lowercase to improve readability.
22839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22840       # Now convert it back to Unix-stile (cygpath)
22841       input_path=`$CYGPATH -u "$shortmode_path"`
22842       new_path="$input_path"
22843     fi
22844   fi
22845 
22846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22847   if test "x$test_cygdrive_prefix" = x; then
22848     # As a simple fix, exclude /usr/bin since it's not a real path.
22849     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22851       # a path prefixed by /cygdrive for fixpath to work.
22852       new_path="$CYGWIN_ROOT_PATH$input_path"
22853     fi
22854   fi
22855 
22856   # remove trailing .exe if any
22857   new_path="${new_path/%.exe/}"
22858 
22859   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22860 
22861   # First separate the path from the arguments. This will split at the first
22862   # space.
22863   complete="$AR"
22864   path="${complete%% *}"
22865   tmp="$complete EOL"
22866   arguments="${tmp#* }"
22867 
22868   # Input might be given as Windows format, start by converting to
22869   # unix format.
22870   new_path="$path"
22871 
22872   windows_path="$new_path"
22873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22874     unix_path=`$CYGPATH -u "$windows_path"`
22875     new_path="$unix_path"
22876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22878     new_path="$unix_path"
22879   fi
22880 
22881 
22882   # Now try to locate executable using which
22883   new_path=`$WHICH "$new_path" 2> /dev/null`
22884 
22885   if test "x$new_path" = x; then
22886     # Oops. Which didn't find the executable.
22887     # The splitting of arguments from the executable at a space might have been incorrect,
22888     # since paths with space are more likely in Windows. Give it another try with the whole
22889     # argument.
22890     path="$complete"
22891     arguments="EOL"
22892     new_path="$path"
22893 
22894   windows_path="$new_path"
22895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22896     unix_path=`$CYGPATH -u "$windows_path"`
22897     new_path="$unix_path"
22898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22900     new_path="$unix_path"
22901   fi
22902 
22903 
22904     new_path=`$WHICH "$new_path" 2> /dev/null`
22905 
22906     if test "x$new_path" = x; then
22907       # It's still not found. Now this is an unrecoverable error.
22908       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22909 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22910       has_space=`$ECHO "$complete" | $GREP " "`
22911       if test "x$has_space" != x; then
22912         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22913 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22914       fi
22915       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22916     fi
22917   fi
22918 
22919   # Now new_path has a complete unix path to the binary
22920   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22921     # Keep paths in /bin as-is, but remove trailing .exe if any
22922     new_path="${new_path/%.exe/}"
22923     # Do not save /bin paths to all_fixpath_prefixes!
22924   else
22925     # Not in mixed or Windows style, start by that.
22926     new_path=`cmd //c echo $new_path`
22927 
22928   input_path="$new_path"
22929   # Check if we need to convert this using DOS-style short mode. If the path
22930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22931   # take no chances and rewrite it.
22932   # Note: m4 eats our [], so we need to use [ and ] instead.
22933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22934   if test "x$has_forbidden_chars" != x; then
22935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22937   fi
22938 
22939     # Output is in $new_path
22940 
22941   windows_path="$new_path"
22942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22943     unix_path=`$CYGPATH -u "$windows_path"`
22944     new_path="$unix_path"
22945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22947     new_path="$unix_path"
22948   fi
22949 
22950     # remove trailing .exe if any
22951     new_path="${new_path/%.exe/}"
22952 
22953     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22954     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22955   fi
22956 
22957   else
22958     # We're on a posix platform. Hooray! :)
22959     # First separate the path from the arguments. This will split at the first
22960     # space.
22961     complete="$AR"
22962     path="${complete%% *}"
22963     tmp="$complete EOL"
22964     arguments="${tmp#* }"
22965 
22966     # Cannot rely on the command "which" here since it doesn't always work.
22967     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22968     if test -z "$is_absolute_path"; then
22969       # Path to executable is not absolute. Find it.
22970       IFS_save="$IFS"
22971       IFS=:
22972       for p in $PATH; do
22973         if test -f "$p/$path" && test -x "$p/$path"; then
22974           new_path="$p/$path"
22975           break
22976         fi
22977       done
22978       IFS="$IFS_save"
22979     else
22980       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22981 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22982       new_path="$path"
22983     fi
22984 
22985     if test "x$new_path" = x; then
22986       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22987 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22988       has_space=`$ECHO "$complete" | $GREP " "`
22989       if test "x$has_space" != x; then
22990         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22991 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22992       fi
22993       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22994     fi
22995   fi
22996 
22997   # Now join together the path and the arguments once again
22998   if test "x$arguments" != xEOL; then
22999     new_complete="$new_path ${arguments% *}"
23000   else
23001     new_complete="$new_path"
23002   fi
23003 
23004   if test "x$complete" != "x$new_complete"; then
23005     AR="$new_complete"
23006     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
23007 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
23008   fi
23009 
23010   fi
23011   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
23012     ARFLAGS="-r"
23013   elif test "x$OPENJDK_TARGET_OS" = xaix; then
23014     ARFLAGS="-X64"
23015   else
23016     ARFLAGS=""
23017   fi
23018 
23019 
23020   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
23021   HOTSPOT_CXX="$CXX"
23022   HOTSPOT_LD="$LD"
23023 
23024 
23025 
23026   COMPILER_NAME=gcc
23027   COMPILER_TYPE=CC
23028   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
23029 
23030     # For now, assume that we are always compiling using cl.exe.
23031     CC_OUT_OPTION=-Fo
23032     EXE_OUT_OPTION=-out:
23033     LD_OUT_OPTION=-out:
23034     AR_OUT_OPTION=-out:
23035     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
23036     # program for something completely different.
23037     # Extract the first word of "link", so it can be a program name with args.
23038 set dummy link; ac_word=$2
23039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23040 $as_echo_n "checking for $ac_word... " >&6; }
23041 if ${ac_cv_prog_WINLD+:} false; then :
23042   $as_echo_n "(cached) " >&6
23043 else
23044   if test -n "$WINLD"; then
23045   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
23046 else
23047   ac_prog_rejected=no
23048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23049 for as_dir in $PATH
23050 do
23051   IFS=$as_save_IFS
23052   test -z "$as_dir" && as_dir=.
23053     for ac_exec_ext in '' $ac_executable_extensions; do
23054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23055     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
23056        ac_prog_rejected=yes
23057        continue
23058      fi
23059     ac_cv_prog_WINLD="link"
23060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23061     break 2
23062   fi
23063 done
23064   done
23065 IFS=$as_save_IFS
23066 
23067 if test $ac_prog_rejected = yes; then
23068   # We found a bogon in the path, so make sure we never use it.
23069   set dummy $ac_cv_prog_WINLD
23070   shift
23071   if test $# != 0; then
23072     # We chose a different compiler from the bogus one.
23073     # However, it has the same basename, so the bogon will be chosen
23074     # first if we set WINLD to just the basename; use the full file name.
23075     shift
23076     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23077   fi
23078 fi
23079 fi
23080 fi
23081 WINLD=$ac_cv_prog_WINLD
23082 if test -n "$WINLD"; then
23083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23084 $as_echo "$WINLD" >&6; }
23085 else
23086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23087 $as_echo "no" >&6; }
23088 fi
23089 
23090 
23091     # Since we must ignore the first found link, WINLD will contain
23092     # the full path to the link.exe program.
23093 
23094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23095 
23096   # First separate the path from the arguments. This will split at the first
23097   # space.
23098   complete="$WINLD"
23099   path="${complete%% *}"
23100   tmp="$complete EOL"
23101   arguments="${tmp#* }"
23102 
23103   # Input might be given as Windows format, start by converting to
23104   # unix format.
23105   new_path=`$CYGPATH -u "$path"`
23106 
23107   # Now try to locate executable using which
23108   new_path=`$WHICH "$new_path" 2> /dev/null`
23109   # bat and cmd files are not always considered executable in cygwin causing which
23110   # to not find them
23111   if test "x$new_path" = x \
23112       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23113       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23114     new_path=`$CYGPATH -u "$path"`
23115   fi
23116   if test "x$new_path" = x; then
23117     # Oops. Which didn't find the executable.
23118     # The splitting of arguments from the executable at a space might have been incorrect,
23119     # since paths with space are more likely in Windows. Give it another try with the whole
23120     # argument.
23121     path="$complete"
23122     arguments="EOL"
23123     new_path=`$CYGPATH -u "$path"`
23124     new_path=`$WHICH "$new_path" 2> /dev/null`
23125     # bat and cmd files are not always considered executable in cygwin causing which
23126     # to not find them
23127     if test "x$new_path" = x \
23128         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23129         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23130       new_path=`$CYGPATH -u "$path"`
23131     fi
23132     if test "x$new_path" = x; then
23133       # It's still not found. Now this is an unrecoverable error.
23134       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23135 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23136       has_space=`$ECHO "$complete" | $GREP " "`
23137       if test "x$has_space" != x; then
23138         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23139 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23140       fi
23141       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23142     fi
23143   fi
23144 
23145   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23146   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23147   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23148   # "foo.exe" is OK but "foo" is an error.
23149   #
23150   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23151   # It is also a way to make sure we got the proper file name for the real test later on.
23152   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23153   if test "x$test_shortpath" = x; then
23154     # Short path failed, file does not exist as specified.
23155     # Try adding .exe or .cmd
23156     if test -f "${new_path}.exe"; then
23157       input_to_shortpath="${new_path}.exe"
23158     elif test -f "${new_path}.cmd"; then
23159       input_to_shortpath="${new_path}.cmd"
23160     else
23161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23162 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23163       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23164 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23165       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23166     fi
23167   else
23168     input_to_shortpath="$new_path"
23169   fi
23170 
23171   # Call helper function which possibly converts this using DOS-style short mode.
23172   # If so, the updated path is stored in $new_path.
23173   new_path="$input_to_shortpath"
23174 
23175   input_path="$input_to_shortpath"
23176   # Check if we need to convert this using DOS-style short mode. If the path
23177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23178   # take no chances and rewrite it.
23179   # Note: m4 eats our [], so we need to use [ and ] instead.
23180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23181   if test "x$has_forbidden_chars" != x; then
23182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23186       # Going to short mode and back again did indeed matter. Since short mode is
23187       # case insensitive, let's make it lowercase to improve readability.
23188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23189       # Now convert it back to Unix-stile (cygpath)
23190       input_path=`$CYGPATH -u "$shortmode_path"`
23191       new_path="$input_path"
23192     fi
23193   fi
23194 
23195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23196   if test "x$test_cygdrive_prefix" = x; then
23197     # As a simple fix, exclude /usr/bin since it's not a real path.
23198     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23200       # a path prefixed by /cygdrive for fixpath to work.
23201       new_path="$CYGWIN_ROOT_PATH$input_path"
23202     fi
23203   fi
23204 
23205   # remove trailing .exe if any
23206   new_path="${new_path/%.exe/}"
23207 
23208   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23209 
23210   # First separate the path from the arguments. This will split at the first
23211   # space.
23212   complete="$WINLD"
23213   path="${complete%% *}"
23214   tmp="$complete EOL"
23215   arguments="${tmp#* }"
23216 
23217   # Input might be given as Windows format, start by converting to
23218   # unix format.
23219   new_path="$path"
23220 
23221   windows_path="$new_path"
23222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23223     unix_path=`$CYGPATH -u "$windows_path"`
23224     new_path="$unix_path"
23225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23227     new_path="$unix_path"
23228   fi
23229 
23230 
23231   # Now try to locate executable using which
23232   new_path=`$WHICH "$new_path" 2> /dev/null`
23233 
23234   if test "x$new_path" = x; then
23235     # Oops. Which didn't find the executable.
23236     # The splitting of arguments from the executable at a space might have been incorrect,
23237     # since paths with space are more likely in Windows. Give it another try with the whole
23238     # argument.
23239     path="$complete"
23240     arguments="EOL"
23241     new_path="$path"
23242 
23243   windows_path="$new_path"
23244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23245     unix_path=`$CYGPATH -u "$windows_path"`
23246     new_path="$unix_path"
23247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23249     new_path="$unix_path"
23250   fi
23251 
23252 
23253     new_path=`$WHICH "$new_path" 2> /dev/null`
23254 
23255     if test "x$new_path" = x; then
23256       # It's still not found. Now this is an unrecoverable error.
23257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23258 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23259       has_space=`$ECHO "$complete" | $GREP " "`
23260       if test "x$has_space" != x; then
23261         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23262 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23263       fi
23264       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23265     fi
23266   fi
23267 
23268   # Now new_path has a complete unix path to the binary
23269   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23270     # Keep paths in /bin as-is, but remove trailing .exe if any
23271     new_path="${new_path/%.exe/}"
23272     # Do not save /bin paths to all_fixpath_prefixes!
23273   else
23274     # Not in mixed or Windows style, start by that.
23275     new_path=`cmd //c echo $new_path`
23276 
23277   input_path="$new_path"
23278   # Check if we need to convert this using DOS-style short mode. If the path
23279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23280   # take no chances and rewrite it.
23281   # Note: m4 eats our [], so we need to use [ and ] instead.
23282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23283   if test "x$has_forbidden_chars" != x; then
23284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23285     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23286   fi
23287 
23288     # Output is in $new_path
23289 
23290   windows_path="$new_path"
23291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23292     unix_path=`$CYGPATH -u "$windows_path"`
23293     new_path="$unix_path"
23294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23296     new_path="$unix_path"
23297   fi
23298 
23299     # remove trailing .exe if any
23300     new_path="${new_path/%.exe/}"
23301 
23302     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23303     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23304   fi
23305 
23306   else
23307     # We're on a posix platform. Hooray! :)
23308     # First separate the path from the arguments. This will split at the first
23309     # space.
23310     complete="$WINLD"
23311     path="${complete%% *}"
23312     tmp="$complete EOL"
23313     arguments="${tmp#* }"
23314 
23315     # Cannot rely on the command "which" here since it doesn't always work.
23316     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23317     if test -z "$is_absolute_path"; then
23318       # Path to executable is not absolute. Find it.
23319       IFS_save="$IFS"
23320       IFS=:
23321       for p in $PATH; do
23322         if test -f "$p/$path" && test -x "$p/$path"; then
23323           new_path="$p/$path"
23324           break
23325         fi
23326       done
23327       IFS="$IFS_save"
23328     else
23329       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23330 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23331       new_path="$path"
23332     fi
23333 
23334     if test "x$new_path" = x; then
23335       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23336 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23337       has_space=`$ECHO "$complete" | $GREP " "`
23338       if test "x$has_space" != x; then
23339         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23340 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23341       fi
23342       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23343     fi
23344   fi
23345 
23346   # Now join together the path and the arguments once again
23347   if test "x$arguments" != xEOL; then
23348     new_complete="$new_path ${arguments% *}"
23349   else
23350     new_complete="$new_path"
23351   fi
23352 
23353   if test "x$complete" != "x$new_complete"; then
23354     WINLD="$new_complete"
23355     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23356 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23357   fi
23358 
23359     printf "Windows linker was found at $WINLD\n"
23360     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23361 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23362     "$WINLD" --version > /dev/null
23363     if test $? -eq 0 ; then
23364       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23365 $as_echo "no" >&6; }
23366       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23367     else
23368       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23369 $as_echo "yes" >&6; }
23370     fi
23371     LD="$WINLD"
23372     LDEXE="$WINLD"
23373     LDCXX="$WINLD"
23374     LDEXECXX="$WINLD"
23375 
23376     # Extract the first word of "mt", so it can be a program name with args.
23377 set dummy mt; ac_word=$2
23378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23379 $as_echo_n "checking for $ac_word... " >&6; }
23380 if ${ac_cv_prog_MT+:} false; then :
23381   $as_echo_n "(cached) " >&6
23382 else
23383   if test -n "$MT"; then
23384   ac_cv_prog_MT="$MT" # Let the user override the test.
23385 else
23386   ac_prog_rejected=no
23387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23388 for as_dir in $PATH
23389 do
23390   IFS=$as_save_IFS
23391   test -z "$as_dir" && as_dir=.
23392     for ac_exec_ext in '' $ac_executable_extensions; do
23393   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23394     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23395        ac_prog_rejected=yes
23396        continue
23397      fi
23398     ac_cv_prog_MT="mt"
23399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23400     break 2
23401   fi
23402 done
23403   done
23404 IFS=$as_save_IFS
23405 
23406 if test $ac_prog_rejected = yes; then
23407   # We found a bogon in the path, so make sure we never use it.
23408   set dummy $ac_cv_prog_MT
23409   shift
23410   if test $# != 0; then
23411     # We chose a different compiler from the bogus one.
23412     # However, it has the same basename, so the bogon will be chosen
23413     # first if we set MT to just the basename; use the full file name.
23414     shift
23415     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23416   fi
23417 fi
23418 fi
23419 fi
23420 MT=$ac_cv_prog_MT
23421 if test -n "$MT"; then
23422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23423 $as_echo "$MT" >&6; }
23424 else
23425   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23426 $as_echo "no" >&6; }
23427 fi
23428 
23429 
23430 
23431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23432 
23433   # First separate the path from the arguments. This will split at the first
23434   # space.
23435   complete="$MT"
23436   path="${complete%% *}"
23437   tmp="$complete EOL"
23438   arguments="${tmp#* }"
23439 
23440   # Input might be given as Windows format, start by converting to
23441   # unix format.
23442   new_path=`$CYGPATH -u "$path"`
23443 
23444   # Now try to locate executable using which
23445   new_path=`$WHICH "$new_path" 2> /dev/null`
23446   # bat and cmd files are not always considered executable in cygwin causing which
23447   # to not find them
23448   if test "x$new_path" = x \
23449       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23450       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23451     new_path=`$CYGPATH -u "$path"`
23452   fi
23453   if test "x$new_path" = x; then
23454     # Oops. Which didn't find the executable.
23455     # The splitting of arguments from the executable at a space might have been incorrect,
23456     # since paths with space are more likely in Windows. Give it another try with the whole
23457     # argument.
23458     path="$complete"
23459     arguments="EOL"
23460     new_path=`$CYGPATH -u "$path"`
23461     new_path=`$WHICH "$new_path" 2> /dev/null`
23462     # bat and cmd files are not always considered executable in cygwin causing which
23463     # to not find them
23464     if test "x$new_path" = x \
23465         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23466         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23467       new_path=`$CYGPATH -u "$path"`
23468     fi
23469     if test "x$new_path" = x; then
23470       # It's still not found. Now this is an unrecoverable error.
23471       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23472 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23473       has_space=`$ECHO "$complete" | $GREP " "`
23474       if test "x$has_space" != x; then
23475         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23476 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23477       fi
23478       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23479     fi
23480   fi
23481 
23482   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23483   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23484   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23485   # "foo.exe" is OK but "foo" is an error.
23486   #
23487   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23488   # It is also a way to make sure we got the proper file name for the real test later on.
23489   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23490   if test "x$test_shortpath" = x; then
23491     # Short path failed, file does not exist as specified.
23492     # Try adding .exe or .cmd
23493     if test -f "${new_path}.exe"; then
23494       input_to_shortpath="${new_path}.exe"
23495     elif test -f "${new_path}.cmd"; then
23496       input_to_shortpath="${new_path}.cmd"
23497     else
23498       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23499 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23500       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23501 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23502       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23503     fi
23504   else
23505     input_to_shortpath="$new_path"
23506   fi
23507 
23508   # Call helper function which possibly converts this using DOS-style short mode.
23509   # If so, the updated path is stored in $new_path.
23510   new_path="$input_to_shortpath"
23511 
23512   input_path="$input_to_shortpath"
23513   # Check if we need to convert this using DOS-style short mode. If the path
23514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23515   # take no chances and rewrite it.
23516   # Note: m4 eats our [], so we need to use [ and ] instead.
23517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23518   if test "x$has_forbidden_chars" != x; then
23519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23520     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23521     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23522     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23523       # Going to short mode and back again did indeed matter. Since short mode is
23524       # case insensitive, let's make it lowercase to improve readability.
23525       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23526       # Now convert it back to Unix-stile (cygpath)
23527       input_path=`$CYGPATH -u "$shortmode_path"`
23528       new_path="$input_path"
23529     fi
23530   fi
23531 
23532   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23533   if test "x$test_cygdrive_prefix" = x; then
23534     # As a simple fix, exclude /usr/bin since it's not a real path.
23535     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23536       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23537       # a path prefixed by /cygdrive for fixpath to work.
23538       new_path="$CYGWIN_ROOT_PATH$input_path"
23539     fi
23540   fi
23541 
23542   # remove trailing .exe if any
23543   new_path="${new_path/%.exe/}"
23544 
23545   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23546 
23547   # First separate the path from the arguments. This will split at the first
23548   # space.
23549   complete="$MT"
23550   path="${complete%% *}"
23551   tmp="$complete EOL"
23552   arguments="${tmp#* }"
23553 
23554   # Input might be given as Windows format, start by converting to
23555   # unix format.
23556   new_path="$path"
23557 
23558   windows_path="$new_path"
23559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23560     unix_path=`$CYGPATH -u "$windows_path"`
23561     new_path="$unix_path"
23562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23564     new_path="$unix_path"
23565   fi
23566 
23567 
23568   # Now try to locate executable using which
23569   new_path=`$WHICH "$new_path" 2> /dev/null`
23570 
23571   if test "x$new_path" = x; then
23572     # Oops. Which didn't find the executable.
23573     # The splitting of arguments from the executable at a space might have been incorrect,
23574     # since paths with space are more likely in Windows. Give it another try with the whole
23575     # argument.
23576     path="$complete"
23577     arguments="EOL"
23578     new_path="$path"
23579 
23580   windows_path="$new_path"
23581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23582     unix_path=`$CYGPATH -u "$windows_path"`
23583     new_path="$unix_path"
23584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23586     new_path="$unix_path"
23587   fi
23588 
23589 
23590     new_path=`$WHICH "$new_path" 2> /dev/null`
23591 
23592     if test "x$new_path" = x; then
23593       # It's still not found. Now this is an unrecoverable error.
23594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23595 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23596       has_space=`$ECHO "$complete" | $GREP " "`
23597       if test "x$has_space" != x; then
23598         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23599 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23600       fi
23601       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23602     fi
23603   fi
23604 
23605   # Now new_path has a complete unix path to the binary
23606   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23607     # Keep paths in /bin as-is, but remove trailing .exe if any
23608     new_path="${new_path/%.exe/}"
23609     # Do not save /bin paths to all_fixpath_prefixes!
23610   else
23611     # Not in mixed or Windows style, start by that.
23612     new_path=`cmd //c echo $new_path`
23613 
23614   input_path="$new_path"
23615   # Check if we need to convert this using DOS-style short mode. If the path
23616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23617   # take no chances and rewrite it.
23618   # Note: m4 eats our [], so we need to use [ and ] instead.
23619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23620   if test "x$has_forbidden_chars" != x; then
23621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23622     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23623   fi
23624 
23625     # Output is in $new_path
23626 
23627   windows_path="$new_path"
23628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23629     unix_path=`$CYGPATH -u "$windows_path"`
23630     new_path="$unix_path"
23631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23633     new_path="$unix_path"
23634   fi
23635 
23636     # remove trailing .exe if any
23637     new_path="${new_path/%.exe/}"
23638 
23639     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23640     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23641   fi
23642 
23643   else
23644     # We're on a posix platform. Hooray! :)
23645     # First separate the path from the arguments. This will split at the first
23646     # space.
23647     complete="$MT"
23648     path="${complete%% *}"
23649     tmp="$complete EOL"
23650     arguments="${tmp#* }"
23651 
23652     # Cannot rely on the command "which" here since it doesn't always work.
23653     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23654     if test -z "$is_absolute_path"; then
23655       # Path to executable is not absolute. Find it.
23656       IFS_save="$IFS"
23657       IFS=:
23658       for p in $PATH; do
23659         if test -f "$p/$path" && test -x "$p/$path"; then
23660           new_path="$p/$path"
23661           break
23662         fi
23663       done
23664       IFS="$IFS_save"
23665     else
23666       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23667 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23668       new_path="$path"
23669     fi
23670 
23671     if test "x$new_path" = x; then
23672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23673 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23674       has_space=`$ECHO "$complete" | $GREP " "`
23675       if test "x$has_space" != x; then
23676         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23677 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23678       fi
23679       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23680     fi
23681   fi
23682 
23683   # Now join together the path and the arguments once again
23684   if test "x$arguments" != xEOL; then
23685     new_complete="$new_path ${arguments% *}"
23686   else
23687     new_complete="$new_path"
23688   fi
23689 
23690   if test "x$complete" != "x$new_complete"; then
23691     MT="$new_complete"
23692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23693 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23694   fi
23695 
23696     # The resource compiler
23697     # Extract the first word of "rc", so it can be a program name with args.
23698 set dummy rc; ac_word=$2
23699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23700 $as_echo_n "checking for $ac_word... " >&6; }
23701 if ${ac_cv_prog_RC+:} false; then :
23702   $as_echo_n "(cached) " >&6
23703 else
23704   if test -n "$RC"; then
23705   ac_cv_prog_RC="$RC" # Let the user override the test.
23706 else
23707   ac_prog_rejected=no
23708 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23709 for as_dir in $PATH
23710 do
23711   IFS=$as_save_IFS
23712   test -z "$as_dir" && as_dir=.
23713     for ac_exec_ext in '' $ac_executable_extensions; do
23714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23715     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23716        ac_prog_rejected=yes
23717        continue
23718      fi
23719     ac_cv_prog_RC="rc"
23720     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23721     break 2
23722   fi
23723 done
23724   done
23725 IFS=$as_save_IFS
23726 
23727 if test $ac_prog_rejected = yes; then
23728   # We found a bogon in the path, so make sure we never use it.
23729   set dummy $ac_cv_prog_RC
23730   shift
23731   if test $# != 0; then
23732     # We chose a different compiler from the bogus one.
23733     # However, it has the same basename, so the bogon will be chosen
23734     # first if we set RC to just the basename; use the full file name.
23735     shift
23736     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23737   fi
23738 fi
23739 fi
23740 fi
23741 RC=$ac_cv_prog_RC
23742 if test -n "$RC"; then
23743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23744 $as_echo "$RC" >&6; }
23745 else
23746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23747 $as_echo "no" >&6; }
23748 fi
23749 
23750 
23751 
23752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23753 
23754   # First separate the path from the arguments. This will split at the first
23755   # space.
23756   complete="$RC"
23757   path="${complete%% *}"
23758   tmp="$complete EOL"
23759   arguments="${tmp#* }"
23760 
23761   # Input might be given as Windows format, start by converting to
23762   # unix format.
23763   new_path=`$CYGPATH -u "$path"`
23764 
23765   # Now try to locate executable using which
23766   new_path=`$WHICH "$new_path" 2> /dev/null`
23767   # bat and cmd files are not always considered executable in cygwin causing which
23768   # to not find them
23769   if test "x$new_path" = x \
23770       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23771       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23772     new_path=`$CYGPATH -u "$path"`
23773   fi
23774   if test "x$new_path" = x; then
23775     # Oops. Which didn't find the executable.
23776     # The splitting of arguments from the executable at a space might have been incorrect,
23777     # since paths with space are more likely in Windows. Give it another try with the whole
23778     # argument.
23779     path="$complete"
23780     arguments="EOL"
23781     new_path=`$CYGPATH -u "$path"`
23782     new_path=`$WHICH "$new_path" 2> /dev/null`
23783     # bat and cmd files are not always considered executable in cygwin causing which
23784     # to not find them
23785     if test "x$new_path" = x \
23786         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23787         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23788       new_path=`$CYGPATH -u "$path"`
23789     fi
23790     if test "x$new_path" = x; then
23791       # It's still not found. Now this is an unrecoverable error.
23792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23793 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23794       has_space=`$ECHO "$complete" | $GREP " "`
23795       if test "x$has_space" != x; then
23796         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23797 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23798       fi
23799       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23800     fi
23801   fi
23802 
23803   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23804   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23805   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23806   # "foo.exe" is OK but "foo" is an error.
23807   #
23808   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23809   # It is also a way to make sure we got the proper file name for the real test later on.
23810   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23811   if test "x$test_shortpath" = x; then
23812     # Short path failed, file does not exist as specified.
23813     # Try adding .exe or .cmd
23814     if test -f "${new_path}.exe"; then
23815       input_to_shortpath="${new_path}.exe"
23816     elif test -f "${new_path}.cmd"; then
23817       input_to_shortpath="${new_path}.cmd"
23818     else
23819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23820 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23821       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23822 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23823       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23824     fi
23825   else
23826     input_to_shortpath="$new_path"
23827   fi
23828 
23829   # Call helper function which possibly converts this using DOS-style short mode.
23830   # If so, the updated path is stored in $new_path.
23831   new_path="$input_to_shortpath"
23832 
23833   input_path="$input_to_shortpath"
23834   # Check if we need to convert this using DOS-style short mode. If the path
23835   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23836   # take no chances and rewrite it.
23837   # Note: m4 eats our [], so we need to use [ and ] instead.
23838   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23839   if test "x$has_forbidden_chars" != x; then
23840     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23841     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23842     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23843     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23844       # Going to short mode and back again did indeed matter. Since short mode is
23845       # case insensitive, let's make it lowercase to improve readability.
23846       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23847       # Now convert it back to Unix-stile (cygpath)
23848       input_path=`$CYGPATH -u "$shortmode_path"`
23849       new_path="$input_path"
23850     fi
23851   fi
23852 
23853   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23854   if test "x$test_cygdrive_prefix" = x; then
23855     # As a simple fix, exclude /usr/bin since it's not a real path.
23856     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23857       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23858       # a path prefixed by /cygdrive for fixpath to work.
23859       new_path="$CYGWIN_ROOT_PATH$input_path"
23860     fi
23861   fi
23862 
23863   # remove trailing .exe if any
23864   new_path="${new_path/%.exe/}"
23865 
23866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23867 
23868   # First separate the path from the arguments. This will split at the first
23869   # space.
23870   complete="$RC"
23871   path="${complete%% *}"
23872   tmp="$complete EOL"
23873   arguments="${tmp#* }"
23874 
23875   # Input might be given as Windows format, start by converting to
23876   # unix format.
23877   new_path="$path"
23878 
23879   windows_path="$new_path"
23880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23881     unix_path=`$CYGPATH -u "$windows_path"`
23882     new_path="$unix_path"
23883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23885     new_path="$unix_path"
23886   fi
23887 
23888 
23889   # Now try to locate executable using which
23890   new_path=`$WHICH "$new_path" 2> /dev/null`
23891 
23892   if test "x$new_path" = x; then
23893     # Oops. Which didn't find the executable.
23894     # The splitting of arguments from the executable at a space might have been incorrect,
23895     # since paths with space are more likely in Windows. Give it another try with the whole
23896     # argument.
23897     path="$complete"
23898     arguments="EOL"
23899     new_path="$path"
23900 
23901   windows_path="$new_path"
23902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23903     unix_path=`$CYGPATH -u "$windows_path"`
23904     new_path="$unix_path"
23905   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23906     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23907     new_path="$unix_path"
23908   fi
23909 
23910 
23911     new_path=`$WHICH "$new_path" 2> /dev/null`
23912 
23913     if test "x$new_path" = x; then
23914       # It's still not found. Now this is an unrecoverable error.
23915       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23916 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23917       has_space=`$ECHO "$complete" | $GREP " "`
23918       if test "x$has_space" != x; then
23919         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23920 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23921       fi
23922       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23923     fi
23924   fi
23925 
23926   # Now new_path has a complete unix path to the binary
23927   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23928     # Keep paths in /bin as-is, but remove trailing .exe if any
23929     new_path="${new_path/%.exe/}"
23930     # Do not save /bin paths to all_fixpath_prefixes!
23931   else
23932     # Not in mixed or Windows style, start by that.
23933     new_path=`cmd //c echo $new_path`
23934 
23935   input_path="$new_path"
23936   # Check if we need to convert this using DOS-style short mode. If the path
23937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23938   # take no chances and rewrite it.
23939   # Note: m4 eats our [], so we need to use [ and ] instead.
23940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23941   if test "x$has_forbidden_chars" != x; then
23942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23943     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23944   fi
23945 
23946     # Output is in $new_path
23947 
23948   windows_path="$new_path"
23949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23950     unix_path=`$CYGPATH -u "$windows_path"`
23951     new_path="$unix_path"
23952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23954     new_path="$unix_path"
23955   fi
23956 
23957     # remove trailing .exe if any
23958     new_path="${new_path/%.exe/}"
23959 
23960     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23961     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23962   fi
23963 
23964   else
23965     # We're on a posix platform. Hooray! :)
23966     # First separate the path from the arguments. This will split at the first
23967     # space.
23968     complete="$RC"
23969     path="${complete%% *}"
23970     tmp="$complete EOL"
23971     arguments="${tmp#* }"
23972 
23973     # Cannot rely on the command "which" here since it doesn't always work.
23974     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23975     if test -z "$is_absolute_path"; then
23976       # Path to executable is not absolute. Find it.
23977       IFS_save="$IFS"
23978       IFS=:
23979       for p in $PATH; do
23980         if test -f "$p/$path" && test -x "$p/$path"; then
23981           new_path="$p/$path"
23982           break
23983         fi
23984       done
23985       IFS="$IFS_save"
23986     else
23987       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23988 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23989       new_path="$path"
23990     fi
23991 
23992     if test "x$new_path" = x; then
23993       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23994 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23995       has_space=`$ECHO "$complete" | $GREP " "`
23996       if test "x$has_space" != x; then
23997         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23998 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23999       fi
24000       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
24001     fi
24002   fi
24003 
24004   # Now join together the path and the arguments once again
24005   if test "x$arguments" != xEOL; then
24006     new_complete="$new_path ${arguments% *}"
24007   else
24008     new_complete="$new_path"
24009   fi
24010 
24011   if test "x$complete" != "x$new_complete"; then
24012     RC="$new_complete"
24013     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
24014 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
24015   fi
24016 
24017 
24018     # For hotspot, we need these in Windows mixed path,
24019     # so rewrite them all. Need added .exe suffix.
24020     HOTSPOT_CXX="$CXX.exe"
24021     HOTSPOT_LD="$LD.exe"
24022     HOTSPOT_MT="$MT.exe"
24023     HOTSPOT_RC="$RC.exe"
24024 
24025   unix_path="$HOTSPOT_CXX"
24026   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24027     windows_path=`$CYGPATH -m "$unix_path"`
24028     HOTSPOT_CXX="$windows_path"
24029   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24030     windows_path=`cmd //c echo $unix_path`
24031     HOTSPOT_CXX="$windows_path"
24032   fi
24033 
24034 
24035   unix_path="$HOTSPOT_LD"
24036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24037     windows_path=`$CYGPATH -m "$unix_path"`
24038     HOTSPOT_LD="$windows_path"
24039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24040     windows_path=`cmd //c echo $unix_path`
24041     HOTSPOT_LD="$windows_path"
24042   fi
24043 
24044 
24045   unix_path="$HOTSPOT_MT"
24046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24047     windows_path=`$CYGPATH -m "$unix_path"`
24048     HOTSPOT_MT="$windows_path"
24049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24050     windows_path=`cmd //c echo $unix_path`
24051     HOTSPOT_MT="$windows_path"
24052   fi
24053 
24054 
24055   unix_path="$HOTSPOT_RC"
24056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24057     windows_path=`$CYGPATH -m "$unix_path"`
24058     HOTSPOT_RC="$windows_path"
24059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24060     windows_path=`cmd //c echo $unix_path`
24061     HOTSPOT_RC="$windows_path"
24062   fi
24063 
24064 
24065 
24066 
24067     RC_FLAGS="-nologo -l 0x409 -r"
24068     if test "x$VARIANT" = xOPT; then :
24069 
24070     RC_FLAGS="$RC_FLAGS -d NDEBUG"
24071 
24072 fi
24073 
24074   # The version variables used to create RC_FLAGS may be overridden
24075   # in a custom configure script, or possibly the command line.
24076   # Let those variables be expanded at make time in spec.gmk.
24077   # The \$ are escaped to the shell, and the $(...) variables
24078   # are evaluated by make.
24079   RC_FLAGS="$RC_FLAGS \
24080       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24081       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24082       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24083       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
24084       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24085       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24086       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
24087 
24088   # lib.exe is used to create static libraries.
24089   # Extract the first word of "lib", so it can be a program name with args.
24090 set dummy lib; ac_word=$2
24091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24092 $as_echo_n "checking for $ac_word... " >&6; }
24093 if ${ac_cv_prog_WINAR+:} false; then :
24094   $as_echo_n "(cached) " >&6
24095 else
24096   if test -n "$WINAR"; then
24097   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24098 else
24099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24100 for as_dir in $PATH
24101 do
24102   IFS=$as_save_IFS
24103   test -z "$as_dir" && as_dir=.
24104     for ac_exec_ext in '' $ac_executable_extensions; do
24105   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24106     ac_cv_prog_WINAR="lib"
24107     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24108     break 2
24109   fi
24110 done
24111   done
24112 IFS=$as_save_IFS
24113 
24114 fi
24115 fi
24116 WINAR=$ac_cv_prog_WINAR
24117 if test -n "$WINAR"; then
24118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24119 $as_echo "$WINAR" >&6; }
24120 else
24121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24122 $as_echo "no" >&6; }
24123 fi
24124 
24125 
24126 
24127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24128 
24129   # First separate the path from the arguments. This will split at the first
24130   # space.
24131   complete="$WINAR"
24132   path="${complete%% *}"
24133   tmp="$complete EOL"
24134   arguments="${tmp#* }"
24135 
24136   # Input might be given as Windows format, start by converting to
24137   # unix format.
24138   new_path=`$CYGPATH -u "$path"`
24139 
24140   # Now try to locate executable using which
24141   new_path=`$WHICH "$new_path" 2> /dev/null`
24142   # bat and cmd files are not always considered executable in cygwin causing which
24143   # to not find them
24144   if test "x$new_path" = x \
24145       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24146       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24147     new_path=`$CYGPATH -u "$path"`
24148   fi
24149   if test "x$new_path" = x; then
24150     # Oops. Which didn't find the executable.
24151     # The splitting of arguments from the executable at a space might have been incorrect,
24152     # since paths with space are more likely in Windows. Give it another try with the whole
24153     # argument.
24154     path="$complete"
24155     arguments="EOL"
24156     new_path=`$CYGPATH -u "$path"`
24157     new_path=`$WHICH "$new_path" 2> /dev/null`
24158     # bat and cmd files are not always considered executable in cygwin causing which
24159     # to not find them
24160     if test "x$new_path" = x \
24161         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24162         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24163       new_path=`$CYGPATH -u "$path"`
24164     fi
24165     if test "x$new_path" = x; then
24166       # It's still not found. Now this is an unrecoverable error.
24167       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24168 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24169       has_space=`$ECHO "$complete" | $GREP " "`
24170       if test "x$has_space" != x; then
24171         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24172 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24173       fi
24174       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24175     fi
24176   fi
24177 
24178   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24179   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24180   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24181   # "foo.exe" is OK but "foo" is an error.
24182   #
24183   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24184   # It is also a way to make sure we got the proper file name for the real test later on.
24185   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24186   if test "x$test_shortpath" = x; then
24187     # Short path failed, file does not exist as specified.
24188     # Try adding .exe or .cmd
24189     if test -f "${new_path}.exe"; then
24190       input_to_shortpath="${new_path}.exe"
24191     elif test -f "${new_path}.cmd"; then
24192       input_to_shortpath="${new_path}.cmd"
24193     else
24194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24195 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24196       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24197 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24198       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24199     fi
24200   else
24201     input_to_shortpath="$new_path"
24202   fi
24203 
24204   # Call helper function which possibly converts this using DOS-style short mode.
24205   # If so, the updated path is stored in $new_path.
24206   new_path="$input_to_shortpath"
24207 
24208   input_path="$input_to_shortpath"
24209   # Check if we need to convert this using DOS-style short mode. If the path
24210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24211   # take no chances and rewrite it.
24212   # Note: m4 eats our [], so we need to use [ and ] instead.
24213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24214   if test "x$has_forbidden_chars" != x; then
24215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24216     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24217     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24218     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24219       # Going to short mode and back again did indeed matter. Since short mode is
24220       # case insensitive, let's make it lowercase to improve readability.
24221       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24222       # Now convert it back to Unix-stile (cygpath)
24223       input_path=`$CYGPATH -u "$shortmode_path"`
24224       new_path="$input_path"
24225     fi
24226   fi
24227 
24228   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24229   if test "x$test_cygdrive_prefix" = x; then
24230     # As a simple fix, exclude /usr/bin since it's not a real path.
24231     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24232       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24233       # a path prefixed by /cygdrive for fixpath to work.
24234       new_path="$CYGWIN_ROOT_PATH$input_path"
24235     fi
24236   fi
24237 
24238   # remove trailing .exe if any
24239   new_path="${new_path/%.exe/}"
24240 
24241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24242 
24243   # First separate the path from the arguments. This will split at the first
24244   # space.
24245   complete="$WINAR"
24246   path="${complete%% *}"
24247   tmp="$complete EOL"
24248   arguments="${tmp#* }"
24249 
24250   # Input might be given as Windows format, start by converting to
24251   # unix format.
24252   new_path="$path"
24253 
24254   windows_path="$new_path"
24255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24256     unix_path=`$CYGPATH -u "$windows_path"`
24257     new_path="$unix_path"
24258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24260     new_path="$unix_path"
24261   fi
24262 
24263 
24264   # Now try to locate executable using which
24265   new_path=`$WHICH "$new_path" 2> /dev/null`
24266 
24267   if test "x$new_path" = x; then
24268     # Oops. Which didn't find the executable.
24269     # The splitting of arguments from the executable at a space might have been incorrect,
24270     # since paths with space are more likely in Windows. Give it another try with the whole
24271     # argument.
24272     path="$complete"
24273     arguments="EOL"
24274     new_path="$path"
24275 
24276   windows_path="$new_path"
24277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24278     unix_path=`$CYGPATH -u "$windows_path"`
24279     new_path="$unix_path"
24280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24282     new_path="$unix_path"
24283   fi
24284 
24285 
24286     new_path=`$WHICH "$new_path" 2> /dev/null`
24287 
24288     if test "x$new_path" = x; then
24289       # It's still not found. Now this is an unrecoverable error.
24290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24291 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24292       has_space=`$ECHO "$complete" | $GREP " "`
24293       if test "x$has_space" != x; then
24294         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24295 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24296       fi
24297       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24298     fi
24299   fi
24300 
24301   # Now new_path has a complete unix path to the binary
24302   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24303     # Keep paths in /bin as-is, but remove trailing .exe if any
24304     new_path="${new_path/%.exe/}"
24305     # Do not save /bin paths to all_fixpath_prefixes!
24306   else
24307     # Not in mixed or Windows style, start by that.
24308     new_path=`cmd //c echo $new_path`
24309 
24310   input_path="$new_path"
24311   # Check if we need to convert this using DOS-style short mode. If the path
24312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24313   # take no chances and rewrite it.
24314   # Note: m4 eats our [], so we need to use [ and ] instead.
24315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24316   if test "x$has_forbidden_chars" != x; then
24317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24318     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24319   fi
24320 
24321     # Output is in $new_path
24322 
24323   windows_path="$new_path"
24324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24325     unix_path=`$CYGPATH -u "$windows_path"`
24326     new_path="$unix_path"
24327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24329     new_path="$unix_path"
24330   fi
24331 
24332     # remove trailing .exe if any
24333     new_path="${new_path/%.exe/}"
24334 
24335     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24336     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24337   fi
24338 
24339   else
24340     # We're on a posix platform. Hooray! :)
24341     # First separate the path from the arguments. This will split at the first
24342     # space.
24343     complete="$WINAR"
24344     path="${complete%% *}"
24345     tmp="$complete EOL"
24346     arguments="${tmp#* }"
24347 
24348     # Cannot rely on the command "which" here since it doesn't always work.
24349     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24350     if test -z "$is_absolute_path"; then
24351       # Path to executable is not absolute. Find it.
24352       IFS_save="$IFS"
24353       IFS=:
24354       for p in $PATH; do
24355         if test -f "$p/$path" && test -x "$p/$path"; then
24356           new_path="$p/$path"
24357           break
24358         fi
24359       done
24360       IFS="$IFS_save"
24361     else
24362       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24363 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24364       new_path="$path"
24365     fi
24366 
24367     if test "x$new_path" = x; then
24368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24369 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24370       has_space=`$ECHO "$complete" | $GREP " "`
24371       if test "x$has_space" != x; then
24372         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24373 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24374       fi
24375       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24376     fi
24377   fi
24378 
24379   # Now join together the path and the arguments once again
24380   if test "x$arguments" != xEOL; then
24381     new_complete="$new_path ${arguments% *}"
24382   else
24383     new_complete="$new_path"
24384   fi
24385 
24386   if test "x$complete" != "x$new_complete"; then
24387     WINAR="$new_complete"
24388     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24389 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24390   fi
24391 
24392   AR="$WINAR"
24393   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24394 
24395   # Extract the first word of "dumpbin", so it can be a program name with args.
24396 set dummy dumpbin; ac_word=$2
24397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24398 $as_echo_n "checking for $ac_word... " >&6; }
24399 if ${ac_cv_prog_DUMPBIN+:} false; then :
24400   $as_echo_n "(cached) " >&6
24401 else
24402   if test -n "$DUMPBIN"; then
24403   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24404 else
24405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24406 for as_dir in $PATH
24407 do
24408   IFS=$as_save_IFS
24409   test -z "$as_dir" && as_dir=.
24410     for ac_exec_ext in '' $ac_executable_extensions; do
24411   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24412     ac_cv_prog_DUMPBIN="dumpbin"
24413     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24414     break 2
24415   fi
24416 done
24417   done
24418 IFS=$as_save_IFS
24419 
24420 fi
24421 fi
24422 DUMPBIN=$ac_cv_prog_DUMPBIN
24423 if test -n "$DUMPBIN"; then
24424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24425 $as_echo "$DUMPBIN" >&6; }
24426 else
24427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24428 $as_echo "no" >&6; }
24429 fi
24430 
24431 
24432 
24433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24434 
24435   # First separate the path from the arguments. This will split at the first
24436   # space.
24437   complete="$DUMPBIN"
24438   path="${complete%% *}"
24439   tmp="$complete EOL"
24440   arguments="${tmp#* }"
24441 
24442   # Input might be given as Windows format, start by converting to
24443   # unix format.
24444   new_path=`$CYGPATH -u "$path"`
24445 
24446   # Now try to locate executable using which
24447   new_path=`$WHICH "$new_path" 2> /dev/null`
24448   # bat and cmd files are not always considered executable in cygwin causing which
24449   # to not find them
24450   if test "x$new_path" = x \
24451       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24452       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24453     new_path=`$CYGPATH -u "$path"`
24454   fi
24455   if test "x$new_path" = x; then
24456     # Oops. Which didn't find the executable.
24457     # The splitting of arguments from the executable at a space might have been incorrect,
24458     # since paths with space are more likely in Windows. Give it another try with the whole
24459     # argument.
24460     path="$complete"
24461     arguments="EOL"
24462     new_path=`$CYGPATH -u "$path"`
24463     new_path=`$WHICH "$new_path" 2> /dev/null`
24464     # bat and cmd files are not always considered executable in cygwin causing which
24465     # to not find them
24466     if test "x$new_path" = x \
24467         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24468         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24469       new_path=`$CYGPATH -u "$path"`
24470     fi
24471     if test "x$new_path" = x; then
24472       # It's still not found. Now this is an unrecoverable error.
24473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24474 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24475       has_space=`$ECHO "$complete" | $GREP " "`
24476       if test "x$has_space" != x; then
24477         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24478 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24479       fi
24480       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24481     fi
24482   fi
24483 
24484   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24485   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24486   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24487   # "foo.exe" is OK but "foo" is an error.
24488   #
24489   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24490   # It is also a way to make sure we got the proper file name for the real test later on.
24491   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24492   if test "x$test_shortpath" = x; then
24493     # Short path failed, file does not exist as specified.
24494     # Try adding .exe or .cmd
24495     if test -f "${new_path}.exe"; then
24496       input_to_shortpath="${new_path}.exe"
24497     elif test -f "${new_path}.cmd"; then
24498       input_to_shortpath="${new_path}.cmd"
24499     else
24500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24501 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24502       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24503 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24504       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24505     fi
24506   else
24507     input_to_shortpath="$new_path"
24508   fi
24509 
24510   # Call helper function which possibly converts this using DOS-style short mode.
24511   # If so, the updated path is stored in $new_path.
24512   new_path="$input_to_shortpath"
24513 
24514   input_path="$input_to_shortpath"
24515   # Check if we need to convert this using DOS-style short mode. If the path
24516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24517   # take no chances and rewrite it.
24518   # Note: m4 eats our [], so we need to use [ and ] instead.
24519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24520   if test "x$has_forbidden_chars" != x; then
24521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24522     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24523     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24524     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24525       # Going to short mode and back again did indeed matter. Since short mode is
24526       # case insensitive, let's make it lowercase to improve readability.
24527       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24528       # Now convert it back to Unix-stile (cygpath)
24529       input_path=`$CYGPATH -u "$shortmode_path"`
24530       new_path="$input_path"
24531     fi
24532   fi
24533 
24534   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24535   if test "x$test_cygdrive_prefix" = x; then
24536     # As a simple fix, exclude /usr/bin since it's not a real path.
24537     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24538       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24539       # a path prefixed by /cygdrive for fixpath to work.
24540       new_path="$CYGWIN_ROOT_PATH$input_path"
24541     fi
24542   fi
24543 
24544   # remove trailing .exe if any
24545   new_path="${new_path/%.exe/}"
24546 
24547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24548 
24549   # First separate the path from the arguments. This will split at the first
24550   # space.
24551   complete="$DUMPBIN"
24552   path="${complete%% *}"
24553   tmp="$complete EOL"
24554   arguments="${tmp#* }"
24555 
24556   # Input might be given as Windows format, start by converting to
24557   # unix format.
24558   new_path="$path"
24559 
24560   windows_path="$new_path"
24561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24562     unix_path=`$CYGPATH -u "$windows_path"`
24563     new_path="$unix_path"
24564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24566     new_path="$unix_path"
24567   fi
24568 
24569 
24570   # Now try to locate executable using which
24571   new_path=`$WHICH "$new_path" 2> /dev/null`
24572 
24573   if test "x$new_path" = x; then
24574     # Oops. Which didn't find the executable.
24575     # The splitting of arguments from the executable at a space might have been incorrect,
24576     # since paths with space are more likely in Windows. Give it another try with the whole
24577     # argument.
24578     path="$complete"
24579     arguments="EOL"
24580     new_path="$path"
24581 
24582   windows_path="$new_path"
24583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24584     unix_path=`$CYGPATH -u "$windows_path"`
24585     new_path="$unix_path"
24586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24588     new_path="$unix_path"
24589   fi
24590 
24591 
24592     new_path=`$WHICH "$new_path" 2> /dev/null`
24593 
24594     if test "x$new_path" = x; then
24595       # It's still not found. Now this is an unrecoverable error.
24596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24597 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24598       has_space=`$ECHO "$complete" | $GREP " "`
24599       if test "x$has_space" != x; then
24600         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24601 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24602       fi
24603       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24604     fi
24605   fi
24606 
24607   # Now new_path has a complete unix path to the binary
24608   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24609     # Keep paths in /bin as-is, but remove trailing .exe if any
24610     new_path="${new_path/%.exe/}"
24611     # Do not save /bin paths to all_fixpath_prefixes!
24612   else
24613     # Not in mixed or Windows style, start by that.
24614     new_path=`cmd //c echo $new_path`
24615 
24616   input_path="$new_path"
24617   # Check if we need to convert this using DOS-style short mode. If the path
24618   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24619   # take no chances and rewrite it.
24620   # Note: m4 eats our [], so we need to use [ and ] instead.
24621   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24622   if test "x$has_forbidden_chars" != x; then
24623     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24624     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24625   fi
24626 
24627     # Output is in $new_path
24628 
24629   windows_path="$new_path"
24630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24631     unix_path=`$CYGPATH -u "$windows_path"`
24632     new_path="$unix_path"
24633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24634     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24635     new_path="$unix_path"
24636   fi
24637 
24638     # remove trailing .exe if any
24639     new_path="${new_path/%.exe/}"
24640 
24641     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24642     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24643   fi
24644 
24645   else
24646     # We're on a posix platform. Hooray! :)
24647     # First separate the path from the arguments. This will split at the first
24648     # space.
24649     complete="$DUMPBIN"
24650     path="${complete%% *}"
24651     tmp="$complete EOL"
24652     arguments="${tmp#* }"
24653 
24654     # Cannot rely on the command "which" here since it doesn't always work.
24655     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24656     if test -z "$is_absolute_path"; then
24657       # Path to executable is not absolute. Find it.
24658       IFS_save="$IFS"
24659       IFS=:
24660       for p in $PATH; do
24661         if test -f "$p/$path" && test -x "$p/$path"; then
24662           new_path="$p/$path"
24663           break
24664         fi
24665       done
24666       IFS="$IFS_save"
24667     else
24668       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24669 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24670       new_path="$path"
24671     fi
24672 
24673     if test "x$new_path" = x; then
24674       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24675 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24676       has_space=`$ECHO "$complete" | $GREP " "`
24677       if test "x$has_space" != x; then
24678         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24679 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24680       fi
24681       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24682     fi
24683   fi
24684 
24685   # Now join together the path and the arguments once again
24686   if test "x$arguments" != xEOL; then
24687     new_complete="$new_path ${arguments% *}"
24688   else
24689     new_complete="$new_path"
24690   fi
24691 
24692   if test "x$complete" != "x$new_complete"; then
24693     DUMPBIN="$new_complete"
24694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24695 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24696   fi
24697 
24698 
24699       COMPILER_TYPE=CL
24700       CCXXFLAGS="$CCXXFLAGS -nologo"
24701 
24702 fi
24703 
24704 
24705 
24706   ac_ext=c
24707 ac_cpp='$CPP $CPPFLAGS'
24708 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24709 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24710 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24712 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24713 # On Suns, sometimes $CPP names a directory.
24714 if test -n "$CPP" && test -d "$CPP"; then
24715   CPP=
24716 fi
24717 if test -z "$CPP"; then
24718   if ${ac_cv_prog_CPP+:} false; then :
24719   $as_echo_n "(cached) " >&6
24720 else
24721       # Double quotes because CPP needs to be expanded
24722     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24723     do
24724       ac_preproc_ok=false
24725 for ac_c_preproc_warn_flag in '' yes
24726 do
24727   # Use a header file that comes with gcc, so configuring glibc
24728   # with a fresh cross-compiler works.
24729   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24730   # <limits.h> exists even on freestanding compilers.
24731   # On the NeXT, cc -E runs the code through the compiler's parser,
24732   # not just through cpp. "Syntax error" is here to catch this case.
24733   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24734 /* end confdefs.h.  */
24735 #ifdef __STDC__
24736 # include <limits.h>
24737 #else
24738 # include <assert.h>
24739 #endif
24740                      Syntax error
24741 _ACEOF
24742 if ac_fn_c_try_cpp "$LINENO"; then :
24743 
24744 else
24745   # Broken: fails on valid input.
24746 continue
24747 fi
24748 rm -f conftest.err conftest.i conftest.$ac_ext
24749 
24750   # OK, works on sane cases.  Now check whether nonexistent headers
24751   # can be detected and how.
24752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24753 /* end confdefs.h.  */
24754 #include <ac_nonexistent.h>
24755 _ACEOF
24756 if ac_fn_c_try_cpp "$LINENO"; then :
24757   # Broken: success on invalid input.
24758 continue
24759 else
24760   # Passes both tests.
24761 ac_preproc_ok=:
24762 break
24763 fi
24764 rm -f conftest.err conftest.i conftest.$ac_ext
24765 
24766 done
24767 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24768 rm -f conftest.i conftest.err conftest.$ac_ext
24769 if $ac_preproc_ok; then :
24770   break
24771 fi
24772 
24773     done
24774     ac_cv_prog_CPP=$CPP
24775 
24776 fi
24777   CPP=$ac_cv_prog_CPP
24778 else
24779   ac_cv_prog_CPP=$CPP
24780 fi
24781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24782 $as_echo "$CPP" >&6; }
24783 ac_preproc_ok=false
24784 for ac_c_preproc_warn_flag in '' yes
24785 do
24786   # Use a header file that comes with gcc, so configuring glibc
24787   # with a fresh cross-compiler works.
24788   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24789   # <limits.h> exists even on freestanding compilers.
24790   # On the NeXT, cc -E runs the code through the compiler's parser,
24791   # not just through cpp. "Syntax error" is here to catch this case.
24792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24793 /* end confdefs.h.  */
24794 #ifdef __STDC__
24795 # include <limits.h>
24796 #else
24797 # include <assert.h>
24798 #endif
24799                      Syntax error
24800 _ACEOF
24801 if ac_fn_c_try_cpp "$LINENO"; then :
24802 
24803 else
24804   # Broken: fails on valid input.
24805 continue
24806 fi
24807 rm -f conftest.err conftest.i conftest.$ac_ext
24808 
24809   # OK, works on sane cases.  Now check whether nonexistent headers
24810   # can be detected and how.
24811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24812 /* end confdefs.h.  */
24813 #include <ac_nonexistent.h>
24814 _ACEOF
24815 if ac_fn_c_try_cpp "$LINENO"; then :
24816   # Broken: success on invalid input.
24817 continue
24818 else
24819   # Passes both tests.
24820 ac_preproc_ok=:
24821 break
24822 fi
24823 rm -f conftest.err conftest.i conftest.$ac_ext
24824 
24825 done
24826 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24827 rm -f conftest.i conftest.err conftest.$ac_ext
24828 if $ac_preproc_ok; then :
24829 
24830 else
24831   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24832 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24833 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24834 See \`config.log' for more details" "$LINENO" 5; }
24835 fi
24836 
24837 ac_ext=cpp
24838 ac_cpp='$CXXCPP $CPPFLAGS'
24839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24842 
24843 
24844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24845 
24846   # First separate the path from the arguments. This will split at the first
24847   # space.
24848   complete="$CPP"
24849   path="${complete%% *}"
24850   tmp="$complete EOL"
24851   arguments="${tmp#* }"
24852 
24853   # Input might be given as Windows format, start by converting to
24854   # unix format.
24855   new_path=`$CYGPATH -u "$path"`
24856 
24857   # Now try to locate executable using which
24858   new_path=`$WHICH "$new_path" 2> /dev/null`
24859   # bat and cmd files are not always considered executable in cygwin causing which
24860   # to not find them
24861   if test "x$new_path" = x \
24862       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24863       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24864     new_path=`$CYGPATH -u "$path"`
24865   fi
24866   if test "x$new_path" = x; then
24867     # Oops. Which didn't find the executable.
24868     # The splitting of arguments from the executable at a space might have been incorrect,
24869     # since paths with space are more likely in Windows. Give it another try with the whole
24870     # argument.
24871     path="$complete"
24872     arguments="EOL"
24873     new_path=`$CYGPATH -u "$path"`
24874     new_path=`$WHICH "$new_path" 2> /dev/null`
24875     # bat and cmd files are not always considered executable in cygwin causing which
24876     # to not find them
24877     if test "x$new_path" = x \
24878         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24879         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24880       new_path=`$CYGPATH -u "$path"`
24881     fi
24882     if test "x$new_path" = x; then
24883       # It's still not found. Now this is an unrecoverable error.
24884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24885 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24886       has_space=`$ECHO "$complete" | $GREP " "`
24887       if test "x$has_space" != x; then
24888         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24889 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24890       fi
24891       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24892     fi
24893   fi
24894 
24895   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24896   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24897   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24898   # "foo.exe" is OK but "foo" is an error.
24899   #
24900   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24901   # It is also a way to make sure we got the proper file name for the real test later on.
24902   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24903   if test "x$test_shortpath" = x; then
24904     # Short path failed, file does not exist as specified.
24905     # Try adding .exe or .cmd
24906     if test -f "${new_path}.exe"; then
24907       input_to_shortpath="${new_path}.exe"
24908     elif test -f "${new_path}.cmd"; then
24909       input_to_shortpath="${new_path}.cmd"
24910     else
24911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24912 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24913       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24914 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24915       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24916     fi
24917   else
24918     input_to_shortpath="$new_path"
24919   fi
24920 
24921   # Call helper function which possibly converts this using DOS-style short mode.
24922   # If so, the updated path is stored in $new_path.
24923   new_path="$input_to_shortpath"
24924 
24925   input_path="$input_to_shortpath"
24926   # Check if we need to convert this using DOS-style short mode. If the path
24927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24928   # take no chances and rewrite it.
24929   # Note: m4 eats our [], so we need to use [ and ] instead.
24930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24931   if test "x$has_forbidden_chars" != x; then
24932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24933     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24934     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24935     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24936       # Going to short mode and back again did indeed matter. Since short mode is
24937       # case insensitive, let's make it lowercase to improve readability.
24938       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24939       # Now convert it back to Unix-stile (cygpath)
24940       input_path=`$CYGPATH -u "$shortmode_path"`
24941       new_path="$input_path"
24942     fi
24943   fi
24944 
24945   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24946   if test "x$test_cygdrive_prefix" = x; then
24947     # As a simple fix, exclude /usr/bin since it's not a real path.
24948     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24949       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24950       # a path prefixed by /cygdrive for fixpath to work.
24951       new_path="$CYGWIN_ROOT_PATH$input_path"
24952     fi
24953   fi
24954 
24955   # remove trailing .exe if any
24956   new_path="${new_path/%.exe/}"
24957 
24958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24959 
24960   # First separate the path from the arguments. This will split at the first
24961   # space.
24962   complete="$CPP"
24963   path="${complete%% *}"
24964   tmp="$complete EOL"
24965   arguments="${tmp#* }"
24966 
24967   # Input might be given as Windows format, start by converting to
24968   # unix format.
24969   new_path="$path"
24970 
24971   windows_path="$new_path"
24972   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24973     unix_path=`$CYGPATH -u "$windows_path"`
24974     new_path="$unix_path"
24975   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24976     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24977     new_path="$unix_path"
24978   fi
24979 
24980 
24981   # Now try to locate executable using which
24982   new_path=`$WHICH "$new_path" 2> /dev/null`
24983 
24984   if test "x$new_path" = x; then
24985     # Oops. Which didn't find the executable.
24986     # The splitting of arguments from the executable at a space might have been incorrect,
24987     # since paths with space are more likely in Windows. Give it another try with the whole
24988     # argument.
24989     path="$complete"
24990     arguments="EOL"
24991     new_path="$path"
24992 
24993   windows_path="$new_path"
24994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24995     unix_path=`$CYGPATH -u "$windows_path"`
24996     new_path="$unix_path"
24997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24999     new_path="$unix_path"
25000   fi
25001 
25002 
25003     new_path=`$WHICH "$new_path" 2> /dev/null`
25004 
25005     if test "x$new_path" = x; then
25006       # It's still not found. Now this is an unrecoverable error.
25007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25008 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25009       has_space=`$ECHO "$complete" | $GREP " "`
25010       if test "x$has_space" != x; then
25011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25013       fi
25014       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25015     fi
25016   fi
25017 
25018   # Now new_path has a complete unix path to the binary
25019   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25020     # Keep paths in /bin as-is, but remove trailing .exe if any
25021     new_path="${new_path/%.exe/}"
25022     # Do not save /bin paths to all_fixpath_prefixes!
25023   else
25024     # Not in mixed or Windows style, start by that.
25025     new_path=`cmd //c echo $new_path`
25026 
25027   input_path="$new_path"
25028   # Check if we need to convert this using DOS-style short mode. If the path
25029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25030   # take no chances and rewrite it.
25031   # Note: m4 eats our [], so we need to use [ and ] instead.
25032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25033   if test "x$has_forbidden_chars" != x; then
25034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25035     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25036   fi
25037 
25038     # Output is in $new_path
25039 
25040   windows_path="$new_path"
25041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25042     unix_path=`$CYGPATH -u "$windows_path"`
25043     new_path="$unix_path"
25044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25046     new_path="$unix_path"
25047   fi
25048 
25049     # remove trailing .exe if any
25050     new_path="${new_path/%.exe/}"
25051 
25052     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25053     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25054   fi
25055 
25056   else
25057     # We're on a posix platform. Hooray! :)
25058     # First separate the path from the arguments. This will split at the first
25059     # space.
25060     complete="$CPP"
25061     path="${complete%% *}"
25062     tmp="$complete EOL"
25063     arguments="${tmp#* }"
25064 
25065     # Cannot rely on the command "which" here since it doesn't always work.
25066     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25067     if test -z "$is_absolute_path"; then
25068       # Path to executable is not absolute. Find it.
25069       IFS_save="$IFS"
25070       IFS=:
25071       for p in $PATH; do
25072         if test -f "$p/$path" && test -x "$p/$path"; then
25073           new_path="$p/$path"
25074           break
25075         fi
25076       done
25077       IFS="$IFS_save"
25078     else
25079       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25080 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25081       new_path="$path"
25082     fi
25083 
25084     if test "x$new_path" = x; then
25085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25086 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25087       has_space=`$ECHO "$complete" | $GREP " "`
25088       if test "x$has_space" != x; then
25089         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25090 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25091       fi
25092       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25093     fi
25094   fi
25095 
25096   # Now join together the path and the arguments once again
25097   if test "x$arguments" != xEOL; then
25098     new_complete="$new_path ${arguments% *}"
25099   else
25100     new_complete="$new_path"
25101   fi
25102 
25103   if test "x$complete" != "x$new_complete"; then
25104     CPP="$new_complete"
25105     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25106 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25107   fi
25108 
25109 
25110   ac_ext=cpp
25111 ac_cpp='$CXXCPP $CPPFLAGS'
25112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25116 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25117 if test -z "$CXXCPP"; then
25118   if ${ac_cv_prog_CXXCPP+:} false; then :
25119   $as_echo_n "(cached) " >&6
25120 else
25121       # Double quotes because CXXCPP needs to be expanded
25122     for CXXCPP in "$CXX -E" "/lib/cpp"
25123     do
25124       ac_preproc_ok=false
25125 for ac_cxx_preproc_warn_flag in '' yes
25126 do
25127   # Use a header file that comes with gcc, so configuring glibc
25128   # with a fresh cross-compiler works.
25129   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25130   # <limits.h> exists even on freestanding compilers.
25131   # On the NeXT, cc -E runs the code through the compiler's parser,
25132   # not just through cpp. "Syntax error" is here to catch this case.
25133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25134 /* end confdefs.h.  */
25135 #ifdef __STDC__
25136 # include <limits.h>
25137 #else
25138 # include <assert.h>
25139 #endif
25140                      Syntax error
25141 _ACEOF
25142 if ac_fn_cxx_try_cpp "$LINENO"; then :
25143 
25144 else
25145   # Broken: fails on valid input.
25146 continue
25147 fi
25148 rm -f conftest.err conftest.i conftest.$ac_ext
25149 
25150   # OK, works on sane cases.  Now check whether nonexistent headers
25151   # can be detected and how.
25152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25153 /* end confdefs.h.  */
25154 #include <ac_nonexistent.h>
25155 _ACEOF
25156 if ac_fn_cxx_try_cpp "$LINENO"; then :
25157   # Broken: success on invalid input.
25158 continue
25159 else
25160   # Passes both tests.
25161 ac_preproc_ok=:
25162 break
25163 fi
25164 rm -f conftest.err conftest.i conftest.$ac_ext
25165 
25166 done
25167 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25168 rm -f conftest.i conftest.err conftest.$ac_ext
25169 if $ac_preproc_ok; then :
25170   break
25171 fi
25172 
25173     done
25174     ac_cv_prog_CXXCPP=$CXXCPP
25175 
25176 fi
25177   CXXCPP=$ac_cv_prog_CXXCPP
25178 else
25179   ac_cv_prog_CXXCPP=$CXXCPP
25180 fi
25181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25182 $as_echo "$CXXCPP" >&6; }
25183 ac_preproc_ok=false
25184 for ac_cxx_preproc_warn_flag in '' yes
25185 do
25186   # Use a header file that comes with gcc, so configuring glibc
25187   # with a fresh cross-compiler works.
25188   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25189   # <limits.h> exists even on freestanding compilers.
25190   # On the NeXT, cc -E runs the code through the compiler's parser,
25191   # not just through cpp. "Syntax error" is here to catch this case.
25192   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25193 /* end confdefs.h.  */
25194 #ifdef __STDC__
25195 # include <limits.h>
25196 #else
25197 # include <assert.h>
25198 #endif
25199                      Syntax error
25200 _ACEOF
25201 if ac_fn_cxx_try_cpp "$LINENO"; then :
25202 
25203 else
25204   # Broken: fails on valid input.
25205 continue
25206 fi
25207 rm -f conftest.err conftest.i conftest.$ac_ext
25208 
25209   # OK, works on sane cases.  Now check whether nonexistent headers
25210   # can be detected and how.
25211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25212 /* end confdefs.h.  */
25213 #include <ac_nonexistent.h>
25214 _ACEOF
25215 if ac_fn_cxx_try_cpp "$LINENO"; then :
25216   # Broken: success on invalid input.
25217 continue
25218 else
25219   # Passes both tests.
25220 ac_preproc_ok=:
25221 break
25222 fi
25223 rm -f conftest.err conftest.i conftest.$ac_ext
25224 
25225 done
25226 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25227 rm -f conftest.i conftest.err conftest.$ac_ext
25228 if $ac_preproc_ok; then :
25229 
25230 else
25231   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25233 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25234 See \`config.log' for more details" "$LINENO" 5; }
25235 fi
25236 
25237 ac_ext=cpp
25238 ac_cpp='$CXXCPP $CPPFLAGS'
25239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25242 
25243 
25244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25245 
25246   # First separate the path from the arguments. This will split at the first
25247   # space.
25248   complete="$CXXCPP"
25249   path="${complete%% *}"
25250   tmp="$complete EOL"
25251   arguments="${tmp#* }"
25252 
25253   # Input might be given as Windows format, start by converting to
25254   # unix format.
25255   new_path=`$CYGPATH -u "$path"`
25256 
25257   # Now try to locate executable using which
25258   new_path=`$WHICH "$new_path" 2> /dev/null`
25259   # bat and cmd files are not always considered executable in cygwin causing which
25260   # to not find them
25261   if test "x$new_path" = x \
25262       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25263       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25264     new_path=`$CYGPATH -u "$path"`
25265   fi
25266   if test "x$new_path" = x; then
25267     # Oops. Which didn't find the executable.
25268     # The splitting of arguments from the executable at a space might have been incorrect,
25269     # since paths with space are more likely in Windows. Give it another try with the whole
25270     # argument.
25271     path="$complete"
25272     arguments="EOL"
25273     new_path=`$CYGPATH -u "$path"`
25274     new_path=`$WHICH "$new_path" 2> /dev/null`
25275     # bat and cmd files are not always considered executable in cygwin causing which
25276     # to not find them
25277     if test "x$new_path" = x \
25278         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25279         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25280       new_path=`$CYGPATH -u "$path"`
25281     fi
25282     if test "x$new_path" = x; then
25283       # It's still not found. Now this is an unrecoverable error.
25284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25285 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25286       has_space=`$ECHO "$complete" | $GREP " "`
25287       if test "x$has_space" != x; then
25288         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25289 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25290       fi
25291       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25292     fi
25293   fi
25294 
25295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25298   # "foo.exe" is OK but "foo" is an error.
25299   #
25300   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25301   # It is also a way to make sure we got the proper file name for the real test later on.
25302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25303   if test "x$test_shortpath" = x; then
25304     # Short path failed, file does not exist as specified.
25305     # Try adding .exe or .cmd
25306     if test -f "${new_path}.exe"; then
25307       input_to_shortpath="${new_path}.exe"
25308     elif test -f "${new_path}.cmd"; then
25309       input_to_shortpath="${new_path}.cmd"
25310     else
25311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25312 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25313       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25314 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25315       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25316     fi
25317   else
25318     input_to_shortpath="$new_path"
25319   fi
25320 
25321   # Call helper function which possibly converts this using DOS-style short mode.
25322   # If so, the updated path is stored in $new_path.
25323   new_path="$input_to_shortpath"
25324 
25325   input_path="$input_to_shortpath"
25326   # Check if we need to convert this using DOS-style short mode. If the path
25327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25328   # take no chances and rewrite it.
25329   # Note: m4 eats our [], so we need to use [ and ] instead.
25330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25331   if test "x$has_forbidden_chars" != x; then
25332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25333     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25334     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25335     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25336       # Going to short mode and back again did indeed matter. Since short mode is
25337       # case insensitive, let's make it lowercase to improve readability.
25338       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25339       # Now convert it back to Unix-stile (cygpath)
25340       input_path=`$CYGPATH -u "$shortmode_path"`
25341       new_path="$input_path"
25342     fi
25343   fi
25344 
25345   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25346   if test "x$test_cygdrive_prefix" = x; then
25347     # As a simple fix, exclude /usr/bin since it's not a real path.
25348     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25349       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25350       # a path prefixed by /cygdrive for fixpath to work.
25351       new_path="$CYGWIN_ROOT_PATH$input_path"
25352     fi
25353   fi
25354 
25355   # remove trailing .exe if any
25356   new_path="${new_path/%.exe/}"
25357 
25358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25359 
25360   # First separate the path from the arguments. This will split at the first
25361   # space.
25362   complete="$CXXCPP"
25363   path="${complete%% *}"
25364   tmp="$complete EOL"
25365   arguments="${tmp#* }"
25366 
25367   # Input might be given as Windows format, start by converting to
25368   # unix format.
25369   new_path="$path"
25370 
25371   windows_path="$new_path"
25372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25373     unix_path=`$CYGPATH -u "$windows_path"`
25374     new_path="$unix_path"
25375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25377     new_path="$unix_path"
25378   fi
25379 
25380 
25381   # Now try to locate executable using which
25382   new_path=`$WHICH "$new_path" 2> /dev/null`
25383 
25384   if test "x$new_path" = x; then
25385     # Oops. Which didn't find the executable.
25386     # The splitting of arguments from the executable at a space might have been incorrect,
25387     # since paths with space are more likely in Windows. Give it another try with the whole
25388     # argument.
25389     path="$complete"
25390     arguments="EOL"
25391     new_path="$path"
25392 
25393   windows_path="$new_path"
25394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25395     unix_path=`$CYGPATH -u "$windows_path"`
25396     new_path="$unix_path"
25397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25399     new_path="$unix_path"
25400   fi
25401 
25402 
25403     new_path=`$WHICH "$new_path" 2> /dev/null`
25404 
25405     if test "x$new_path" = x; then
25406       # It's still not found. Now this is an unrecoverable error.
25407       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25408 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25409       has_space=`$ECHO "$complete" | $GREP " "`
25410       if test "x$has_space" != x; then
25411         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25412 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25413       fi
25414       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25415     fi
25416   fi
25417 
25418   # Now new_path has a complete unix path to the binary
25419   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25420     # Keep paths in /bin as-is, but remove trailing .exe if any
25421     new_path="${new_path/%.exe/}"
25422     # Do not save /bin paths to all_fixpath_prefixes!
25423   else
25424     # Not in mixed or Windows style, start by that.
25425     new_path=`cmd //c echo $new_path`
25426 
25427   input_path="$new_path"
25428   # Check if we need to convert this using DOS-style short mode. If the path
25429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25430   # take no chances and rewrite it.
25431   # Note: m4 eats our [], so we need to use [ and ] instead.
25432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25433   if test "x$has_forbidden_chars" != x; then
25434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25435     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25436   fi
25437 
25438     # Output is in $new_path
25439 
25440   windows_path="$new_path"
25441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25442     unix_path=`$CYGPATH -u "$windows_path"`
25443     new_path="$unix_path"
25444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25446     new_path="$unix_path"
25447   fi
25448 
25449     # remove trailing .exe if any
25450     new_path="${new_path/%.exe/}"
25451 
25452     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25453     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25454   fi
25455 
25456   else
25457     # We're on a posix platform. Hooray! :)
25458     # First separate the path from the arguments. This will split at the first
25459     # space.
25460     complete="$CXXCPP"
25461     path="${complete%% *}"
25462     tmp="$complete EOL"
25463     arguments="${tmp#* }"
25464 
25465     # Cannot rely on the command "which" here since it doesn't always work.
25466     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25467     if test -z "$is_absolute_path"; then
25468       # Path to executable is not absolute. Find it.
25469       IFS_save="$IFS"
25470       IFS=:
25471       for p in $PATH; do
25472         if test -f "$p/$path" && test -x "$p/$path"; then
25473           new_path="$p/$path"
25474           break
25475         fi
25476       done
25477       IFS="$IFS_save"
25478     else
25479       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25480 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25481       new_path="$path"
25482     fi
25483 
25484     if test "x$new_path" = x; then
25485       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25486 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25487       has_space=`$ECHO "$complete" | $GREP " "`
25488       if test "x$has_space" != x; then
25489         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25490 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25491       fi
25492       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25493     fi
25494   fi
25495 
25496   # Now join together the path and the arguments once again
25497   if test "x$arguments" != xEOL; then
25498     new_complete="$new_path ${arguments% *}"
25499   else
25500     new_complete="$new_path"
25501   fi
25502 
25503   if test "x$complete" != "x$new_complete"; then
25504     CXXCPP="$new_complete"
25505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25506 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25507   fi
25508 
25509 
25510   if test "x$COMPILE_TYPE" != "xcross"; then
25511     # If we are not cross compiling, use the same compilers for
25512     # building the build platform executables. The cross-compilation
25513     # case needed to be done earlier, but this can only be done after
25514     # the native tools have been localized.
25515     BUILD_CC="$CC"
25516     BUILD_CXX="$CXX"
25517     BUILD_LD="$LD"
25518   fi
25519 
25520   # for solaris we really need solaris tools, and not gnu equivalent
25521   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25522   #   starting to probe
25523   #
25524   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25525   #         so that it can be overriden --with-tools-dir
25526   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25527     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25528   fi
25529 
25530   # Find the right assembler.
25531   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25532     # Extract the first word of "as", so it can be a program name with args.
25533 set dummy as; ac_word=$2
25534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25535 $as_echo_n "checking for $ac_word... " >&6; }
25536 if ${ac_cv_path_AS+:} false; then :
25537   $as_echo_n "(cached) " >&6
25538 else
25539   case $AS in
25540   [\\/]* | ?:[\\/]*)
25541   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25542   ;;
25543   *)
25544   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25545 for as_dir in $PATH
25546 do
25547   IFS=$as_save_IFS
25548   test -z "$as_dir" && as_dir=.
25549     for ac_exec_ext in '' $ac_executable_extensions; do
25550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25551     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25553     break 2
25554   fi
25555 done
25556   done
25557 IFS=$as_save_IFS
25558 
25559   ;;
25560 esac
25561 fi
25562 AS=$ac_cv_path_AS
25563 if test -n "$AS"; then
25564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25565 $as_echo "$AS" >&6; }
25566 else
25567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25568 $as_echo "no" >&6; }
25569 fi
25570 
25571 
25572 
25573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25574 
25575   # First separate the path from the arguments. This will split at the first
25576   # space.
25577   complete="$AS"
25578   path="${complete%% *}"
25579   tmp="$complete EOL"
25580   arguments="${tmp#* }"
25581 
25582   # Input might be given as Windows format, start by converting to
25583   # unix format.
25584   new_path=`$CYGPATH -u "$path"`
25585 
25586   # Now try to locate executable using which
25587   new_path=`$WHICH "$new_path" 2> /dev/null`
25588   # bat and cmd files are not always considered executable in cygwin causing which
25589   # to not find them
25590   if test "x$new_path" = x \
25591       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25592       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25593     new_path=`$CYGPATH -u "$path"`
25594   fi
25595   if test "x$new_path" = x; then
25596     # Oops. Which didn't find the executable.
25597     # The splitting of arguments from the executable at a space might have been incorrect,
25598     # since paths with space are more likely in Windows. Give it another try with the whole
25599     # argument.
25600     path="$complete"
25601     arguments="EOL"
25602     new_path=`$CYGPATH -u "$path"`
25603     new_path=`$WHICH "$new_path" 2> /dev/null`
25604     # bat and cmd files are not always considered executable in cygwin causing which
25605     # to not find them
25606     if test "x$new_path" = x \
25607         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25608         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25609       new_path=`$CYGPATH -u "$path"`
25610     fi
25611     if test "x$new_path" = x; then
25612       # It's still not found. Now this is an unrecoverable error.
25613       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25614 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25615       has_space=`$ECHO "$complete" | $GREP " "`
25616       if test "x$has_space" != x; then
25617         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25618 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25619       fi
25620       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25621     fi
25622   fi
25623 
25624   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25625   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25626   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25627   # "foo.exe" is OK but "foo" is an error.
25628   #
25629   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25630   # It is also a way to make sure we got the proper file name for the real test later on.
25631   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25632   if test "x$test_shortpath" = x; then
25633     # Short path failed, file does not exist as specified.
25634     # Try adding .exe or .cmd
25635     if test -f "${new_path}.exe"; then
25636       input_to_shortpath="${new_path}.exe"
25637     elif test -f "${new_path}.cmd"; then
25638       input_to_shortpath="${new_path}.cmd"
25639     else
25640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25641 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25642       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25643 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25644       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25645     fi
25646   else
25647     input_to_shortpath="$new_path"
25648   fi
25649 
25650   # Call helper function which possibly converts this using DOS-style short mode.
25651   # If so, the updated path is stored in $new_path.
25652   new_path="$input_to_shortpath"
25653 
25654   input_path="$input_to_shortpath"
25655   # Check if we need to convert this using DOS-style short mode. If the path
25656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25657   # take no chances and rewrite it.
25658   # Note: m4 eats our [], so we need to use [ and ] instead.
25659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25660   if test "x$has_forbidden_chars" != x; then
25661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25665       # Going to short mode and back again did indeed matter. Since short mode is
25666       # case insensitive, let's make it lowercase to improve readability.
25667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668       # Now convert it back to Unix-stile (cygpath)
25669       input_path=`$CYGPATH -u "$shortmode_path"`
25670       new_path="$input_path"
25671     fi
25672   fi
25673 
25674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25675   if test "x$test_cygdrive_prefix" = x; then
25676     # As a simple fix, exclude /usr/bin since it's not a real path.
25677     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25679       # a path prefixed by /cygdrive for fixpath to work.
25680       new_path="$CYGWIN_ROOT_PATH$input_path"
25681     fi
25682   fi
25683 
25684   # remove trailing .exe if any
25685   new_path="${new_path/%.exe/}"
25686 
25687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25688 
25689   # First separate the path from the arguments. This will split at the first
25690   # space.
25691   complete="$AS"
25692   path="${complete%% *}"
25693   tmp="$complete EOL"
25694   arguments="${tmp#* }"
25695 
25696   # Input might be given as Windows format, start by converting to
25697   # unix format.
25698   new_path="$path"
25699 
25700   windows_path="$new_path"
25701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25702     unix_path=`$CYGPATH -u "$windows_path"`
25703     new_path="$unix_path"
25704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25706     new_path="$unix_path"
25707   fi
25708 
25709 
25710   # Now try to locate executable using which
25711   new_path=`$WHICH "$new_path" 2> /dev/null`
25712 
25713   if test "x$new_path" = x; then
25714     # Oops. Which didn't find the executable.
25715     # The splitting of arguments from the executable at a space might have been incorrect,
25716     # since paths with space are more likely in Windows. Give it another try with the whole
25717     # argument.
25718     path="$complete"
25719     arguments="EOL"
25720     new_path="$path"
25721 
25722   windows_path="$new_path"
25723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25724     unix_path=`$CYGPATH -u "$windows_path"`
25725     new_path="$unix_path"
25726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25728     new_path="$unix_path"
25729   fi
25730 
25731 
25732     new_path=`$WHICH "$new_path" 2> /dev/null`
25733 
25734     if test "x$new_path" = x; then
25735       # It's still not found. Now this is an unrecoverable error.
25736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25737 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25738       has_space=`$ECHO "$complete" | $GREP " "`
25739       if test "x$has_space" != x; then
25740         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25741 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25742       fi
25743       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25744     fi
25745   fi
25746 
25747   # Now new_path has a complete unix path to the binary
25748   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25749     # Keep paths in /bin as-is, but remove trailing .exe if any
25750     new_path="${new_path/%.exe/}"
25751     # Do not save /bin paths to all_fixpath_prefixes!
25752   else
25753     # Not in mixed or Windows style, start by that.
25754     new_path=`cmd //c echo $new_path`
25755 
25756   input_path="$new_path"
25757   # Check if we need to convert this using DOS-style short mode. If the path
25758   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25759   # take no chances and rewrite it.
25760   # Note: m4 eats our [], so we need to use [ and ] instead.
25761   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25762   if test "x$has_forbidden_chars" != x; then
25763     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25764     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25765   fi
25766 
25767     # Output is in $new_path
25768 
25769   windows_path="$new_path"
25770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25771     unix_path=`$CYGPATH -u "$windows_path"`
25772     new_path="$unix_path"
25773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25775     new_path="$unix_path"
25776   fi
25777 
25778     # remove trailing .exe if any
25779     new_path="${new_path/%.exe/}"
25780 
25781     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25782     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25783   fi
25784 
25785   else
25786     # We're on a posix platform. Hooray! :)
25787     # First separate the path from the arguments. This will split at the first
25788     # space.
25789     complete="$AS"
25790     path="${complete%% *}"
25791     tmp="$complete EOL"
25792     arguments="${tmp#* }"
25793 
25794     # Cannot rely on the command "which" here since it doesn't always work.
25795     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25796     if test -z "$is_absolute_path"; then
25797       # Path to executable is not absolute. Find it.
25798       IFS_save="$IFS"
25799       IFS=:
25800       for p in $PATH; do
25801         if test -f "$p/$path" && test -x "$p/$path"; then
25802           new_path="$p/$path"
25803           break
25804         fi
25805       done
25806       IFS="$IFS_save"
25807     else
25808       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25809 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25810       new_path="$path"
25811     fi
25812 
25813     if test "x$new_path" = x; then
25814       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25815 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25816       has_space=`$ECHO "$complete" | $GREP " "`
25817       if test "x$has_space" != x; then
25818         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25819 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25820       fi
25821       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25822     fi
25823   fi
25824 
25825   # Now join together the path and the arguments once again
25826   if test "x$arguments" != xEOL; then
25827     new_complete="$new_path ${arguments% *}"
25828   else
25829     new_complete="$new_path"
25830   fi
25831 
25832   if test "x$complete" != "x$new_complete"; then
25833     AS="$new_complete"
25834     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25835 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25836   fi
25837 
25838   else
25839     AS="$CC -c"
25840   fi
25841 
25842 
25843   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25844     # Extract the first word of "nm", so it can be a program name with args.
25845 set dummy nm; ac_word=$2
25846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25847 $as_echo_n "checking for $ac_word... " >&6; }
25848 if ${ac_cv_path_NM+:} false; then :
25849   $as_echo_n "(cached) " >&6
25850 else
25851   case $NM in
25852   [\\/]* | ?:[\\/]*)
25853   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25854   ;;
25855   *)
25856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25857 for as_dir in $PATH
25858 do
25859   IFS=$as_save_IFS
25860   test -z "$as_dir" && as_dir=.
25861     for ac_exec_ext in '' $ac_executable_extensions; do
25862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25863     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25865     break 2
25866   fi
25867 done
25868   done
25869 IFS=$as_save_IFS
25870 
25871   ;;
25872 esac
25873 fi
25874 NM=$ac_cv_path_NM
25875 if test -n "$NM"; then
25876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25877 $as_echo "$NM" >&6; }
25878 else
25879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25880 $as_echo "no" >&6; }
25881 fi
25882 
25883 
25884 
25885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25886 
25887   # First separate the path from the arguments. This will split at the first
25888   # space.
25889   complete="$NM"
25890   path="${complete%% *}"
25891   tmp="$complete EOL"
25892   arguments="${tmp#* }"
25893 
25894   # Input might be given as Windows format, start by converting to
25895   # unix format.
25896   new_path=`$CYGPATH -u "$path"`
25897 
25898   # Now try to locate executable using which
25899   new_path=`$WHICH "$new_path" 2> /dev/null`
25900   # bat and cmd files are not always considered executable in cygwin causing which
25901   # to not find them
25902   if test "x$new_path" = x \
25903       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25904       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25905     new_path=`$CYGPATH -u "$path"`
25906   fi
25907   if test "x$new_path" = x; then
25908     # Oops. Which didn't find the executable.
25909     # The splitting of arguments from the executable at a space might have been incorrect,
25910     # since paths with space are more likely in Windows. Give it another try with the whole
25911     # argument.
25912     path="$complete"
25913     arguments="EOL"
25914     new_path=`$CYGPATH -u "$path"`
25915     new_path=`$WHICH "$new_path" 2> /dev/null`
25916     # bat and cmd files are not always considered executable in cygwin causing which
25917     # to not find them
25918     if test "x$new_path" = x \
25919         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25920         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25921       new_path=`$CYGPATH -u "$path"`
25922     fi
25923     if test "x$new_path" = x; then
25924       # It's still not found. Now this is an unrecoverable error.
25925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25926 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25927       has_space=`$ECHO "$complete" | $GREP " "`
25928       if test "x$has_space" != x; then
25929         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25930 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25931       fi
25932       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25933     fi
25934   fi
25935 
25936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25939   # "foo.exe" is OK but "foo" is an error.
25940   #
25941   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25942   # It is also a way to make sure we got the proper file name for the real test later on.
25943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25944   if test "x$test_shortpath" = x; then
25945     # Short path failed, file does not exist as specified.
25946     # Try adding .exe or .cmd
25947     if test -f "${new_path}.exe"; then
25948       input_to_shortpath="${new_path}.exe"
25949     elif test -f "${new_path}.cmd"; then
25950       input_to_shortpath="${new_path}.cmd"
25951     else
25952       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25953 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25954       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25955 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25956       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25957     fi
25958   else
25959     input_to_shortpath="$new_path"
25960   fi
25961 
25962   # Call helper function which possibly converts this using DOS-style short mode.
25963   # If so, the updated path is stored in $new_path.
25964   new_path="$input_to_shortpath"
25965 
25966   input_path="$input_to_shortpath"
25967   # Check if we need to convert this using DOS-style short mode. If the path
25968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25969   # take no chances and rewrite it.
25970   # Note: m4 eats our [], so we need to use [ and ] instead.
25971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25972   if test "x$has_forbidden_chars" != x; then
25973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25974     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25975     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25976     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25977       # Going to short mode and back again did indeed matter. Since short mode is
25978       # case insensitive, let's make it lowercase to improve readability.
25979       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25980       # Now convert it back to Unix-stile (cygpath)
25981       input_path=`$CYGPATH -u "$shortmode_path"`
25982       new_path="$input_path"
25983     fi
25984   fi
25985 
25986   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25987   if test "x$test_cygdrive_prefix" = x; then
25988     # As a simple fix, exclude /usr/bin since it's not a real path.
25989     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25990       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25991       # a path prefixed by /cygdrive for fixpath to work.
25992       new_path="$CYGWIN_ROOT_PATH$input_path"
25993     fi
25994   fi
25995 
25996   # remove trailing .exe if any
25997   new_path="${new_path/%.exe/}"
25998 
25999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26000 
26001   # First separate the path from the arguments. This will split at the first
26002   # space.
26003   complete="$NM"
26004   path="${complete%% *}"
26005   tmp="$complete EOL"
26006   arguments="${tmp#* }"
26007 
26008   # Input might be given as Windows format, start by converting to
26009   # unix format.
26010   new_path="$path"
26011 
26012   windows_path="$new_path"
26013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26014     unix_path=`$CYGPATH -u "$windows_path"`
26015     new_path="$unix_path"
26016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26018     new_path="$unix_path"
26019   fi
26020 
26021 
26022   # Now try to locate executable using which
26023   new_path=`$WHICH "$new_path" 2> /dev/null`
26024 
26025   if test "x$new_path" = x; then
26026     # Oops. Which didn't find the executable.
26027     # The splitting of arguments from the executable at a space might have been incorrect,
26028     # since paths with space are more likely in Windows. Give it another try with the whole
26029     # argument.
26030     path="$complete"
26031     arguments="EOL"
26032     new_path="$path"
26033 
26034   windows_path="$new_path"
26035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26036     unix_path=`$CYGPATH -u "$windows_path"`
26037     new_path="$unix_path"
26038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26040     new_path="$unix_path"
26041   fi
26042 
26043 
26044     new_path=`$WHICH "$new_path" 2> /dev/null`
26045 
26046     if test "x$new_path" = x; then
26047       # It's still not found. Now this is an unrecoverable error.
26048       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26049 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26050       has_space=`$ECHO "$complete" | $GREP " "`
26051       if test "x$has_space" != x; then
26052         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26053 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26054       fi
26055       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26056     fi
26057   fi
26058 
26059   # Now new_path has a complete unix path to the binary
26060   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26061     # Keep paths in /bin as-is, but remove trailing .exe if any
26062     new_path="${new_path/%.exe/}"
26063     # Do not save /bin paths to all_fixpath_prefixes!
26064   else
26065     # Not in mixed or Windows style, start by that.
26066     new_path=`cmd //c echo $new_path`
26067 
26068   input_path="$new_path"
26069   # Check if we need to convert this using DOS-style short mode. If the path
26070   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26071   # take no chances and rewrite it.
26072   # Note: m4 eats our [], so we need to use [ and ] instead.
26073   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26074   if test "x$has_forbidden_chars" != x; then
26075     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26076     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26077   fi
26078 
26079     # Output is in $new_path
26080 
26081   windows_path="$new_path"
26082   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26083     unix_path=`$CYGPATH -u "$windows_path"`
26084     new_path="$unix_path"
26085   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26086     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26087     new_path="$unix_path"
26088   fi
26089 
26090     # remove trailing .exe if any
26091     new_path="${new_path/%.exe/}"
26092 
26093     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26094     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26095   fi
26096 
26097   else
26098     # We're on a posix platform. Hooray! :)
26099     # First separate the path from the arguments. This will split at the first
26100     # space.
26101     complete="$NM"
26102     path="${complete%% *}"
26103     tmp="$complete EOL"
26104     arguments="${tmp#* }"
26105 
26106     # Cannot rely on the command "which" here since it doesn't always work.
26107     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26108     if test -z "$is_absolute_path"; then
26109       # Path to executable is not absolute. Find it.
26110       IFS_save="$IFS"
26111       IFS=:
26112       for p in $PATH; do
26113         if test -f "$p/$path" && test -x "$p/$path"; then
26114           new_path="$p/$path"
26115           break
26116         fi
26117       done
26118       IFS="$IFS_save"
26119     else
26120       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26121 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26122       new_path="$path"
26123     fi
26124 
26125     if test "x$new_path" = x; then
26126       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26127 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26128       has_space=`$ECHO "$complete" | $GREP " "`
26129       if test "x$has_space" != x; then
26130         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26131 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26132       fi
26133       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26134     fi
26135   fi
26136 
26137   # Now join together the path and the arguments once again
26138   if test "x$arguments" != xEOL; then
26139     new_complete="$new_path ${arguments% *}"
26140   else
26141     new_complete="$new_path"
26142   fi
26143 
26144   if test "x$complete" != "x$new_complete"; then
26145     NM="$new_complete"
26146     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26147 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26148   fi
26149 
26150     # Extract the first word of "gnm", so it can be a program name with args.
26151 set dummy gnm; ac_word=$2
26152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26153 $as_echo_n "checking for $ac_word... " >&6; }
26154 if ${ac_cv_path_GNM+:} false; then :
26155   $as_echo_n "(cached) " >&6
26156 else
26157   case $GNM in
26158   [\\/]* | ?:[\\/]*)
26159   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26160   ;;
26161   *)
26162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26163 for as_dir in $PATH
26164 do
26165   IFS=$as_save_IFS
26166   test -z "$as_dir" && as_dir=.
26167     for ac_exec_ext in '' $ac_executable_extensions; do
26168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26169     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26171     break 2
26172   fi
26173 done
26174   done
26175 IFS=$as_save_IFS
26176 
26177   ;;
26178 esac
26179 fi
26180 GNM=$ac_cv_path_GNM
26181 if test -n "$GNM"; then
26182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26183 $as_echo "$GNM" >&6; }
26184 else
26185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26186 $as_echo "no" >&6; }
26187 fi
26188 
26189 
26190 
26191   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26192 
26193   # First separate the path from the arguments. This will split at the first
26194   # space.
26195   complete="$GNM"
26196   path="${complete%% *}"
26197   tmp="$complete EOL"
26198   arguments="${tmp#* }"
26199 
26200   # Input might be given as Windows format, start by converting to
26201   # unix format.
26202   new_path=`$CYGPATH -u "$path"`
26203 
26204   # Now try to locate executable using which
26205   new_path=`$WHICH "$new_path" 2> /dev/null`
26206   # bat and cmd files are not always considered executable in cygwin causing which
26207   # to not find them
26208   if test "x$new_path" = x \
26209       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26210       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26211     new_path=`$CYGPATH -u "$path"`
26212   fi
26213   if test "x$new_path" = x; then
26214     # Oops. Which didn't find the executable.
26215     # The splitting of arguments from the executable at a space might have been incorrect,
26216     # since paths with space are more likely in Windows. Give it another try with the whole
26217     # argument.
26218     path="$complete"
26219     arguments="EOL"
26220     new_path=`$CYGPATH -u "$path"`
26221     new_path=`$WHICH "$new_path" 2> /dev/null`
26222     # bat and cmd files are not always considered executable in cygwin causing which
26223     # to not find them
26224     if test "x$new_path" = x \
26225         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26226         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26227       new_path=`$CYGPATH -u "$path"`
26228     fi
26229     if test "x$new_path" = x; then
26230       # It's still not found. Now this is an unrecoverable error.
26231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26232 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26233       has_space=`$ECHO "$complete" | $GREP " "`
26234       if test "x$has_space" != x; then
26235         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26236 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26237       fi
26238       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26239     fi
26240   fi
26241 
26242   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26243   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26244   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26245   # "foo.exe" is OK but "foo" is an error.
26246   #
26247   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26248   # It is also a way to make sure we got the proper file name for the real test later on.
26249   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26250   if test "x$test_shortpath" = x; then
26251     # Short path failed, file does not exist as specified.
26252     # Try adding .exe or .cmd
26253     if test -f "${new_path}.exe"; then
26254       input_to_shortpath="${new_path}.exe"
26255     elif test -f "${new_path}.cmd"; then
26256       input_to_shortpath="${new_path}.cmd"
26257     else
26258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26259 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26260       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26261 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26262       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26263     fi
26264   else
26265     input_to_shortpath="$new_path"
26266   fi
26267 
26268   # Call helper function which possibly converts this using DOS-style short mode.
26269   # If so, the updated path is stored in $new_path.
26270   new_path="$input_to_shortpath"
26271 
26272   input_path="$input_to_shortpath"
26273   # Check if we need to convert this using DOS-style short mode. If the path
26274   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26275   # take no chances and rewrite it.
26276   # Note: m4 eats our [], so we need to use [ and ] instead.
26277   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26278   if test "x$has_forbidden_chars" != x; then
26279     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26280     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26281     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26282     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26283       # Going to short mode and back again did indeed matter. Since short mode is
26284       # case insensitive, let's make it lowercase to improve readability.
26285       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26286       # Now convert it back to Unix-stile (cygpath)
26287       input_path=`$CYGPATH -u "$shortmode_path"`
26288       new_path="$input_path"
26289     fi
26290   fi
26291 
26292   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26293   if test "x$test_cygdrive_prefix" = x; then
26294     # As a simple fix, exclude /usr/bin since it's not a real path.
26295     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26296       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26297       # a path prefixed by /cygdrive for fixpath to work.
26298       new_path="$CYGWIN_ROOT_PATH$input_path"
26299     fi
26300   fi
26301 
26302   # remove trailing .exe if any
26303   new_path="${new_path/%.exe/}"
26304 
26305   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26306 
26307   # First separate the path from the arguments. This will split at the first
26308   # space.
26309   complete="$GNM"
26310   path="${complete%% *}"
26311   tmp="$complete EOL"
26312   arguments="${tmp#* }"
26313 
26314   # Input might be given as Windows format, start by converting to
26315   # unix format.
26316   new_path="$path"
26317 
26318   windows_path="$new_path"
26319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26320     unix_path=`$CYGPATH -u "$windows_path"`
26321     new_path="$unix_path"
26322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26324     new_path="$unix_path"
26325   fi
26326 
26327 
26328   # Now try to locate executable using which
26329   new_path=`$WHICH "$new_path" 2> /dev/null`
26330 
26331   if test "x$new_path" = x; then
26332     # Oops. Which didn't find the executable.
26333     # The splitting of arguments from the executable at a space might have been incorrect,
26334     # since paths with space are more likely in Windows. Give it another try with the whole
26335     # argument.
26336     path="$complete"
26337     arguments="EOL"
26338     new_path="$path"
26339 
26340   windows_path="$new_path"
26341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26342     unix_path=`$CYGPATH -u "$windows_path"`
26343     new_path="$unix_path"
26344   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26345     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26346     new_path="$unix_path"
26347   fi
26348 
26349 
26350     new_path=`$WHICH "$new_path" 2> /dev/null`
26351 
26352     if test "x$new_path" = x; then
26353       # It's still not found. Now this is an unrecoverable error.
26354       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26355 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26356       has_space=`$ECHO "$complete" | $GREP " "`
26357       if test "x$has_space" != x; then
26358         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26359 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26360       fi
26361       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26362     fi
26363   fi
26364 
26365   # Now new_path has a complete unix path to the binary
26366   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26367     # Keep paths in /bin as-is, but remove trailing .exe if any
26368     new_path="${new_path/%.exe/}"
26369     # Do not save /bin paths to all_fixpath_prefixes!
26370   else
26371     # Not in mixed or Windows style, start by that.
26372     new_path=`cmd //c echo $new_path`
26373 
26374   input_path="$new_path"
26375   # Check if we need to convert this using DOS-style short mode. If the path
26376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26377   # take no chances and rewrite it.
26378   # Note: m4 eats our [], so we need to use [ and ] instead.
26379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26380   if test "x$has_forbidden_chars" != x; then
26381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26382     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26383   fi
26384 
26385     # Output is in $new_path
26386 
26387   windows_path="$new_path"
26388   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26389     unix_path=`$CYGPATH -u "$windows_path"`
26390     new_path="$unix_path"
26391   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26392     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26393     new_path="$unix_path"
26394   fi
26395 
26396     # remove trailing .exe if any
26397     new_path="${new_path/%.exe/}"
26398 
26399     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26400     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26401   fi
26402 
26403   else
26404     # We're on a posix platform. Hooray! :)
26405     # First separate the path from the arguments. This will split at the first
26406     # space.
26407     complete="$GNM"
26408     path="${complete%% *}"
26409     tmp="$complete EOL"
26410     arguments="${tmp#* }"
26411 
26412     # Cannot rely on the command "which" here since it doesn't always work.
26413     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26414     if test -z "$is_absolute_path"; then
26415       # Path to executable is not absolute. Find it.
26416       IFS_save="$IFS"
26417       IFS=:
26418       for p in $PATH; do
26419         if test -f "$p/$path" && test -x "$p/$path"; then
26420           new_path="$p/$path"
26421           break
26422         fi
26423       done
26424       IFS="$IFS_save"
26425     else
26426       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26427 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26428       new_path="$path"
26429     fi
26430 
26431     if test "x$new_path" = x; then
26432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26433 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26434       has_space=`$ECHO "$complete" | $GREP " "`
26435       if test "x$has_space" != x; then
26436         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26437 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26438       fi
26439       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26440     fi
26441   fi
26442 
26443   # Now join together the path and the arguments once again
26444   if test "x$arguments" != xEOL; then
26445     new_complete="$new_path ${arguments% *}"
26446   else
26447     new_complete="$new_path"
26448   fi
26449 
26450   if test "x$complete" != "x$new_complete"; then
26451     GNM="$new_complete"
26452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26453 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26454   fi
26455 
26456     # Extract the first word of "strip", so it can be a program name with args.
26457 set dummy strip; ac_word=$2
26458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26459 $as_echo_n "checking for $ac_word... " >&6; }
26460 if ${ac_cv_path_STRIP+:} false; then :
26461   $as_echo_n "(cached) " >&6
26462 else
26463   case $STRIP in
26464   [\\/]* | ?:[\\/]*)
26465   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26466   ;;
26467   *)
26468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26469 for as_dir in $PATH
26470 do
26471   IFS=$as_save_IFS
26472   test -z "$as_dir" && as_dir=.
26473     for ac_exec_ext in '' $ac_executable_extensions; do
26474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26475     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26477     break 2
26478   fi
26479 done
26480   done
26481 IFS=$as_save_IFS
26482 
26483   ;;
26484 esac
26485 fi
26486 STRIP=$ac_cv_path_STRIP
26487 if test -n "$STRIP"; then
26488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26489 $as_echo "$STRIP" >&6; }
26490 else
26491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26492 $as_echo "no" >&6; }
26493 fi
26494 
26495 
26496 
26497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26498 
26499   # First separate the path from the arguments. This will split at the first
26500   # space.
26501   complete="$STRIP"
26502   path="${complete%% *}"
26503   tmp="$complete EOL"
26504   arguments="${tmp#* }"
26505 
26506   # Input might be given as Windows format, start by converting to
26507   # unix format.
26508   new_path=`$CYGPATH -u "$path"`
26509 
26510   # Now try to locate executable using which
26511   new_path=`$WHICH "$new_path" 2> /dev/null`
26512   # bat and cmd files are not always considered executable in cygwin causing which
26513   # to not find them
26514   if test "x$new_path" = x \
26515       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26516       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26517     new_path=`$CYGPATH -u "$path"`
26518   fi
26519   if test "x$new_path" = x; then
26520     # Oops. Which didn't find the executable.
26521     # The splitting of arguments from the executable at a space might have been incorrect,
26522     # since paths with space are more likely in Windows. Give it another try with the whole
26523     # argument.
26524     path="$complete"
26525     arguments="EOL"
26526     new_path=`$CYGPATH -u "$path"`
26527     new_path=`$WHICH "$new_path" 2> /dev/null`
26528     # bat and cmd files are not always considered executable in cygwin causing which
26529     # to not find them
26530     if test "x$new_path" = x \
26531         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26532         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26533       new_path=`$CYGPATH -u "$path"`
26534     fi
26535     if test "x$new_path" = x; then
26536       # It's still not found. Now this is an unrecoverable error.
26537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26538 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26539       has_space=`$ECHO "$complete" | $GREP " "`
26540       if test "x$has_space" != x; then
26541         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26542 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26543       fi
26544       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26545     fi
26546   fi
26547 
26548   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26549   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26550   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26551   # "foo.exe" is OK but "foo" is an error.
26552   #
26553   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26554   # It is also a way to make sure we got the proper file name for the real test later on.
26555   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26556   if test "x$test_shortpath" = x; then
26557     # Short path failed, file does not exist as specified.
26558     # Try adding .exe or .cmd
26559     if test -f "${new_path}.exe"; then
26560       input_to_shortpath="${new_path}.exe"
26561     elif test -f "${new_path}.cmd"; then
26562       input_to_shortpath="${new_path}.cmd"
26563     else
26564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26565 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26566       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26567 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26568       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26569     fi
26570   else
26571     input_to_shortpath="$new_path"
26572   fi
26573 
26574   # Call helper function which possibly converts this using DOS-style short mode.
26575   # If so, the updated path is stored in $new_path.
26576   new_path="$input_to_shortpath"
26577 
26578   input_path="$input_to_shortpath"
26579   # Check if we need to convert this using DOS-style short mode. If the path
26580   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26581   # take no chances and rewrite it.
26582   # Note: m4 eats our [], so we need to use [ and ] instead.
26583   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26584   if test "x$has_forbidden_chars" != x; then
26585     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26586     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26587     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26588     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26589       # Going to short mode and back again did indeed matter. Since short mode is
26590       # case insensitive, let's make it lowercase to improve readability.
26591       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26592       # Now convert it back to Unix-stile (cygpath)
26593       input_path=`$CYGPATH -u "$shortmode_path"`
26594       new_path="$input_path"
26595     fi
26596   fi
26597 
26598   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26599   if test "x$test_cygdrive_prefix" = x; then
26600     # As a simple fix, exclude /usr/bin since it's not a real path.
26601     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26602       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26603       # a path prefixed by /cygdrive for fixpath to work.
26604       new_path="$CYGWIN_ROOT_PATH$input_path"
26605     fi
26606   fi
26607 
26608   # remove trailing .exe if any
26609   new_path="${new_path/%.exe/}"
26610 
26611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26612 
26613   # First separate the path from the arguments. This will split at the first
26614   # space.
26615   complete="$STRIP"
26616   path="${complete%% *}"
26617   tmp="$complete EOL"
26618   arguments="${tmp#* }"
26619 
26620   # Input might be given as Windows format, start by converting to
26621   # unix format.
26622   new_path="$path"
26623 
26624   windows_path="$new_path"
26625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26626     unix_path=`$CYGPATH -u "$windows_path"`
26627     new_path="$unix_path"
26628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26630     new_path="$unix_path"
26631   fi
26632 
26633 
26634   # Now try to locate executable using which
26635   new_path=`$WHICH "$new_path" 2> /dev/null`
26636 
26637   if test "x$new_path" = x; then
26638     # Oops. Which didn't find the executable.
26639     # The splitting of arguments from the executable at a space might have been incorrect,
26640     # since paths with space are more likely in Windows. Give it another try with the whole
26641     # argument.
26642     path="$complete"
26643     arguments="EOL"
26644     new_path="$path"
26645 
26646   windows_path="$new_path"
26647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26648     unix_path=`$CYGPATH -u "$windows_path"`
26649     new_path="$unix_path"
26650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26652     new_path="$unix_path"
26653   fi
26654 
26655 
26656     new_path=`$WHICH "$new_path" 2> /dev/null`
26657 
26658     if test "x$new_path" = x; then
26659       # It's still not found. Now this is an unrecoverable error.
26660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26661 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26662       has_space=`$ECHO "$complete" | $GREP " "`
26663       if test "x$has_space" != x; then
26664         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26665 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26666       fi
26667       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26668     fi
26669   fi
26670 
26671   # Now new_path has a complete unix path to the binary
26672   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26673     # Keep paths in /bin as-is, but remove trailing .exe if any
26674     new_path="${new_path/%.exe/}"
26675     # Do not save /bin paths to all_fixpath_prefixes!
26676   else
26677     # Not in mixed or Windows style, start by that.
26678     new_path=`cmd //c echo $new_path`
26679 
26680   input_path="$new_path"
26681   # Check if we need to convert this using DOS-style short mode. If the path
26682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26683   # take no chances and rewrite it.
26684   # Note: m4 eats our [], so we need to use [ and ] instead.
26685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26686   if test "x$has_forbidden_chars" != x; then
26687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26689   fi
26690 
26691     # Output is in $new_path
26692 
26693   windows_path="$new_path"
26694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26695     unix_path=`$CYGPATH -u "$windows_path"`
26696     new_path="$unix_path"
26697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26699     new_path="$unix_path"
26700   fi
26701 
26702     # remove trailing .exe if any
26703     new_path="${new_path/%.exe/}"
26704 
26705     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26706     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26707   fi
26708 
26709   else
26710     # We're on a posix platform. Hooray! :)
26711     # First separate the path from the arguments. This will split at the first
26712     # space.
26713     complete="$STRIP"
26714     path="${complete%% *}"
26715     tmp="$complete EOL"
26716     arguments="${tmp#* }"
26717 
26718     # Cannot rely on the command "which" here since it doesn't always work.
26719     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26720     if test -z "$is_absolute_path"; then
26721       # Path to executable is not absolute. Find it.
26722       IFS_save="$IFS"
26723       IFS=:
26724       for p in $PATH; do
26725         if test -f "$p/$path" && test -x "$p/$path"; then
26726           new_path="$p/$path"
26727           break
26728         fi
26729       done
26730       IFS="$IFS_save"
26731     else
26732       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26733 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26734       new_path="$path"
26735     fi
26736 
26737     if test "x$new_path" = x; then
26738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26739 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26740       has_space=`$ECHO "$complete" | $GREP " "`
26741       if test "x$has_space" != x; then
26742         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26743 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26744       fi
26745       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26746     fi
26747   fi
26748 
26749   # Now join together the path and the arguments once again
26750   if test "x$arguments" != xEOL; then
26751     new_complete="$new_path ${arguments% *}"
26752   else
26753     new_complete="$new_path"
26754   fi
26755 
26756   if test "x$complete" != "x$new_complete"; then
26757     STRIP="$new_complete"
26758     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26759 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26760   fi
26761 
26762     # Extract the first word of "mcs", so it can be a program name with args.
26763 set dummy mcs; ac_word=$2
26764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26765 $as_echo_n "checking for $ac_word... " >&6; }
26766 if ${ac_cv_path_MCS+:} false; then :
26767   $as_echo_n "(cached) " >&6
26768 else
26769   case $MCS in
26770   [\\/]* | ?:[\\/]*)
26771   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26772   ;;
26773   *)
26774   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26775 for as_dir in $PATH
26776 do
26777   IFS=$as_save_IFS
26778   test -z "$as_dir" && as_dir=.
26779     for ac_exec_ext in '' $ac_executable_extensions; do
26780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26781     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26782     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26783     break 2
26784   fi
26785 done
26786   done
26787 IFS=$as_save_IFS
26788 
26789   ;;
26790 esac
26791 fi
26792 MCS=$ac_cv_path_MCS
26793 if test -n "$MCS"; then
26794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26795 $as_echo "$MCS" >&6; }
26796 else
26797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26798 $as_echo "no" >&6; }
26799 fi
26800 
26801 
26802 
26803   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26804 
26805   # First separate the path from the arguments. This will split at the first
26806   # space.
26807   complete="$MCS"
26808   path="${complete%% *}"
26809   tmp="$complete EOL"
26810   arguments="${tmp#* }"
26811 
26812   # Input might be given as Windows format, start by converting to
26813   # unix format.
26814   new_path=`$CYGPATH -u "$path"`
26815 
26816   # Now try to locate executable using which
26817   new_path=`$WHICH "$new_path" 2> /dev/null`
26818   # bat and cmd files are not always considered executable in cygwin causing which
26819   # to not find them
26820   if test "x$new_path" = x \
26821       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26822       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26823     new_path=`$CYGPATH -u "$path"`
26824   fi
26825   if test "x$new_path" = x; then
26826     # Oops. Which didn't find the executable.
26827     # The splitting of arguments from the executable at a space might have been incorrect,
26828     # since paths with space are more likely in Windows. Give it another try with the whole
26829     # argument.
26830     path="$complete"
26831     arguments="EOL"
26832     new_path=`$CYGPATH -u "$path"`
26833     new_path=`$WHICH "$new_path" 2> /dev/null`
26834     # bat and cmd files are not always considered executable in cygwin causing which
26835     # to not find them
26836     if test "x$new_path" = x \
26837         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26838         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26839       new_path=`$CYGPATH -u "$path"`
26840     fi
26841     if test "x$new_path" = x; then
26842       # It's still not found. Now this is an unrecoverable error.
26843       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26844 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26845       has_space=`$ECHO "$complete" | $GREP " "`
26846       if test "x$has_space" != x; then
26847         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26848 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26849       fi
26850       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26851     fi
26852   fi
26853 
26854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26857   # "foo.exe" is OK but "foo" is an error.
26858   #
26859   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26860   # It is also a way to make sure we got the proper file name for the real test later on.
26861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26862   if test "x$test_shortpath" = x; then
26863     # Short path failed, file does not exist as specified.
26864     # Try adding .exe or .cmd
26865     if test -f "${new_path}.exe"; then
26866       input_to_shortpath="${new_path}.exe"
26867     elif test -f "${new_path}.cmd"; then
26868       input_to_shortpath="${new_path}.cmd"
26869     else
26870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26871 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26872       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26873 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26874       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26875     fi
26876   else
26877     input_to_shortpath="$new_path"
26878   fi
26879 
26880   # Call helper function which possibly converts this using DOS-style short mode.
26881   # If so, the updated path is stored in $new_path.
26882   new_path="$input_to_shortpath"
26883 
26884   input_path="$input_to_shortpath"
26885   # Check if we need to convert this using DOS-style short mode. If the path
26886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26887   # take no chances and rewrite it.
26888   # Note: m4 eats our [], so we need to use [ and ] instead.
26889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26890   if test "x$has_forbidden_chars" != x; then
26891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26892     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26893     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26894     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26895       # Going to short mode and back again did indeed matter. Since short mode is
26896       # case insensitive, let's make it lowercase to improve readability.
26897       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26898       # Now convert it back to Unix-stile (cygpath)
26899       input_path=`$CYGPATH -u "$shortmode_path"`
26900       new_path="$input_path"
26901     fi
26902   fi
26903 
26904   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26905   if test "x$test_cygdrive_prefix" = x; then
26906     # As a simple fix, exclude /usr/bin since it's not a real path.
26907     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26908       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26909       # a path prefixed by /cygdrive for fixpath to work.
26910       new_path="$CYGWIN_ROOT_PATH$input_path"
26911     fi
26912   fi
26913 
26914   # remove trailing .exe if any
26915   new_path="${new_path/%.exe/}"
26916 
26917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26918 
26919   # First separate the path from the arguments. This will split at the first
26920   # space.
26921   complete="$MCS"
26922   path="${complete%% *}"
26923   tmp="$complete EOL"
26924   arguments="${tmp#* }"
26925 
26926   # Input might be given as Windows format, start by converting to
26927   # unix format.
26928   new_path="$path"
26929 
26930   windows_path="$new_path"
26931   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26932     unix_path=`$CYGPATH -u "$windows_path"`
26933     new_path="$unix_path"
26934   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26935     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26936     new_path="$unix_path"
26937   fi
26938 
26939 
26940   # Now try to locate executable using which
26941   new_path=`$WHICH "$new_path" 2> /dev/null`
26942 
26943   if test "x$new_path" = x; then
26944     # Oops. Which didn't find the executable.
26945     # The splitting of arguments from the executable at a space might have been incorrect,
26946     # since paths with space are more likely in Windows. Give it another try with the whole
26947     # argument.
26948     path="$complete"
26949     arguments="EOL"
26950     new_path="$path"
26951 
26952   windows_path="$new_path"
26953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26954     unix_path=`$CYGPATH -u "$windows_path"`
26955     new_path="$unix_path"
26956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26958     new_path="$unix_path"
26959   fi
26960 
26961 
26962     new_path=`$WHICH "$new_path" 2> /dev/null`
26963 
26964     if test "x$new_path" = x; then
26965       # It's still not found. Now this is an unrecoverable error.
26966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26967 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26968       has_space=`$ECHO "$complete" | $GREP " "`
26969       if test "x$has_space" != x; then
26970         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26971 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26972       fi
26973       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26974     fi
26975   fi
26976 
26977   # Now new_path has a complete unix path to the binary
26978   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26979     # Keep paths in /bin as-is, but remove trailing .exe if any
26980     new_path="${new_path/%.exe/}"
26981     # Do not save /bin paths to all_fixpath_prefixes!
26982   else
26983     # Not in mixed or Windows style, start by that.
26984     new_path=`cmd //c echo $new_path`
26985 
26986   input_path="$new_path"
26987   # Check if we need to convert this using DOS-style short mode. If the path
26988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26989   # take no chances and rewrite it.
26990   # Note: m4 eats our [], so we need to use [ and ] instead.
26991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26992   if test "x$has_forbidden_chars" != x; then
26993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26995   fi
26996 
26997     # Output is in $new_path
26998 
26999   windows_path="$new_path"
27000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27001     unix_path=`$CYGPATH -u "$windows_path"`
27002     new_path="$unix_path"
27003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27005     new_path="$unix_path"
27006   fi
27007 
27008     # remove trailing .exe if any
27009     new_path="${new_path/%.exe/}"
27010 
27011     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27012     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27013   fi
27014 
27015   else
27016     # We're on a posix platform. Hooray! :)
27017     # First separate the path from the arguments. This will split at the first
27018     # space.
27019     complete="$MCS"
27020     path="${complete%% *}"
27021     tmp="$complete EOL"
27022     arguments="${tmp#* }"
27023 
27024     # Cannot rely on the command "which" here since it doesn't always work.
27025     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27026     if test -z "$is_absolute_path"; then
27027       # Path to executable is not absolute. Find it.
27028       IFS_save="$IFS"
27029       IFS=:
27030       for p in $PATH; do
27031         if test -f "$p/$path" && test -x "$p/$path"; then
27032           new_path="$p/$path"
27033           break
27034         fi
27035       done
27036       IFS="$IFS_save"
27037     else
27038       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
27039 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
27040       new_path="$path"
27041     fi
27042 
27043     if test "x$new_path" = x; then
27044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
27045 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
27046       has_space=`$ECHO "$complete" | $GREP " "`
27047       if test "x$has_space" != x; then
27048         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27049 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27050       fi
27051       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
27052     fi
27053   fi
27054 
27055   # Now join together the path and the arguments once again
27056   if test "x$arguments" != xEOL; then
27057     new_complete="$new_path ${arguments% *}"
27058   else
27059     new_complete="$new_path"
27060   fi
27061 
27062   if test "x$complete" != "x$new_complete"; then
27063     MCS="$new_complete"
27064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
27065 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
27066   fi
27067 
27068   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
27069     if test -n "$ac_tool_prefix"; then
27070   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
27071 set dummy ${ac_tool_prefix}nm; ac_word=$2
27072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27073 $as_echo_n "checking for $ac_word... " >&6; }
27074 if ${ac_cv_prog_NM+:} false; then :
27075   $as_echo_n "(cached) " >&6
27076 else
27077   if test -n "$NM"; then
27078   ac_cv_prog_NM="$NM" # Let the user override the test.
27079 else
27080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27081 for as_dir in $PATH
27082 do
27083   IFS=$as_save_IFS
27084   test -z "$as_dir" && as_dir=.
27085     for ac_exec_ext in '' $ac_executable_extensions; do
27086   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27087     ac_cv_prog_NM="${ac_tool_prefix}nm"
27088     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27089     break 2
27090   fi
27091 done
27092   done
27093 IFS=$as_save_IFS
27094 
27095 fi
27096 fi
27097 NM=$ac_cv_prog_NM
27098 if test -n "$NM"; then
27099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27100 $as_echo "$NM" >&6; }
27101 else
27102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27103 $as_echo "no" >&6; }
27104 fi
27105 
27106 
27107 fi
27108 if test -z "$ac_cv_prog_NM"; then
27109   ac_ct_NM=$NM
27110   # Extract the first word of "nm", so it can be a program name with args.
27111 set dummy nm; ac_word=$2
27112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27113 $as_echo_n "checking for $ac_word... " >&6; }
27114 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27115   $as_echo_n "(cached) " >&6
27116 else
27117   if test -n "$ac_ct_NM"; then
27118   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27119 else
27120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27121 for as_dir in $PATH
27122 do
27123   IFS=$as_save_IFS
27124   test -z "$as_dir" && as_dir=.
27125     for ac_exec_ext in '' $ac_executable_extensions; do
27126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27127     ac_cv_prog_ac_ct_NM="nm"
27128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27129     break 2
27130   fi
27131 done
27132   done
27133 IFS=$as_save_IFS
27134 
27135 fi
27136 fi
27137 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27138 if test -n "$ac_ct_NM"; then
27139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27140 $as_echo "$ac_ct_NM" >&6; }
27141 else
27142   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27143 $as_echo "no" >&6; }
27144 fi
27145 
27146   if test "x$ac_ct_NM" = x; then
27147     NM=""
27148   else
27149     case $cross_compiling:$ac_tool_warned in
27150 yes:)
27151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27152 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27153 ac_tool_warned=yes ;;
27154 esac
27155     NM=$ac_ct_NM
27156   fi
27157 else
27158   NM="$ac_cv_prog_NM"
27159 fi
27160 
27161 
27162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27163 
27164   # First separate the path from the arguments. This will split at the first
27165   # space.
27166   complete="$NM"
27167   path="${complete%% *}"
27168   tmp="$complete EOL"
27169   arguments="${tmp#* }"
27170 
27171   # Input might be given as Windows format, start by converting to
27172   # unix format.
27173   new_path=`$CYGPATH -u "$path"`
27174 
27175   # Now try to locate executable using which
27176   new_path=`$WHICH "$new_path" 2> /dev/null`
27177   # bat and cmd files are not always considered executable in cygwin causing which
27178   # to not find them
27179   if test "x$new_path" = x \
27180       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27181       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27182     new_path=`$CYGPATH -u "$path"`
27183   fi
27184   if test "x$new_path" = x; then
27185     # Oops. Which didn't find the executable.
27186     # The splitting of arguments from the executable at a space might have been incorrect,
27187     # since paths with space are more likely in Windows. Give it another try with the whole
27188     # argument.
27189     path="$complete"
27190     arguments="EOL"
27191     new_path=`$CYGPATH -u "$path"`
27192     new_path=`$WHICH "$new_path" 2> /dev/null`
27193     # bat and cmd files are not always considered executable in cygwin causing which
27194     # to not find them
27195     if test "x$new_path" = x \
27196         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27197         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27198       new_path=`$CYGPATH -u "$path"`
27199     fi
27200     if test "x$new_path" = x; then
27201       # It's still not found. Now this is an unrecoverable error.
27202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27203 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27204       has_space=`$ECHO "$complete" | $GREP " "`
27205       if test "x$has_space" != x; then
27206         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27207 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27208       fi
27209       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27210     fi
27211   fi
27212 
27213   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27214   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27215   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27216   # "foo.exe" is OK but "foo" is an error.
27217   #
27218   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27219   # It is also a way to make sure we got the proper file name for the real test later on.
27220   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27221   if test "x$test_shortpath" = x; then
27222     # Short path failed, file does not exist as specified.
27223     # Try adding .exe or .cmd
27224     if test -f "${new_path}.exe"; then
27225       input_to_shortpath="${new_path}.exe"
27226     elif test -f "${new_path}.cmd"; then
27227       input_to_shortpath="${new_path}.cmd"
27228     else
27229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27230 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27231       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27232 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27233       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27234     fi
27235   else
27236     input_to_shortpath="$new_path"
27237   fi
27238 
27239   # Call helper function which possibly converts this using DOS-style short mode.
27240   # If so, the updated path is stored in $new_path.
27241   new_path="$input_to_shortpath"
27242 
27243   input_path="$input_to_shortpath"
27244   # Check if we need to convert this using DOS-style short mode. If the path
27245   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27246   # take no chances and rewrite it.
27247   # Note: m4 eats our [], so we need to use [ and ] instead.
27248   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27249   if test "x$has_forbidden_chars" != x; then
27250     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27251     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27252     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27253     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27254       # Going to short mode and back again did indeed matter. Since short mode is
27255       # case insensitive, let's make it lowercase to improve readability.
27256       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27257       # Now convert it back to Unix-stile (cygpath)
27258       input_path=`$CYGPATH -u "$shortmode_path"`
27259       new_path="$input_path"
27260     fi
27261   fi
27262 
27263   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27264   if test "x$test_cygdrive_prefix" = x; then
27265     # As a simple fix, exclude /usr/bin since it's not a real path.
27266     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27267       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27268       # a path prefixed by /cygdrive for fixpath to work.
27269       new_path="$CYGWIN_ROOT_PATH$input_path"
27270     fi
27271   fi
27272 
27273   # remove trailing .exe if any
27274   new_path="${new_path/%.exe/}"
27275 
27276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27277 
27278   # First separate the path from the arguments. This will split at the first
27279   # space.
27280   complete="$NM"
27281   path="${complete%% *}"
27282   tmp="$complete EOL"
27283   arguments="${tmp#* }"
27284 
27285   # Input might be given as Windows format, start by converting to
27286   # unix format.
27287   new_path="$path"
27288 
27289   windows_path="$new_path"
27290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27291     unix_path=`$CYGPATH -u "$windows_path"`
27292     new_path="$unix_path"
27293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27295     new_path="$unix_path"
27296   fi
27297 
27298 
27299   # Now try to locate executable using which
27300   new_path=`$WHICH "$new_path" 2> /dev/null`
27301 
27302   if test "x$new_path" = x; then
27303     # Oops. Which didn't find the executable.
27304     # The splitting of arguments from the executable at a space might have been incorrect,
27305     # since paths with space are more likely in Windows. Give it another try with the whole
27306     # argument.
27307     path="$complete"
27308     arguments="EOL"
27309     new_path="$path"
27310 
27311   windows_path="$new_path"
27312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27313     unix_path=`$CYGPATH -u "$windows_path"`
27314     new_path="$unix_path"
27315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27317     new_path="$unix_path"
27318   fi
27319 
27320 
27321     new_path=`$WHICH "$new_path" 2> /dev/null`
27322 
27323     if test "x$new_path" = x; then
27324       # It's still not found. Now this is an unrecoverable error.
27325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27326 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27327       has_space=`$ECHO "$complete" | $GREP " "`
27328       if test "x$has_space" != x; then
27329         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27330 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27331       fi
27332       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27333     fi
27334   fi
27335 
27336   # Now new_path has a complete unix path to the binary
27337   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27338     # Keep paths in /bin as-is, but remove trailing .exe if any
27339     new_path="${new_path/%.exe/}"
27340     # Do not save /bin paths to all_fixpath_prefixes!
27341   else
27342     # Not in mixed or Windows style, start by that.
27343     new_path=`cmd //c echo $new_path`
27344 
27345   input_path="$new_path"
27346   # Check if we need to convert this using DOS-style short mode. If the path
27347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27348   # take no chances and rewrite it.
27349   # Note: m4 eats our [], so we need to use [ and ] instead.
27350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27351   if test "x$has_forbidden_chars" != x; then
27352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27354   fi
27355 
27356     # Output is in $new_path
27357 
27358   windows_path="$new_path"
27359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27360     unix_path=`$CYGPATH -u "$windows_path"`
27361     new_path="$unix_path"
27362   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27363     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27364     new_path="$unix_path"
27365   fi
27366 
27367     # remove trailing .exe if any
27368     new_path="${new_path/%.exe/}"
27369 
27370     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27371     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27372   fi
27373 
27374   else
27375     # We're on a posix platform. Hooray! :)
27376     # First separate the path from the arguments. This will split at the first
27377     # space.
27378     complete="$NM"
27379     path="${complete%% *}"
27380     tmp="$complete EOL"
27381     arguments="${tmp#* }"
27382 
27383     # Cannot rely on the command "which" here since it doesn't always work.
27384     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27385     if test -z "$is_absolute_path"; then
27386       # Path to executable is not absolute. Find it.
27387       IFS_save="$IFS"
27388       IFS=:
27389       for p in $PATH; do
27390         if test -f "$p/$path" && test -x "$p/$path"; then
27391           new_path="$p/$path"
27392           break
27393         fi
27394       done
27395       IFS="$IFS_save"
27396     else
27397       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27398 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27399       new_path="$path"
27400     fi
27401 
27402     if test "x$new_path" = x; then
27403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27404 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27405       has_space=`$ECHO "$complete" | $GREP " "`
27406       if test "x$has_space" != x; then
27407         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27408 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27409       fi
27410       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27411     fi
27412   fi
27413 
27414   # Now join together the path and the arguments once again
27415   if test "x$arguments" != xEOL; then
27416     new_complete="$new_path ${arguments% *}"
27417   else
27418     new_complete="$new_path"
27419   fi
27420 
27421   if test "x$complete" != "x$new_complete"; then
27422     NM="$new_complete"
27423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27424 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27425   fi
27426 
27427     GNM="$NM"
27428 
27429     if test -n "$ac_tool_prefix"; then
27430   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27431 set dummy ${ac_tool_prefix}strip; ac_word=$2
27432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27433 $as_echo_n "checking for $ac_word... " >&6; }
27434 if ${ac_cv_prog_STRIP+:} false; then :
27435   $as_echo_n "(cached) " >&6
27436 else
27437   if test -n "$STRIP"; then
27438   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27439 else
27440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27441 for as_dir in $PATH
27442 do
27443   IFS=$as_save_IFS
27444   test -z "$as_dir" && as_dir=.
27445     for ac_exec_ext in '' $ac_executable_extensions; do
27446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27447     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27449     break 2
27450   fi
27451 done
27452   done
27453 IFS=$as_save_IFS
27454 
27455 fi
27456 fi
27457 STRIP=$ac_cv_prog_STRIP
27458 if test -n "$STRIP"; then
27459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27460 $as_echo "$STRIP" >&6; }
27461 else
27462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27463 $as_echo "no" >&6; }
27464 fi
27465 
27466 
27467 fi
27468 if test -z "$ac_cv_prog_STRIP"; then
27469   ac_ct_STRIP=$STRIP
27470   # Extract the first word of "strip", so it can be a program name with args.
27471 set dummy strip; ac_word=$2
27472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27473 $as_echo_n "checking for $ac_word... " >&6; }
27474 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27475   $as_echo_n "(cached) " >&6
27476 else
27477   if test -n "$ac_ct_STRIP"; then
27478   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27479 else
27480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27481 for as_dir in $PATH
27482 do
27483   IFS=$as_save_IFS
27484   test -z "$as_dir" && as_dir=.
27485     for ac_exec_ext in '' $ac_executable_extensions; do
27486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27487     ac_cv_prog_ac_ct_STRIP="strip"
27488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27489     break 2
27490   fi
27491 done
27492   done
27493 IFS=$as_save_IFS
27494 
27495 fi
27496 fi
27497 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27498 if test -n "$ac_ct_STRIP"; then
27499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27500 $as_echo "$ac_ct_STRIP" >&6; }
27501 else
27502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27503 $as_echo "no" >&6; }
27504 fi
27505 
27506   if test "x$ac_ct_STRIP" = x; then
27507     STRIP=""
27508   else
27509     case $cross_compiling:$ac_tool_warned in
27510 yes:)
27511 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27512 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27513 ac_tool_warned=yes ;;
27514 esac
27515     STRIP=$ac_ct_STRIP
27516   fi
27517 else
27518   STRIP="$ac_cv_prog_STRIP"
27519 fi
27520 
27521 
27522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27523 
27524   # First separate the path from the arguments. This will split at the first
27525   # space.
27526   complete="$STRIP"
27527   path="${complete%% *}"
27528   tmp="$complete EOL"
27529   arguments="${tmp#* }"
27530 
27531   # Input might be given as Windows format, start by converting to
27532   # unix format.
27533   new_path=`$CYGPATH -u "$path"`
27534 
27535   # Now try to locate executable using which
27536   new_path=`$WHICH "$new_path" 2> /dev/null`
27537   # bat and cmd files are not always considered executable in cygwin causing which
27538   # to not find them
27539   if test "x$new_path" = x \
27540       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27541       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27542     new_path=`$CYGPATH -u "$path"`
27543   fi
27544   if test "x$new_path" = x; then
27545     # Oops. Which didn't find the executable.
27546     # The splitting of arguments from the executable at a space might have been incorrect,
27547     # since paths with space are more likely in Windows. Give it another try with the whole
27548     # argument.
27549     path="$complete"
27550     arguments="EOL"
27551     new_path=`$CYGPATH -u "$path"`
27552     new_path=`$WHICH "$new_path" 2> /dev/null`
27553     # bat and cmd files are not always considered executable in cygwin causing which
27554     # to not find them
27555     if test "x$new_path" = x \
27556         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27557         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27558       new_path=`$CYGPATH -u "$path"`
27559     fi
27560     if test "x$new_path" = x; then
27561       # It's still not found. Now this is an unrecoverable error.
27562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27563 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27564       has_space=`$ECHO "$complete" | $GREP " "`
27565       if test "x$has_space" != x; then
27566         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27567 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27568       fi
27569       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27570     fi
27571   fi
27572 
27573   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27574   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27575   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27576   # "foo.exe" is OK but "foo" is an error.
27577   #
27578   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27579   # It is also a way to make sure we got the proper file name for the real test later on.
27580   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27581   if test "x$test_shortpath" = x; then
27582     # Short path failed, file does not exist as specified.
27583     # Try adding .exe or .cmd
27584     if test -f "${new_path}.exe"; then
27585       input_to_shortpath="${new_path}.exe"
27586     elif test -f "${new_path}.cmd"; then
27587       input_to_shortpath="${new_path}.cmd"
27588     else
27589       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27590 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27591       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27592 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27593       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27594     fi
27595   else
27596     input_to_shortpath="$new_path"
27597   fi
27598 
27599   # Call helper function which possibly converts this using DOS-style short mode.
27600   # If so, the updated path is stored in $new_path.
27601   new_path="$input_to_shortpath"
27602 
27603   input_path="$input_to_shortpath"
27604   # Check if we need to convert this using DOS-style short mode. If the path
27605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27606   # take no chances and rewrite it.
27607   # Note: m4 eats our [], so we need to use [ and ] instead.
27608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27609   if test "x$has_forbidden_chars" != x; then
27610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27611     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27612     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27613     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27614       # Going to short mode and back again did indeed matter. Since short mode is
27615       # case insensitive, let's make it lowercase to improve readability.
27616       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27617       # Now convert it back to Unix-stile (cygpath)
27618       input_path=`$CYGPATH -u "$shortmode_path"`
27619       new_path="$input_path"
27620     fi
27621   fi
27622 
27623   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27624   if test "x$test_cygdrive_prefix" = x; then
27625     # As a simple fix, exclude /usr/bin since it's not a real path.
27626     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27627       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27628       # a path prefixed by /cygdrive for fixpath to work.
27629       new_path="$CYGWIN_ROOT_PATH$input_path"
27630     fi
27631   fi
27632 
27633   # remove trailing .exe if any
27634   new_path="${new_path/%.exe/}"
27635 
27636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27637 
27638   # First separate the path from the arguments. This will split at the first
27639   # space.
27640   complete="$STRIP"
27641   path="${complete%% *}"
27642   tmp="$complete EOL"
27643   arguments="${tmp#* }"
27644 
27645   # Input might be given as Windows format, start by converting to
27646   # unix format.
27647   new_path="$path"
27648 
27649   windows_path="$new_path"
27650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27651     unix_path=`$CYGPATH -u "$windows_path"`
27652     new_path="$unix_path"
27653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27655     new_path="$unix_path"
27656   fi
27657 
27658 
27659   # Now try to locate executable using which
27660   new_path=`$WHICH "$new_path" 2> /dev/null`
27661 
27662   if test "x$new_path" = x; then
27663     # Oops. Which didn't find the executable.
27664     # The splitting of arguments from the executable at a space might have been incorrect,
27665     # since paths with space are more likely in Windows. Give it another try with the whole
27666     # argument.
27667     path="$complete"
27668     arguments="EOL"
27669     new_path="$path"
27670 
27671   windows_path="$new_path"
27672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27673     unix_path=`$CYGPATH -u "$windows_path"`
27674     new_path="$unix_path"
27675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27677     new_path="$unix_path"
27678   fi
27679 
27680 
27681     new_path=`$WHICH "$new_path" 2> /dev/null`
27682 
27683     if test "x$new_path" = x; then
27684       # It's still not found. Now this is an unrecoverable error.
27685       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27686 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27687       has_space=`$ECHO "$complete" | $GREP " "`
27688       if test "x$has_space" != x; then
27689         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27690 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27691       fi
27692       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27693     fi
27694   fi
27695 
27696   # Now new_path has a complete unix path to the binary
27697   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27698     # Keep paths in /bin as-is, but remove trailing .exe if any
27699     new_path="${new_path/%.exe/}"
27700     # Do not save /bin paths to all_fixpath_prefixes!
27701   else
27702     # Not in mixed or Windows style, start by that.
27703     new_path=`cmd //c echo $new_path`
27704 
27705   input_path="$new_path"
27706   # Check if we need to convert this using DOS-style short mode. If the path
27707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27708   # take no chances and rewrite it.
27709   # Note: m4 eats our [], so we need to use [ and ] instead.
27710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27711   if test "x$has_forbidden_chars" != x; then
27712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27713     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27714   fi
27715 
27716     # Output is in $new_path
27717 
27718   windows_path="$new_path"
27719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27720     unix_path=`$CYGPATH -u "$windows_path"`
27721     new_path="$unix_path"
27722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27724     new_path="$unix_path"
27725   fi
27726 
27727     # remove trailing .exe if any
27728     new_path="${new_path/%.exe/}"
27729 
27730     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27731     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27732   fi
27733 
27734   else
27735     # We're on a posix platform. Hooray! :)
27736     # First separate the path from the arguments. This will split at the first
27737     # space.
27738     complete="$STRIP"
27739     path="${complete%% *}"
27740     tmp="$complete EOL"
27741     arguments="${tmp#* }"
27742 
27743     # Cannot rely on the command "which" here since it doesn't always work.
27744     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27745     if test -z "$is_absolute_path"; then
27746       # Path to executable is not absolute. Find it.
27747       IFS_save="$IFS"
27748       IFS=:
27749       for p in $PATH; do
27750         if test -f "$p/$path" && test -x "$p/$path"; then
27751           new_path="$p/$path"
27752           break
27753         fi
27754       done
27755       IFS="$IFS_save"
27756     else
27757       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27758 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27759       new_path="$path"
27760     fi
27761 
27762     if test "x$new_path" = x; then
27763       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27764 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27765       has_space=`$ECHO "$complete" | $GREP " "`
27766       if test "x$has_space" != x; then
27767         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27768 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27769       fi
27770       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27771     fi
27772   fi
27773 
27774   # Now join together the path and the arguments once again
27775   if test "x$arguments" != xEOL; then
27776     new_complete="$new_path ${arguments% *}"
27777   else
27778     new_complete="$new_path"
27779   fi
27780 
27781   if test "x$complete" != "x$new_complete"; then
27782     STRIP="$new_complete"
27783     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27784 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27785   fi
27786 
27787   fi
27788 
27789   # objcopy is used for moving debug symbols to separate files when
27790   # full debug symbols are enabled.
27791   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27792     if test -n "$ac_tool_prefix"; then
27793   for ac_prog in gobjcopy objcopy
27794   do
27795     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27796 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27798 $as_echo_n "checking for $ac_word... " >&6; }
27799 if ${ac_cv_prog_OBJCOPY+:} false; then :
27800   $as_echo_n "(cached) " >&6
27801 else
27802   if test -n "$OBJCOPY"; then
27803   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27804 else
27805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27806 for as_dir in $PATH
27807 do
27808   IFS=$as_save_IFS
27809   test -z "$as_dir" && as_dir=.
27810     for ac_exec_ext in '' $ac_executable_extensions; do
27811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27812     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27814     break 2
27815   fi
27816 done
27817   done
27818 IFS=$as_save_IFS
27819 
27820 fi
27821 fi
27822 OBJCOPY=$ac_cv_prog_OBJCOPY
27823 if test -n "$OBJCOPY"; then
27824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27825 $as_echo "$OBJCOPY" >&6; }
27826 else
27827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27828 $as_echo "no" >&6; }
27829 fi
27830 
27831 
27832     test -n "$OBJCOPY" && break
27833   done
27834 fi
27835 if test -z "$OBJCOPY"; then
27836   ac_ct_OBJCOPY=$OBJCOPY
27837   for ac_prog in gobjcopy objcopy
27838 do
27839   # Extract the first word of "$ac_prog", so it can be a program name with args.
27840 set dummy $ac_prog; ac_word=$2
27841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27842 $as_echo_n "checking for $ac_word... " >&6; }
27843 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27844   $as_echo_n "(cached) " >&6
27845 else
27846   if test -n "$ac_ct_OBJCOPY"; then
27847   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27848 else
27849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27850 for as_dir in $PATH
27851 do
27852   IFS=$as_save_IFS
27853   test -z "$as_dir" && as_dir=.
27854     for ac_exec_ext in '' $ac_executable_extensions; do
27855   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27856     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27857     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27858     break 2
27859   fi
27860 done
27861   done
27862 IFS=$as_save_IFS
27863 
27864 fi
27865 fi
27866 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27867 if test -n "$ac_ct_OBJCOPY"; then
27868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27869 $as_echo "$ac_ct_OBJCOPY" >&6; }
27870 else
27871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27872 $as_echo "no" >&6; }
27873 fi
27874 
27875 
27876   test -n "$ac_ct_OBJCOPY" && break
27877 done
27878 
27879   if test "x$ac_ct_OBJCOPY" = x; then
27880     OBJCOPY=""
27881   else
27882     case $cross_compiling:$ac_tool_warned in
27883 yes:)
27884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27885 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27886 ac_tool_warned=yes ;;
27887 esac
27888     OBJCOPY=$ac_ct_OBJCOPY
27889   fi
27890 fi
27891 
27892     # Only call fixup if objcopy was found.
27893     if test -n "$OBJCOPY"; then
27894 
27895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27896 
27897   # First separate the path from the arguments. This will split at the first
27898   # space.
27899   complete="$OBJCOPY"
27900   path="${complete%% *}"
27901   tmp="$complete EOL"
27902   arguments="${tmp#* }"
27903 
27904   # Input might be given as Windows format, start by converting to
27905   # unix format.
27906   new_path=`$CYGPATH -u "$path"`
27907 
27908   # Now try to locate executable using which
27909   new_path=`$WHICH "$new_path" 2> /dev/null`
27910   # bat and cmd files are not always considered executable in cygwin causing which
27911   # to not find them
27912   if test "x$new_path" = x \
27913       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27914       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27915     new_path=`$CYGPATH -u "$path"`
27916   fi
27917   if test "x$new_path" = x; then
27918     # Oops. Which didn't find the executable.
27919     # The splitting of arguments from the executable at a space might have been incorrect,
27920     # since paths with space are more likely in Windows. Give it another try with the whole
27921     # argument.
27922     path="$complete"
27923     arguments="EOL"
27924     new_path=`$CYGPATH -u "$path"`
27925     new_path=`$WHICH "$new_path" 2> /dev/null`
27926     # bat and cmd files are not always considered executable in cygwin causing which
27927     # to not find them
27928     if test "x$new_path" = x \
27929         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27930         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27931       new_path=`$CYGPATH -u "$path"`
27932     fi
27933     if test "x$new_path" = x; then
27934       # It's still not found. Now this is an unrecoverable error.
27935       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27936 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27937       has_space=`$ECHO "$complete" | $GREP " "`
27938       if test "x$has_space" != x; then
27939         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27940 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27941       fi
27942       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27943     fi
27944   fi
27945 
27946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27949   # "foo.exe" is OK but "foo" is an error.
27950   #
27951   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27952   # It is also a way to make sure we got the proper file name for the real test later on.
27953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27954   if test "x$test_shortpath" = x; then
27955     # Short path failed, file does not exist as specified.
27956     # Try adding .exe or .cmd
27957     if test -f "${new_path}.exe"; then
27958       input_to_shortpath="${new_path}.exe"
27959     elif test -f "${new_path}.cmd"; then
27960       input_to_shortpath="${new_path}.cmd"
27961     else
27962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27963 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27964       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27965 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27966       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27967     fi
27968   else
27969     input_to_shortpath="$new_path"
27970   fi
27971 
27972   # Call helper function which possibly converts this using DOS-style short mode.
27973   # If so, the updated path is stored in $new_path.
27974   new_path="$input_to_shortpath"
27975 
27976   input_path="$input_to_shortpath"
27977   # Check if we need to convert this using DOS-style short mode. If the path
27978   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27979   # take no chances and rewrite it.
27980   # Note: m4 eats our [], so we need to use [ and ] instead.
27981   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27982   if test "x$has_forbidden_chars" != x; then
27983     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27984     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27985     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27986     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27987       # Going to short mode and back again did indeed matter. Since short mode is
27988       # case insensitive, let's make it lowercase to improve readability.
27989       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27990       # Now convert it back to Unix-stile (cygpath)
27991       input_path=`$CYGPATH -u "$shortmode_path"`
27992       new_path="$input_path"
27993     fi
27994   fi
27995 
27996   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27997   if test "x$test_cygdrive_prefix" = x; then
27998     # As a simple fix, exclude /usr/bin since it's not a real path.
27999     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28000       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28001       # a path prefixed by /cygdrive for fixpath to work.
28002       new_path="$CYGWIN_ROOT_PATH$input_path"
28003     fi
28004   fi
28005 
28006   # remove trailing .exe if any
28007   new_path="${new_path/%.exe/}"
28008 
28009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28010 
28011   # First separate the path from the arguments. This will split at the first
28012   # space.
28013   complete="$OBJCOPY"
28014   path="${complete%% *}"
28015   tmp="$complete EOL"
28016   arguments="${tmp#* }"
28017 
28018   # Input might be given as Windows format, start by converting to
28019   # unix format.
28020   new_path="$path"
28021 
28022   windows_path="$new_path"
28023   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28024     unix_path=`$CYGPATH -u "$windows_path"`
28025     new_path="$unix_path"
28026   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28027     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28028     new_path="$unix_path"
28029   fi
28030 
28031 
28032   # Now try to locate executable using which
28033   new_path=`$WHICH "$new_path" 2> /dev/null`
28034 
28035   if test "x$new_path" = x; then
28036     # Oops. Which didn't find the executable.
28037     # The splitting of arguments from the executable at a space might have been incorrect,
28038     # since paths with space are more likely in Windows. Give it another try with the whole
28039     # argument.
28040     path="$complete"
28041     arguments="EOL"
28042     new_path="$path"
28043 
28044   windows_path="$new_path"
28045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28046     unix_path=`$CYGPATH -u "$windows_path"`
28047     new_path="$unix_path"
28048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28050     new_path="$unix_path"
28051   fi
28052 
28053 
28054     new_path=`$WHICH "$new_path" 2> /dev/null`
28055 
28056     if test "x$new_path" = x; then
28057       # It's still not found. Now this is an unrecoverable error.
28058       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28059 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28060       has_space=`$ECHO "$complete" | $GREP " "`
28061       if test "x$has_space" != x; then
28062         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28063 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28064       fi
28065       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28066     fi
28067   fi
28068 
28069   # Now new_path has a complete unix path to the binary
28070   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28071     # Keep paths in /bin as-is, but remove trailing .exe if any
28072     new_path="${new_path/%.exe/}"
28073     # Do not save /bin paths to all_fixpath_prefixes!
28074   else
28075     # Not in mixed or Windows style, start by that.
28076     new_path=`cmd //c echo $new_path`
28077 
28078   input_path="$new_path"
28079   # Check if we need to convert this using DOS-style short mode. If the path
28080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28081   # take no chances and rewrite it.
28082   # Note: m4 eats our [], so we need to use [ and ] instead.
28083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28084   if test "x$has_forbidden_chars" != x; then
28085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28087   fi
28088 
28089     # Output is in $new_path
28090 
28091   windows_path="$new_path"
28092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28093     unix_path=`$CYGPATH -u "$windows_path"`
28094     new_path="$unix_path"
28095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28097     new_path="$unix_path"
28098   fi
28099 
28100     # remove trailing .exe if any
28101     new_path="${new_path/%.exe/}"
28102 
28103     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28104     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28105   fi
28106 
28107   else
28108     # We're on a posix platform. Hooray! :)
28109     # First separate the path from the arguments. This will split at the first
28110     # space.
28111     complete="$OBJCOPY"
28112     path="${complete%% *}"
28113     tmp="$complete EOL"
28114     arguments="${tmp#* }"
28115 
28116     # Cannot rely on the command "which" here since it doesn't always work.
28117     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28118     if test -z "$is_absolute_path"; then
28119       # Path to executable is not absolute. Find it.
28120       IFS_save="$IFS"
28121       IFS=:
28122       for p in $PATH; do
28123         if test -f "$p/$path" && test -x "$p/$path"; then
28124           new_path="$p/$path"
28125           break
28126         fi
28127       done
28128       IFS="$IFS_save"
28129     else
28130       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28131 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28132       new_path="$path"
28133     fi
28134 
28135     if test "x$new_path" = x; then
28136       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28137 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28138       has_space=`$ECHO "$complete" | $GREP " "`
28139       if test "x$has_space" != x; then
28140         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28141 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28142       fi
28143       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28144     fi
28145   fi
28146 
28147   # Now join together the path and the arguments once again
28148   if test "x$arguments" != xEOL; then
28149     new_complete="$new_path ${arguments% *}"
28150   else
28151     new_complete="$new_path"
28152   fi
28153 
28154   if test "x$complete" != "x$new_complete"; then
28155     OBJCOPY="$new_complete"
28156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28157 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28158   fi
28159 
28160     fi
28161   fi
28162 
28163   if test -n "$ac_tool_prefix"; then
28164   for ac_prog in gobjdump objdump
28165   do
28166     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28167 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28169 $as_echo_n "checking for $ac_word... " >&6; }
28170 if ${ac_cv_prog_OBJDUMP+:} false; then :
28171   $as_echo_n "(cached) " >&6
28172 else
28173   if test -n "$OBJDUMP"; then
28174   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28175 else
28176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28177 for as_dir in $PATH
28178 do
28179   IFS=$as_save_IFS
28180   test -z "$as_dir" && as_dir=.
28181     for ac_exec_ext in '' $ac_executable_extensions; do
28182   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28183     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28184     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28185     break 2
28186   fi
28187 done
28188   done
28189 IFS=$as_save_IFS
28190 
28191 fi
28192 fi
28193 OBJDUMP=$ac_cv_prog_OBJDUMP
28194 if test -n "$OBJDUMP"; then
28195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28196 $as_echo "$OBJDUMP" >&6; }
28197 else
28198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28199 $as_echo "no" >&6; }
28200 fi
28201 
28202 
28203     test -n "$OBJDUMP" && break
28204   done
28205 fi
28206 if test -z "$OBJDUMP"; then
28207   ac_ct_OBJDUMP=$OBJDUMP
28208   for ac_prog in gobjdump objdump
28209 do
28210   # Extract the first word of "$ac_prog", so it can be a program name with args.
28211 set dummy $ac_prog; ac_word=$2
28212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28213 $as_echo_n "checking for $ac_word... " >&6; }
28214 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28215   $as_echo_n "(cached) " >&6
28216 else
28217   if test -n "$ac_ct_OBJDUMP"; then
28218   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28219 else
28220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28221 for as_dir in $PATH
28222 do
28223   IFS=$as_save_IFS
28224   test -z "$as_dir" && as_dir=.
28225     for ac_exec_ext in '' $ac_executable_extensions; do
28226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28227     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28229     break 2
28230   fi
28231 done
28232   done
28233 IFS=$as_save_IFS
28234 
28235 fi
28236 fi
28237 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28238 if test -n "$ac_ct_OBJDUMP"; then
28239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28240 $as_echo "$ac_ct_OBJDUMP" >&6; }
28241 else
28242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28243 $as_echo "no" >&6; }
28244 fi
28245 
28246 
28247   test -n "$ac_ct_OBJDUMP" && break
28248 done
28249 
28250   if test "x$ac_ct_OBJDUMP" = x; then
28251     OBJDUMP=""
28252   else
28253     case $cross_compiling:$ac_tool_warned in
28254 yes:)
28255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28256 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28257 ac_tool_warned=yes ;;
28258 esac
28259     OBJDUMP=$ac_ct_OBJDUMP
28260   fi
28261 fi
28262 
28263   if test "x$OBJDUMP" != x; then
28264     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28265 
28266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28267 
28268   # First separate the path from the arguments. This will split at the first
28269   # space.
28270   complete="$OBJDUMP"
28271   path="${complete%% *}"
28272   tmp="$complete EOL"
28273   arguments="${tmp#* }"
28274 
28275   # Input might be given as Windows format, start by converting to
28276   # unix format.
28277   new_path=`$CYGPATH -u "$path"`
28278 
28279   # Now try to locate executable using which
28280   new_path=`$WHICH "$new_path" 2> /dev/null`
28281   # bat and cmd files are not always considered executable in cygwin causing which
28282   # to not find them
28283   if test "x$new_path" = x \
28284       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28285       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28286     new_path=`$CYGPATH -u "$path"`
28287   fi
28288   if test "x$new_path" = x; then
28289     # Oops. Which didn't find the executable.
28290     # The splitting of arguments from the executable at a space might have been incorrect,
28291     # since paths with space are more likely in Windows. Give it another try with the whole
28292     # argument.
28293     path="$complete"
28294     arguments="EOL"
28295     new_path=`$CYGPATH -u "$path"`
28296     new_path=`$WHICH "$new_path" 2> /dev/null`
28297     # bat and cmd files are not always considered executable in cygwin causing which
28298     # to not find them
28299     if test "x$new_path" = x \
28300         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28301         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28302       new_path=`$CYGPATH -u "$path"`
28303     fi
28304     if test "x$new_path" = x; then
28305       # It's still not found. Now this is an unrecoverable error.
28306       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28307 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28308       has_space=`$ECHO "$complete" | $GREP " "`
28309       if test "x$has_space" != x; then
28310         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28311 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28312       fi
28313       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28314     fi
28315   fi
28316 
28317   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28318   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28319   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28320   # "foo.exe" is OK but "foo" is an error.
28321   #
28322   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28323   # It is also a way to make sure we got the proper file name for the real test later on.
28324   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28325   if test "x$test_shortpath" = x; then
28326     # Short path failed, file does not exist as specified.
28327     # Try adding .exe or .cmd
28328     if test -f "${new_path}.exe"; then
28329       input_to_shortpath="${new_path}.exe"
28330     elif test -f "${new_path}.cmd"; then
28331       input_to_shortpath="${new_path}.cmd"
28332     else
28333       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28334 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28335       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28336 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28337       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28338     fi
28339   else
28340     input_to_shortpath="$new_path"
28341   fi
28342 
28343   # Call helper function which possibly converts this using DOS-style short mode.
28344   # If so, the updated path is stored in $new_path.
28345   new_path="$input_to_shortpath"
28346 
28347   input_path="$input_to_shortpath"
28348   # Check if we need to convert this using DOS-style short mode. If the path
28349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28350   # take no chances and rewrite it.
28351   # Note: m4 eats our [], so we need to use [ and ] instead.
28352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28353   if test "x$has_forbidden_chars" != x; then
28354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28355     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28356     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28357     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28358       # Going to short mode and back again did indeed matter. Since short mode is
28359       # case insensitive, let's make it lowercase to improve readability.
28360       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28361       # Now convert it back to Unix-stile (cygpath)
28362       input_path=`$CYGPATH -u "$shortmode_path"`
28363       new_path="$input_path"
28364     fi
28365   fi
28366 
28367   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28368   if test "x$test_cygdrive_prefix" = x; then
28369     # As a simple fix, exclude /usr/bin since it's not a real path.
28370     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28371       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28372       # a path prefixed by /cygdrive for fixpath to work.
28373       new_path="$CYGWIN_ROOT_PATH$input_path"
28374     fi
28375   fi
28376 
28377   # remove trailing .exe if any
28378   new_path="${new_path/%.exe/}"
28379 
28380   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28381 
28382   # First separate the path from the arguments. This will split at the first
28383   # space.
28384   complete="$OBJDUMP"
28385   path="${complete%% *}"
28386   tmp="$complete EOL"
28387   arguments="${tmp#* }"
28388 
28389   # Input might be given as Windows format, start by converting to
28390   # unix format.
28391   new_path="$path"
28392 
28393   windows_path="$new_path"
28394   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28395     unix_path=`$CYGPATH -u "$windows_path"`
28396     new_path="$unix_path"
28397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28398     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28399     new_path="$unix_path"
28400   fi
28401 
28402 
28403   # Now try to locate executable using which
28404   new_path=`$WHICH "$new_path" 2> /dev/null`
28405 
28406   if test "x$new_path" = x; then
28407     # Oops. Which didn't find the executable.
28408     # The splitting of arguments from the executable at a space might have been incorrect,
28409     # since paths with space are more likely in Windows. Give it another try with the whole
28410     # argument.
28411     path="$complete"
28412     arguments="EOL"
28413     new_path="$path"
28414 
28415   windows_path="$new_path"
28416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28417     unix_path=`$CYGPATH -u "$windows_path"`
28418     new_path="$unix_path"
28419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28421     new_path="$unix_path"
28422   fi
28423 
28424 
28425     new_path=`$WHICH "$new_path" 2> /dev/null`
28426 
28427     if test "x$new_path" = x; then
28428       # It's still not found. Now this is an unrecoverable error.
28429       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28430 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28431       has_space=`$ECHO "$complete" | $GREP " "`
28432       if test "x$has_space" != x; then
28433         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28434 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28435       fi
28436       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28437     fi
28438   fi
28439 
28440   # Now new_path has a complete unix path to the binary
28441   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28442     # Keep paths in /bin as-is, but remove trailing .exe if any
28443     new_path="${new_path/%.exe/}"
28444     # Do not save /bin paths to all_fixpath_prefixes!
28445   else
28446     # Not in mixed or Windows style, start by that.
28447     new_path=`cmd //c echo $new_path`
28448 
28449   input_path="$new_path"
28450   # Check if we need to convert this using DOS-style short mode. If the path
28451   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28452   # take no chances and rewrite it.
28453   # Note: m4 eats our [], so we need to use [ and ] instead.
28454   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28455   if test "x$has_forbidden_chars" != x; then
28456     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28457     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28458   fi
28459 
28460     # Output is in $new_path
28461 
28462   windows_path="$new_path"
28463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28464     unix_path=`$CYGPATH -u "$windows_path"`
28465     new_path="$unix_path"
28466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28468     new_path="$unix_path"
28469   fi
28470 
28471     # remove trailing .exe if any
28472     new_path="${new_path/%.exe/}"
28473 
28474     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28475     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28476   fi
28477 
28478   else
28479     # We're on a posix platform. Hooray! :)
28480     # First separate the path from the arguments. This will split at the first
28481     # space.
28482     complete="$OBJDUMP"
28483     path="${complete%% *}"
28484     tmp="$complete EOL"
28485     arguments="${tmp#* }"
28486 
28487     # Cannot rely on the command "which" here since it doesn't always work.
28488     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28489     if test -z "$is_absolute_path"; then
28490       # Path to executable is not absolute. Find it.
28491       IFS_save="$IFS"
28492       IFS=:
28493       for p in $PATH; do
28494         if test -f "$p/$path" && test -x "$p/$path"; then
28495           new_path="$p/$path"
28496           break
28497         fi
28498       done
28499       IFS="$IFS_save"
28500     else
28501       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28502 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28503       new_path="$path"
28504     fi
28505 
28506     if test "x$new_path" = x; then
28507       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28508 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28509       has_space=`$ECHO "$complete" | $GREP " "`
28510       if test "x$has_space" != x; then
28511         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28512 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28513       fi
28514       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28515     fi
28516   fi
28517 
28518   # Now join together the path and the arguments once again
28519   if test "x$arguments" != xEOL; then
28520     new_complete="$new_path ${arguments% *}"
28521   else
28522     new_complete="$new_path"
28523   fi
28524 
28525   if test "x$complete" != "x$new_complete"; then
28526     OBJDUMP="$new_complete"
28527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28528 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28529   fi
28530 
28531   fi
28532 
28533   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28534     # Extract the first word of "lipo", so it can be a program name with args.
28535 set dummy lipo; ac_word=$2
28536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28537 $as_echo_n "checking for $ac_word... " >&6; }
28538 if ${ac_cv_path_LIPO+:} false; then :
28539   $as_echo_n "(cached) " >&6
28540 else
28541   case $LIPO in
28542   [\\/]* | ?:[\\/]*)
28543   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28544   ;;
28545   *)
28546   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28547 for as_dir in $PATH
28548 do
28549   IFS=$as_save_IFS
28550   test -z "$as_dir" && as_dir=.
28551     for ac_exec_ext in '' $ac_executable_extensions; do
28552   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28553     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28554     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28555     break 2
28556   fi
28557 done
28558   done
28559 IFS=$as_save_IFS
28560 
28561   ;;
28562 esac
28563 fi
28564 LIPO=$ac_cv_path_LIPO
28565 if test -n "$LIPO"; then
28566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28567 $as_echo "$LIPO" >&6; }
28568 else
28569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28570 $as_echo "no" >&6; }
28571 fi
28572 
28573 
28574 
28575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28576 
28577   # First separate the path from the arguments. This will split at the first
28578   # space.
28579   complete="$LIPO"
28580   path="${complete%% *}"
28581   tmp="$complete EOL"
28582   arguments="${tmp#* }"
28583 
28584   # Input might be given as Windows format, start by converting to
28585   # unix format.
28586   new_path=`$CYGPATH -u "$path"`
28587 
28588   # Now try to locate executable using which
28589   new_path=`$WHICH "$new_path" 2> /dev/null`
28590   # bat and cmd files are not always considered executable in cygwin causing which
28591   # to not find them
28592   if test "x$new_path" = x \
28593       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28594       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28595     new_path=`$CYGPATH -u "$path"`
28596   fi
28597   if test "x$new_path" = x; then
28598     # Oops. Which didn't find the executable.
28599     # The splitting of arguments from the executable at a space might have been incorrect,
28600     # since paths with space are more likely in Windows. Give it another try with the whole
28601     # argument.
28602     path="$complete"
28603     arguments="EOL"
28604     new_path=`$CYGPATH -u "$path"`
28605     new_path=`$WHICH "$new_path" 2> /dev/null`
28606     # bat and cmd files are not always considered executable in cygwin causing which
28607     # to not find them
28608     if test "x$new_path" = x \
28609         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28610         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28611       new_path=`$CYGPATH -u "$path"`
28612     fi
28613     if test "x$new_path" = x; then
28614       # It's still not found. Now this is an unrecoverable error.
28615       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28616 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28617       has_space=`$ECHO "$complete" | $GREP " "`
28618       if test "x$has_space" != x; then
28619         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28620 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28621       fi
28622       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28623     fi
28624   fi
28625 
28626   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28627   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28628   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28629   # "foo.exe" is OK but "foo" is an error.
28630   #
28631   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28632   # It is also a way to make sure we got the proper file name for the real test later on.
28633   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28634   if test "x$test_shortpath" = x; then
28635     # Short path failed, file does not exist as specified.
28636     # Try adding .exe or .cmd
28637     if test -f "${new_path}.exe"; then
28638       input_to_shortpath="${new_path}.exe"
28639     elif test -f "${new_path}.cmd"; then
28640       input_to_shortpath="${new_path}.cmd"
28641     else
28642       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28643 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28644       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28645 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28646       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28647     fi
28648   else
28649     input_to_shortpath="$new_path"
28650   fi
28651 
28652   # Call helper function which possibly converts this using DOS-style short mode.
28653   # If so, the updated path is stored in $new_path.
28654   new_path="$input_to_shortpath"
28655 
28656   input_path="$input_to_shortpath"
28657   # Check if we need to convert this using DOS-style short mode. If the path
28658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28659   # take no chances and rewrite it.
28660   # Note: m4 eats our [], so we need to use [ and ] instead.
28661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28662   if test "x$has_forbidden_chars" != x; then
28663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28664     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28665     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28666     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28667       # Going to short mode and back again did indeed matter. Since short mode is
28668       # case insensitive, let's make it lowercase to improve readability.
28669       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28670       # Now convert it back to Unix-stile (cygpath)
28671       input_path=`$CYGPATH -u "$shortmode_path"`
28672       new_path="$input_path"
28673     fi
28674   fi
28675 
28676   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28677   if test "x$test_cygdrive_prefix" = x; then
28678     # As a simple fix, exclude /usr/bin since it's not a real path.
28679     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28680       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28681       # a path prefixed by /cygdrive for fixpath to work.
28682       new_path="$CYGWIN_ROOT_PATH$input_path"
28683     fi
28684   fi
28685 
28686   # remove trailing .exe if any
28687   new_path="${new_path/%.exe/}"
28688 
28689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28690 
28691   # First separate the path from the arguments. This will split at the first
28692   # space.
28693   complete="$LIPO"
28694   path="${complete%% *}"
28695   tmp="$complete EOL"
28696   arguments="${tmp#* }"
28697 
28698   # Input might be given as Windows format, start by converting to
28699   # unix format.
28700   new_path="$path"
28701 
28702   windows_path="$new_path"
28703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28704     unix_path=`$CYGPATH -u "$windows_path"`
28705     new_path="$unix_path"
28706   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28707     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28708     new_path="$unix_path"
28709   fi
28710 
28711 
28712   # Now try to locate executable using which
28713   new_path=`$WHICH "$new_path" 2> /dev/null`
28714 
28715   if test "x$new_path" = x; then
28716     # Oops. Which didn't find the executable.
28717     # The splitting of arguments from the executable at a space might have been incorrect,
28718     # since paths with space are more likely in Windows. Give it another try with the whole
28719     # argument.
28720     path="$complete"
28721     arguments="EOL"
28722     new_path="$path"
28723 
28724   windows_path="$new_path"
28725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28726     unix_path=`$CYGPATH -u "$windows_path"`
28727     new_path="$unix_path"
28728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28730     new_path="$unix_path"
28731   fi
28732 
28733 
28734     new_path=`$WHICH "$new_path" 2> /dev/null`
28735 
28736     if test "x$new_path" = x; then
28737       # It's still not found. Now this is an unrecoverable error.
28738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28739 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28740       has_space=`$ECHO "$complete" | $GREP " "`
28741       if test "x$has_space" != x; then
28742         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28743 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28744       fi
28745       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28746     fi
28747   fi
28748 
28749   # Now new_path has a complete unix path to the binary
28750   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28751     # Keep paths in /bin as-is, but remove trailing .exe if any
28752     new_path="${new_path/%.exe/}"
28753     # Do not save /bin paths to all_fixpath_prefixes!
28754   else
28755     # Not in mixed or Windows style, start by that.
28756     new_path=`cmd //c echo $new_path`
28757 
28758   input_path="$new_path"
28759   # Check if we need to convert this using DOS-style short mode. If the path
28760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28761   # take no chances and rewrite it.
28762   # Note: m4 eats our [], so we need to use [ and ] instead.
28763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28764   if test "x$has_forbidden_chars" != x; then
28765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28767   fi
28768 
28769     # Output is in $new_path
28770 
28771   windows_path="$new_path"
28772   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28773     unix_path=`$CYGPATH -u "$windows_path"`
28774     new_path="$unix_path"
28775   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28776     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28777     new_path="$unix_path"
28778   fi
28779 
28780     # remove trailing .exe if any
28781     new_path="${new_path/%.exe/}"
28782 
28783     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28784     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28785   fi
28786 
28787   else
28788     # We're on a posix platform. Hooray! :)
28789     # First separate the path from the arguments. This will split at the first
28790     # space.
28791     complete="$LIPO"
28792     path="${complete%% *}"
28793     tmp="$complete EOL"
28794     arguments="${tmp#* }"
28795 
28796     # Cannot rely on the command "which" here since it doesn't always work.
28797     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28798     if test -z "$is_absolute_path"; then
28799       # Path to executable is not absolute. Find it.
28800       IFS_save="$IFS"
28801       IFS=:
28802       for p in $PATH; do
28803         if test -f "$p/$path" && test -x "$p/$path"; then
28804           new_path="$p/$path"
28805           break
28806         fi
28807       done
28808       IFS="$IFS_save"
28809     else
28810       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28811 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28812       new_path="$path"
28813     fi
28814 
28815     if test "x$new_path" = x; then
28816       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28817 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28818       has_space=`$ECHO "$complete" | $GREP " "`
28819       if test "x$has_space" != x; then
28820         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28821 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28822       fi
28823       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28824     fi
28825   fi
28826 
28827   # Now join together the path and the arguments once again
28828   if test "x$arguments" != xEOL; then
28829     new_complete="$new_path ${arguments% *}"
28830   else
28831     new_complete="$new_path"
28832   fi
28833 
28834   if test "x$complete" != "x$new_complete"; then
28835     LIPO="$new_complete"
28836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28837 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28838   fi
28839 
28840   fi
28841 
28842 
28843 
28844   # Restore old path without tools dir
28845   PATH="$OLD_PATH"
28846 
28847 
28848 # FIXME: Currently we must test this after paths but before flags. Fix!
28849 
28850 # And we can test some aspects on the target using configure macros.
28851 
28852 
28853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28854 $as_echo_n "checking for ANSI C header files... " >&6; }
28855 if ${ac_cv_header_stdc+:} false; then :
28856   $as_echo_n "(cached) " >&6
28857 else
28858   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28859 /* end confdefs.h.  */
28860 #include <stdlib.h>
28861 #include <stdarg.h>
28862 #include <string.h>
28863 #include <float.h>
28864 
28865 int
28866 main ()
28867 {
28868 
28869   ;
28870   return 0;
28871 }
28872 _ACEOF
28873 if ac_fn_cxx_try_compile "$LINENO"; then :
28874   ac_cv_header_stdc=yes
28875 else
28876   ac_cv_header_stdc=no
28877 fi
28878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28879 
28880 if test $ac_cv_header_stdc = yes; then
28881   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28883 /* end confdefs.h.  */
28884 #include <string.h>
28885 
28886 _ACEOF
28887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28888   $EGREP "memchr" >/dev/null 2>&1; then :
28889 
28890 else
28891   ac_cv_header_stdc=no
28892 fi
28893 rm -f conftest*
28894 
28895 fi
28896 
28897 if test $ac_cv_header_stdc = yes; then
28898   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28900 /* end confdefs.h.  */
28901 #include <stdlib.h>
28902 
28903 _ACEOF
28904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28905   $EGREP "free" >/dev/null 2>&1; then :
28906 
28907 else
28908   ac_cv_header_stdc=no
28909 fi
28910 rm -f conftest*
28911 
28912 fi
28913 
28914 if test $ac_cv_header_stdc = yes; then
28915   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28916   if test "$cross_compiling" = yes; then :
28917   :
28918 else
28919   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28920 /* end confdefs.h.  */
28921 #include <ctype.h>
28922 #include <stdlib.h>
28923 #if ((' ' & 0x0FF) == 0x020)
28924 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28925 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28926 #else
28927 # define ISLOWER(c) \
28928                    (('a' <= (c) && (c) <= 'i') \
28929                      || ('j' <= (c) && (c) <= 'r') \
28930                      || ('s' <= (c) && (c) <= 'z'))
28931 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28932 #endif
28933 
28934 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28935 int
28936 main ()
28937 {
28938   int i;
28939   for (i = 0; i < 256; i++)
28940     if (XOR (islower (i), ISLOWER (i))
28941         || toupper (i) != TOUPPER (i))
28942       return 2;
28943   return 0;
28944 }
28945 _ACEOF
28946 if ac_fn_cxx_try_run "$LINENO"; then :
28947 
28948 else
28949   ac_cv_header_stdc=no
28950 fi
28951 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28952   conftest.$ac_objext conftest.beam conftest.$ac_ext
28953 fi
28954 
28955 fi
28956 fi
28957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28958 $as_echo "$ac_cv_header_stdc" >&6; }
28959 if test $ac_cv_header_stdc = yes; then
28960 
28961 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28962 
28963 fi
28964 
28965 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28966 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28967                   inttypes.h stdint.h unistd.h
28968 do :
28969   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28970 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28971 "
28972 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28973   cat >>confdefs.h <<_ACEOF
28974 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28975 _ACEOF
28976 
28977 fi
28978 
28979 done
28980 
28981 
28982 
28983   ###############################################################################
28984   #
28985   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28986   # (The JVM can use 32 or 64 bit Java pointers but that decision
28987   # is made at runtime.)
28988   #
28989 
28990   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28991     # Always specify -m flag on Solaris
28992     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28993 
28994   # When we add flags to the "official" CFLAGS etc, we need to
28995   # keep track of these additions in ADDED_CFLAGS etc. These
28996   # will later be checked to make sure only controlled additions
28997   # have been made to CFLAGS etc.
28998   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28999   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29000   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29001 
29002   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29003   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29004   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29005 
29006   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29007   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29008   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29009 
29010   elif test "x$COMPILE_TYPE" = xreduced; then
29011     if test "x$OPENJDK_TARGET_OS" != xwindows; then
29012       # Specify -m if running reduced on other Posix platforms
29013 
29014   # When we add flags to the "official" CFLAGS etc, we need to
29015   # keep track of these additions in ADDED_CFLAGS etc. These
29016   # will later be checked to make sure only controlled additions
29017   # have been made to CFLAGS etc.
29018   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29019   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29020   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29021 
29022   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29023   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29024   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29025 
29026   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29027   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29028   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29029 
29030     fi
29031   fi
29032 
29033   # Make compilation sanity check
29034   for ac_header in stdio.h
29035 do :
29036   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
29037 if test "x$ac_cv_header_stdio_h" = xyes; then :
29038   cat >>confdefs.h <<_ACEOF
29039 #define HAVE_STDIO_H 1
29040 _ACEOF
29041 
29042 else
29043 
29044     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
29045 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
29046     if test "x$COMPILE_TYPE" = xreduced; then
29047       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
29048 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
29049     elif test "x$COMPILE_TYPE" = xcross; then
29050       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
29051 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
29052     fi
29053     as_fn_error $? "Cannot continue." "$LINENO" 5
29054 
29055 fi
29056 
29057 done
29058 
29059 
29060   # The cast to long int works around a bug in the HP C Compiler
29061 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29062 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29063 # This bug is HP SR number 8606223364.
29064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29065 $as_echo_n "checking size of int *... " >&6; }
29066 if ${ac_cv_sizeof_int_p+:} false; then :
29067   $as_echo_n "(cached) " >&6
29068 else
29069   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29070 
29071 else
29072   if test "$ac_cv_type_int_p" = yes; then
29073      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29074 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29075 as_fn_error 77 "cannot compute sizeof (int *)
29076 See \`config.log' for more details" "$LINENO" 5; }
29077    else
29078      ac_cv_sizeof_int_p=0
29079    fi
29080 fi
29081 
29082 fi
29083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29084 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29085 
29086 
29087 
29088 cat >>confdefs.h <<_ACEOF
29089 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29090 _ACEOF
29091 
29092 
29093 
29094   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
29095   if test "x$ac_cv_sizeof_int_p" = x; then
29096     # The test failed, lets stick to the assumed value.
29097     { $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
29098 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29099   else
29100     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29101 
29102     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29103       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
29104       # Let's try to implicitely set the compilers target architecture and retry the test
29105       { $as_echo "$as_me:${as_lineno-$LINENO}: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&5
29106 $as_echo "$as_me: The tested number of bits in the target ($TESTED_TARGET_CPU_BITS) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)." >&6;}
29107       { $as_echo "$as_me:${as_lineno-$LINENO}: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
29108 $as_echo "$as_me: I'll retry after setting the platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
29109 
29110   # When we add flags to the "official" CFLAGS etc, we need to
29111   # keep track of these additions in ADDED_CFLAGS etc. These
29112   # will later be checked to make sure only controlled additions
29113   # have been made to CFLAGS etc.
29114   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29115   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29116   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29117 
29118   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29119   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29120   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29121 
29122   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29123   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29124   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29125 
29126 
29127       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29128       unset ac_cv_sizeof_int_p
29129       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29130       cat >>confdefs.h <<_ACEOF
29131 #undef SIZEOF_INT_P
29132 _ACEOF
29133 
29134       # The cast to long int works around a bug in the HP C Compiler
29135 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29136 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29137 # This bug is HP SR number 8606223364.
29138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29139 $as_echo_n "checking size of int *... " >&6; }
29140 if ${ac_cv_sizeof_int_p+:} false; then :
29141   $as_echo_n "(cached) " >&6
29142 else
29143   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29144 
29145 else
29146   if test "$ac_cv_type_int_p" = yes; then
29147      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29149 as_fn_error 77 "cannot compute sizeof (int *)
29150 See \`config.log' for more details" "$LINENO" 5; }
29151    else
29152      ac_cv_sizeof_int_p=0
29153    fi
29154 fi
29155 
29156 fi
29157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29158 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29159 
29160 
29161 
29162 cat >>confdefs.h <<_ACEOF
29163 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29164 _ACEOF
29165 
29166 
29167 
29168       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29169 
29170       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29171         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
29172       fi
29173     fi
29174   fi
29175 
29176   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29177 $as_echo_n "checking for target address size... " >&6; }
29178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29179 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29180 
29181 
29182   ###############################################################################
29183   #
29184   # Is the target little of big endian?
29185   #
29186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29187 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29188 if ${ac_cv_c_bigendian+:} false; then :
29189   $as_echo_n "(cached) " >&6
29190 else
29191   ac_cv_c_bigendian=unknown
29192     # See if we're dealing with a universal compiler.
29193     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29194 /* end confdefs.h.  */
29195 #ifndef __APPLE_CC__
29196                not a universal capable compiler
29197              #endif
29198              typedef int dummy;
29199 
29200 _ACEOF
29201 if ac_fn_cxx_try_compile "$LINENO"; then :
29202 
29203         # Check for potential -arch flags.  It is not universal unless
29204         # there are at least two -arch flags with different values.
29205         ac_arch=
29206         ac_prev=
29207         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29208          if test -n "$ac_prev"; then
29209            case $ac_word in
29210              i?86 | x86_64 | ppc | ppc64)
29211                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29212                  ac_arch=$ac_word
29213                else
29214                  ac_cv_c_bigendian=universal
29215                  break
29216                fi
29217                ;;
29218            esac
29219            ac_prev=
29220          elif test "x$ac_word" = "x-arch"; then
29221            ac_prev=arch
29222          fi
29223        done
29224 fi
29225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29226     if test $ac_cv_c_bigendian = unknown; then
29227       # See if sys/param.h defines the BYTE_ORDER macro.
29228       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29229 /* end confdefs.h.  */
29230 #include <sys/types.h>
29231              #include <sys/param.h>
29232 
29233 int
29234 main ()
29235 {
29236 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29237                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29238                      && LITTLE_ENDIAN)
29239               bogus endian macros
29240              #endif
29241 
29242   ;
29243   return 0;
29244 }
29245 _ACEOF
29246 if ac_fn_cxx_try_compile "$LINENO"; then :
29247   # It does; now see whether it defined to BIG_ENDIAN or not.
29248          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29249 /* end confdefs.h.  */
29250 #include <sys/types.h>
29251                 #include <sys/param.h>
29252 
29253 int
29254 main ()
29255 {
29256 #if BYTE_ORDER != BIG_ENDIAN
29257                  not big endian
29258                 #endif
29259 
29260   ;
29261   return 0;
29262 }
29263 _ACEOF
29264 if ac_fn_cxx_try_compile "$LINENO"; then :
29265   ac_cv_c_bigendian=yes
29266 else
29267   ac_cv_c_bigendian=no
29268 fi
29269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29270 fi
29271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29272     fi
29273     if test $ac_cv_c_bigendian = unknown; then
29274       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29275       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29276 /* end confdefs.h.  */
29277 #include <limits.h>
29278 
29279 int
29280 main ()
29281 {
29282 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29283               bogus endian macros
29284              #endif
29285 
29286   ;
29287   return 0;
29288 }
29289 _ACEOF
29290 if ac_fn_cxx_try_compile "$LINENO"; then :
29291   # It does; now see whether it defined to _BIG_ENDIAN or not.
29292          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29293 /* end confdefs.h.  */
29294 #include <limits.h>
29295 
29296 int
29297 main ()
29298 {
29299 #ifndef _BIG_ENDIAN
29300                  not big endian
29301                 #endif
29302 
29303   ;
29304   return 0;
29305 }
29306 _ACEOF
29307 if ac_fn_cxx_try_compile "$LINENO"; then :
29308   ac_cv_c_bigendian=yes
29309 else
29310   ac_cv_c_bigendian=no
29311 fi
29312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29313 fi
29314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29315     fi
29316     if test $ac_cv_c_bigendian = unknown; then
29317       # Compile a test program.
29318       if test "$cross_compiling" = yes; then :
29319   # Try to guess by grepping values from an object file.
29320          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29321 /* end confdefs.h.  */
29322 short int ascii_mm[] =
29323                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29324                 short int ascii_ii[] =
29325                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29326                 int use_ascii (int i) {
29327                   return ascii_mm[i] + ascii_ii[i];
29328                 }
29329                 short int ebcdic_ii[] =
29330                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29331                 short int ebcdic_mm[] =
29332                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29333                 int use_ebcdic (int i) {
29334                   return ebcdic_mm[i] + ebcdic_ii[i];
29335                 }
29336                 extern int foo;
29337 
29338 int
29339 main ()
29340 {
29341 return use_ascii (foo) == use_ebcdic (foo);
29342   ;
29343   return 0;
29344 }
29345 _ACEOF
29346 if ac_fn_cxx_try_compile "$LINENO"; then :
29347   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29348               ac_cv_c_bigendian=yes
29349             fi
29350             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29351               if test "$ac_cv_c_bigendian" = unknown; then
29352                 ac_cv_c_bigendian=no
29353               else
29354                 # finding both strings is unlikely to happen, but who knows?
29355                 ac_cv_c_bigendian=unknown
29356               fi
29357             fi
29358 fi
29359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29360 else
29361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29362 /* end confdefs.h.  */
29363 $ac_includes_default
29364 int
29365 main ()
29366 {
29367 
29368              /* Are we little or big endian?  From Harbison&Steele.  */
29369              union
29370              {
29371                long int l;
29372                char c[sizeof (long int)];
29373              } u;
29374              u.l = 1;
29375              return u.c[sizeof (long int) - 1] == 1;
29376 
29377   ;
29378   return 0;
29379 }
29380 _ACEOF
29381 if ac_fn_cxx_try_run "$LINENO"; then :
29382   ac_cv_c_bigendian=no
29383 else
29384   ac_cv_c_bigendian=yes
29385 fi
29386 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29387   conftest.$ac_objext conftest.beam conftest.$ac_ext
29388 fi
29389 
29390     fi
29391 fi
29392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29393 $as_echo "$ac_cv_c_bigendian" >&6; }
29394  case $ac_cv_c_bigendian in #(
29395    yes)
29396      ENDIAN="big";; #(
29397    no)
29398      ENDIAN="little" ;; #(
29399    universal)
29400      ENDIAN="universal_endianness"
29401      ;; #(
29402    *)
29403      ENDIAN="unknown" ;;
29404  esac
29405 
29406 
29407   if test "x$ENDIAN" = xuniversal_endianness; then
29408     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29409   fi
29410   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29411     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
29412   fi
29413 
29414 
29415 # Configure flags for the tools
29416 
29417 
29418   ###############################################################################
29419   #
29420   # How to compile shared libraries.
29421   #
29422 
29423   if test "x$GCC" = xyes; then
29424     COMPILER_NAME=gcc
29425     PICFLAG="-fPIC"
29426     LIBRARY_PREFIX=lib
29427     SHARED_LIBRARY='lib$1.so'
29428     STATIC_LIBRARY='lib$1.a'
29429     SHARED_LIBRARY_FLAGS="-shared"
29430     SHARED_LIBRARY_SUFFIX='.so'
29431     STATIC_LIBRARY_SUFFIX='.a'
29432     OBJ_SUFFIX='.o'
29433     EXE_SUFFIX=''
29434     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29435     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29436     C_FLAG_REORDER=''
29437     CXX_FLAG_REORDER=''
29438     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29439     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29440     LD="$CC"
29441     LDEXE="$CC"
29442     LDCXX="$CXX"
29443     LDEXECXX="$CXX"
29444     POST_STRIP_CMD="$STRIP -g"
29445 
29446     # Linking is different on MacOSX
29447     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29448       # Might change in the future to clang.
29449       COMPILER_NAME=gcc
29450       SHARED_LIBRARY='lib$1.dylib'
29451       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29452       SHARED_LIBRARY_SUFFIX='.dylib'
29453       EXE_SUFFIX=''
29454       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29455       SET_SHARED_LIBRARY_MAPFILE=''
29456       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29457       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29458       POST_STRIP_CMD="$STRIP -S"
29459     fi
29460   else
29461     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29462       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29463       COMPILER_NAME=ossc
29464       PICFLAG="-KPIC"
29465       LIBRARY_PREFIX=lib
29466       SHARED_LIBRARY='lib$1.so'
29467       STATIC_LIBRARY='lib$1.a'
29468       SHARED_LIBRARY_FLAGS="-G"
29469       SHARED_LIBRARY_SUFFIX='.so'
29470       STATIC_LIBRARY_SUFFIX='.a'
29471       OBJ_SUFFIX='.o'
29472       EXE_SUFFIX=''
29473       SET_SHARED_LIBRARY_NAME=''
29474       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29475       C_FLAG_REORDER='-xF'
29476       CXX_FLAG_REORDER='-xF'
29477       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29478       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29479       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29480       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29481       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29482       POST_STRIP_CMD="$STRIP -x"
29483       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29484     fi
29485     if test "x$OPENJDK_TARGET_OS" = xaix; then
29486         COMPILER_NAME=xlc
29487         PICFLAG="-qpic=large"
29488         LIBRARY_PREFIX=lib
29489         SHARED_LIBRARY='lib$1.so'
29490         STATIC_LIBRARY='lib$1.a'
29491         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29492         SHARED_LIBRARY_SUFFIX='.so'
29493         STATIC_LIBRARY_SUFFIX='.a'
29494         OBJ_SUFFIX='.o'
29495         EXE_SUFFIX=''
29496         SET_SHARED_LIBRARY_NAME=''
29497         SET_SHARED_LIBRARY_MAPFILE=''
29498         C_FLAG_REORDER=''
29499         CXX_FLAG_REORDER=''
29500         SET_SHARED_LIBRARY_ORIGIN=''
29501         SET_EXECUTABLE_ORIGIN=""
29502         CFLAGS_JDK=""
29503         CXXFLAGS_JDK=""
29504         CFLAGS_JDKLIB_EXTRA=''
29505         POST_STRIP_CMD="$STRIP -X32_64"
29506         POST_MCS_CMD=""
29507     fi
29508     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29509       # If it is not gcc, then assume it is the MS Visual Studio compiler
29510       COMPILER_NAME=cl
29511       PICFLAG=""
29512       LIBRARY_PREFIX=
29513       SHARED_LIBRARY='$1.dll'
29514       STATIC_LIBRARY='$1.lib'
29515       SHARED_LIBRARY_FLAGS="-LD"
29516       SHARED_LIBRARY_SUFFIX='.dll'
29517       STATIC_LIBRARY_SUFFIX='.lib'
29518       OBJ_SUFFIX='.obj'
29519       EXE_SUFFIX='.exe'
29520       SET_SHARED_LIBRARY_NAME=''
29521       SET_SHARED_LIBRARY_MAPFILE=''
29522       SET_SHARED_LIBRARY_ORIGIN=''
29523       SET_EXECUTABLE_ORIGIN=''
29524     fi
29525   fi
29526 
29527 
29528 
29529 
29530 
29531 
29532 
29533 
29534 
29535 
29536 
29537 
29538 
29539 
29540 
29541 
29542 
29543 
29544 
29545   # The (cross) compiler is now configured, we can now test capabilities
29546   # of the target platform.
29547 
29548 
29549 
29550   ###############################################################################
29551   #
29552   # Setup the opt flags for different compilers
29553   # and different operating systems.
29554   #
29555 
29556   #
29557   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29558   #
29559   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29560     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29561     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29562     CFLAGS="$CFLAGS -mstackrealign"
29563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29564 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29565     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29566 /* end confdefs.h.  */
29567 int main() { return 0; }
29568 _ACEOF
29569 if ac_fn_cxx_try_link "$LINENO"; then :
29570 
29571           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29572 $as_echo "yes" >&6; }
29573 
29574 else
29575 
29576           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29577 $as_echo "no" >&6; }
29578           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29579 
29580 
29581 fi
29582 rm -f core conftest.err conftest.$ac_objext \
29583     conftest$ac_exeext conftest.$ac_ext
29584   fi
29585 
29586   C_FLAG_DEPS="-MMD -MF"
29587   CXX_FLAG_DEPS="-MMD -MF"
29588 
29589   case $COMPILER_TYPE in
29590     CC )
29591       case $COMPILER_NAME in
29592         gcc )
29593           case $OPENJDK_TARGET_OS in
29594             macosx )
29595               # On MacOSX we optimize for size, something
29596               # we should do for all platforms?
29597               C_O_FLAG_HI="-Os"
29598               C_O_FLAG_NORM="-Os"
29599               C_O_FLAG_NONE=""
29600               ;;
29601             *)
29602               C_O_FLAG_HI="-O3"
29603               C_O_FLAG_NORM="-O2"
29604               C_O_FLAG_NONE="-O0"
29605               ;;
29606           esac
29607           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29608           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29609           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29610           CFLAGS_DEBUG_SYMBOLS="-g"
29611           CXXFLAGS_DEBUG_SYMBOLS="-g"
29612           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29613             CFLAGS_DEBUG_SYMBOLS="-g1"
29614             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29615           fi
29616           ;;
29617         ossc )
29618           #
29619           # Forte has different names for this with their C++ compiler...
29620           #
29621           C_FLAG_DEPS="-xMMD -xMF"
29622           CXX_FLAG_DEPS="-xMMD -xMF"
29623 
29624           # Extra options used with HIGHEST
29625           #
29626           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29627           #          done with care, there are some assumptions below that need to
29628           #          be understood about the use of pointers, and IEEE behavior.
29629           #
29630           # Use non-standard floating point mode (not IEEE 754)
29631           CC_HIGHEST="$CC_HIGHEST -fns"
29632           # Do some simplification of floating point arithmetic (not IEEE 754)
29633           CC_HIGHEST="$CC_HIGHEST -fsimple"
29634           # Use single precision floating point with 'float'
29635           CC_HIGHEST="$CC_HIGHEST -fsingle"
29636           # Assume memory references via basic pointer types do not alias
29637           #   (Source with excessing pointer casting and data access with mixed
29638           #    pointer types are not recommended)
29639           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29640           # Use intrinsic or inline versions for math/std functions
29641           #   (If you expect perfect errno behavior, do not use this)
29642           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29643           # Loop data dependency optimizations (need -xO3 or higher)
29644           CC_HIGHEST="$CC_HIGHEST -xdepend"
29645           # Pointer parameters to functions do not overlap
29646           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29647           #    If you pass in multiple pointers to the same data, do not use this)
29648           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29649           # Inline some library routines
29650           #   (If you expect perfect errno behavior, do not use this)
29651           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29652           # Use optimized math routines
29653           #   (If you expect perfect errno behavior, do not use this)
29654           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29655           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29656 
29657           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29658             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29659             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29660           fi
29661 
29662           case $OPENJDK_TARGET_CPU_ARCH in
29663             x86)
29664               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29665               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29666               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29667               C_O_FLAG_NONE="-xregs=no%frameptr"
29668               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29669               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29670               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29671               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29672               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29673                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29674                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29675               fi
29676               ;;
29677             sparc)
29678               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29679               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29680               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29681               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29682               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29683               C_O_FLAG_NONE=""
29684               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29685               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29686               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29687               CXX_O_FLAG_NONE=""
29688               ;;
29689           esac
29690 
29691           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29692           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29693           ;;
29694         xlc )
29695           C_FLAG_DEPS="-qmakedep=gcc -MF"
29696           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29697           C_O_FLAG_HIGHEST="-O3"
29698           C_O_FLAG_HI="-O3 -qstrict"
29699           C_O_FLAG_NORM="-O2"
29700           C_O_FLAG_NONE=""
29701           CXX_O_FLAG_HIGHEST="-O3"
29702           CXX_O_FLAG_HI="-O3 -qstrict"
29703           CXX_O_FLAG_NORM="-O2"
29704           CXX_O_FLAG_NONE=""
29705           CFLAGS_DEBUG_SYMBOLS="-g"
29706           CXXFLAGS_DEBUG_SYMBOLS="-g"
29707           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29708           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29709           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29710           ;;
29711       esac
29712       ;;
29713     CL )
29714       C_O_FLAG_HIGHEST="-O2"
29715       C_O_FLAG_HI="-O1"
29716       C_O_FLAG_NORM="-O1"
29717       C_O_FLAG_NONE="-Od"
29718       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29719       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29720       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29721       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29722       ;;
29723   esac
29724 
29725   if test -z "$C_O_FLAG_HIGHEST"; then
29726     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29727   fi
29728 
29729   if test -z "$CXX_O_FLAG_HIGHEST"; then
29730     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29731   fi
29732 
29733 
29734 
29735 
29736 
29737 
29738 
29739 
29740 
29741 
29742 
29743 
29744 
29745 
29746   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29747     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29748 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29749   fi
29750 
29751   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29752     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29753 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29754   fi
29755 
29756   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29757     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29758 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29759   fi
29760 
29761 
29762 # Check whether --with-extra-cflags was given.
29763 if test "${with_extra_cflags+set}" = set; then :
29764   withval=$with_extra_cflags;
29765 fi
29766 
29767 
29768 
29769 # Check whether --with-extra-cxxflags was given.
29770 if test "${with_extra_cxxflags+set}" = set; then :
29771   withval=$with_extra_cxxflags;
29772 fi
29773 
29774 
29775 
29776 # Check whether --with-extra-ldflags was given.
29777 if test "${with_extra_ldflags+set}" = set; then :
29778   withval=$with_extra_ldflags;
29779 fi
29780 
29781 
29782   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29783   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29784   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29785 
29786   # Hotspot needs these set in their legacy form
29787   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29788   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29789   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29790 
29791 
29792 
29793 
29794 
29795   ###############################################################################
29796   #
29797   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29798   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29799   #
29800   case $COMPILER_NAME in
29801     gcc )
29802       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29803       -pipe \
29804       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29805       case $OPENJDK_TARGET_CPU_ARCH in
29806         arm )
29807           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29808           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29809           ;;
29810         ppc )
29811           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29812           ;;
29813         * )
29814           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29815           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29816           ;;
29817       esac
29818       ;;
29819     ossc )
29820       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29821       case $OPENJDK_TARGET_CPU_ARCH in
29822         x86 )
29823           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29824           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29825           ;;
29826       esac
29827 
29828       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29829       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29830 
29831       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29832       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29833       ;;
29834     xlc )
29835       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29836       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29837 
29838       LDFLAGS_JDK="$LDFLAGS_JDK"
29839       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29840       ;;
29841     cl )
29842       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29843       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29844       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29845       -DWIN32 -DIAL"
29846       case $OPENJDK_TARGET_CPU in
29847         x86 )
29848           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29849           ;;
29850         x86_64 )
29851           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29852           ;;
29853       esac
29854       ;;
29855   esac
29856 
29857   ###############################################################################
29858 
29859   # Adjust flags according to debug level.
29860   case $DEBUG_LEVEL in
29861     fastdebug )
29862       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29863       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29864       C_O_FLAG_HI="$C_O_FLAG_NORM"
29865       C_O_FLAG_NORM="$C_O_FLAG_NORM"
29866       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29867       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29868       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29869       ;;
29870     slowdebug )
29871       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29872       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29873       C_O_FLAG_HI="$C_O_FLAG_NONE"
29874       C_O_FLAG_NORM="$C_O_FLAG_NONE"
29875       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29876       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29877       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29878       ;;
29879   esac
29880 
29881   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29882 
29883   # The package path is used only on macosx?
29884   PACKAGE_PATH=/opt/local
29885 
29886 
29887   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29888     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29889     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29890     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29891     #   Note: -Dmacro         is the same as    #define macro 1
29892     #         -Dmacro=        is the same as    #define macro
29893     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29894       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29895     else
29896       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29897     fi
29898   else
29899     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29900   fi
29901   if test "x$OPENJDK_TARGET_OS" = xlinux; then
29902     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29903   fi
29904   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29905     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29906   fi
29907   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29908     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29909   fi
29910   if test "x$OPENJDK_TARGET_OS" = xaix; then
29911     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29912   fi
29913   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29914     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29915     # Setting these parameters makes it an error to link to macosx APIs that are
29916     # newer than the given OS version and makes the linked binaries compatible even
29917     # if built on a newer version of the OS.
29918     # The expected format is X.Y.Z
29919     MACOSX_VERSION_MIN=10.7.0
29920 
29921     # The macro takes the version with no dots, ex: 1070
29922     # Let the flags variables get resolved in make for easier override on make
29923     # command line.
29924     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29925     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29926   fi
29927   if test "x$OPENJDK_TARGET_OS" = xbsd; then
29928     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29929   fi
29930   if test "x$DEBUG_LEVEL" = xrelease; then
29931     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29932   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29933     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29934   fi
29935   else
29936     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29937   fi
29938 
29939   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29940   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
29941 
29942   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29943       -I${JDK_OUTPUTDIR}/include \
29944       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29945       -I${JDK_TOPDIR}/src/share/javavm/export \
29946       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29947       -I${JDK_TOPDIR}/src/share/native/common \
29948       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29949 
29950   # The shared libraries are compiled using the picflag.
29951   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29952   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29953 
29954   # Executable flags
29955   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29956   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29957 
29958   # Now this is odd. The JDK native libraries have to link against libjvm.so
29959   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29960   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29961   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29962   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29963   # libraries will link to whatever is in memory. Yuck.
29964   #
29965   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29966   if test "x$COMPILER_NAME" = xcl; then
29967     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29968     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29969       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29970     fi
29971     # TODO: make -debug optional "--disable-full-debug-symbols"
29972     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29973     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29974     LDFLAGS_JDKLIB_SUFFIX=""
29975     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29976       LDFLAGS_STACK_SIZE=1048576
29977     else
29978       LDFLAGS_STACK_SIZE=327680
29979     fi
29980     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29981   else
29982     if test "x$COMPILER_NAME" = xgcc; then
29983       # If this is a --hash-style=gnu system, use --hash-style=both, why?
29984       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29985       if test -n "$HAS_GNU_HASH"; then
29986         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29987       fi
29988       if test "x$OPENJDK_TARGET_OS" = xlinux; then
29989         # And since we now know that the linker is gnu, then add -z defs, to forbid
29990         # undefined symbols in object files.
29991         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29992         if test "x$DEBUG_LEVEL" = "xrelease"; then
29993           # When building release libraries, tell the linker optimize them.
29994           # Should this be supplied to the OSS linker as well?
29995           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29996         fi
29997       fi
29998     fi
29999     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
30000         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
30001 
30002     # On some platforms (mac) the linker warns about non existing -L dirs.
30003     # Add server first if available. Linking aginst client does not always produce the same results.
30004     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
30005     # Default to server for other variants.
30006     if test "x$JVM_VARIANT_SERVER" = xtrue; then
30007       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30008     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
30009       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
30010     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
30011       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
30012     else
30013       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
30014     fi
30015 
30016     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
30017     if test "x$COMPILER_NAME" = xossc; then
30018       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
30019     fi
30020 
30021     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
30022     if test "x$OPENJDK_TARGET_OS" = xlinux; then
30023       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
30024     fi
30025   fi
30026 
30027 
30028 
30029 
30030 
30031 
30032 
30033 
30034 
30035 
30036 
30037 
30038 
30039 
30040 
30041   # Some Zero and Shark settings.
30042   # ZERO_ARCHFLAG tells the compiler which mode to build for
30043   case "${OPENJDK_TARGET_CPU}" in
30044     s390)
30045       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
30046       ;;
30047     *)
30048       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30049   esac
30050 
30051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
30052 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
30053   supports=yes
30054 
30055   saved_cflags="$CFLAGS"
30056   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
30057   ac_ext=c
30058 ac_cpp='$CPP $CPPFLAGS'
30059 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30060 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30061 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30062 
30063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30064 /* end confdefs.h.  */
30065 int i;
30066 _ACEOF
30067 if ac_fn_c_try_compile "$LINENO"; then :
30068 
30069 else
30070   supports=no
30071 fi
30072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30073   ac_ext=cpp
30074 ac_cpp='$CXXCPP $CPPFLAGS'
30075 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30076 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30077 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30078 
30079   CFLAGS="$saved_cflags"
30080 
30081   saved_cxxflags="$CXXFLAGS"
30082   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
30083   ac_ext=cpp
30084 ac_cpp='$CXXCPP $CPPFLAGS'
30085 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30086 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30087 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30088 
30089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30090 /* end confdefs.h.  */
30091 int i;
30092 _ACEOF
30093 if ac_fn_cxx_try_compile "$LINENO"; then :
30094 
30095 else
30096   supports=no
30097 fi
30098 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30099   ac_ext=cpp
30100 ac_cpp='$CXXCPP $CPPFLAGS'
30101 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30102 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30103 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30104 
30105   CXXFLAGS="$saved_cxxflags"
30106 
30107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30108 $as_echo "$supports" >&6; }
30109   if test "x$supports" = "xyes" ; then
30110     :
30111   else
30112     ZERO_ARCHFLAG=""
30113   fi
30114 
30115 
30116 
30117   # Check that the compiler supports -mX (or -qX on AIX) flags
30118   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30119 
30120   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30121 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30122   supports=yes
30123 
30124   saved_cflags="$CFLAGS"
30125   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30126   ac_ext=c
30127 ac_cpp='$CPP $CPPFLAGS'
30128 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30129 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30130 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30131 
30132   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30133 /* end confdefs.h.  */
30134 int i;
30135 _ACEOF
30136 if ac_fn_c_try_compile "$LINENO"; then :
30137 
30138 else
30139   supports=no
30140 fi
30141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30142   ac_ext=cpp
30143 ac_cpp='$CXXCPP $CPPFLAGS'
30144 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30145 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30146 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30147 
30148   CFLAGS="$saved_cflags"
30149 
30150   saved_cxxflags="$CXXFLAGS"
30151   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30152   ac_ext=cpp
30153 ac_cpp='$CXXCPP $CPPFLAGS'
30154 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30155 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30156 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30157 
30158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30159 /* end confdefs.h.  */
30160 int i;
30161 _ACEOF
30162 if ac_fn_cxx_try_compile "$LINENO"; then :
30163 
30164 else
30165   supports=no
30166 fi
30167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30168   ac_ext=cpp
30169 ac_cpp='$CXXCPP $CPPFLAGS'
30170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30171 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30173 
30174   CXXFLAGS="$saved_cxxflags"
30175 
30176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30177 $as_echo "$supports" >&6; }
30178   if test "x$supports" = "xyes" ; then
30179     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30180   else
30181     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30182   fi
30183 
30184 
30185 
30186 
30187   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30188   USING_BROKEN_SUSE_LD=no
30189   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30190     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30191 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30192     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30193     echo "int main() { }" > main.c
30194     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30195       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30196 $as_echo "no" >&6; }
30197       USING_BROKEN_SUSE_LD=no
30198     else
30199       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30200 $as_echo "yes" >&6; }
30201       USING_BROKEN_SUSE_LD=yes
30202     fi
30203     rm -rf version-script.map main.c
30204   fi
30205 
30206 
30207 
30208 # Setup debug symbols (need objcopy from the toolchain for that)
30209 
30210   #
30211   # ENABLE_DEBUG_SYMBOLS
30212   # This must be done after the toolchain is setup, since we're looking at objcopy.
30213   #
30214   # Check whether --enable-debug-symbols was given.
30215 if test "${enable_debug_symbols+set}" = set; then :
30216   enableval=$enable_debug_symbols;
30217 fi
30218 
30219 
30220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30221 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30222 
30223   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30224     # explicit enabling of enable-debug-symbols and can't find objcopy
30225     #   this is an error
30226     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30227   fi
30228 
30229   if test "x$enable_debug_symbols" = "xyes"; then
30230     ENABLE_DEBUG_SYMBOLS=true
30231   elif test "x$enable_debug_symbols" = "xno"; then
30232     ENABLE_DEBUG_SYMBOLS=false
30233   else
30234     # Default is on if objcopy is found
30235     if test "x$OBJCOPY" != x; then
30236       ENABLE_DEBUG_SYMBOLS=true
30237     # MacOS X and Windows don't use objcopy but default is on for those OSes
30238     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30239       ENABLE_DEBUG_SYMBOLS=true
30240     else
30241       ENABLE_DEBUG_SYMBOLS=false
30242     fi
30243   fi
30244 
30245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30246 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30247 
30248   #
30249   # ZIP_DEBUGINFO_FILES
30250   #
30251   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30252 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30253   # Check whether --enable-zip-debug-info was given.
30254 if test "${enable_zip_debug_info+set}" = set; then :
30255   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30256 else
30257   enable_zip_debug_info="yes"
30258 fi
30259 
30260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30261 $as_echo "${enable_zip_debug_info}" >&6; }
30262 
30263   if test "x${enable_zip_debug_info}" = "xno"; then
30264     ZIP_DEBUGINFO_FILES=false
30265   else
30266     ZIP_DEBUGINFO_FILES=true
30267   fi
30268 
30269 
30270 
30271 
30272 
30273 
30274 
30275 ###############################################################################
30276 #
30277 # Check dependencies for external and internal libraries.
30278 #
30279 ###############################################################################
30280 
30281 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30282 
30283   # When using cygwin or msys, we need a wrapper binary that renames
30284   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30285   # @files and rewrites these too! This wrapper binary is
30286   # called fixpath.
30287   FIXPATH=
30288   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30289     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30290 $as_echo_n "checking if fixpath can be created... " >&6; }
30291     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30292     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30293     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30294       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30295       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30296       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30297       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30298     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30299       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30300       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30301 
30302       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30303       # @ was chosen as separator to minimize risk of other tools messing around with it
30304       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30305       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30306 
30307       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30308     fi
30309     rm -f $OUTPUT_ROOT/fixpath*
30310     cd $OUTPUT_ROOT
30311     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30312     cd $CURDIR
30313 
30314     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30315       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30316 $as_echo "no" >&6; }
30317       cat $OUTPUT_ROOT/fixpath1.log
30318       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30319     fi
30320     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30321 $as_echo "yes" >&6; }
30322     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30323 $as_echo_n "checking if fixpath.exe works... " >&6; }
30324     cd $OUTPUT_ROOT
30325     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30326     cd $CURDIR
30327     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30328       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30329 $as_echo "no" >&6; }
30330       cat $OUTPUT_ROOT/fixpath2.log
30331       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30332     fi
30333     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30334 $as_echo "yes" >&6; }
30335     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30336   fi
30337 
30338 
30339 
30340 
30341 
30342 
30343   ###############################################################################
30344   #
30345   # OS specific settings that we never will need to probe.
30346   #
30347   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30348     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30349 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30350     PULSE_NOT_NEEDED=yes
30351     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30352 $as_echo "pulse" >&6; }
30353   fi
30354 
30355   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30356     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30357 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30358     ALSA_NOT_NEEDED=yes
30359     PULSE_NOT_NEEDED=yes
30360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30361 $as_echo "alsa pulse" >&6; }
30362   fi
30363 
30364   if test "x$OPENJDK_TARGET_OS" = xaix; then
30365     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30366 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30367     ALSA_NOT_NEEDED=yes
30368     PULSE_NOT_NEEDED=yes
30369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30370 $as_echo "alsa pulse" >&6; }
30371   fi
30372 
30373 
30374   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30376 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30377     CUPS_NOT_NEEDED=yes
30378     ALSA_NOT_NEEDED=yes
30379     PULSE_NOT_NEEDED=yes
30380     X11_NOT_NEEDED=yes
30381     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30382 $as_echo "alsa cups pulse x11" >&6; }
30383   fi
30384 
30385   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30387 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30388     ALSA_NOT_NEEDED=yes
30389     PULSE_NOT_NEEDED=yes
30390     X11_NOT_NEEDED=yes
30391     # If the java runtime framework is disabled, then we need X11.
30392     # This will be adjusted below.
30393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30394 $as_echo "alsa pulse x11" >&6; }
30395   fi
30396 
30397   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30399 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30400     ALSA_NOT_NEEDED=yes
30401     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30402 $as_echo "alsa" >&6; }
30403   fi
30404 
30405   if test "x$OPENJDK" = "xfalse"; then
30406     FREETYPE_NOT_NEEDED=yes
30407   fi
30408 
30409   if test "x$SUPPORT_HEADFUL" = xno; then
30410     X11_NOT_NEEDED=yes
30411   fi
30412 
30413   ###############################################################################
30414   #
30415   # Check for MacOSX support for OpenJDK.
30416   #
30417 
30418 
30419   # Check whether --enable-macosx-runtime-support was given.
30420 if test "${enable_macosx_runtime_support+set}" = set; then :
30421   enableval=$enable_macosx_runtime_support;
30422 fi
30423 
30424   if test "x$enable_macosx_runtime_support" != x; then
30425     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30426 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30427   fi
30428 
30429 
30430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30431 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30432   if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30433     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30434 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30435   else
30436     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30437 $as_echo "no" >&6; }
30438   fi
30439 
30440 
30441 
30442   ###############################################################################
30443   #
30444   # Check for X Windows
30445   #
30446 
30447   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30448   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30449   # --x-libraries for the sysroot, if that seems to be correct.
30450   if test "x$SYS_ROOT" != "x/"; then
30451     if test "x$x_includes" = xNONE; then
30452       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30453         x_includes="$SYS_ROOT/usr/X11R6/include"
30454       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30455         x_includes="$SYS_ROOT/usr/include"
30456       fi
30457     fi
30458     if test "x$x_libraries" = xNONE; then
30459       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30460         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30461       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30462         x_libraries="$SYS_ROOT/usr/lib64"
30463       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30464         x_libraries="$SYS_ROOT/usr/lib"
30465       fi
30466     fi
30467   fi
30468 
30469   # Now let autoconf do it's magic
30470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30471 $as_echo_n "checking for X... " >&6; }
30472 
30473 
30474 # Check whether --with-x was given.
30475 if test "${with_x+set}" = set; then :
30476   withval=$with_x;
30477 fi
30478 
30479 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30480 if test "x$with_x" = xno; then
30481   # The user explicitly disabled X.
30482   have_x=disabled
30483 else
30484   case $x_includes,$x_libraries in #(
30485     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30486     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30487   $as_echo_n "(cached) " >&6
30488 else
30489   # One or both of the vars are not set, and there is no cached value.
30490 ac_x_includes=no ac_x_libraries=no
30491 rm -f -r conftest.dir
30492 if mkdir conftest.dir; then
30493   cd conftest.dir
30494   cat >Imakefile <<'_ACEOF'
30495 incroot:
30496         @echo incroot='${INCROOT}'
30497 usrlibdir:
30498         @echo usrlibdir='${USRLIBDIR}'
30499 libdir:
30500         @echo libdir='${LIBDIR}'
30501 _ACEOF
30502   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30503     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30504     for ac_var in incroot usrlibdir libdir; do
30505       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30506     done
30507     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30508     for ac_extension in a so sl dylib la dll; do
30509       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30510          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30511         ac_im_usrlibdir=$ac_im_libdir; break
30512       fi
30513     done
30514     # Screen out bogus values from the imake configuration.  They are
30515     # bogus both because they are the default anyway, and because
30516     # using them would break gcc on systems where it needs fixed includes.
30517     case $ac_im_incroot in
30518         /usr/include) ac_x_includes= ;;
30519         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30520     esac
30521     case $ac_im_usrlibdir in
30522         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30523         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30524     esac
30525   fi
30526   cd ..
30527   rm -f -r conftest.dir
30528 fi
30529 
30530 # Standard set of common directories for X headers.
30531 # Check X11 before X11Rn because it is often a symlink to the current release.
30532 ac_x_header_dirs='
30533 /usr/X11/include
30534 /usr/X11R7/include
30535 /usr/X11R6/include
30536 /usr/X11R5/include
30537 /usr/X11R4/include
30538 
30539 /usr/include/X11
30540 /usr/include/X11R7
30541 /usr/include/X11R6
30542 /usr/include/X11R5
30543 /usr/include/X11R4
30544 
30545 /usr/local/X11/include
30546 /usr/local/X11R7/include
30547 /usr/local/X11R6/include
30548 /usr/local/X11R5/include
30549 /usr/local/X11R4/include
30550 
30551 /usr/local/include/X11
30552 /usr/local/include/X11R7
30553 /usr/local/include/X11R6
30554 /usr/local/include/X11R5
30555 /usr/local/include/X11R4
30556 
30557 /usr/X386/include
30558 /usr/x386/include
30559 /usr/XFree86/include/X11
30560 
30561 /usr/include
30562 /usr/local/include
30563 /usr/unsupported/include
30564 /usr/athena/include
30565 /usr/local/x11r5/include
30566 /usr/lpp/Xamples/include
30567 
30568 /usr/openwin/include
30569 /usr/openwin/share/include'
30570 
30571 if test "$ac_x_includes" = no; then
30572   # Guess where to find include files, by looking for Xlib.h.
30573   # First, try using that file with no special directory specified.
30574   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30575 /* end confdefs.h.  */
30576 #include <X11/Xlib.h>
30577 _ACEOF
30578 if ac_fn_cxx_try_cpp "$LINENO"; then :
30579   # We can compile using X headers with no special include directory.
30580 ac_x_includes=
30581 else
30582   for ac_dir in $ac_x_header_dirs; do
30583   if test -r "$ac_dir/X11/Xlib.h"; then
30584     ac_x_includes=$ac_dir
30585     break
30586   fi
30587 done
30588 fi
30589 rm -f conftest.err conftest.i conftest.$ac_ext
30590 fi # $ac_x_includes = no
30591 
30592 if test "$ac_x_libraries" = no; then
30593   # Check for the libraries.
30594   # See if we find them without any special options.
30595   # Don't add to $LIBS permanently.
30596   ac_save_LIBS=$LIBS
30597   LIBS="-lX11 $LIBS"
30598   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30599 /* end confdefs.h.  */
30600 #include <X11/Xlib.h>
30601 int
30602 main ()
30603 {
30604 XrmInitialize ()
30605   ;
30606   return 0;
30607 }
30608 _ACEOF
30609 if ac_fn_cxx_try_link "$LINENO"; then :
30610   LIBS=$ac_save_LIBS
30611 # We can link X programs with no special library path.
30612 ac_x_libraries=
30613 else
30614   LIBS=$ac_save_LIBS
30615 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30616 do
30617   # Don't even attempt the hair of trying to link an X program!
30618   for ac_extension in a so sl dylib la dll; do
30619     if test -r "$ac_dir/libX11.$ac_extension"; then
30620       ac_x_libraries=$ac_dir
30621       break 2
30622     fi
30623   done
30624 done
30625 fi
30626 rm -f core conftest.err conftest.$ac_objext \
30627     conftest$ac_exeext conftest.$ac_ext
30628 fi # $ac_x_libraries = no
30629 
30630 case $ac_x_includes,$ac_x_libraries in #(
30631   no,* | *,no | *\'*)
30632     # Didn't find X, or a directory has "'" in its name.
30633     ac_cv_have_x="have_x=no";; #(
30634   *)
30635     # Record where we found X for the cache.
30636     ac_cv_have_x="have_x=yes\
30637         ac_x_includes='$ac_x_includes'\
30638         ac_x_libraries='$ac_x_libraries'"
30639 esac
30640 fi
30641 ;; #(
30642     *) have_x=yes;;
30643   esac
30644   eval "$ac_cv_have_x"
30645 fi # $with_x != no
30646 
30647 if test "$have_x" != yes; then
30648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30649 $as_echo "$have_x" >&6; }
30650   no_x=yes
30651 else
30652   # If each of the values was on the command line, it overrides each guess.
30653   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30654   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30655   # Update the cache value to reflect the command line values.
30656   ac_cv_have_x="have_x=yes\
30657         ac_x_includes='$x_includes'\
30658         ac_x_libraries='$x_libraries'"
30659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30660 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30661 fi
30662 
30663   if test "$no_x" = yes; then
30664   # Not all programs may use this symbol, but it does not hurt to define it.
30665 
30666 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30667 
30668   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30669 else
30670   if test -n "$x_includes"; then
30671     X_CFLAGS="$X_CFLAGS -I$x_includes"
30672   fi
30673 
30674   # It would also be nice to do this for all -L options, not just this one.
30675   if test -n "$x_libraries"; then
30676     X_LIBS="$X_LIBS -L$x_libraries"
30677     # For Solaris; some versions of Sun CC require a space after -R and
30678     # others require no space.  Words are not sufficient . . . .
30679     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30680 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30681     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30682     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30683     ac_cxx_werror_flag=yes
30684     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30685 /* end confdefs.h.  */
30686 
30687 int
30688 main ()
30689 {
30690 
30691   ;
30692   return 0;
30693 }
30694 _ACEOF
30695 if ac_fn_cxx_try_link "$LINENO"; then :
30696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30697 $as_echo "no" >&6; }
30698        X_LIBS="$X_LIBS -R$x_libraries"
30699 else
30700   LIBS="$ac_xsave_LIBS -R $x_libraries"
30701        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702 /* end confdefs.h.  */
30703 
30704 int
30705 main ()
30706 {
30707 
30708   ;
30709   return 0;
30710 }
30711 _ACEOF
30712 if ac_fn_cxx_try_link "$LINENO"; then :
30713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30714 $as_echo "yes" >&6; }
30715           X_LIBS="$X_LIBS -R $x_libraries"
30716 else
30717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30718 $as_echo "neither works" >&6; }
30719 fi
30720 rm -f core conftest.err conftest.$ac_objext \
30721     conftest$ac_exeext conftest.$ac_ext
30722 fi
30723 rm -f core conftest.err conftest.$ac_objext \
30724     conftest$ac_exeext conftest.$ac_ext
30725     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30726     LIBS=$ac_xsave_LIBS
30727   fi
30728 
30729   # Check for system-dependent libraries X programs must link with.
30730   # Do this before checking for the system-independent R6 libraries
30731   # (-lICE), since we may need -lsocket or whatever for X linking.
30732 
30733   if test "$ISC" = yes; then
30734     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30735   else
30736     # Martyn Johnson says this is needed for Ultrix, if the X
30737     # libraries were built with DECnet support.  And Karl Berry says
30738     # the Alpha needs dnet_stub (dnet does not exist).
30739     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30740     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30741 /* end confdefs.h.  */
30742 
30743 /* Override any GCC internal prototype to avoid an error.
30744    Use char because int might match the return type of a GCC
30745    builtin and then its argument prototype would still apply.  */
30746 #ifdef __cplusplus
30747 extern "C"
30748 #endif
30749 char XOpenDisplay ();
30750 int
30751 main ()
30752 {
30753 return XOpenDisplay ();
30754   ;
30755   return 0;
30756 }
30757 _ACEOF
30758 if ac_fn_cxx_try_link "$LINENO"; then :
30759 
30760 else
30761   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30762 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30763 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30764   $as_echo_n "(cached) " >&6
30765 else
30766   ac_check_lib_save_LIBS=$LIBS
30767 LIBS="-ldnet  $LIBS"
30768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30769 /* end confdefs.h.  */
30770 
30771 /* Override any GCC internal prototype to avoid an error.
30772    Use char because int might match the return type of a GCC
30773    builtin and then its argument prototype would still apply.  */
30774 #ifdef __cplusplus
30775 extern "C"
30776 #endif
30777 char dnet_ntoa ();
30778 int
30779 main ()
30780 {
30781 return dnet_ntoa ();
30782   ;
30783   return 0;
30784 }
30785 _ACEOF
30786 if ac_fn_cxx_try_link "$LINENO"; then :
30787   ac_cv_lib_dnet_dnet_ntoa=yes
30788 else
30789   ac_cv_lib_dnet_dnet_ntoa=no
30790 fi
30791 rm -f core conftest.err conftest.$ac_objext \
30792     conftest$ac_exeext conftest.$ac_ext
30793 LIBS=$ac_check_lib_save_LIBS
30794 fi
30795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30796 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30797 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30798   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30799 fi
30800 
30801     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30802       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30803 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30804 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30805   $as_echo_n "(cached) " >&6
30806 else
30807   ac_check_lib_save_LIBS=$LIBS
30808 LIBS="-ldnet_stub  $LIBS"
30809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30810 /* end confdefs.h.  */
30811 
30812 /* Override any GCC internal prototype to avoid an error.
30813    Use char because int might match the return type of a GCC
30814    builtin and then its argument prototype would still apply.  */
30815 #ifdef __cplusplus
30816 extern "C"
30817 #endif
30818 char dnet_ntoa ();
30819 int
30820 main ()
30821 {
30822 return dnet_ntoa ();
30823   ;
30824   return 0;
30825 }
30826 _ACEOF
30827 if ac_fn_cxx_try_link "$LINENO"; then :
30828   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30829 else
30830   ac_cv_lib_dnet_stub_dnet_ntoa=no
30831 fi
30832 rm -f core conftest.err conftest.$ac_objext \
30833     conftest$ac_exeext conftest.$ac_ext
30834 LIBS=$ac_check_lib_save_LIBS
30835 fi
30836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30837 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30838 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30839   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30840 fi
30841 
30842     fi
30843 fi
30844 rm -f core conftest.err conftest.$ac_objext \
30845     conftest$ac_exeext conftest.$ac_ext
30846     LIBS="$ac_xsave_LIBS"
30847 
30848     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30849     # to get the SysV transport functions.
30850     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30851     # needs -lnsl.
30852     # The nsl library prevents programs from opening the X display
30853     # on Irix 5.2, according to T.E. Dickey.
30854     # The functions gethostbyname, getservbyname, and inet_addr are
30855     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30856     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30857 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30858 
30859 fi
30860 
30861     if test $ac_cv_func_gethostbyname = no; then
30862       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30863 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30864 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30865   $as_echo_n "(cached) " >&6
30866 else
30867   ac_check_lib_save_LIBS=$LIBS
30868 LIBS="-lnsl  $LIBS"
30869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30870 /* end confdefs.h.  */
30871 
30872 /* Override any GCC internal prototype to avoid an error.
30873    Use char because int might match the return type of a GCC
30874    builtin and then its argument prototype would still apply.  */
30875 #ifdef __cplusplus
30876 extern "C"
30877 #endif
30878 char gethostbyname ();
30879 int
30880 main ()
30881 {
30882 return gethostbyname ();
30883   ;
30884   return 0;
30885 }
30886 _ACEOF
30887 if ac_fn_cxx_try_link "$LINENO"; then :
30888   ac_cv_lib_nsl_gethostbyname=yes
30889 else
30890   ac_cv_lib_nsl_gethostbyname=no
30891 fi
30892 rm -f core conftest.err conftest.$ac_objext \
30893     conftest$ac_exeext conftest.$ac_ext
30894 LIBS=$ac_check_lib_save_LIBS
30895 fi
30896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30897 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30898 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30899   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30900 fi
30901 
30902       if test $ac_cv_lib_nsl_gethostbyname = no; then
30903         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30904 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30905 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30906   $as_echo_n "(cached) " >&6
30907 else
30908   ac_check_lib_save_LIBS=$LIBS
30909 LIBS="-lbsd  $LIBS"
30910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30911 /* end confdefs.h.  */
30912 
30913 /* Override any GCC internal prototype to avoid an error.
30914    Use char because int might match the return type of a GCC
30915    builtin and then its argument prototype would still apply.  */
30916 #ifdef __cplusplus
30917 extern "C"
30918 #endif
30919 char gethostbyname ();
30920 int
30921 main ()
30922 {
30923 return gethostbyname ();
30924   ;
30925   return 0;
30926 }
30927 _ACEOF
30928 if ac_fn_cxx_try_link "$LINENO"; then :
30929   ac_cv_lib_bsd_gethostbyname=yes
30930 else
30931   ac_cv_lib_bsd_gethostbyname=no
30932 fi
30933 rm -f core conftest.err conftest.$ac_objext \
30934     conftest$ac_exeext conftest.$ac_ext
30935 LIBS=$ac_check_lib_save_LIBS
30936 fi
30937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30938 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30939 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30940   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30941 fi
30942 
30943       fi
30944     fi
30945 
30946     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30947     # socket/setsockopt and other routines are undefined under SCO ODT
30948     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30949     # on later versions), says Simon Leinen: it contains gethostby*
30950     # variants that don't use the name server (or something).  -lsocket
30951     # must be given before -lnsl if both are needed.  We assume that
30952     # if connect needs -lnsl, so does gethostbyname.
30953     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30954 if test "x$ac_cv_func_connect" = xyes; then :
30955 
30956 fi
30957 
30958     if test $ac_cv_func_connect = no; then
30959       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30960 $as_echo_n "checking for connect in -lsocket... " >&6; }
30961 if ${ac_cv_lib_socket_connect+:} false; then :
30962   $as_echo_n "(cached) " >&6
30963 else
30964   ac_check_lib_save_LIBS=$LIBS
30965 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30967 /* end confdefs.h.  */
30968 
30969 /* Override any GCC internal prototype to avoid an error.
30970    Use char because int might match the return type of a GCC
30971    builtin and then its argument prototype would still apply.  */
30972 #ifdef __cplusplus
30973 extern "C"
30974 #endif
30975 char connect ();
30976 int
30977 main ()
30978 {
30979 return connect ();
30980   ;
30981   return 0;
30982 }
30983 _ACEOF
30984 if ac_fn_cxx_try_link "$LINENO"; then :
30985   ac_cv_lib_socket_connect=yes
30986 else
30987   ac_cv_lib_socket_connect=no
30988 fi
30989 rm -f core conftest.err conftest.$ac_objext \
30990     conftest$ac_exeext conftest.$ac_ext
30991 LIBS=$ac_check_lib_save_LIBS
30992 fi
30993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30994 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30995 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30996   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30997 fi
30998 
30999     fi
31000 
31001     # Guillermo Gomez says -lposix is necessary on A/UX.
31002     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
31003 if test "x$ac_cv_func_remove" = xyes; then :
31004 
31005 fi
31006 
31007     if test $ac_cv_func_remove = no; then
31008       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
31009 $as_echo_n "checking for remove in -lposix... " >&6; }
31010 if ${ac_cv_lib_posix_remove+:} false; then :
31011   $as_echo_n "(cached) " >&6
31012 else
31013   ac_check_lib_save_LIBS=$LIBS
31014 LIBS="-lposix  $LIBS"
31015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31016 /* end confdefs.h.  */
31017 
31018 /* Override any GCC internal prototype to avoid an error.
31019    Use char because int might match the return type of a GCC
31020    builtin and then its argument prototype would still apply.  */
31021 #ifdef __cplusplus
31022 extern "C"
31023 #endif
31024 char remove ();
31025 int
31026 main ()
31027 {
31028 return remove ();
31029   ;
31030   return 0;
31031 }
31032 _ACEOF
31033 if ac_fn_cxx_try_link "$LINENO"; then :
31034   ac_cv_lib_posix_remove=yes
31035 else
31036   ac_cv_lib_posix_remove=no
31037 fi
31038 rm -f core conftest.err conftest.$ac_objext \
31039     conftest$ac_exeext conftest.$ac_ext
31040 LIBS=$ac_check_lib_save_LIBS
31041 fi
31042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
31043 $as_echo "$ac_cv_lib_posix_remove" >&6; }
31044 if test "x$ac_cv_lib_posix_remove" = xyes; then :
31045   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
31046 fi
31047 
31048     fi
31049 
31050     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
31051     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
31052 if test "x$ac_cv_func_shmat" = xyes; then :
31053 
31054 fi
31055 
31056     if test $ac_cv_func_shmat = no; then
31057       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
31058 $as_echo_n "checking for shmat in -lipc... " >&6; }
31059 if ${ac_cv_lib_ipc_shmat+:} false; then :
31060   $as_echo_n "(cached) " >&6
31061 else
31062   ac_check_lib_save_LIBS=$LIBS
31063 LIBS="-lipc  $LIBS"
31064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31065 /* end confdefs.h.  */
31066 
31067 /* Override any GCC internal prototype to avoid an error.
31068    Use char because int might match the return type of a GCC
31069    builtin and then its argument prototype would still apply.  */
31070 #ifdef __cplusplus
31071 extern "C"
31072 #endif
31073 char shmat ();
31074 int
31075 main ()
31076 {
31077 return shmat ();
31078   ;
31079   return 0;
31080 }
31081 _ACEOF
31082 if ac_fn_cxx_try_link "$LINENO"; then :
31083   ac_cv_lib_ipc_shmat=yes
31084 else
31085   ac_cv_lib_ipc_shmat=no
31086 fi
31087 rm -f core conftest.err conftest.$ac_objext \
31088     conftest$ac_exeext conftest.$ac_ext
31089 LIBS=$ac_check_lib_save_LIBS
31090 fi
31091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
31092 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
31093 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
31094   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
31095 fi
31096 
31097     fi
31098   fi
31099 
31100   # Check for libraries that X11R6 Xt/Xaw programs need.
31101   ac_save_LDFLAGS=$LDFLAGS
31102   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
31103   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
31104   # check for ICE first), but we must link in the order -lSM -lICE or
31105   # we get undefined symbols.  So assume we have SM if we have ICE.
31106   # These have to be linked with before -lX11, unlike the other
31107   # libraries we check for below, so use a different variable.
31108   # John Interrante, Karl Berry
31109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31110 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31111 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31112   $as_echo_n "(cached) " >&6
31113 else
31114   ac_check_lib_save_LIBS=$LIBS
31115 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31117 /* end confdefs.h.  */
31118 
31119 /* Override any GCC internal prototype to avoid an error.
31120    Use char because int might match the return type of a GCC
31121    builtin and then its argument prototype would still apply.  */
31122 #ifdef __cplusplus
31123 extern "C"
31124 #endif
31125 char IceConnectionNumber ();
31126 int
31127 main ()
31128 {
31129 return IceConnectionNumber ();
31130   ;
31131   return 0;
31132 }
31133 _ACEOF
31134 if ac_fn_cxx_try_link "$LINENO"; then :
31135   ac_cv_lib_ICE_IceConnectionNumber=yes
31136 else
31137   ac_cv_lib_ICE_IceConnectionNumber=no
31138 fi
31139 rm -f core conftest.err conftest.$ac_objext \
31140     conftest$ac_exeext conftest.$ac_ext
31141 LIBS=$ac_check_lib_save_LIBS
31142 fi
31143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31144 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31145 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31146   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31147 fi
31148 
31149   LDFLAGS=$ac_save_LDFLAGS
31150 
31151 fi
31152 
31153 
31154   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31155   # this doesn't make sense so we remove it.
31156   if test "x$COMPILE_TYPE" = xcross; then
31157     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31158   fi
31159 
31160   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31161 
31162   # Print a helpful message on how to acquire the necessary build dependency.
31163   # x11 is the help tag: freetype, cups, pulse, alsa etc
31164   MISSING_DEPENDENCY=x11
31165 
31166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31167     cygwin_help $MISSING_DEPENDENCY
31168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31169     msys_help $MISSING_DEPENDENCY
31170   else
31171     PKGHANDLER_COMMAND=
31172 
31173     case $PKGHANDLER in
31174       apt-get)
31175         apt_help     $MISSING_DEPENDENCY ;;
31176       yum)
31177         yum_help     $MISSING_DEPENDENCY ;;
31178       port)
31179         port_help    $MISSING_DEPENDENCY ;;
31180       pkgutil)
31181         pkgutil_help $MISSING_DEPENDENCY ;;
31182       pkgadd)
31183         pkgadd_help  $MISSING_DEPENDENCY ;;
31184     esac
31185 
31186     if test "x$PKGHANDLER_COMMAND" != x; then
31187       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31188     fi
31189   fi
31190 
31191     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31192   fi
31193 
31194   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31195     OPENWIN_HOME="/usr/openwin"
31196   fi
31197 
31198 
31199 
31200   #
31201   # Weird Sol10 something check...TODO change to try compile
31202   #
31203   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31204     if test "`uname -r`" = "5.10"; then
31205       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31206         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31207       fi
31208     fi
31209   fi
31210 
31211   ac_ext=c
31212 ac_cpp='$CPP $CPPFLAGS'
31213 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31214 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31215 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31216 
31217   OLD_CFLAGS="$CFLAGS"
31218   CFLAGS="$CFLAGS $X_CFLAGS"
31219 
31220   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31221   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31222 do :
31223   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31224 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31225         # include <X11/Xlib.h>
31226         # include <X11/Xutil.h>
31227 
31228 
31229 "
31230 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31231   cat >>confdefs.h <<_ACEOF
31232 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31233 _ACEOF
31234  X11_A_OK=yes
31235 else
31236   X11_A_OK=no; break
31237 fi
31238 
31239 done
31240 
31241 
31242   CFLAGS="$OLD_CFLAGS"
31243   ac_ext=cpp
31244 ac_cpp='$CXXCPP $CPPFLAGS'
31245 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31246 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31247 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31248 
31249 
31250   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31251 
31252   # Print a helpful message on how to acquire the necessary build dependency.
31253   # x11 is the help tag: freetype, cups, pulse, alsa etc
31254   MISSING_DEPENDENCY=x11
31255 
31256   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31257     cygwin_help $MISSING_DEPENDENCY
31258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31259     msys_help $MISSING_DEPENDENCY
31260   else
31261     PKGHANDLER_COMMAND=
31262 
31263     case $PKGHANDLER in
31264       apt-get)
31265         apt_help     $MISSING_DEPENDENCY ;;
31266       yum)
31267         yum_help     $MISSING_DEPENDENCY ;;
31268       port)
31269         port_help    $MISSING_DEPENDENCY ;;
31270       pkgutil)
31271         pkgutil_help $MISSING_DEPENDENCY ;;
31272       pkgadd)
31273         pkgadd_help  $MISSING_DEPENDENCY ;;
31274     esac
31275 
31276     if test "x$PKGHANDLER_COMMAND" != x; then
31277       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31278     fi
31279   fi
31280 
31281     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31282   fi
31283 
31284 
31285 
31286 
31287 
31288 
31289   ###############################################################################
31290   #
31291   # The common unix printing system cups is used to print from java.
31292   #
31293 
31294 # Check whether --with-cups was given.
31295 if test "${with_cups+set}" = set; then :
31296   withval=$with_cups;
31297 fi
31298 
31299 
31300 # Check whether --with-cups-include was given.
31301 if test "${with_cups_include+set}" = set; then :
31302   withval=$with_cups_include;
31303 fi
31304 
31305 
31306   if test "x$CUPS_NOT_NEEDED" = xyes; then
31307     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31308       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31309 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31310     fi
31311     CUPS_CFLAGS=
31312   else
31313     CUPS_FOUND=no
31314 
31315     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31316       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31317     fi
31318 
31319     if test "x${with_cups}" != x; then
31320       CUPS_CFLAGS="-I${with_cups}/include"
31321       CUPS_FOUND=yes
31322     fi
31323     if test "x${with_cups_include}" != x; then
31324       CUPS_CFLAGS="-I${with_cups_include}"
31325       CUPS_FOUND=yes
31326     fi
31327     if test "x$CUPS_FOUND" = xno; then
31328 
31329 
31330   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31331     # Source the builddeps file again, to make sure it uses the latest variables!
31332     . $builddepsfile
31333     # Look for a target and build machine specific resource!
31334     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31335     if test "x$resource" = x; then
31336       # Ok, lets instead look for a target specific resource
31337       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31338     fi
31339     if test "x$resource" = x; then
31340       # Ok, lets instead look for a build specific resource
31341       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31342     fi
31343     if test "x$resource" = x; then
31344       # Ok, lets instead look for a generic resource
31345       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31346       resource=${builddep_cups}
31347     fi
31348     if test "x$resource" != x; then
31349       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31350 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31351       # If the resource in the builddeps.conf file is an existing directory,
31352       # for example /java/linux/cups
31353       if test -d ${resource}; then
31354         depdir=${resource}
31355       else
31356 
31357   # cups is for example mymodule
31358   # $resource is for example libs/general/libmymod_1_2_3.zip
31359   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31360   # $with_builddeps_dir is for example /localhome/builddeps
31361   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31362   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31363   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31364   filename=`basename $resource`
31365   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31366   filebase=${filename%%.*}
31367   extension=${filename#*.}
31368   installdir=$with_builddeps_dir/$filebase
31369   if test ! -f $installdir/$filename.unpacked; then
31370     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31371 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31372     if test ! -d $installdir; then
31373       mkdir -p $installdir
31374     fi
31375     if test ! -d $installdir; then
31376       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31377     fi
31378     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31379     touch $tmpfile
31380     if test ! -f $tmpfile; then
31381       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31382     fi
31383 
31384   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31385   # $tmpfile is the local file name for the downloaded file.
31386   VALID_TOOL=no
31387   if test "x$BDEPS_FTP" = xwget; then
31388     VALID_TOOL=yes
31389     wget -O $tmpfile $with_builddeps_server/$resource
31390   fi
31391   if test "x$BDEPS_FTP" = xlftp; then
31392     VALID_TOOL=yes
31393     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31394   fi
31395   if test "x$BDEPS_FTP" = xftp; then
31396     VALID_TOOL=yes
31397     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31398     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31399     FTPUSERPWD=${FTPSERVER%%@*}
31400     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31401       FTPUSER=${userpwd%%:*}
31402       FTPPWD=${userpwd#*@}
31403       FTPSERVER=${FTPSERVER#*@}
31404     else
31405       FTPUSER=ftp
31406       FTPPWD=ftp
31407     fi
31408     # the "pass" command does not work on some
31409     # ftp clients (read ftp.exe) but if it works,
31410     # passive mode is better!
31411     ( \
31412         echo "user $FTPUSER $FTPPWD"        ; \
31413         echo "pass"                         ; \
31414         echo "bin"                          ; \
31415         echo "get $FTPPATH $tmpfile"              ; \
31416     ) | ftp -in $FTPSERVER
31417   fi
31418   if test "x$VALID_TOOL" != xyes; then
31419     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31420   fi
31421 
31422     mv $tmpfile $installdir/$filename
31423     if test ! -s $installdir/$filename; then
31424       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31425     fi
31426     case "$extension" in
31427       zip)  echo "Unzipping $installdir/$filename..."
31428         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31429         ;;
31430       tar.gz) echo "Untaring $installdir/$filename..."
31431         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31432         ;;
31433       tgz) echo "Untaring $installdir/$filename..."
31434         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31435         ;;
31436       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31437         ;;
31438     esac
31439   fi
31440   if test -f $installdir/$filename.unpacked; then
31441     depdir=$installdir
31442   fi
31443 
31444       fi
31445       # Source the builddeps file again, because in the previous command, the depdir
31446       # was updated to point at the current build dependency install directory.
31447       . $builddepsfile
31448       # Now extract variables from the builddeps.conf files.
31449       theroot=${builddep_cups_ROOT}
31450       thecflags=${builddep_cups_CFLAGS}
31451       thelibs=${builddep_cups_LIBS}
31452       if test "x$depdir" = x; then
31453         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31454       fi
31455       CUPS=$depdir
31456       if test "x$theroot" != x; then
31457         CUPS="$theroot"
31458       fi
31459       if test "x$thecflags" != x; then
31460         CUPS_CFLAGS="$thecflags"
31461       fi
31462       if test "x$thelibs" != x; then
31463         CUPS_LIBS="$thelibs"
31464       fi
31465       CUPS_FOUND=yes
31466 
31467     fi
31468 
31469   fi
31470 
31471     fi
31472     if test "x$CUPS_FOUND" = xno; then
31473       # Are the cups headers installed in the default /usr/include location?
31474       for ac_header in cups/cups.h cups/ppd.h
31475 do :
31476   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31477 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31478 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31479   cat >>confdefs.h <<_ACEOF
31480 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31481 _ACEOF
31482 
31483             CUPS_FOUND=yes
31484             CUPS_CFLAGS=
31485             DEFAULT_CUPS=yes
31486 
31487 
31488 fi
31489 
31490 done
31491 
31492     fi
31493     if test "x$CUPS_FOUND" = xno; then
31494       # Getting nervous now? Lets poke around for standard Solaris third-party
31495       # package installation locations.
31496       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31497 $as_echo_n "checking for cups headers... " >&6; }
31498       if test -s /opt/sfw/cups/include/cups/cups.h; then
31499         # An SFW package seems to be installed!
31500         CUPS_FOUND=yes
31501         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31502       elif test -s /opt/csw/include/cups/cups.h; then
31503         # A CSW package seems to be installed!
31504         CUPS_FOUND=yes
31505         CUPS_CFLAGS="-I/opt/csw/include"
31506       fi
31507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31508 $as_echo "$CUPS_FOUND" >&6; }
31509     fi
31510     if test "x$CUPS_FOUND" = xno; then
31511 
31512   # Print a helpful message on how to acquire the necessary build dependency.
31513   # cups is the help tag: freetype, cups, pulse, alsa etc
31514   MISSING_DEPENDENCY=cups
31515 
31516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31517     cygwin_help $MISSING_DEPENDENCY
31518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31519     msys_help $MISSING_DEPENDENCY
31520   else
31521     PKGHANDLER_COMMAND=
31522 
31523     case $PKGHANDLER in
31524       apt-get)
31525         apt_help     $MISSING_DEPENDENCY ;;
31526       yum)
31527         yum_help     $MISSING_DEPENDENCY ;;
31528       port)
31529         port_help    $MISSING_DEPENDENCY ;;
31530       pkgutil)
31531         pkgutil_help $MISSING_DEPENDENCY ;;
31532       pkgadd)
31533         pkgadd_help  $MISSING_DEPENDENCY ;;
31534     esac
31535 
31536     if test "x$PKGHANDLER_COMMAND" != x; then
31537       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31538     fi
31539   fi
31540 
31541       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31542     fi
31543   fi
31544 
31545 
31546 
31547 
31548 
31549 
31550   ###############################################################################
31551   #
31552   # The ubiquitous freetype library is used to render fonts.
31553   #
31554 
31555 # Check whether --with-freetype was given.
31556 if test "${with_freetype+set}" = set; then :
31557   withval=$with_freetype;
31558 fi
31559 
31560 
31561 # Check whether --with-freetype-include was given.
31562 if test "${with_freetype_include+set}" = set; then :
31563   withval=$with_freetype_include;
31564 fi
31565 
31566 
31567 # Check whether --with-freetype-lib was given.
31568 if test "${with_freetype_lib+set}" = set; then :
31569   withval=$with_freetype_lib;
31570 fi
31571 
31572   # Check whether --enable-freetype-bundling was given.
31573 if test "${enable_freetype_bundling+set}" = set; then :
31574   enableval=$enable_freetype_bundling;
31575 fi
31576 
31577 
31578   FREETYPE_CFLAGS=
31579   FREETYPE_LIBS=
31580   FREETYPE_BUNDLE_LIB_PATH=
31581 
31582   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31583     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31584       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31585 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31586     fi
31587     if test "x$enable_freetype_bundling" != x; then
31588       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31589 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31590     fi
31591   else
31592     # freetype is needed to build; go get it!
31593 
31594     BUNDLE_FREETYPE="$enable_freetype_bundling"
31595 
31596     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31597       # User has specified settings
31598 
31599       if test "x$BUNDLE_FREETYPE" = x; then
31600         # If not specified, default is to bundle freetype
31601         BUNDLE_FREETYPE=yes
31602       fi
31603 
31604       if test "x$with_freetype" != x; then
31605         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31606         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31607       fi
31608 
31609       # Allow --with-freetype-lib and --with-freetype-include to override
31610       if test "x$with_freetype_include" != x; then
31611         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31612       fi
31613       if test "x$with_freetype_lib" != x; then
31614         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31615       fi
31616 
31617       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31618         # Okay, we got it. Check that it works.
31619 
31620   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31621   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31622   METHOD="--with-freetype"
31623 
31624   # First check if the files exists.
31625   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31626     # We found an arbitrary include file. That's a good sign.
31627     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31628 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31629     FOUND_FREETYPE=yes
31630 
31631     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31632     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31633       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31634 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31635       FOUND_FREETYPE=no
31636     else
31637       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31638         # On Windows, we will need both .lib and .dll file.
31639         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31640           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31641 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31642           FOUND_FREETYPE=no
31643         fi
31644       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
31645         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31646         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31647       fi
31648     fi
31649   fi
31650 
31651   if test "x$FOUND_FREETYPE" = xyes; then
31652 
31653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31654 
31655   # Input might be given as Windows format, start by converting to
31656   # unix format.
31657   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31658   new_path=`$CYGPATH -u "$path"`
31659 
31660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31663   # "foo.exe" is OK but "foo" is an error.
31664   #
31665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31666   # It is also a way to make sure we got the proper file name for the real test later on.
31667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31668   if test "x$test_shortpath" = x; then
31669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31670 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31671     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31672   fi
31673 
31674   # Call helper function which possibly converts this using DOS-style short mode.
31675   # If so, the updated path is stored in $new_path.
31676 
31677   input_path="$new_path"
31678   # Check if we need to convert this using DOS-style short mode. If the path
31679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31680   # take no chances and rewrite it.
31681   # Note: m4 eats our [], so we need to use [ and ] instead.
31682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31683   if test "x$has_forbidden_chars" != x; then
31684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31688       # Going to short mode and back again did indeed matter. Since short mode is
31689       # case insensitive, let's make it lowercase to improve readability.
31690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31691       # Now convert it back to Unix-stile (cygpath)
31692       input_path=`$CYGPATH -u "$shortmode_path"`
31693       new_path="$input_path"
31694     fi
31695   fi
31696 
31697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31698   if test "x$test_cygdrive_prefix" = x; then
31699     # As a simple fix, exclude /usr/bin since it's not a real path.
31700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31702       # a path prefixed by /cygdrive for fixpath to work.
31703       new_path="$CYGWIN_ROOT_PATH$input_path"
31704     fi
31705   fi
31706 
31707 
31708   if test "x$path" != "x$new_path"; then
31709     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31712   fi
31713 
31714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31715 
31716   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31717   has_colon=`$ECHO $path | $GREP ^.:`
31718   new_path="$path"
31719   if test "x$has_colon" = x; then
31720     # Not in mixed or Windows style, start by that.
31721     new_path=`cmd //c echo $path`
31722   fi
31723 
31724 
31725   input_path="$new_path"
31726   # Check if we need to convert this using DOS-style short mode. If the path
31727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31728   # take no chances and rewrite it.
31729   # Note: m4 eats our [], so we need to use [ and ] instead.
31730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31731   if test "x$has_forbidden_chars" != x; then
31732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31734   fi
31735 
31736 
31737   windows_path="$new_path"
31738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31739     unix_path=`$CYGPATH -u "$windows_path"`
31740     new_path="$unix_path"
31741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31743     new_path="$unix_path"
31744   fi
31745 
31746   if test "x$path" != "x$new_path"; then
31747     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31750   fi
31751 
31752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31754 
31755   else
31756     # We're on a posix platform. Hooray! :)
31757     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31758     has_space=`$ECHO "$path" | $GREP " "`
31759     if test "x$has_space" != x; then
31760       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31761 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31762       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31763     fi
31764 
31765     # Use eval to expand a potential ~
31766     eval path="$path"
31767     if test ! -f "$path" && test ! -d "$path"; then
31768       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31769     fi
31770 
31771     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31772   fi
31773 
31774 
31775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31776 
31777   # Input might be given as Windows format, start by converting to
31778   # unix format.
31779   path="$POTENTIAL_FREETYPE_LIB_PATH"
31780   new_path=`$CYGPATH -u "$path"`
31781 
31782   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31783   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31784   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31785   # "foo.exe" is OK but "foo" is an error.
31786   #
31787   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31788   # It is also a way to make sure we got the proper file name for the real test later on.
31789   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31790   if test "x$test_shortpath" = x; then
31791     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31792 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31793     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31794   fi
31795 
31796   # Call helper function which possibly converts this using DOS-style short mode.
31797   # If so, the updated path is stored in $new_path.
31798 
31799   input_path="$new_path"
31800   # Check if we need to convert this using DOS-style short mode. If the path
31801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31802   # take no chances and rewrite it.
31803   # Note: m4 eats our [], so we need to use [ and ] instead.
31804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31805   if test "x$has_forbidden_chars" != x; then
31806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31810       # Going to short mode and back again did indeed matter. Since short mode is
31811       # case insensitive, let's make it lowercase to improve readability.
31812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31813       # Now convert it back to Unix-stile (cygpath)
31814       input_path=`$CYGPATH -u "$shortmode_path"`
31815       new_path="$input_path"
31816     fi
31817   fi
31818 
31819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31820   if test "x$test_cygdrive_prefix" = x; then
31821     # As a simple fix, exclude /usr/bin since it's not a real path.
31822     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31824       # a path prefixed by /cygdrive for fixpath to work.
31825       new_path="$CYGWIN_ROOT_PATH$input_path"
31826     fi
31827   fi
31828 
31829 
31830   if test "x$path" != "x$new_path"; then
31831     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31833 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31834   fi
31835 
31836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31837 
31838   path="$POTENTIAL_FREETYPE_LIB_PATH"
31839   has_colon=`$ECHO $path | $GREP ^.:`
31840   new_path="$path"
31841   if test "x$has_colon" = x; then
31842     # Not in mixed or Windows style, start by that.
31843     new_path=`cmd //c echo $path`
31844   fi
31845 
31846 
31847   input_path="$new_path"
31848   # Check if we need to convert this using DOS-style short mode. If the path
31849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31850   # take no chances and rewrite it.
31851   # Note: m4 eats our [], so we need to use [ and ] instead.
31852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31853   if test "x$has_forbidden_chars" != x; then
31854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31855     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31856   fi
31857 
31858 
31859   windows_path="$new_path"
31860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31861     unix_path=`$CYGPATH -u "$windows_path"`
31862     new_path="$unix_path"
31863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31865     new_path="$unix_path"
31866   fi
31867 
31868   if test "x$path" != "x$new_path"; then
31869     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31870     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31871 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31872   fi
31873 
31874   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31875   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31876 
31877   else
31878     # We're on a posix platform. Hooray! :)
31879     path="$POTENTIAL_FREETYPE_LIB_PATH"
31880     has_space=`$ECHO "$path" | $GREP " "`
31881     if test "x$has_space" != x; then
31882       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31883 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31884       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31885     fi
31886 
31887     # Use eval to expand a potential ~
31888     eval path="$path"
31889     if test ! -f "$path" && test ! -d "$path"; then
31890       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31891     fi
31892 
31893     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31894   fi
31895 
31896 
31897     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31898     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31899 $as_echo_n "checking for freetype includes... " >&6; }
31900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31901 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31902     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31903     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31904 $as_echo_n "checking for freetype libraries... " >&6; }
31905     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31906 $as_echo "$FREETYPE_LIB_PATH" >&6; }
31907   fi
31908 
31909         if test "x$FOUND_FREETYPE" != xyes; then
31910           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31911         fi
31912       else
31913         # User specified only one of lib or include. This is an error.
31914         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31915           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31916 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31917           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31918         else
31919           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31920 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31921           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31922         fi
31923       fi
31924     else
31925       # User did not specify settings, but we need freetype. Try to locate it.
31926 
31927       if test "x$BUNDLE_FREETYPE" = x; then
31928         # If not specified, default is to bundle freetype only on windows
31929         if test "x$OPENJDK_TARGET_OS" = xwindows; then
31930           BUNDLE_FREETYPE=yes
31931         else
31932           BUNDLE_FREETYPE=no
31933         fi
31934       fi
31935 
31936       if test "x$FOUND_FREETYPE" != xyes; then
31937         # Check builddeps
31938 
31939 
31940   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31941     # Source the builddeps file again, to make sure it uses the latest variables!
31942     . $builddepsfile
31943     # Look for a target and build machine specific resource!
31944     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31945     if test "x$resource" = x; then
31946       # Ok, lets instead look for a target specific resource
31947       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31948     fi
31949     if test "x$resource" = x; then
31950       # Ok, lets instead look for a build specific resource
31951       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31952     fi
31953     if test "x$resource" = x; then
31954       # Ok, lets instead look for a generic resource
31955       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31956       resource=${builddep_freetype2}
31957     fi
31958     if test "x$resource" != x; then
31959       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31960 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31961       # If the resource in the builddeps.conf file is an existing directory,
31962       # for example /java/linux/cups
31963       if test -d ${resource}; then
31964         depdir=${resource}
31965       else
31966 
31967   # freetype2 is for example mymodule
31968   # $resource is for example libs/general/libmymod_1_2_3.zip
31969   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31970   # $with_builddeps_dir is for example /localhome/builddeps
31971   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31972   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31973   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31974   filename=`basename $resource`
31975   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31976   filebase=${filename%%.*}
31977   extension=${filename#*.}
31978   installdir=$with_builddeps_dir/$filebase
31979   if test ! -f $installdir/$filename.unpacked; then
31980     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31981 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31982     if test ! -d $installdir; then
31983       mkdir -p $installdir
31984     fi
31985     if test ! -d $installdir; then
31986       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31987     fi
31988     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31989     touch $tmpfile
31990     if test ! -f $tmpfile; then
31991       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31992     fi
31993 
31994   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31995   # $tmpfile is the local file name for the downloaded file.
31996   VALID_TOOL=no
31997   if test "x$BDEPS_FTP" = xwget; then
31998     VALID_TOOL=yes
31999     wget -O $tmpfile $with_builddeps_server/$resource
32000   fi
32001   if test "x$BDEPS_FTP" = xlftp; then
32002     VALID_TOOL=yes
32003     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
32004   fi
32005   if test "x$BDEPS_FTP" = xftp; then
32006     VALID_TOOL=yes
32007     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
32008     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
32009     FTPUSERPWD=${FTPSERVER%%@*}
32010     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
32011       FTPUSER=${userpwd%%:*}
32012       FTPPWD=${userpwd#*@}
32013       FTPSERVER=${FTPSERVER#*@}
32014     else
32015       FTPUSER=ftp
32016       FTPPWD=ftp
32017     fi
32018     # the "pass" command does not work on some
32019     # ftp clients (read ftp.exe) but if it works,
32020     # passive mode is better!
32021     ( \
32022         echo "user $FTPUSER $FTPPWD"        ; \
32023         echo "pass"                         ; \
32024         echo "bin"                          ; \
32025         echo "get $FTPPATH $tmpfile"              ; \
32026     ) | ftp -in $FTPSERVER
32027   fi
32028   if test "x$VALID_TOOL" != xyes; then
32029     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
32030   fi
32031 
32032     mv $tmpfile $installdir/$filename
32033     if test ! -s $installdir/$filename; then
32034       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
32035     fi
32036     case "$extension" in
32037       zip)  echo "Unzipping $installdir/$filename..."
32038         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
32039         ;;
32040       tar.gz) echo "Untaring $installdir/$filename..."
32041         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32042         ;;
32043       tgz) echo "Untaring $installdir/$filename..."
32044         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
32045         ;;
32046       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
32047         ;;
32048     esac
32049   fi
32050   if test -f $installdir/$filename.unpacked; then
32051     depdir=$installdir
32052   fi
32053 
32054       fi
32055       # Source the builddeps file again, because in the previous command, the depdir
32056       # was updated to point at the current build dependency install directory.
32057       . $builddepsfile
32058       # Now extract variables from the builddeps.conf files.
32059       theroot=${builddep_freetype2_ROOT}
32060       thecflags=${builddep_freetype2_CFLAGS}
32061       thelibs=${builddep_freetype2_LIBS}
32062       if test "x$depdir" = x; then
32063         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
32064       fi
32065       FREETYPE=$depdir
32066       if test "x$theroot" != x; then
32067         FREETYPE="$theroot"
32068       fi
32069       if test "x$thecflags" != x; then
32070         FREETYPE_CFLAGS="$thecflags"
32071       fi
32072       if test "x$thelibs" != x; then
32073         FREETYPE_LIBS="$thelibs"
32074       fi
32075       FOUND_FREETYPE=yes
32076       else FOUND_FREETYPE=no
32077 
32078     fi
32079     else FOUND_FREETYPE=no
32080 
32081   fi
32082 
32083         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32084         if test "x$FOUND_FREETYPE" = xyes; then
32085           if test "x$BUNDLE_FREETYPE" = xyes; then
32086             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
32087 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
32088             FOUND_FREETYPE=no
32089           else
32090             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32091 $as_echo_n "checking for freetype... " >&6; }
32092             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
32093 $as_echo "yes (using builddeps)" >&6; }
32094           fi
32095         fi
32096       fi
32097 
32098       if test "x$FOUND_FREETYPE" != xyes; then
32099         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
32100         if test "x$PKG_CONFIG" != x; then
32101 
32102 pkg_failed=no
32103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
32104 $as_echo_n "checking for FREETYPE... " >&6; }
32105 
32106 if test -n "$FREETYPE_CFLAGS"; then
32107     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
32108  elif test -n "$PKG_CONFIG"; then
32109     if test -n "$PKG_CONFIG" && \
32110     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32111   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32112   ac_status=$?
32113   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32114   test $ac_status = 0; }; then
32115   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
32116 else
32117   pkg_failed=yes
32118 fi
32119  else
32120     pkg_failed=untried
32121 fi
32122 if test -n "$FREETYPE_LIBS"; then
32123     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
32124  elif test -n "$PKG_CONFIG"; then
32125     if test -n "$PKG_CONFIG" && \
32126     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32127   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32128   ac_status=$?
32129   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32130   test $ac_status = 0; }; then
32131   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
32132 else
32133   pkg_failed=yes
32134 fi
32135  else
32136     pkg_failed=untried
32137 fi
32138 
32139 
32140 
32141 if test $pkg_failed = yes; then
32142 
32143 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32144         _pkg_short_errors_supported=yes
32145 else
32146         _pkg_short_errors_supported=no
32147 fi
32148         if test $_pkg_short_errors_supported = yes; then
32149                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32150         else
32151                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32152         fi
32153         # Put the nasty error message in config.log where it belongs
32154         echo "$FREETYPE_PKG_ERRORS" >&5
32155 
32156         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32157 $as_echo "no" >&6; }
32158                 FOUND_FREETYPE=no
32159 elif test $pkg_failed = untried; then
32160         FOUND_FREETYPE=no
32161 else
32162         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32163         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32165 $as_echo "yes" >&6; }
32166         FOUND_FREETYPE=yes
32167 fi
32168           if test "x$FOUND_FREETYPE" = xyes; then
32169             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32170             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32171             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32172             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32173               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32174             fi
32175             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32176             if test "x$BUNDLE_FREETYPE" = xyes; then
32177               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32178 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32179               FOUND_FREETYPE=no
32180             else
32181               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32182 $as_echo_n "checking for freetype... " >&6; }
32183               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32184 $as_echo "yes (using pkg-config)" >&6; }
32185             fi
32186           fi
32187         fi
32188       fi
32189 
32190       if test "x$FOUND_FREETYPE" != xyes; then
32191         # Check in well-known locations
32192         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32193           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32194 
32195   windows_path="$FREETYPE_BASE_DIR"
32196   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32197     unix_path=`$CYGPATH -u "$windows_path"`
32198     FREETYPE_BASE_DIR="$unix_path"
32199   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32200     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32201     FREETYPE_BASE_DIR="$unix_path"
32202   fi
32203 
32204 
32205   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32206   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32207   METHOD="well-known location"
32208 
32209   # First check if the files exists.
32210   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32211     # We found an arbitrary include file. That's a good sign.
32212     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32213 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32214     FOUND_FREETYPE=yes
32215 
32216     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32217     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32218       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32219 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32220       FOUND_FREETYPE=no
32221     else
32222       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32223         # On Windows, we will need both .lib and .dll file.
32224         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32225           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32226 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32227           FOUND_FREETYPE=no
32228         fi
32229       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32230         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32231         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32232       fi
32233     fi
32234   fi
32235 
32236   if test "x$FOUND_FREETYPE" = xyes; then
32237 
32238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32239 
32240   # Input might be given as Windows format, start by converting to
32241   # unix format.
32242   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32243   new_path=`$CYGPATH -u "$path"`
32244 
32245   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32246   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32247   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32248   # "foo.exe" is OK but "foo" is an error.
32249   #
32250   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32251   # It is also a way to make sure we got the proper file name for the real test later on.
32252   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32253   if test "x$test_shortpath" = x; then
32254     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32255 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32256     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32257   fi
32258 
32259   # Call helper function which possibly converts this using DOS-style short mode.
32260   # If so, the updated path is stored in $new_path.
32261 
32262   input_path="$new_path"
32263   # Check if we need to convert this using DOS-style short mode. If the path
32264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32265   # take no chances and rewrite it.
32266   # Note: m4 eats our [], so we need to use [ and ] instead.
32267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32268   if test "x$has_forbidden_chars" != x; then
32269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32270     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32271     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32272     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32273       # Going to short mode and back again did indeed matter. Since short mode is
32274       # case insensitive, let's make it lowercase to improve readability.
32275       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32276       # Now convert it back to Unix-stile (cygpath)
32277       input_path=`$CYGPATH -u "$shortmode_path"`
32278       new_path="$input_path"
32279     fi
32280   fi
32281 
32282   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32283   if test "x$test_cygdrive_prefix" = x; then
32284     # As a simple fix, exclude /usr/bin since it's not a real path.
32285     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32286       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32287       # a path prefixed by /cygdrive for fixpath to work.
32288       new_path="$CYGWIN_ROOT_PATH$input_path"
32289     fi
32290   fi
32291 
32292 
32293   if test "x$path" != "x$new_path"; then
32294     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32295     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32296 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32297   fi
32298 
32299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32300 
32301   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32302   has_colon=`$ECHO $path | $GREP ^.:`
32303   new_path="$path"
32304   if test "x$has_colon" = x; then
32305     # Not in mixed or Windows style, start by that.
32306     new_path=`cmd //c echo $path`
32307   fi
32308 
32309 
32310   input_path="$new_path"
32311   # Check if we need to convert this using DOS-style short mode. If the path
32312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32313   # take no chances and rewrite it.
32314   # Note: m4 eats our [], so we need to use [ and ] instead.
32315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32316   if test "x$has_forbidden_chars" != x; then
32317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32318     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32319   fi
32320 
32321 
32322   windows_path="$new_path"
32323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324     unix_path=`$CYGPATH -u "$windows_path"`
32325     new_path="$unix_path"
32326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328     new_path="$unix_path"
32329   fi
32330 
32331   if test "x$path" != "x$new_path"; then
32332     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32334 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32335   fi
32336 
32337   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32338   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32339 
32340   else
32341     # We're on a posix platform. Hooray! :)
32342     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32343     has_space=`$ECHO "$path" | $GREP " "`
32344     if test "x$has_space" != x; then
32345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32346 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32347       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32348     fi
32349 
32350     # Use eval to expand a potential ~
32351     eval path="$path"
32352     if test ! -f "$path" && test ! -d "$path"; then
32353       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32354     fi
32355 
32356     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32357   fi
32358 
32359 
32360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32361 
32362   # Input might be given as Windows format, start by converting to
32363   # unix format.
32364   path="$POTENTIAL_FREETYPE_LIB_PATH"
32365   new_path=`$CYGPATH -u "$path"`
32366 
32367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32370   # "foo.exe" is OK but "foo" is an error.
32371   #
32372   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32373   # It is also a way to make sure we got the proper file name for the real test later on.
32374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32375   if test "x$test_shortpath" = x; then
32376     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32377 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32378     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32379   fi
32380 
32381   # Call helper function which possibly converts this using DOS-style short mode.
32382   # If so, the updated path is stored in $new_path.
32383 
32384   input_path="$new_path"
32385   # Check if we need to convert this using DOS-style short mode. If the path
32386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32387   # take no chances and rewrite it.
32388   # Note: m4 eats our [], so we need to use [ and ] instead.
32389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32390   if test "x$has_forbidden_chars" != x; then
32391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32395       # Going to short mode and back again did indeed matter. Since short mode is
32396       # case insensitive, let's make it lowercase to improve readability.
32397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32398       # Now convert it back to Unix-stile (cygpath)
32399       input_path=`$CYGPATH -u "$shortmode_path"`
32400       new_path="$input_path"
32401     fi
32402   fi
32403 
32404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32405   if test "x$test_cygdrive_prefix" = x; then
32406     # As a simple fix, exclude /usr/bin since it's not a real path.
32407     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32409       # a path prefixed by /cygdrive for fixpath to work.
32410       new_path="$CYGWIN_ROOT_PATH$input_path"
32411     fi
32412   fi
32413 
32414 
32415   if test "x$path" != "x$new_path"; then
32416     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32417     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32418 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32419   fi
32420 
32421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32422 
32423   path="$POTENTIAL_FREETYPE_LIB_PATH"
32424   has_colon=`$ECHO $path | $GREP ^.:`
32425   new_path="$path"
32426   if test "x$has_colon" = x; then
32427     # Not in mixed or Windows style, start by that.
32428     new_path=`cmd //c echo $path`
32429   fi
32430 
32431 
32432   input_path="$new_path"
32433   # Check if we need to convert this using DOS-style short mode. If the path
32434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32435   # take no chances and rewrite it.
32436   # Note: m4 eats our [], so we need to use [ and ] instead.
32437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32438   if test "x$has_forbidden_chars" != x; then
32439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32441   fi
32442 
32443 
32444   windows_path="$new_path"
32445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32446     unix_path=`$CYGPATH -u "$windows_path"`
32447     new_path="$unix_path"
32448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32450     new_path="$unix_path"
32451   fi
32452 
32453   if test "x$path" != "x$new_path"; then
32454     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32456 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32457   fi
32458 
32459   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32460   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32461 
32462   else
32463     # We're on a posix platform. Hooray! :)
32464     path="$POTENTIAL_FREETYPE_LIB_PATH"
32465     has_space=`$ECHO "$path" | $GREP " "`
32466     if test "x$has_space" != x; then
32467       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32468 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32469       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32470     fi
32471 
32472     # Use eval to expand a potential ~
32473     eval path="$path"
32474     if test ! -f "$path" && test ! -d "$path"; then
32475       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32476     fi
32477 
32478     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32479   fi
32480 
32481 
32482     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32483     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32484 $as_echo_n "checking for freetype includes... " >&6; }
32485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32486 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32487     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32488     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32489 $as_echo_n "checking for freetype libraries... " >&6; }
32490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32491 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32492   fi
32493 
32494           if test "x$FOUND_FREETYPE" != xyes; then
32495             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32496 
32497   windows_path="$FREETYPE_BASE_DIR"
32498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32499     unix_path=`$CYGPATH -u "$windows_path"`
32500     FREETYPE_BASE_DIR="$unix_path"
32501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32503     FREETYPE_BASE_DIR="$unix_path"
32504   fi
32505 
32506 
32507   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32508   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32509   METHOD="well-known location"
32510 
32511   # First check if the files exists.
32512   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32513     # We found an arbitrary include file. That's a good sign.
32514     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32515 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32516     FOUND_FREETYPE=yes
32517 
32518     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32519     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32520       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32521 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32522       FOUND_FREETYPE=no
32523     else
32524       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32525         # On Windows, we will need both .lib and .dll file.
32526         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32527           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32528 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32529           FOUND_FREETYPE=no
32530         fi
32531       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32532         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32533         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32534       fi
32535     fi
32536   fi
32537 
32538   if test "x$FOUND_FREETYPE" = xyes; then
32539 
32540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32541 
32542   # Input might be given as Windows format, start by converting to
32543   # unix format.
32544   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32545   new_path=`$CYGPATH -u "$path"`
32546 
32547   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32548   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32549   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32550   # "foo.exe" is OK but "foo" is an error.
32551   #
32552   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32553   # It is also a way to make sure we got the proper file name for the real test later on.
32554   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32555   if test "x$test_shortpath" = x; then
32556     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32557 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32558     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32559   fi
32560 
32561   # Call helper function which possibly converts this using DOS-style short mode.
32562   # If so, the updated path is stored in $new_path.
32563 
32564   input_path="$new_path"
32565   # Check if we need to convert this using DOS-style short mode. If the path
32566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32567   # take no chances and rewrite it.
32568   # Note: m4 eats our [], so we need to use [ and ] instead.
32569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32570   if test "x$has_forbidden_chars" != x; then
32571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32572     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32573     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32574     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32575       # Going to short mode and back again did indeed matter. Since short mode is
32576       # case insensitive, let's make it lowercase to improve readability.
32577       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32578       # Now convert it back to Unix-stile (cygpath)
32579       input_path=`$CYGPATH -u "$shortmode_path"`
32580       new_path="$input_path"
32581     fi
32582   fi
32583 
32584   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32585   if test "x$test_cygdrive_prefix" = x; then
32586     # As a simple fix, exclude /usr/bin since it's not a real path.
32587     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32588       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32589       # a path prefixed by /cygdrive for fixpath to work.
32590       new_path="$CYGWIN_ROOT_PATH$input_path"
32591     fi
32592   fi
32593 
32594 
32595   if test "x$path" != "x$new_path"; then
32596     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32597     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32598 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32599   fi
32600 
32601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32602 
32603   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32604   has_colon=`$ECHO $path | $GREP ^.:`
32605   new_path="$path"
32606   if test "x$has_colon" = x; then
32607     # Not in mixed or Windows style, start by that.
32608     new_path=`cmd //c echo $path`
32609   fi
32610 
32611 
32612   input_path="$new_path"
32613   # Check if we need to convert this using DOS-style short mode. If the path
32614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32615   # take no chances and rewrite it.
32616   # Note: m4 eats our [], so we need to use [ and ] instead.
32617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32618   if test "x$has_forbidden_chars" != x; then
32619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32621   fi
32622 
32623 
32624   windows_path="$new_path"
32625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32626     unix_path=`$CYGPATH -u "$windows_path"`
32627     new_path="$unix_path"
32628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32630     new_path="$unix_path"
32631   fi
32632 
32633   if test "x$path" != "x$new_path"; then
32634     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32636 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32637   fi
32638 
32639   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32640   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32641 
32642   else
32643     # We're on a posix platform. Hooray! :)
32644     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32645     has_space=`$ECHO "$path" | $GREP " "`
32646     if test "x$has_space" != x; then
32647       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32648 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32649       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32650     fi
32651 
32652     # Use eval to expand a potential ~
32653     eval path="$path"
32654     if test ! -f "$path" && test ! -d "$path"; then
32655       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32656     fi
32657 
32658     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32659   fi
32660 
32661 
32662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663 
32664   # Input might be given as Windows format, start by converting to
32665   # unix format.
32666   path="$POTENTIAL_FREETYPE_LIB_PATH"
32667   new_path=`$CYGPATH -u "$path"`
32668 
32669   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32670   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32671   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32672   # "foo.exe" is OK but "foo" is an error.
32673   #
32674   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32675   # It is also a way to make sure we got the proper file name for the real test later on.
32676   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32677   if test "x$test_shortpath" = x; then
32678     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32679 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32680     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32681   fi
32682 
32683   # Call helper function which possibly converts this using DOS-style short mode.
32684   # If so, the updated path is stored in $new_path.
32685 
32686   input_path="$new_path"
32687   # Check if we need to convert this using DOS-style short mode. If the path
32688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32689   # take no chances and rewrite it.
32690   # Note: m4 eats our [], so we need to use [ and ] instead.
32691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32692   if test "x$has_forbidden_chars" != x; then
32693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32697       # Going to short mode and back again did indeed matter. Since short mode is
32698       # case insensitive, let's make it lowercase to improve readability.
32699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32700       # Now convert it back to Unix-stile (cygpath)
32701       input_path=`$CYGPATH -u "$shortmode_path"`
32702       new_path="$input_path"
32703     fi
32704   fi
32705 
32706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32707   if test "x$test_cygdrive_prefix" = x; then
32708     # As a simple fix, exclude /usr/bin since it's not a real path.
32709     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32711       # a path prefixed by /cygdrive for fixpath to work.
32712       new_path="$CYGWIN_ROOT_PATH$input_path"
32713     fi
32714   fi
32715 
32716 
32717   if test "x$path" != "x$new_path"; then
32718     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32719     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32720 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32721   fi
32722 
32723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32724 
32725   path="$POTENTIAL_FREETYPE_LIB_PATH"
32726   has_colon=`$ECHO $path | $GREP ^.:`
32727   new_path="$path"
32728   if test "x$has_colon" = x; then
32729     # Not in mixed or Windows style, start by that.
32730     new_path=`cmd //c echo $path`
32731   fi
32732 
32733 
32734   input_path="$new_path"
32735   # Check if we need to convert this using DOS-style short mode. If the path
32736   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32737   # take no chances and rewrite it.
32738   # Note: m4 eats our [], so we need to use [ and ] instead.
32739   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32740   if test "x$has_forbidden_chars" != x; then
32741     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32742     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32743   fi
32744 
32745 
32746   windows_path="$new_path"
32747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32748     unix_path=`$CYGPATH -u "$windows_path"`
32749     new_path="$unix_path"
32750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32752     new_path="$unix_path"
32753   fi
32754 
32755   if test "x$path" != "x$new_path"; then
32756     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32757     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32758 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32759   fi
32760 
32761   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32762   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32763 
32764   else
32765     # We're on a posix platform. Hooray! :)
32766     path="$POTENTIAL_FREETYPE_LIB_PATH"
32767     has_space=`$ECHO "$path" | $GREP " "`
32768     if test "x$has_space" != x; then
32769       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32770 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32771       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32772     fi
32773 
32774     # Use eval to expand a potential ~
32775     eval path="$path"
32776     if test ! -f "$path" && test ! -d "$path"; then
32777       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32778     fi
32779 
32780     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32781   fi
32782 
32783 
32784     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32785     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32786 $as_echo_n "checking for freetype includes... " >&6; }
32787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32788 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32789     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32790     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32791 $as_echo_n "checking for freetype libraries... " >&6; }
32792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32793 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32794   fi
32795 
32796           fi
32797         else
32798           if test "x$SYS_ROOT" = "x/"; then
32799             FREETYPE_ROOT=
32800           else
32801             FREETYPE_ROOT="$SYS_ROOT"
32802           fi
32803           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32804 
32805   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32806   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32807   METHOD="well-known location"
32808 
32809   # First check if the files exists.
32810   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32811     # We found an arbitrary include file. That's a good sign.
32812     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32813 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32814     FOUND_FREETYPE=yes
32815 
32816     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32817     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32818       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32819 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32820       FOUND_FREETYPE=no
32821     else
32822       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32823         # On Windows, we will need both .lib and .dll file.
32824         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32825           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32826 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32827           FOUND_FREETYPE=no
32828         fi
32829       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
32830         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32831         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32832       fi
32833     fi
32834   fi
32835 
32836   if test "x$FOUND_FREETYPE" = xyes; then
32837 
32838   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32839 
32840   # Input might be given as Windows format, start by converting to
32841   # unix format.
32842   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32843   new_path=`$CYGPATH -u "$path"`
32844 
32845   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32846   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32847   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32848   # "foo.exe" is OK but "foo" is an error.
32849   #
32850   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32851   # It is also a way to make sure we got the proper file name for the real test later on.
32852   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32853   if test "x$test_shortpath" = x; then
32854     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32855 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32856     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32857   fi
32858 
32859   # Call helper function which possibly converts this using DOS-style short mode.
32860   # If so, the updated path is stored in $new_path.
32861 
32862   input_path="$new_path"
32863   # Check if we need to convert this using DOS-style short mode. If the path
32864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32865   # take no chances and rewrite it.
32866   # Note: m4 eats our [], so we need to use [ and ] instead.
32867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32868   if test "x$has_forbidden_chars" != x; then
32869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32870     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32871     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32872     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32873       # Going to short mode and back again did indeed matter. Since short mode is
32874       # case insensitive, let's make it lowercase to improve readability.
32875       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32876       # Now convert it back to Unix-stile (cygpath)
32877       input_path=`$CYGPATH -u "$shortmode_path"`
32878       new_path="$input_path"
32879     fi
32880   fi
32881 
32882   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32883   if test "x$test_cygdrive_prefix" = x; then
32884     # As a simple fix, exclude /usr/bin since it's not a real path.
32885     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32886       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32887       # a path prefixed by /cygdrive for fixpath to work.
32888       new_path="$CYGWIN_ROOT_PATH$input_path"
32889     fi
32890   fi
32891 
32892 
32893   if test "x$path" != "x$new_path"; then
32894     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32895     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32896 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32897   fi
32898 
32899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32900 
32901   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32902   has_colon=`$ECHO $path | $GREP ^.:`
32903   new_path="$path"
32904   if test "x$has_colon" = x; then
32905     # Not in mixed or Windows style, start by that.
32906     new_path=`cmd //c echo $path`
32907   fi
32908 
32909 
32910   input_path="$new_path"
32911   # Check if we need to convert this using DOS-style short mode. If the path
32912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32913   # take no chances and rewrite it.
32914   # Note: m4 eats our [], so we need to use [ and ] instead.
32915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32916   if test "x$has_forbidden_chars" != x; then
32917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32919   fi
32920 
32921 
32922   windows_path="$new_path"
32923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32924     unix_path=`$CYGPATH -u "$windows_path"`
32925     new_path="$unix_path"
32926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32928     new_path="$unix_path"
32929   fi
32930 
32931   if test "x$path" != "x$new_path"; then
32932     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32933     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32934 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32935   fi
32936 
32937   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32938   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32939 
32940   else
32941     # We're on a posix platform. Hooray! :)
32942     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32943     has_space=`$ECHO "$path" | $GREP " "`
32944     if test "x$has_space" != x; then
32945       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32946 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32947       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32948     fi
32949 
32950     # Use eval to expand a potential ~
32951     eval path="$path"
32952     if test ! -f "$path" && test ! -d "$path"; then
32953       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32954     fi
32955 
32956     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32957   fi
32958 
32959 
32960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32961 
32962   # Input might be given as Windows format, start by converting to
32963   # unix format.
32964   path="$POTENTIAL_FREETYPE_LIB_PATH"
32965   new_path=`$CYGPATH -u "$path"`
32966 
32967   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32968   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32969   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32970   # "foo.exe" is OK but "foo" is an error.
32971   #
32972   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32973   # It is also a way to make sure we got the proper file name for the real test later on.
32974   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32975   if test "x$test_shortpath" = x; then
32976     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32977 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32978     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32979   fi
32980 
32981   # Call helper function which possibly converts this using DOS-style short mode.
32982   # If so, the updated path is stored in $new_path.
32983 
32984   input_path="$new_path"
32985   # Check if we need to convert this using DOS-style short mode. If the path
32986   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32987   # take no chances and rewrite it.
32988   # Note: m4 eats our [], so we need to use [ and ] instead.
32989   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32990   if test "x$has_forbidden_chars" != x; then
32991     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32992     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32993     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32994     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32995       # Going to short mode and back again did indeed matter. Since short mode is
32996       # case insensitive, let's make it lowercase to improve readability.
32997       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32998       # Now convert it back to Unix-stile (cygpath)
32999       input_path=`$CYGPATH -u "$shortmode_path"`
33000       new_path="$input_path"
33001     fi
33002   fi
33003 
33004   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33005   if test "x$test_cygdrive_prefix" = x; then
33006     # As a simple fix, exclude /usr/bin since it's not a real path.
33007     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33008       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33009       # a path prefixed by /cygdrive for fixpath to work.
33010       new_path="$CYGWIN_ROOT_PATH$input_path"
33011     fi
33012   fi
33013 
33014 
33015   if test "x$path" != "x$new_path"; then
33016     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33017     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33018 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33019   fi
33020 
33021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33022 
33023   path="$POTENTIAL_FREETYPE_LIB_PATH"
33024   has_colon=`$ECHO $path | $GREP ^.:`
33025   new_path="$path"
33026   if test "x$has_colon" = x; then
33027     # Not in mixed or Windows style, start by that.
33028     new_path=`cmd //c echo $path`
33029   fi
33030 
33031 
33032   input_path="$new_path"
33033   # Check if we need to convert this using DOS-style short mode. If the path
33034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33035   # take no chances and rewrite it.
33036   # Note: m4 eats our [], so we need to use [ and ] instead.
33037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33038   if test "x$has_forbidden_chars" != x; then
33039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33040     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33041   fi
33042 
33043 
33044   windows_path="$new_path"
33045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33046     unix_path=`$CYGPATH -u "$windows_path"`
33047     new_path="$unix_path"
33048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33050     new_path="$unix_path"
33051   fi
33052 
33053   if test "x$path" != "x$new_path"; then
33054     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33055     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33056 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33057   fi
33058 
33059   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33060   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33061 
33062   else
33063     # We're on a posix platform. Hooray! :)
33064     path="$POTENTIAL_FREETYPE_LIB_PATH"
33065     has_space=`$ECHO "$path" | $GREP " "`
33066     if test "x$has_space" != x; then
33067       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33068 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33069       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33070     fi
33071 
33072     # Use eval to expand a potential ~
33073     eval path="$path"
33074     if test ! -f "$path" && test ! -d "$path"; then
33075       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33076     fi
33077 
33078     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33079   fi
33080 
33081 
33082     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33083     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33084 $as_echo_n "checking for freetype includes... " >&6; }
33085     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33086 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33087     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33089 $as_echo_n "checking for freetype libraries... " >&6; }
33090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33091 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33092   fi
33093 
33094 
33095           if test "x$FOUND_FREETYPE" != xyes; then
33096             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
33097 
33098   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33099   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
33100   METHOD="well-known location"
33101 
33102   # First check if the files exists.
33103   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33104     # We found an arbitrary include file. That's a good sign.
33105     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33106 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33107     FOUND_FREETYPE=yes
33108 
33109     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33110     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33111       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33112 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33113       FOUND_FREETYPE=no
33114     else
33115       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33116         # On Windows, we will need both .lib and .dll file.
33117         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33118           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33119 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33120           FOUND_FREETYPE=no
33121         fi
33122       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33123         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33124         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33125       fi
33126     fi
33127   fi
33128 
33129   if test "x$FOUND_FREETYPE" = xyes; then
33130 
33131   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33132 
33133   # Input might be given as Windows format, start by converting to
33134   # unix format.
33135   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33136   new_path=`$CYGPATH -u "$path"`
33137 
33138   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33139   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33140   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33141   # "foo.exe" is OK but "foo" is an error.
33142   #
33143   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33144   # It is also a way to make sure we got the proper file name for the real test later on.
33145   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33146   if test "x$test_shortpath" = x; then
33147     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33148 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33149     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33150   fi
33151 
33152   # Call helper function which possibly converts this using DOS-style short mode.
33153   # If so, the updated path is stored in $new_path.
33154 
33155   input_path="$new_path"
33156   # Check if we need to convert this using DOS-style short mode. If the path
33157   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33158   # take no chances and rewrite it.
33159   # Note: m4 eats our [], so we need to use [ and ] instead.
33160   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33161   if test "x$has_forbidden_chars" != x; then
33162     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33163     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33164     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33165     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33166       # Going to short mode and back again did indeed matter. Since short mode is
33167       # case insensitive, let's make it lowercase to improve readability.
33168       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33169       # Now convert it back to Unix-stile (cygpath)
33170       input_path=`$CYGPATH -u "$shortmode_path"`
33171       new_path="$input_path"
33172     fi
33173   fi
33174 
33175   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33176   if test "x$test_cygdrive_prefix" = x; then
33177     # As a simple fix, exclude /usr/bin since it's not a real path.
33178     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33179       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33180       # a path prefixed by /cygdrive for fixpath to work.
33181       new_path="$CYGWIN_ROOT_PATH$input_path"
33182     fi
33183   fi
33184 
33185 
33186   if test "x$path" != "x$new_path"; then
33187     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33188     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33189 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33190   fi
33191 
33192   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33193 
33194   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33195   has_colon=`$ECHO $path | $GREP ^.:`
33196   new_path="$path"
33197   if test "x$has_colon" = x; then
33198     # Not in mixed or Windows style, start by that.
33199     new_path=`cmd //c echo $path`
33200   fi
33201 
33202 
33203   input_path="$new_path"
33204   # Check if we need to convert this using DOS-style short mode. If the path
33205   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33206   # take no chances and rewrite it.
33207   # Note: m4 eats our [], so we need to use [ and ] instead.
33208   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33209   if test "x$has_forbidden_chars" != x; then
33210     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33211     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33212   fi
33213 
33214 
33215   windows_path="$new_path"
33216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33217     unix_path=`$CYGPATH -u "$windows_path"`
33218     new_path="$unix_path"
33219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33221     new_path="$unix_path"
33222   fi
33223 
33224   if test "x$path" != "x$new_path"; then
33225     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33226     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33227 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33228   fi
33229 
33230   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33231   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33232 
33233   else
33234     # We're on a posix platform. Hooray! :)
33235     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33236     has_space=`$ECHO "$path" | $GREP " "`
33237     if test "x$has_space" != x; then
33238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33239 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33240       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33241     fi
33242 
33243     # Use eval to expand a potential ~
33244     eval path="$path"
33245     if test ! -f "$path" && test ! -d "$path"; then
33246       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33247     fi
33248 
33249     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33250   fi
33251 
33252 
33253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33254 
33255   # Input might be given as Windows format, start by converting to
33256   # unix format.
33257   path="$POTENTIAL_FREETYPE_LIB_PATH"
33258   new_path=`$CYGPATH -u "$path"`
33259 
33260   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33261   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33262   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33263   # "foo.exe" is OK but "foo" is an error.
33264   #
33265   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33266   # It is also a way to make sure we got the proper file name for the real test later on.
33267   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33268   if test "x$test_shortpath" = x; then
33269     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33270 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33271     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33272   fi
33273 
33274   # Call helper function which possibly converts this using DOS-style short mode.
33275   # If so, the updated path is stored in $new_path.
33276 
33277   input_path="$new_path"
33278   # Check if we need to convert this using DOS-style short mode. If the path
33279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33280   # take no chances and rewrite it.
33281   # Note: m4 eats our [], so we need to use [ and ] instead.
33282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33283   if test "x$has_forbidden_chars" != x; then
33284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33285     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33286     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33287     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33288       # Going to short mode and back again did indeed matter. Since short mode is
33289       # case insensitive, let's make it lowercase to improve readability.
33290       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33291       # Now convert it back to Unix-stile (cygpath)
33292       input_path=`$CYGPATH -u "$shortmode_path"`
33293       new_path="$input_path"
33294     fi
33295   fi
33296 
33297   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33298   if test "x$test_cygdrive_prefix" = x; then
33299     # As a simple fix, exclude /usr/bin since it's not a real path.
33300     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33301       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33302       # a path prefixed by /cygdrive for fixpath to work.
33303       new_path="$CYGWIN_ROOT_PATH$input_path"
33304     fi
33305   fi
33306 
33307 
33308   if test "x$path" != "x$new_path"; then
33309     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33311 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33312   fi
33313 
33314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33315 
33316   path="$POTENTIAL_FREETYPE_LIB_PATH"
33317   has_colon=`$ECHO $path | $GREP ^.:`
33318   new_path="$path"
33319   if test "x$has_colon" = x; then
33320     # Not in mixed or Windows style, start by that.
33321     new_path=`cmd //c echo $path`
33322   fi
33323 
33324 
33325   input_path="$new_path"
33326   # Check if we need to convert this using DOS-style short mode. If the path
33327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33328   # take no chances and rewrite it.
33329   # Note: m4 eats our [], so we need to use [ and ] instead.
33330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33331   if test "x$has_forbidden_chars" != x; then
33332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33333     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33334   fi
33335 
33336 
33337   windows_path="$new_path"
33338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33339     unix_path=`$CYGPATH -u "$windows_path"`
33340     new_path="$unix_path"
33341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33343     new_path="$unix_path"
33344   fi
33345 
33346   if test "x$path" != "x$new_path"; then
33347     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33349 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33350   fi
33351 
33352   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33353   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33354 
33355   else
33356     # We're on a posix platform. Hooray! :)
33357     path="$POTENTIAL_FREETYPE_LIB_PATH"
33358     has_space=`$ECHO "$path" | $GREP " "`
33359     if test "x$has_space" != x; then
33360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33361 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33362       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33363     fi
33364 
33365     # Use eval to expand a potential ~
33366     eval path="$path"
33367     if test ! -f "$path" && test ! -d "$path"; then
33368       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33369     fi
33370 
33371     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33372   fi
33373 
33374 
33375     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33376     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33377 $as_echo_n "checking for freetype includes... " >&6; }
33378     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33379 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33380     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33382 $as_echo_n "checking for freetype libraries... " >&6; }
33383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33384 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33385   fi
33386 
33387           fi
33388 
33389           if test "x$FOUND_FREETYPE" != xyes; then
33390             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33391             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33392 
33393   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33394   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33395   METHOD="well-known location"
33396 
33397   # First check if the files exists.
33398   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33399     # We found an arbitrary include file. That's a good sign.
33400     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33401 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33402     FOUND_FREETYPE=yes
33403 
33404     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33405     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33406       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33407 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33408       FOUND_FREETYPE=no
33409     else
33410       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33411         # On Windows, we will need both .lib and .dll file.
33412         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33413           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33414 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33415           FOUND_FREETYPE=no
33416         fi
33417       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33418         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33419         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33420       fi
33421     fi
33422   fi
33423 
33424   if test "x$FOUND_FREETYPE" = xyes; then
33425 
33426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33427 
33428   # Input might be given as Windows format, start by converting to
33429   # unix format.
33430   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33431   new_path=`$CYGPATH -u "$path"`
33432 
33433   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33434   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33435   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33436   # "foo.exe" is OK but "foo" is an error.
33437   #
33438   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33439   # It is also a way to make sure we got the proper file name for the real test later on.
33440   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33441   if test "x$test_shortpath" = x; then
33442     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33443 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33444     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33445   fi
33446 
33447   # Call helper function which possibly converts this using DOS-style short mode.
33448   # If so, the updated path is stored in $new_path.
33449 
33450   input_path="$new_path"
33451   # Check if we need to convert this using DOS-style short mode. If the path
33452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33453   # take no chances and rewrite it.
33454   # Note: m4 eats our [], so we need to use [ and ] instead.
33455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33456   if test "x$has_forbidden_chars" != x; then
33457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33458     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33459     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33460     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33461       # Going to short mode and back again did indeed matter. Since short mode is
33462       # case insensitive, let's make it lowercase to improve readability.
33463       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33464       # Now convert it back to Unix-stile (cygpath)
33465       input_path=`$CYGPATH -u "$shortmode_path"`
33466       new_path="$input_path"
33467     fi
33468   fi
33469 
33470   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33471   if test "x$test_cygdrive_prefix" = x; then
33472     # As a simple fix, exclude /usr/bin since it's not a real path.
33473     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33474       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33475       # a path prefixed by /cygdrive for fixpath to work.
33476       new_path="$CYGWIN_ROOT_PATH$input_path"
33477     fi
33478   fi
33479 
33480 
33481   if test "x$path" != "x$new_path"; then
33482     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33483     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33484 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33485   fi
33486 
33487   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33488 
33489   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33490   has_colon=`$ECHO $path | $GREP ^.:`
33491   new_path="$path"
33492   if test "x$has_colon" = x; then
33493     # Not in mixed or Windows style, start by that.
33494     new_path=`cmd //c echo $path`
33495   fi
33496 
33497 
33498   input_path="$new_path"
33499   # Check if we need to convert this using DOS-style short mode. If the path
33500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33501   # take no chances and rewrite it.
33502   # Note: m4 eats our [], so we need to use [ and ] instead.
33503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33504   if test "x$has_forbidden_chars" != x; then
33505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33506     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33507   fi
33508 
33509 
33510   windows_path="$new_path"
33511   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33512     unix_path=`$CYGPATH -u "$windows_path"`
33513     new_path="$unix_path"
33514   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33515     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33516     new_path="$unix_path"
33517   fi
33518 
33519   if test "x$path" != "x$new_path"; then
33520     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33521     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33522 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33523   fi
33524 
33525   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33526   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33527 
33528   else
33529     # We're on a posix platform. Hooray! :)
33530     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33531     has_space=`$ECHO "$path" | $GREP " "`
33532     if test "x$has_space" != x; then
33533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33534 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33535       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33536     fi
33537 
33538     # Use eval to expand a potential ~
33539     eval path="$path"
33540     if test ! -f "$path" && test ! -d "$path"; then
33541       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33542     fi
33543 
33544     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33545   fi
33546 
33547 
33548   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33549 
33550   # Input might be given as Windows format, start by converting to
33551   # unix format.
33552   path="$POTENTIAL_FREETYPE_LIB_PATH"
33553   new_path=`$CYGPATH -u "$path"`
33554 
33555   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33556   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33557   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33558   # "foo.exe" is OK but "foo" is an error.
33559   #
33560   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33561   # It is also a way to make sure we got the proper file name for the real test later on.
33562   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33563   if test "x$test_shortpath" = x; then
33564     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33565 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33566     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33567   fi
33568 
33569   # Call helper function which possibly converts this using DOS-style short mode.
33570   # If so, the updated path is stored in $new_path.
33571 
33572   input_path="$new_path"
33573   # Check if we need to convert this using DOS-style short mode. If the path
33574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33575   # take no chances and rewrite it.
33576   # Note: m4 eats our [], so we need to use [ and ] instead.
33577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33578   if test "x$has_forbidden_chars" != x; then
33579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33580     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33581     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33582     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33583       # Going to short mode and back again did indeed matter. Since short mode is
33584       # case insensitive, let's make it lowercase to improve readability.
33585       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33586       # Now convert it back to Unix-stile (cygpath)
33587       input_path=`$CYGPATH -u "$shortmode_path"`
33588       new_path="$input_path"
33589     fi
33590   fi
33591 
33592   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33593   if test "x$test_cygdrive_prefix" = x; then
33594     # As a simple fix, exclude /usr/bin since it's not a real path.
33595     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33596       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33597       # a path prefixed by /cygdrive for fixpath to work.
33598       new_path="$CYGWIN_ROOT_PATH$input_path"
33599     fi
33600   fi
33601 
33602 
33603   if test "x$path" != "x$new_path"; then
33604     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33606 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33607   fi
33608 
33609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33610 
33611   path="$POTENTIAL_FREETYPE_LIB_PATH"
33612   has_colon=`$ECHO $path | $GREP ^.:`
33613   new_path="$path"
33614   if test "x$has_colon" = x; then
33615     # Not in mixed or Windows style, start by that.
33616     new_path=`cmd //c echo $path`
33617   fi
33618 
33619 
33620   input_path="$new_path"
33621   # Check if we need to convert this using DOS-style short mode. If the path
33622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33623   # take no chances and rewrite it.
33624   # Note: m4 eats our [], so we need to use [ and ] instead.
33625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33626   if test "x$has_forbidden_chars" != x; then
33627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33628     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33629   fi
33630 
33631 
33632   windows_path="$new_path"
33633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33634     unix_path=`$CYGPATH -u "$windows_path"`
33635     new_path="$unix_path"
33636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33638     new_path="$unix_path"
33639   fi
33640 
33641   if test "x$path" != "x$new_path"; then
33642     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33644 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33645   fi
33646 
33647   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33648   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33649 
33650   else
33651     # We're on a posix platform. Hooray! :)
33652     path="$POTENTIAL_FREETYPE_LIB_PATH"
33653     has_space=`$ECHO "$path" | $GREP " "`
33654     if test "x$has_space" != x; then
33655       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33656 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33657       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33658     fi
33659 
33660     # Use eval to expand a potential ~
33661     eval path="$path"
33662     if test ! -f "$path" && test ! -d "$path"; then
33663       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33664     fi
33665 
33666     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33667   fi
33668 
33669 
33670     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33671     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33672 $as_echo_n "checking for freetype includes... " >&6; }
33673     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33674 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33675     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33676     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33677 $as_echo_n "checking for freetype libraries... " >&6; }
33678     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33679 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33680   fi
33681 
33682             else
33683 
33684   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33685   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33686   METHOD="well-known location"
33687 
33688   # First check if the files exists.
33689   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33690     # We found an arbitrary include file. That's a good sign.
33691     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33692 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33693     FOUND_FREETYPE=yes
33694 
33695     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33696     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33697       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33698 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33699       FOUND_FREETYPE=no
33700     else
33701       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33702         # On Windows, we will need both .lib and .dll file.
33703         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33704           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33705 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33706           FOUND_FREETYPE=no
33707         fi
33708       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
33709         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33710         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33711       fi
33712     fi
33713   fi
33714 
33715   if test "x$FOUND_FREETYPE" = xyes; then
33716 
33717   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33718 
33719   # Input might be given as Windows format, start by converting to
33720   # unix format.
33721   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33722   new_path=`$CYGPATH -u "$path"`
33723 
33724   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33725   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33726   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33727   # "foo.exe" is OK but "foo" is an error.
33728   #
33729   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33730   # It is also a way to make sure we got the proper file name for the real test later on.
33731   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33732   if test "x$test_shortpath" = x; then
33733     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33734 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33735     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33736   fi
33737 
33738   # Call helper function which possibly converts this using DOS-style short mode.
33739   # If so, the updated path is stored in $new_path.
33740 
33741   input_path="$new_path"
33742   # Check if we need to convert this using DOS-style short mode. If the path
33743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33744   # take no chances and rewrite it.
33745   # Note: m4 eats our [], so we need to use [ and ] instead.
33746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33747   if test "x$has_forbidden_chars" != x; then
33748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33752       # Going to short mode and back again did indeed matter. Since short mode is
33753       # case insensitive, let's make it lowercase to improve readability.
33754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33755       # Now convert it back to Unix-stile (cygpath)
33756       input_path=`$CYGPATH -u "$shortmode_path"`
33757       new_path="$input_path"
33758     fi
33759   fi
33760 
33761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33762   if test "x$test_cygdrive_prefix" = x; then
33763     # As a simple fix, exclude /usr/bin since it's not a real path.
33764     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33766       # a path prefixed by /cygdrive for fixpath to work.
33767       new_path="$CYGWIN_ROOT_PATH$input_path"
33768     fi
33769   fi
33770 
33771 
33772   if test "x$path" != "x$new_path"; then
33773     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33775 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33776   fi
33777 
33778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33779 
33780   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33781   has_colon=`$ECHO $path | $GREP ^.:`
33782   new_path="$path"
33783   if test "x$has_colon" = x; then
33784     # Not in mixed or Windows style, start by that.
33785     new_path=`cmd //c echo $path`
33786   fi
33787 
33788 
33789   input_path="$new_path"
33790   # Check if we need to convert this using DOS-style short mode. If the path
33791   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33792   # take no chances and rewrite it.
33793   # Note: m4 eats our [], so we need to use [ and ] instead.
33794   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33795   if test "x$has_forbidden_chars" != x; then
33796     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33797     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33798   fi
33799 
33800 
33801   windows_path="$new_path"
33802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33803     unix_path=`$CYGPATH -u "$windows_path"`
33804     new_path="$unix_path"
33805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33807     new_path="$unix_path"
33808   fi
33809 
33810   if test "x$path" != "x$new_path"; then
33811     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33812     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33813 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33814   fi
33815 
33816   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33817   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33818 
33819   else
33820     # We're on a posix platform. Hooray! :)
33821     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33822     has_space=`$ECHO "$path" | $GREP " "`
33823     if test "x$has_space" != x; then
33824       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33825 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33826       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33827     fi
33828 
33829     # Use eval to expand a potential ~
33830     eval path="$path"
33831     if test ! -f "$path" && test ! -d "$path"; then
33832       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33833     fi
33834 
33835     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33836   fi
33837 
33838 
33839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33840 
33841   # Input might be given as Windows format, start by converting to
33842   # unix format.
33843   path="$POTENTIAL_FREETYPE_LIB_PATH"
33844   new_path=`$CYGPATH -u "$path"`
33845 
33846   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33847   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33848   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33849   # "foo.exe" is OK but "foo" is an error.
33850   #
33851   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33852   # It is also a way to make sure we got the proper file name for the real test later on.
33853   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33854   if test "x$test_shortpath" = x; then
33855     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33856 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33857     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33858   fi
33859 
33860   # Call helper function which possibly converts this using DOS-style short mode.
33861   # If so, the updated path is stored in $new_path.
33862 
33863   input_path="$new_path"
33864   # Check if we need to convert this using DOS-style short mode. If the path
33865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33866   # take no chances and rewrite it.
33867   # Note: m4 eats our [], so we need to use [ and ] instead.
33868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33869   if test "x$has_forbidden_chars" != x; then
33870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33874       # Going to short mode and back again did indeed matter. Since short mode is
33875       # case insensitive, let's make it lowercase to improve readability.
33876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33877       # Now convert it back to Unix-stile (cygpath)
33878       input_path=`$CYGPATH -u "$shortmode_path"`
33879       new_path="$input_path"
33880     fi
33881   fi
33882 
33883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33884   if test "x$test_cygdrive_prefix" = x; then
33885     # As a simple fix, exclude /usr/bin since it's not a real path.
33886     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33888       # a path prefixed by /cygdrive for fixpath to work.
33889       new_path="$CYGWIN_ROOT_PATH$input_path"
33890     fi
33891   fi
33892 
33893 
33894   if test "x$path" != "x$new_path"; then
33895     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33896     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33897 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33898   fi
33899 
33900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33901 
33902   path="$POTENTIAL_FREETYPE_LIB_PATH"
33903   has_colon=`$ECHO $path | $GREP ^.:`
33904   new_path="$path"
33905   if test "x$has_colon" = x; then
33906     # Not in mixed or Windows style, start by that.
33907     new_path=`cmd //c echo $path`
33908   fi
33909 
33910 
33911   input_path="$new_path"
33912   # Check if we need to convert this using DOS-style short mode. If the path
33913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33914   # take no chances and rewrite it.
33915   # Note: m4 eats our [], so we need to use [ and ] instead.
33916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33917   if test "x$has_forbidden_chars" != x; then
33918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33919     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33920   fi
33921 
33922 
33923   windows_path="$new_path"
33924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33925     unix_path=`$CYGPATH -u "$windows_path"`
33926     new_path="$unix_path"
33927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33929     new_path="$unix_path"
33930   fi
33931 
33932   if test "x$path" != "x$new_path"; then
33933     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33935 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33936   fi
33937 
33938   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33939   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33940 
33941   else
33942     # We're on a posix platform. Hooray! :)
33943     path="$POTENTIAL_FREETYPE_LIB_PATH"
33944     has_space=`$ECHO "$path" | $GREP " "`
33945     if test "x$has_space" != x; then
33946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33947 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33948       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33949     fi
33950 
33951     # Use eval to expand a potential ~
33952     eval path="$path"
33953     if test ! -f "$path" && test ! -d "$path"; then
33954       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33955     fi
33956 
33957     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33958   fi
33959 
33960 
33961     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33962     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33963 $as_echo_n "checking for freetype includes... " >&6; }
33964     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33965 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33966     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33967     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33968 $as_echo_n "checking for freetype libraries... " >&6; }
33969     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33970 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33971   fi
33972 
33973               if test "x$FOUND_FREETYPE" != xyes; then
33974 
33975   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33976   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33977   METHOD="well-known location"
33978 
33979   # First check if the files exists.
33980   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33981     # We found an arbitrary include file. That's a good sign.
33982     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33983 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33984     FOUND_FREETYPE=yes
33985 
33986     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33987     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33988       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33989 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33990       FOUND_FREETYPE=no
33991     else
33992       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33993         # On Windows, we will need both .lib and .dll file.
33994         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33995           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33996 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33997           FOUND_FREETYPE=no
33998         fi
33999       elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then
34000         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
34001         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
34002       fi
34003     fi
34004   fi
34005 
34006   if test "x$FOUND_FREETYPE" = xyes; then
34007 
34008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34009 
34010   # Input might be given as Windows format, start by converting to
34011   # unix format.
34012   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34013   new_path=`$CYGPATH -u "$path"`
34014 
34015   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34016   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34017   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34018   # "foo.exe" is OK but "foo" is an error.
34019   #
34020   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34021   # It is also a way to make sure we got the proper file name for the real test later on.
34022   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34023   if test "x$test_shortpath" = x; then
34024     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34025 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34026     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
34027   fi
34028 
34029   # Call helper function which possibly converts this using DOS-style short mode.
34030   # If so, the updated path is stored in $new_path.
34031 
34032   input_path="$new_path"
34033   # Check if we need to convert this using DOS-style short mode. If the path
34034   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34035   # take no chances and rewrite it.
34036   # Note: m4 eats our [], so we need to use [ and ] instead.
34037   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34038   if test "x$has_forbidden_chars" != x; then
34039     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34040     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34041     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34042     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34043       # Going to short mode and back again did indeed matter. Since short mode is
34044       # case insensitive, let's make it lowercase to improve readability.
34045       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34046       # Now convert it back to Unix-stile (cygpath)
34047       input_path=`$CYGPATH -u "$shortmode_path"`
34048       new_path="$input_path"
34049     fi
34050   fi
34051 
34052   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34053   if test "x$test_cygdrive_prefix" = x; then
34054     # As a simple fix, exclude /usr/bin since it's not a real path.
34055     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34056       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34057       # a path prefixed by /cygdrive for fixpath to work.
34058       new_path="$CYGWIN_ROOT_PATH$input_path"
34059     fi
34060   fi
34061 
34062 
34063   if test "x$path" != "x$new_path"; then
34064     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34065     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34066 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34067   fi
34068 
34069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34070 
34071   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34072   has_colon=`$ECHO $path | $GREP ^.:`
34073   new_path="$path"
34074   if test "x$has_colon" = x; then
34075     # Not in mixed or Windows style, start by that.
34076     new_path=`cmd //c echo $path`
34077   fi
34078 
34079 
34080   input_path="$new_path"
34081   # Check if we need to convert this using DOS-style short mode. If the path
34082   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34083   # take no chances and rewrite it.
34084   # Note: m4 eats our [], so we need to use [ and ] instead.
34085   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34086   if test "x$has_forbidden_chars" != x; then
34087     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34088     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34089   fi
34090 
34091 
34092   windows_path="$new_path"
34093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34094     unix_path=`$CYGPATH -u "$windows_path"`
34095     new_path="$unix_path"
34096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34098     new_path="$unix_path"
34099   fi
34100 
34101   if test "x$path" != "x$new_path"; then
34102     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34103     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34104 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34105   fi
34106 
34107   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34108   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34109 
34110   else
34111     # We're on a posix platform. Hooray! :)
34112     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34113     has_space=`$ECHO "$path" | $GREP " "`
34114     if test "x$has_space" != x; then
34115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34116 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34117       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34118     fi
34119 
34120     # Use eval to expand a potential ~
34121     eval path="$path"
34122     if test ! -f "$path" && test ! -d "$path"; then
34123       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34124     fi
34125 
34126     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34127   fi
34128 
34129 
34130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34131 
34132   # Input might be given as Windows format, start by converting to
34133   # unix format.
34134   path="$POTENTIAL_FREETYPE_LIB_PATH"
34135   new_path=`$CYGPATH -u "$path"`
34136 
34137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34140   # "foo.exe" is OK but "foo" is an error.
34141   #
34142   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34143   # It is also a way to make sure we got the proper file name for the real test later on.
34144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34145   if test "x$test_shortpath" = x; then
34146     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34147 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34148     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34149   fi
34150 
34151   # Call helper function which possibly converts this using DOS-style short mode.
34152   # If so, the updated path is stored in $new_path.
34153 
34154   input_path="$new_path"
34155   # Check if we need to convert this using DOS-style short mode. If the path
34156   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34157   # take no chances and rewrite it.
34158   # Note: m4 eats our [], so we need to use [ and ] instead.
34159   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34160   if test "x$has_forbidden_chars" != x; then
34161     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34162     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34163     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34164     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34165       # Going to short mode and back again did indeed matter. Since short mode is
34166       # case insensitive, let's make it lowercase to improve readability.
34167       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34168       # Now convert it back to Unix-stile (cygpath)
34169       input_path=`$CYGPATH -u "$shortmode_path"`
34170       new_path="$input_path"
34171     fi
34172   fi
34173 
34174   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34175   if test "x$test_cygdrive_prefix" = x; then
34176     # As a simple fix, exclude /usr/bin since it's not a real path.
34177     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34178       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34179       # a path prefixed by /cygdrive for fixpath to work.
34180       new_path="$CYGWIN_ROOT_PATH$input_path"
34181     fi
34182   fi
34183 
34184 
34185   if test "x$path" != "x$new_path"; then
34186     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34187     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34188 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34189   fi
34190 
34191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34192 
34193   path="$POTENTIAL_FREETYPE_LIB_PATH"
34194   has_colon=`$ECHO $path | $GREP ^.:`
34195   new_path="$path"
34196   if test "x$has_colon" = x; then
34197     # Not in mixed or Windows style, start by that.
34198     new_path=`cmd //c echo $path`
34199   fi
34200 
34201 
34202   input_path="$new_path"
34203   # Check if we need to convert this using DOS-style short mode. If the path
34204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34205   # take no chances and rewrite it.
34206   # Note: m4 eats our [], so we need to use [ and ] instead.
34207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34208   if test "x$has_forbidden_chars" != x; then
34209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34211   fi
34212 
34213 
34214   windows_path="$new_path"
34215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34216     unix_path=`$CYGPATH -u "$windows_path"`
34217     new_path="$unix_path"
34218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34220     new_path="$unix_path"
34221   fi
34222 
34223   if test "x$path" != "x$new_path"; then
34224     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34226 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34227   fi
34228 
34229   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34230   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34231 
34232   else
34233     # We're on a posix platform. Hooray! :)
34234     path="$POTENTIAL_FREETYPE_LIB_PATH"
34235     has_space=`$ECHO "$path" | $GREP " "`
34236     if test "x$has_space" != x; then
34237       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34238 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34239       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34240     fi
34241 
34242     # Use eval to expand a potential ~
34243     eval path="$path"
34244     if test ! -f "$path" && test ! -d "$path"; then
34245       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34246     fi
34247 
34248     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34249   fi
34250 
34251 
34252     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34253     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34254 $as_echo_n "checking for freetype includes... " >&6; }
34255     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34256 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34257     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34259 $as_echo_n "checking for freetype libraries... " >&6; }
34260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34261 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34262   fi
34263 
34264               fi
34265             fi
34266           fi
34267         fi
34268       fi # end check in well-known locations
34269 
34270       if test "x$FOUND_FREETYPE" != xyes; then
34271 
34272   # Print a helpful message on how to acquire the necessary build dependency.
34273   # freetype is the help tag: freetype, cups, pulse, alsa etc
34274   MISSING_DEPENDENCY=freetype
34275 
34276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34277     cygwin_help $MISSING_DEPENDENCY
34278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34279     msys_help $MISSING_DEPENDENCY
34280   else
34281     PKGHANDLER_COMMAND=
34282 
34283     case $PKGHANDLER in
34284       apt-get)
34285         apt_help     $MISSING_DEPENDENCY ;;
34286       yum)
34287         yum_help     $MISSING_DEPENDENCY ;;
34288       port)
34289         port_help    $MISSING_DEPENDENCY ;;
34290       pkgutil)
34291         pkgutil_help $MISSING_DEPENDENCY ;;
34292       pkgadd)
34293         pkgadd_help  $MISSING_DEPENDENCY ;;
34294     esac
34295 
34296     if test "x$PKGHANDLER_COMMAND" != x; then
34297       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34298     fi
34299   fi
34300 
34301         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34302       fi
34303     fi # end user specified settings
34304 
34305     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34306     if test "x$FREETYPE_CFLAGS" = x; then
34307 
34308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34309 
34310   # Input might be given as Windows format, start by converting to
34311   # unix format.
34312   path="$FREETYPE_INCLUDE_PATH"
34313   new_path=`$CYGPATH -u "$path"`
34314 
34315   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34316   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34317   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34318   # "foo.exe" is OK but "foo" is an error.
34319   #
34320   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34321   # It is also a way to make sure we got the proper file name for the real test later on.
34322   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34323   if test "x$test_shortpath" = x; then
34324     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34325 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34326     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34327   fi
34328 
34329   # Call helper function which possibly converts this using DOS-style short mode.
34330   # If so, the updated path is stored in $new_path.
34331 
34332   input_path="$new_path"
34333   # Check if we need to convert this using DOS-style short mode. If the path
34334   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34335   # take no chances and rewrite it.
34336   # Note: m4 eats our [], so we need to use [ and ] instead.
34337   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34338   if test "x$has_forbidden_chars" != x; then
34339     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34340     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34341     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34342     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34343       # Going to short mode and back again did indeed matter. Since short mode is
34344       # case insensitive, let's make it lowercase to improve readability.
34345       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34346       # Now convert it back to Unix-stile (cygpath)
34347       input_path=`$CYGPATH -u "$shortmode_path"`
34348       new_path="$input_path"
34349     fi
34350   fi
34351 
34352   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34353   if test "x$test_cygdrive_prefix" = x; then
34354     # As a simple fix, exclude /usr/bin since it's not a real path.
34355     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34356       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34357       # a path prefixed by /cygdrive for fixpath to work.
34358       new_path="$CYGWIN_ROOT_PATH$input_path"
34359     fi
34360   fi
34361 
34362 
34363   if test "x$path" != "x$new_path"; then
34364     FREETYPE_INCLUDE_PATH="$new_path"
34365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34366 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34367   fi
34368 
34369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34370 
34371   path="$FREETYPE_INCLUDE_PATH"
34372   has_colon=`$ECHO $path | $GREP ^.:`
34373   new_path="$path"
34374   if test "x$has_colon" = x; then
34375     # Not in mixed or Windows style, start by that.
34376     new_path=`cmd //c echo $path`
34377   fi
34378 
34379 
34380   input_path="$new_path"
34381   # Check if we need to convert this using DOS-style short mode. If the path
34382   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34383   # take no chances and rewrite it.
34384   # Note: m4 eats our [], so we need to use [ and ] instead.
34385   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34386   if test "x$has_forbidden_chars" != x; then
34387     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34388     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34389   fi
34390 
34391 
34392   windows_path="$new_path"
34393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34394     unix_path=`$CYGPATH -u "$windows_path"`
34395     new_path="$unix_path"
34396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34398     new_path="$unix_path"
34399   fi
34400 
34401   if test "x$path" != "x$new_path"; then
34402     FREETYPE_INCLUDE_PATH="$new_path"
34403     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34404 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34405   fi
34406 
34407   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34408   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34409 
34410   else
34411     # We're on a posix platform. Hooray! :)
34412     path="$FREETYPE_INCLUDE_PATH"
34413     has_space=`$ECHO "$path" | $GREP " "`
34414     if test "x$has_space" != x; then
34415       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34416 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34417       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34418     fi
34419 
34420     # Use eval to expand a potential ~
34421     eval path="$path"
34422     if test ! -f "$path" && test ! -d "$path"; then
34423       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34424     fi
34425 
34426     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34427   fi
34428 
34429       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34430         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34431       else
34432         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34433       fi
34434     fi
34435 
34436     if test "x$FREETYPE_LIBS" = x; then
34437 
34438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34439 
34440   # Input might be given as Windows format, start by converting to
34441   # unix format.
34442   path="$FREETYPE_LIB_PATH"
34443   new_path=`$CYGPATH -u "$path"`
34444 
34445   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34446   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34447   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34448   # "foo.exe" is OK but "foo" is an error.
34449   #
34450   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34451   # It is also a way to make sure we got the proper file name for the real test later on.
34452   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34453   if test "x$test_shortpath" = x; then
34454     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34455 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34456     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34457   fi
34458 
34459   # Call helper function which possibly converts this using DOS-style short mode.
34460   # If so, the updated path is stored in $new_path.
34461 
34462   input_path="$new_path"
34463   # Check if we need to convert this using DOS-style short mode. If the path
34464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34465   # take no chances and rewrite it.
34466   # Note: m4 eats our [], so we need to use [ and ] instead.
34467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34468   if test "x$has_forbidden_chars" != x; then
34469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34473       # Going to short mode and back again did indeed matter. Since short mode is
34474       # case insensitive, let's make it lowercase to improve readability.
34475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34476       # Now convert it back to Unix-stile (cygpath)
34477       input_path=`$CYGPATH -u "$shortmode_path"`
34478       new_path="$input_path"
34479     fi
34480   fi
34481 
34482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34483   if test "x$test_cygdrive_prefix" = x; then
34484     # As a simple fix, exclude /usr/bin since it's not a real path.
34485     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34487       # a path prefixed by /cygdrive for fixpath to work.
34488       new_path="$CYGWIN_ROOT_PATH$input_path"
34489     fi
34490   fi
34491 
34492 
34493   if test "x$path" != "x$new_path"; then
34494     FREETYPE_LIB_PATH="$new_path"
34495     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34496 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34497   fi
34498 
34499   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34500 
34501   path="$FREETYPE_LIB_PATH"
34502   has_colon=`$ECHO $path | $GREP ^.:`
34503   new_path="$path"
34504   if test "x$has_colon" = x; then
34505     # Not in mixed or Windows style, start by that.
34506     new_path=`cmd //c echo $path`
34507   fi
34508 
34509 
34510   input_path="$new_path"
34511   # Check if we need to convert this using DOS-style short mode. If the path
34512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34513   # take no chances and rewrite it.
34514   # Note: m4 eats our [], so we need to use [ and ] instead.
34515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34516   if test "x$has_forbidden_chars" != x; then
34517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34518     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34519   fi
34520 
34521 
34522   windows_path="$new_path"
34523   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34524     unix_path=`$CYGPATH -u "$windows_path"`
34525     new_path="$unix_path"
34526   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34527     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34528     new_path="$unix_path"
34529   fi
34530 
34531   if test "x$path" != "x$new_path"; then
34532     FREETYPE_LIB_PATH="$new_path"
34533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34534 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34535   fi
34536 
34537   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34538   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34539 
34540   else
34541     # We're on a posix platform. Hooray! :)
34542     path="$FREETYPE_LIB_PATH"
34543     has_space=`$ECHO "$path" | $GREP " "`
34544     if test "x$has_space" != x; then
34545       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34546 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34547       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34548     fi
34549 
34550     # Use eval to expand a potential ~
34551     eval path="$path"
34552     if test ! -f "$path" && test ! -d "$path"; then
34553       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34554     fi
34555 
34556     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34557   fi
34558 
34559       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34560         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34561       else
34562         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34563       fi
34564     fi
34565 
34566     # Try to compile it
34567     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34568 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34569     ac_ext=cpp
34570 ac_cpp='$CXXCPP $CPPFLAGS'
34571 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34572 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34573 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34574 
34575     PREV_CXXCFLAGS="$CXXFLAGS"
34576     PREV_LIBS="$LIBS"
34577     PREV_CXX="$CXX"
34578     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34579     LIBS="$LIBS $FREETYPE_LIBS"
34580     CXX="$FIXPATH $CXX"
34581     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34582 /* end confdefs.h.  */
34583 
34584           #include<ft2build.h>
34585           #include FT_FREETYPE_H
34586           int main () {
34587             FT_Init_FreeType(NULL);
34588             return 0;
34589           }
34590 
34591 _ACEOF
34592 if ac_fn_cxx_try_link "$LINENO"; then :
34593 
34594           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34595 $as_echo "yes" >&6; }
34596 
34597 else
34598 
34599           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34600 $as_echo "no" >&6; }
34601           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34602 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34603           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34604 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34605 
34606 
34607   # Print a helpful message on how to acquire the necessary build dependency.
34608   # freetype is the help tag: freetype, cups, pulse, alsa etc
34609   MISSING_DEPENDENCY=freetype
34610 
34611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34612     cygwin_help $MISSING_DEPENDENCY
34613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34614     msys_help $MISSING_DEPENDENCY
34615   else
34616     PKGHANDLER_COMMAND=
34617 
34618     case $PKGHANDLER in
34619       apt-get)
34620         apt_help     $MISSING_DEPENDENCY ;;
34621       yum)
34622         yum_help     $MISSING_DEPENDENCY ;;
34623       port)
34624         port_help    $MISSING_DEPENDENCY ;;
34625       pkgutil)
34626         pkgutil_help $MISSING_DEPENDENCY ;;
34627       pkgadd)
34628         pkgadd_help  $MISSING_DEPENDENCY ;;
34629     esac
34630 
34631     if test "x$PKGHANDLER_COMMAND" != x; then
34632       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34633     fi
34634   fi
34635 
34636 
34637           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34638 
34639 
34640 fi
34641 rm -f core conftest.err conftest.$ac_objext \
34642     conftest$ac_exeext conftest.$ac_ext
34643     CXXCFLAGS="$PREV_CXXFLAGS"
34644     LIBS="$PREV_LIBS"
34645     CXX="$PREV_CXX"
34646     ac_ext=cpp
34647 ac_cpp='$CXXCPP $CPPFLAGS'
34648 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34649 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34650 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34651 
34652 
34653     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34654 $as_echo_n "checking if we should bundle freetype... " >&6; }
34655     if test "x$BUNDLE_FREETYPE" = xyes; then
34656       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34657     fi
34658     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34659 $as_echo "$BUNDLE_FREETYPE" >&6; }
34660 
34661   fi # end freetype needed
34662 
34663 
34664 
34665 
34666 
34667 
34668 
34669   ###############################################################################
34670   #
34671   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34672   #
34673 
34674 # Check whether --with-alsa was given.
34675 if test "${with_alsa+set}" = set; then :
34676   withval=$with_alsa;
34677 fi
34678 
34679 
34680 # Check whether --with-alsa-include was given.
34681 if test "${with_alsa_include+set}" = set; then :
34682   withval=$with_alsa_include;
34683 fi
34684 
34685 
34686 # Check whether --with-alsa-lib was given.
34687 if test "${with_alsa_lib+set}" = set; then :
34688   withval=$with_alsa_lib;
34689 fi
34690 
34691 
34692   if test "x$ALSA_NOT_NEEDED" = xyes; then
34693     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34694       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34695 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34696     fi
34697     ALSA_CFLAGS=
34698     ALSA_LIBS=
34699   else
34700     ALSA_FOUND=no
34701 
34702     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34703       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34704     fi
34705 
34706     if test "x${with_alsa}" != x; then
34707       ALSA_LIBS="-L${with_alsa}/lib -lasound"
34708       ALSA_CFLAGS="-I${with_alsa}/include"
34709       ALSA_FOUND=yes
34710     fi
34711     if test "x${with_alsa_include}" != x; then
34712       ALSA_CFLAGS="-I${with_alsa_include}"
34713       ALSA_FOUND=yes
34714     fi
34715     if test "x${with_alsa_lib}" != x; then
34716       ALSA_LIBS="-L${with_alsa_lib} -lasound"
34717       ALSA_FOUND=yes
34718     fi
34719     if test "x$ALSA_FOUND" = xno; then
34720 
34721 
34722   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34723     # Source the builddeps file again, to make sure it uses the latest variables!
34724     . $builddepsfile
34725     # Look for a target and build machine specific resource!
34726     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34727     if test "x$resource" = x; then
34728       # Ok, lets instead look for a target specific resource
34729       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34730     fi
34731     if test "x$resource" = x; then
34732       # Ok, lets instead look for a build specific resource
34733       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34734     fi
34735     if test "x$resource" = x; then
34736       # Ok, lets instead look for a generic resource
34737       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34738       resource=${builddep_alsa}
34739     fi
34740     if test "x$resource" != x; then
34741       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34742 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34743       # If the resource in the builddeps.conf file is an existing directory,
34744       # for example /java/linux/cups
34745       if test -d ${resource}; then
34746         depdir=${resource}
34747       else
34748 
34749   # alsa is for example mymodule
34750   # $resource is for example libs/general/libmymod_1_2_3.zip
34751   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34752   # $with_builddeps_dir is for example /localhome/builddeps
34753   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34754   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34755   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34756   filename=`basename $resource`
34757   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34758   filebase=${filename%%.*}
34759   extension=${filename#*.}
34760   installdir=$with_builddeps_dir/$filebase
34761   if test ! -f $installdir/$filename.unpacked; then
34762     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34763 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34764     if test ! -d $installdir; then
34765       mkdir -p $installdir
34766     fi
34767     if test ! -d $installdir; then
34768       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34769     fi
34770     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34771     touch $tmpfile
34772     if test ! -f $tmpfile; then
34773       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34774     fi
34775 
34776   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34777   # $tmpfile is the local file name for the downloaded file.
34778   VALID_TOOL=no
34779   if test "x$BDEPS_FTP" = xwget; then
34780     VALID_TOOL=yes
34781     wget -O $tmpfile $with_builddeps_server/$resource
34782   fi
34783   if test "x$BDEPS_FTP" = xlftp; then
34784     VALID_TOOL=yes
34785     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34786   fi
34787   if test "x$BDEPS_FTP" = xftp; then
34788     VALID_TOOL=yes
34789     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34790     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34791     FTPUSERPWD=${FTPSERVER%%@*}
34792     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34793       FTPUSER=${userpwd%%:*}
34794       FTPPWD=${userpwd#*@}
34795       FTPSERVER=${FTPSERVER#*@}
34796     else
34797       FTPUSER=ftp
34798       FTPPWD=ftp
34799     fi
34800     # the "pass" command does not work on some
34801     # ftp clients (read ftp.exe) but if it works,
34802     # passive mode is better!
34803     ( \
34804         echo "user $FTPUSER $FTPPWD"        ; \
34805         echo "pass"                         ; \
34806         echo "bin"                          ; \
34807         echo "get $FTPPATH $tmpfile"              ; \
34808     ) | ftp -in $FTPSERVER
34809   fi
34810   if test "x$VALID_TOOL" != xyes; then
34811     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34812   fi
34813 
34814     mv $tmpfile $installdir/$filename
34815     if test ! -s $installdir/$filename; then
34816       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34817     fi
34818     case "$extension" in
34819       zip)  echo "Unzipping $installdir/$filename..."
34820         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34821         ;;
34822       tar.gz) echo "Untaring $installdir/$filename..."
34823         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34824         ;;
34825       tgz) echo "Untaring $installdir/$filename..."
34826         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34827         ;;
34828       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34829         ;;
34830     esac
34831   fi
34832   if test -f $installdir/$filename.unpacked; then
34833     depdir=$installdir
34834   fi
34835 
34836       fi
34837       # Source the builddeps file again, because in the previous command, the depdir
34838       # was updated to point at the current build dependency install directory.
34839       . $builddepsfile
34840       # Now extract variables from the builddeps.conf files.
34841       theroot=${builddep_alsa_ROOT}
34842       thecflags=${builddep_alsa_CFLAGS}
34843       thelibs=${builddep_alsa_LIBS}
34844       if test "x$depdir" = x; then
34845         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34846       fi
34847       ALSA=$depdir
34848       if test "x$theroot" != x; then
34849         ALSA="$theroot"
34850       fi
34851       if test "x$thecflags" != x; then
34852         ALSA_CFLAGS="$thecflags"
34853       fi
34854       if test "x$thelibs" != x; then
34855         ALSA_LIBS="$thelibs"
34856       fi
34857       ALSA_FOUND=yes
34858       else ALSA_FOUND=no
34859 
34860     fi
34861     else ALSA_FOUND=no
34862 
34863   fi
34864 
34865     fi
34866     if test "x$ALSA_FOUND" = xno; then
34867 
34868 pkg_failed=no
34869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34870 $as_echo_n "checking for ALSA... " >&6; }
34871 
34872 if test -n "$ALSA_CFLAGS"; then
34873     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34874  elif test -n "$PKG_CONFIG"; then
34875     if test -n "$PKG_CONFIG" && \
34876     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34877   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34878   ac_status=$?
34879   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34880   test $ac_status = 0; }; then
34881   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34882 else
34883   pkg_failed=yes
34884 fi
34885  else
34886     pkg_failed=untried
34887 fi
34888 if test -n "$ALSA_LIBS"; then
34889     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34890  elif test -n "$PKG_CONFIG"; then
34891     if test -n "$PKG_CONFIG" && \
34892     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34893   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34894   ac_status=$?
34895   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34896   test $ac_status = 0; }; then
34897   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34898 else
34899   pkg_failed=yes
34900 fi
34901  else
34902     pkg_failed=untried
34903 fi
34904 
34905 
34906 
34907 if test $pkg_failed = yes; then
34908 
34909 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34910         _pkg_short_errors_supported=yes
34911 else
34912         _pkg_short_errors_supported=no
34913 fi
34914         if test $_pkg_short_errors_supported = yes; then
34915                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34916         else
34917                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34918         fi
34919         # Put the nasty error message in config.log where it belongs
34920         echo "$ALSA_PKG_ERRORS" >&5
34921 
34922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34923 $as_echo "no" >&6; }
34924                 ALSA_FOUND=no
34925 elif test $pkg_failed = untried; then
34926         ALSA_FOUND=no
34927 else
34928         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34929         ALSA_LIBS=$pkg_cv_ALSA_LIBS
34930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34931 $as_echo "yes" >&6; }
34932         ALSA_FOUND=yes
34933 fi
34934     fi
34935     if test "x$ALSA_FOUND" = xno; then
34936       for ac_header in alsa/asoundlib.h
34937 do :
34938   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34939 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34940   cat >>confdefs.h <<_ACEOF
34941 #define HAVE_ALSA_ASOUNDLIB_H 1
34942 _ACEOF
34943 
34944             ALSA_FOUND=yes
34945             ALSA_CFLAGS=-Iignoreme
34946             ALSA_LIBS=-lasound
34947             DEFAULT_ALSA=yes
34948 
34949 else
34950   ALSA_FOUND=no
34951 fi
34952 
34953 done
34954 
34955     fi
34956     if test "x$ALSA_FOUND" = xno; then
34957 
34958   # Print a helpful message on how to acquire the necessary build dependency.
34959   # alsa is the help tag: freetype, cups, pulse, alsa etc
34960   MISSING_DEPENDENCY=alsa
34961 
34962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34963     cygwin_help $MISSING_DEPENDENCY
34964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34965     msys_help $MISSING_DEPENDENCY
34966   else
34967     PKGHANDLER_COMMAND=
34968 
34969     case $PKGHANDLER in
34970       apt-get)
34971         apt_help     $MISSING_DEPENDENCY ;;
34972       yum)
34973         yum_help     $MISSING_DEPENDENCY ;;
34974       port)
34975         port_help    $MISSING_DEPENDENCY ;;
34976       pkgutil)
34977         pkgutil_help $MISSING_DEPENDENCY ;;
34978       pkgadd)
34979         pkgadd_help  $MISSING_DEPENDENCY ;;
34980     esac
34981 
34982     if test "x$PKGHANDLER_COMMAND" != x; then
34983       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34984     fi
34985   fi
34986 
34987       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34988     fi
34989   fi
34990 
34991 
34992 
34993 
34994 
34995 
34996   ###############################################################################
34997   #
34998   # Check for the jpeg library
34999   #
35000 
35001   USE_EXTERNAL_LIBJPEG=true
35002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
35003 $as_echo_n "checking for main in -ljpeg... " >&6; }
35004 if ${ac_cv_lib_jpeg_main+:} false; then :
35005   $as_echo_n "(cached) " >&6
35006 else
35007   ac_check_lib_save_LIBS=$LIBS
35008 LIBS="-ljpeg  $LIBS"
35009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35010 /* end confdefs.h.  */
35011 
35012 
35013 int
35014 main ()
35015 {
35016 return main ();
35017   ;
35018   return 0;
35019 }
35020 _ACEOF
35021 if ac_fn_cxx_try_link "$LINENO"; then :
35022   ac_cv_lib_jpeg_main=yes
35023 else
35024   ac_cv_lib_jpeg_main=no
35025 fi
35026 rm -f core conftest.err conftest.$ac_objext \
35027     conftest$ac_exeext conftest.$ac_ext
35028 LIBS=$ac_check_lib_save_LIBS
35029 fi
35030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
35031 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
35032 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
35033   cat >>confdefs.h <<_ACEOF
35034 #define HAVE_LIBJPEG 1
35035 _ACEOF
35036 
35037   LIBS="-ljpeg $LIBS"
35038 
35039 else
35040    USE_EXTERNAL_LIBJPEG=false
35041       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
35042 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
35043 
35044 fi
35045 
35046 
35047 
35048   ###############################################################################
35049   #
35050   # Check for the gif library
35051   #
35052 
35053 
35054 # Check whether --with-giflib was given.
35055 if test "${with_giflib+set}" = set; then :
35056   withval=$with_giflib;
35057 fi
35058 
35059 
35060 
35061   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
35062 $as_echo_n "checking for which giflib to use... " >&6; }
35063 
35064   # default is bundled
35065   DEFAULT_GIFLIB=bundled
35066 
35067   #
35068   # if user didn't specify, use DEFAULT_GIFLIB
35069   #
35070   if test "x${with_giflib}" = "x"; then
35071     with_giflib=${DEFAULT_GIFLIB}
35072   fi
35073 
35074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
35075 $as_echo "${with_giflib}" >&6; }
35076 
35077   if test "x${with_giflib}" = "xbundled"; then
35078     USE_EXTERNAL_LIBGIF=false
35079   elif test "x${with_giflib}" = "xsystem"; then
35080     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
35081 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
35082 
35083 else
35084    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
35085 fi
35086 
35087 
35088     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
35089 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
35090 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
35091   $as_echo_n "(cached) " >&6
35092 else
35093   ac_check_lib_save_LIBS=$LIBS
35094 LIBS="-lgif  $LIBS"
35095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35096 /* end confdefs.h.  */
35097 
35098 /* Override any GCC internal prototype to avoid an error.
35099    Use char because int might match the return type of a GCC
35100    builtin and then its argument prototype would still apply.  */
35101 #ifdef __cplusplus
35102 extern "C"
35103 #endif
35104 char DGifGetCode ();
35105 int
35106 main ()
35107 {
35108 return DGifGetCode ();
35109   ;
35110   return 0;
35111 }
35112 _ACEOF
35113 if ac_fn_cxx_try_link "$LINENO"; then :
35114   ac_cv_lib_gif_DGifGetCode=yes
35115 else
35116   ac_cv_lib_gif_DGifGetCode=no
35117 fi
35118 rm -f core conftest.err conftest.$ac_objext \
35119     conftest$ac_exeext conftest.$ac_ext
35120 LIBS=$ac_check_lib_save_LIBS
35121 fi
35122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
35123 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
35124 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
35125   cat >>confdefs.h <<_ACEOF
35126 #define HAVE_LIBGIF 1
35127 _ACEOF
35128 
35129   LIBS="-lgif $LIBS"
35130 
35131 else
35132    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
35133 fi
35134 
35135 
35136     USE_EXTERNAL_LIBGIF=true
35137   else
35138     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
35139   fi
35140 
35141 
35142   ###############################################################################
35143   #
35144   # Check for the zlib library
35145   #
35146 
35147 
35148 # Check whether --with-zlib was given.
35149 if test "${with_zlib+set}" = set; then :
35150   withval=$with_zlib;
35151 fi
35152 
35153 
35154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35155 $as_echo_n "checking for compress in -lz... " >&6; }
35156 if ${ac_cv_lib_z_compress+:} false; then :
35157   $as_echo_n "(cached) " >&6
35158 else
35159   ac_check_lib_save_LIBS=$LIBS
35160 LIBS="-lz  $LIBS"
35161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35162 /* end confdefs.h.  */
35163 
35164 /* Override any GCC internal prototype to avoid an error.
35165    Use char because int might match the return type of a GCC
35166    builtin and then its argument prototype would still apply.  */
35167 #ifdef __cplusplus
35168 extern "C"
35169 #endif
35170 char compress ();
35171 int
35172 main ()
35173 {
35174 return compress ();
35175   ;
35176   return 0;
35177 }
35178 _ACEOF
35179 if ac_fn_cxx_try_link "$LINENO"; then :
35180   ac_cv_lib_z_compress=yes
35181 else
35182   ac_cv_lib_z_compress=no
35183 fi
35184 rm -f core conftest.err conftest.$ac_objext \
35185     conftest$ac_exeext conftest.$ac_ext
35186 LIBS=$ac_check_lib_save_LIBS
35187 fi
35188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35189 $as_echo "$ac_cv_lib_z_compress" >&6; }
35190 if test "x$ac_cv_lib_z_compress" = xyes; then :
35191    ZLIB_FOUND=yes
35192 else
35193    ZLIB_FOUND=no
35194 fi
35195 
35196 
35197   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35198 $as_echo_n "checking for which zlib to use... " >&6; }
35199 
35200   DEFAULT_ZLIB=bundled
35201   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35202     #
35203     # On macosx default is system...on others default is
35204     #
35205     DEFAULT_ZLIB=system
35206   fi
35207 
35208   if test "x${ZLIB_FOUND}" != "xyes"; then
35209     #
35210     # If we don't find any system...set default to bundled
35211     #
35212     DEFAULT_ZLIB=bundled
35213   fi
35214 
35215   #
35216   # If user didn't specify, use DEFAULT_ZLIB
35217   #
35218   if test "x${with_zlib}" = "x"; then
35219     with_zlib=${DEFAULT_ZLIB}
35220   fi
35221 
35222   if test "x${with_zlib}" = "xbundled"; then
35223     USE_EXTERNAL_LIBZ=false
35224     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35225 $as_echo "bundled" >&6; }
35226   elif test "x${with_zlib}" = "xsystem"; then
35227     if test "x${ZLIB_FOUND}" = "xyes"; then
35228       USE_EXTERNAL_LIBZ=true
35229       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35230 $as_echo "system" >&6; }
35231     else
35232       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35233 $as_echo "system not found" >&6; }
35234       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35235     fi
35236   else
35237     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35238   fi
35239 
35240 
35241 
35242   ###############################################################################
35243   LIBZIP_CAN_USE_MMAP=true
35244 
35245 
35246 
35247   ###############################################################################
35248   #
35249   # Check if altzone exists in time.h
35250   #
35251 
35252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35253 /* end confdefs.h.  */
35254 #include <time.h>
35255 int
35256 main ()
35257 {
35258 return (int)altzone;
35259   ;
35260   return 0;
35261 }
35262 _ACEOF
35263 if ac_fn_cxx_try_link "$LINENO"; then :
35264   has_altzone=yes
35265 else
35266   has_altzone=no
35267 fi
35268 rm -f core conftest.err conftest.$ac_objext \
35269     conftest$ac_exeext conftest.$ac_ext
35270   if test "x$has_altzone" = xyes; then
35271 
35272 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35273 
35274   fi
35275 
35276   ###############################################################################
35277   #
35278   # Check the maths library
35279   #
35280 
35281   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35282 $as_echo_n "checking for cos in -lm... " >&6; }
35283 if ${ac_cv_lib_m_cos+:} false; then :
35284   $as_echo_n "(cached) " >&6
35285 else
35286   ac_check_lib_save_LIBS=$LIBS
35287 LIBS="-lm  $LIBS"
35288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35289 /* end confdefs.h.  */
35290 
35291 /* Override any GCC internal prototype to avoid an error.
35292    Use char because int might match the return type of a GCC
35293    builtin and then its argument prototype would still apply.  */
35294 #ifdef __cplusplus
35295 extern "C"
35296 #endif
35297 char cos ();
35298 int
35299 main ()
35300 {
35301 return cos ();
35302   ;
35303   return 0;
35304 }
35305 _ACEOF
35306 if ac_fn_cxx_try_link "$LINENO"; then :
35307   ac_cv_lib_m_cos=yes
35308 else
35309   ac_cv_lib_m_cos=no
35310 fi
35311 rm -f core conftest.err conftest.$ac_objext \
35312     conftest$ac_exeext conftest.$ac_ext
35313 LIBS=$ac_check_lib_save_LIBS
35314 fi
35315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35316 $as_echo "$ac_cv_lib_m_cos" >&6; }
35317 if test "x$ac_cv_lib_m_cos" = xyes; then :
35318   cat >>confdefs.h <<_ACEOF
35319 #define HAVE_LIBM 1
35320 _ACEOF
35321 
35322   LIBS="-lm $LIBS"
35323 
35324 else
35325 
35326         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35327 $as_echo "$as_me: Maths library was not found" >&6;}
35328 
35329 
35330 fi
35331 
35332 
35333 
35334   ###############################################################################
35335   #
35336   # Check for libdl.so
35337 
35338   save_LIBS="$LIBS"
35339   LIBS=""
35340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35341 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35342 if ${ac_cv_lib_dl_dlopen+:} false; then :
35343   $as_echo_n "(cached) " >&6
35344 else
35345   ac_check_lib_save_LIBS=$LIBS
35346 LIBS="-ldl  $LIBS"
35347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35348 /* end confdefs.h.  */
35349 
35350 /* Override any GCC internal prototype to avoid an error.
35351    Use char because int might match the return type of a GCC
35352    builtin and then its argument prototype would still apply.  */
35353 #ifdef __cplusplus
35354 extern "C"
35355 #endif
35356 char dlopen ();
35357 int
35358 main ()
35359 {
35360 return dlopen ();
35361   ;
35362   return 0;
35363 }
35364 _ACEOF
35365 if ac_fn_cxx_try_link "$LINENO"; then :
35366   ac_cv_lib_dl_dlopen=yes
35367 else
35368   ac_cv_lib_dl_dlopen=no
35369 fi
35370 rm -f core conftest.err conftest.$ac_objext \
35371     conftest$ac_exeext conftest.$ac_ext
35372 LIBS=$ac_check_lib_save_LIBS
35373 fi
35374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35375 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35376 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35377   cat >>confdefs.h <<_ACEOF
35378 #define HAVE_LIBDL 1
35379 _ACEOF
35380 
35381   LIBS="-ldl $LIBS"
35382 
35383 fi
35384 
35385   LIBDL="$LIBS"
35386 
35387   LIBS="$save_LIBS"
35388 
35389 
35390   ###############################################################################
35391   #
35392   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35393   # dynamic build is configured on command line.
35394   #
35395 
35396 # Check whether --with-stdc++lib was given.
35397 if test "${with_stdc__lib+set}" = set; then :
35398   withval=$with_stdc__lib;
35399         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35400                 && test "x$with_stdc__lib" != xdefault; then
35401           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35402         fi
35403 
35404 else
35405   with_stdc__lib=default
35406 
35407 fi
35408 
35409 
35410   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35411     # Test if -lstdc++ works.
35412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35413 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35414     ac_ext=cpp
35415 ac_cpp='$CXXCPP $CPPFLAGS'
35416 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35417 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35418 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35419 
35420     OLD_CXXFLAGS="$CXXFLAGS"
35421     CXXFLAGS="$CXXFLAGS -lstdc++"
35422     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35423 /* end confdefs.h.  */
35424 
35425 int
35426 main ()
35427 {
35428 return 0;
35429   ;
35430   return 0;
35431 }
35432 _ACEOF
35433 if ac_fn_cxx_try_link "$LINENO"; then :
35434   has_dynamic_libstdcxx=yes
35435 else
35436   has_dynamic_libstdcxx=no
35437 fi
35438 rm -f core conftest.err conftest.$ac_objext \
35439     conftest$ac_exeext conftest.$ac_ext
35440     CXXFLAGS="$OLD_CXXFLAGS"
35441     ac_ext=cpp
35442 ac_cpp='$CXXCPP $CPPFLAGS'
35443 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35444 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35445 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35446 
35447     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35448 $as_echo "$has_dynamic_libstdcxx" >&6; }
35449 
35450     # Test if stdc++ can be linked statically.
35451     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35452 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35453     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35454     ac_ext=cpp
35455 ac_cpp='$CXXCPP $CPPFLAGS'
35456 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35457 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35458 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35459 
35460     OLD_LIBS="$LIBS"
35461     OLD_CXX="$CXX"
35462     LIBS="$STATIC_STDCXX_FLAGS"
35463     CXX="$CC"
35464     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35465 /* end confdefs.h.  */
35466 
35467 int
35468 main ()
35469 {
35470 return 0;
35471   ;
35472   return 0;
35473 }
35474 _ACEOF
35475 if ac_fn_cxx_try_link "$LINENO"; then :
35476   has_static_libstdcxx=yes
35477 else
35478   has_static_libstdcxx=no
35479 fi
35480 rm -f core conftest.err conftest.$ac_objext \
35481     conftest$ac_exeext conftest.$ac_ext
35482     LIBS="$OLD_LIBS"
35483     CXX="$OLD_CXX"
35484     ac_ext=cpp
35485 ac_cpp='$CXXCPP $CPPFLAGS'
35486 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35487 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35488 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35489 
35490     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35491 $as_echo "$has_static_libstdcxx" >&6; }
35492 
35493     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35494       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35495     fi
35496 
35497     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35498       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35499     fi
35500 
35501     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35502       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35503     fi
35504 
35505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35506 $as_echo_n "checking how to link with libstdc++... " >&6; }
35507     # If dynamic was requested, it's available since it would fail above otherwise.
35508     # If dynamic wasn't requested, go with static unless it isn't available.
35509     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35510       LIBCXX="$LIBCXX -lstdc++"
35511       LDCXX="$CXX"
35512       STATIC_CXX_SETTING="STATIC_CXX=false"
35513       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35514 $as_echo "dynamic" >&6; }
35515     else
35516       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35517       LDCXX="$CC"
35518       STATIC_CXX_SETTING="STATIC_CXX=true"
35519       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35520 $as_echo "static" >&6; }
35521     fi
35522   fi
35523 
35524 
35525   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35526     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35527 
35528 pkg_failed=no
35529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35530 $as_echo_n "checking for LIBFFI... " >&6; }
35531 
35532 if test -n "$LIBFFI_CFLAGS"; then
35533     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35534  elif test -n "$PKG_CONFIG"; then
35535     if test -n "$PKG_CONFIG" && \
35536     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35537   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35538   ac_status=$?
35539   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35540   test $ac_status = 0; }; then
35541   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35542 else
35543   pkg_failed=yes
35544 fi
35545  else
35546     pkg_failed=untried
35547 fi
35548 if test -n "$LIBFFI_LIBS"; then
35549     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35550  elif test -n "$PKG_CONFIG"; then
35551     if test -n "$PKG_CONFIG" && \
35552     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35553   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35554   ac_status=$?
35555   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35556   test $ac_status = 0; }; then
35557   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35558 else
35559   pkg_failed=yes
35560 fi
35561  else
35562     pkg_failed=untried
35563 fi
35564 
35565 
35566 
35567 if test $pkg_failed = yes; then
35568 
35569 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35570         _pkg_short_errors_supported=yes
35571 else
35572         _pkg_short_errors_supported=no
35573 fi
35574         if test $_pkg_short_errors_supported = yes; then
35575                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35576         else
35577                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35578         fi
35579         # Put the nasty error message in config.log where it belongs
35580         echo "$LIBFFI_PKG_ERRORS" >&5
35581 
35582         as_fn_error $? "Package requirements (libffi) were not met:
35583 
35584 $LIBFFI_PKG_ERRORS
35585 
35586 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35587 installed software in a non-standard prefix.
35588 
35589 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35590 and LIBFFI_LIBS to avoid the need to call pkg-config.
35591 See the pkg-config man page for more details.
35592 " "$LINENO" 5
35593 elif test $pkg_failed = untried; then
35594         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35595 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35596 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35597 is in your PATH or set the PKG_CONFIG environment variable to the full
35598 path to pkg-config.
35599 
35600 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35601 and LIBFFI_LIBS to avoid the need to call pkg-config.
35602 See the pkg-config man page for more details.
35603 
35604 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35605 See \`config.log' for more details" "$LINENO" 5; }
35606 else
35607         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35608         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35609         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35610 $as_echo "yes" >&6; }
35611         :
35612 fi
35613 
35614   fi
35615 
35616   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35617     # Extract the first word of "llvm-config", so it can be a program name with args.
35618 set dummy llvm-config; ac_word=$2
35619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35620 $as_echo_n "checking for $ac_word... " >&6; }
35621 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35622   $as_echo_n "(cached) " >&6
35623 else
35624   if test -n "$LLVM_CONFIG"; then
35625   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35626 else
35627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35628 for as_dir in $PATH
35629 do
35630   IFS=$as_save_IFS
35631   test -z "$as_dir" && as_dir=.
35632     for ac_exec_ext in '' $ac_executable_extensions; do
35633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35634     ac_cv_prog_LLVM_CONFIG="llvm-config"
35635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35636     break 2
35637   fi
35638 done
35639   done
35640 IFS=$as_save_IFS
35641 
35642 fi
35643 fi
35644 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35645 if test -n "$LLVM_CONFIG"; then
35646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35647 $as_echo "$LLVM_CONFIG" >&6; }
35648 else
35649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35650 $as_echo "no" >&6; }
35651 fi
35652 
35653 
35654 
35655     if test "x$LLVM_CONFIG" != xllvm-config; then
35656       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35657     fi
35658 
35659     llvm_components="jit mcjit engine nativecodegen native"
35660     unset LLVM_CFLAGS
35661     for flag in $("$LLVM_CONFIG" --cxxflags); do
35662       if echo "${flag}" | grep -q '^-[ID]'; then
35663         if test "${flag}" != "-D_DEBUG" ; then
35664           if test "${LLVM_CFLAGS}" != "" ; then
35665             LLVM_CFLAGS="${LLVM_CFLAGS} "
35666           fi
35667           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35668         fi
35669       fi
35670     done
35671     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35672     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35673 
35674     unset LLVM_LDFLAGS
35675     for flag in $("${LLVM_CONFIG}" --ldflags); do
35676       if echo "${flag}" | grep -q '^-L'; then
35677         if test "${LLVM_LDFLAGS}" != ""; then
35678           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35679         fi
35680         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35681       fi
35682     done
35683 
35684     unset LLVM_LIBS
35685     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35686       if echo "${flag}" | grep -q '^-l'; then
35687         if test "${LLVM_LIBS}" != ""; then
35688           LLVM_LIBS="${LLVM_LIBS} "
35689         fi
35690         LLVM_LIBS="${LLVM_LIBS}${flag}"
35691       fi
35692     done
35693 
35694 
35695 
35696 
35697   fi
35698 
35699   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35700   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35701     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35702   fi
35703 
35704   # TODO better (platform agnostic) test
35705   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35706     LIBCXX="-lstdc++"
35707   fi
35708 
35709 
35710 
35711 
35712 
35713 ###############################################################################
35714 #
35715 # We need to do some final tweaking, when everything else is done.
35716 #
35717 ###############################################################################
35718 
35719 
35720   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35721 
35722 
35723   # The name of the Service Agent jar.
35724   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35725   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35726     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35727   fi
35728 
35729 
35730 
35731     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35732 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35733 
35734     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35735       ENABLE_INTREE_EC=yes
35736       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35737 $as_echo "yes" >&6; }
35738     else
35739       ENABLE_INTREE_EC=no
35740       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35741 $as_echo "no" >&6; }
35742     fi
35743 
35744 
35745 
35746 
35747 ###############################################################################
35748 #
35749 # Configure parts of the build that only affect the build performance,
35750 # not the result.
35751 #
35752 ###############################################################################
35753 
35754 
35755   # How many cores do we have on this build system?
35756 
35757 # Check whether --with-num-cores was given.
35758 if test "${with_num_cores+set}" = set; then :
35759   withval=$with_num_cores;
35760 fi
35761 
35762   if test "x$with_num_cores" = x; then
35763     # The number of cores were not specified, try to probe them.
35764 
35765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35766 $as_echo_n "checking for number of cores... " >&6; }
35767   NUM_CORES=1
35768   FOUND_CORES=no
35769 
35770   if test -f /proc/cpuinfo; then
35771     # Looks like a Linux (or cygwin) system
35772     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35773     FOUND_CORES=yes
35774   elif test -x /usr/sbin/psrinfo; then
35775     # Looks like a Solaris system
35776     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35777     FOUND_CORES=yes
35778   elif test -x /usr/sbin/system_profiler; then
35779     # Looks like a MacOSX system
35780     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35781     FOUND_CORES=yes
35782   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35783     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35784     FOUND_CORES=yes
35785   elif test -n "$NUMBER_OF_PROCESSORS"; then
35786     # On windows, look in the env
35787     NUM_CORES=$NUMBER_OF_PROCESSORS
35788     FOUND_CORES=yes
35789   fi
35790 
35791   if test "x$FOUND_CORES" = xyes; then
35792     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35793 $as_echo "$NUM_CORES" >&6; }
35794   else
35795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35796 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
35797     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35798 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35799   fi
35800 
35801   else
35802     NUM_CORES=$with_num_cores
35803   fi
35804 
35805 
35806 
35807   # How much memory do we have on this build system?
35808 
35809 # Check whether --with-memory-size was given.
35810 if test "${with_memory_size+set}" = set; then :
35811   withval=$with_memory_size;
35812 fi
35813 
35814   if test "x$with_memory_size" = x; then
35815     # The memory size was not specified, try to probe it.
35816 
35817   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35818 $as_echo_n "checking for memory size... " >&6; }
35819   # Default to 1024 MB
35820   MEMORY_SIZE=1024
35821   FOUND_MEM=no
35822 
35823   if test -f /proc/meminfo; then
35824     # Looks like a Linux (or cygwin) system
35825     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35826     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35827     FOUND_MEM=yes
35828   elif test -x /usr/sbin/prtconf; then
35829     # Looks like a Solaris or AIX system
35830     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35831     FOUND_MEM=yes
35832   elif test -x /usr/sbin/system_profiler; then
35833     # Looks like a MacOSX system
35834     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35835     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35836     FOUND_MEM=yes
35837   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35838     # Windows, but without cygwin
35839     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35840     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35841     FOUND_MEM=yes
35842   fi
35843 
35844   if test "x$FOUND_MEM" = xyes; then
35845     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35846 $as_echo "$MEMORY_SIZE MB" >&6; }
35847   else
35848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35849 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35850     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35851 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35852   fi
35853 
35854   else
35855     MEMORY_SIZE=$with_memory_size
35856   fi
35857 
35858 
35859 
35860   # Provide a decent default number of parallel jobs for make depending on
35861   # number of cores, amount of memory and machine architecture.
35862 
35863 # Check whether --with-jobs was given.
35864 if test "${with_jobs+set}" = set; then :
35865   withval=$with_jobs;
35866 fi
35867 
35868   if test "x$with_jobs" = x; then
35869     # Number of jobs was not specified, calculate.
35870     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35871 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35872     # Approximate memory in GB, rounding up a bit.
35873     memory_gb=`expr $MEMORY_SIZE / 1100`
35874     # Pick the lowest of memory in gb and number of cores.
35875     if test "$memory_gb" -lt "$NUM_CORES"; then
35876       JOBS="$memory_gb"
35877     else
35878       JOBS="$NUM_CORES"
35879       # On bigger machines, leave some room for other processes to run
35880       if test "$JOBS" -gt "4"; then
35881         JOBS=`expr $JOBS '*' 90 / 100`
35882       fi
35883     fi
35884     # Cap number of jobs to 16
35885     if test "$JOBS" -gt "16"; then
35886       JOBS=16
35887     fi
35888     if test "$JOBS" -eq "0"; then
35889       JOBS=1
35890     fi
35891     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35892 $as_echo "$JOBS" >&6; }
35893   else
35894     JOBS=$with_jobs
35895   fi
35896 
35897 
35898 
35899 # Setup smart javac (after cores and memory have been setup)
35900 
35901 
35902 # Check whether --with-sjavac-server-java was given.
35903 if test "${with_sjavac_server_java+set}" = set; then :
35904   withval=$with_sjavac_server_java;
35905 fi
35906 
35907 
35908   if test "x$with_sjavac_server_java" != x; then
35909     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35910     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35911     if test "x$FOUND_VERSION" = x; then
35912       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35913     fi
35914   else
35915     SJAVAC_SERVER_JAVA=""
35916     # Hotspot specific options.
35917 
35918   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35919   $ECHO "Command: $JAVA -verbosegc -version" >&5
35920   OUTPUT=`$JAVA -verbosegc -version 2>&1`
35921   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35922   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35923   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35924     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35925     JVM_ARG_OK=true
35926   else
35927     $ECHO "Arg failed:" >&5
35928     $ECHO "$OUTPUT" >&5
35929     JVM_ARG_OK=false
35930   fi
35931 
35932     # JRockit specific options.
35933 
35934   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35935   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35936   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35937   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35938   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35939   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35940     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35941     JVM_ARG_OK=true
35942   else
35943     $ECHO "Arg failed:" >&5
35944     $ECHO "$OUTPUT" >&5
35945     JVM_ARG_OK=false
35946   fi
35947 
35948     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35949   fi
35950 
35951 
35952   if test "$MEMORY_SIZE" -gt "2500"; then
35953 
35954   $ECHO "Check if jvm arg is ok: -d64" >&5
35955   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35956   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35957   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35958   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35959   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35960     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35961     JVM_ARG_OK=true
35962   else
35963     $ECHO "Arg failed:" >&5
35964     $ECHO "$OUTPUT" >&5
35965     JVM_ARG_OK=false
35966   fi
35967 
35968     if test "$JVM_ARG_OK" = true; then
35969       JVM_64BIT=true
35970       JVM_ARG_OK=false
35971     fi
35972   fi
35973 
35974   if test "$JVM_64BIT" = true; then
35975     if test "$MEMORY_SIZE" -gt "17000"; then
35976 
35977   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35978   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35979   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35980   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35981   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35982   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35983     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35984     JVM_ARG_OK=true
35985   else
35986     $ECHO "Arg failed:" >&5
35987     $ECHO "$OUTPUT" >&5
35988     JVM_ARG_OK=false
35989   fi
35990 
35991     fi
35992     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35993 
35994   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35995   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35996   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35997   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35998   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35999   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36000     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
36001     JVM_ARG_OK=true
36002   else
36003     $ECHO "Arg failed:" >&5
36004     $ECHO "$OUTPUT" >&5
36005     JVM_ARG_OK=false
36006   fi
36007 
36008     fi
36009     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
36010 
36011   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
36012   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
36013   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
36014   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36015   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36016   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36017     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
36018     JVM_ARG_OK=true
36019   else
36020     $ECHO "Arg failed:" >&5
36021     $ECHO "$OUTPUT" >&5
36022     JVM_ARG_OK=false
36023   fi
36024 
36025     fi
36026     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
36027 
36028   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
36029   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
36030   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
36031   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36032   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36033   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36034     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
36035     JVM_ARG_OK=true
36036   else
36037     $ECHO "Arg failed:" >&5
36038     $ECHO "$OUTPUT" >&5
36039     JVM_ARG_OK=false
36040   fi
36041 
36042     fi
36043   fi
36044   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
36045 
36046   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
36047   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
36048   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
36049   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36050   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36051   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36052     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
36053     JVM_ARG_OK=true
36054   else
36055     $ECHO "Arg failed:" >&5
36056     $ECHO "$OUTPUT" >&5
36057     JVM_ARG_OK=false
36058   fi
36059 
36060   fi
36061   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
36062 
36063   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
36064   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
36065   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
36066   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36067   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36068   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36069     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
36070     JVM_ARG_OK=true
36071   else
36072     $ECHO "Arg failed:" >&5
36073     $ECHO "$OUTPUT" >&5
36074     JVM_ARG_OK=false
36075   fi
36076 
36077   fi
36078   if test "$JVM_ARG_OK" = false; then
36079 
36080   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
36081   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
36082   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
36083   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36084   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36085   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36086     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
36087     JVM_ARG_OK=true
36088   else
36089     $ECHO "Arg failed:" >&5
36090     $ECHO "$OUTPUT" >&5
36091     JVM_ARG_OK=false
36092   fi
36093 
36094   fi
36095 
36096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
36097 $as_echo_n "checking whether to use sjavac... " >&6; }
36098   # Check whether --enable-sjavac was given.
36099 if test "${enable_sjavac+set}" = set; then :
36100   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
36101 else
36102   ENABLE_SJAVAC='no'
36103 fi
36104 
36105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
36106 $as_echo "$ENABLE_SJAVAC" >&6; }
36107 
36108 
36109   if test "x$ENABLE_SJAVAC" = xyes; then
36110     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
36111   else
36112     SJAVAC_SERVER_DIR=
36113   fi
36114 
36115 
36116 
36117 # Can the C/C++ compiler use precompiled headers?
36118 
36119 
36120   ###############################################################################
36121   #
36122   # Can the C/C++ compiler use precompiled headers?
36123   #
36124   # Check whether --enable-precompiled-headers was given.
36125 if test "${enable_precompiled_headers+set}" = set; then :
36126   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
36127 else
36128   ENABLE_PRECOMPH=yes
36129 fi
36130 
36131 
36132   USE_PRECOMPILED_HEADER=1
36133   if test "x$ENABLE_PRECOMPH" = xno; then
36134     USE_PRECOMPILED_HEADER=0
36135   fi
36136 
36137   if test "x$ENABLE_PRECOMPH" = xyes; then
36138     # Check that the compiler actually supports precomp headers.
36139     if test "x$GCC" = xyes; then
36140       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
36141 $as_echo_n "checking that precompiled headers work... " >&6; }
36142       echo "int alfa();" > conftest.h
36143       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
36144       if test ! -f conftest.hpp.gch; then
36145         USE_PRECOMPILED_HEADER=0
36146         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36147 $as_echo "no" >&6; }
36148       else
36149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36150 $as_echo "yes" >&6; }
36151       fi
36152       rm -f conftest.h conftest.hpp.gch
36153     fi
36154   fi
36155 
36156 
36157 
36158 
36159 # Setup use of ccache, if available
36160 
36161   # Check whether --enable-ccache was given.
36162 if test "${enable_ccache+set}" = set; then :
36163   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
36164 else
36165   ENABLE_CCACHE=yes
36166 fi
36167 
36168   if test "x$ENABLE_CCACHE" = xyes; then
36169     OLD_PATH="$PATH"
36170     if test "x$TOOLS_DIR" != x; then
36171       PATH=$TOOLS_DIR:$PATH
36172     fi
36173     # Extract the first word of "ccache", so it can be a program name with args.
36174 set dummy ccache; ac_word=$2
36175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36176 $as_echo_n "checking for $ac_word... " >&6; }
36177 if ${ac_cv_path_CCACHE+:} false; then :
36178   $as_echo_n "(cached) " >&6
36179 else
36180   case $CCACHE in
36181   [\\/]* | ?:[\\/]*)
36182   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36183   ;;
36184   *)
36185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36186 for as_dir in $PATH
36187 do
36188   IFS=$as_save_IFS
36189   test -z "$as_dir" && as_dir=.
36190     for ac_exec_ext in '' $ac_executable_extensions; do
36191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36192     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36194     break 2
36195   fi
36196 done
36197   done
36198 IFS=$as_save_IFS
36199 
36200   ;;
36201 esac
36202 fi
36203 CCACHE=$ac_cv_path_CCACHE
36204 if test -n "$CCACHE"; then
36205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36206 $as_echo "$CCACHE" >&6; }
36207 else
36208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36209 $as_echo "no" >&6; }
36210 fi
36211 
36212 
36213     PATH="$OLD_PATH"
36214   else
36215     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36216 $as_echo_n "checking for ccache... " >&6; }
36217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36218 $as_echo "explicitly disabled" >&6; }
36219     CCACHE=
36220   fi
36221 
36222 
36223 
36224 # Check whether --with-ccache-dir was given.
36225 if test "${with_ccache_dir+set}" = set; then :
36226   withval=$with_ccache_dir;
36227 fi
36228 
36229 
36230   if test "x$with_ccache_dir" != x; then
36231     # When using a non home ccache directory, assume the use is to share ccache files
36232     # with other users. Thus change the umask.
36233     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36234   fi
36235   CCACHE_FOUND=""
36236   if test "x$CCACHE" != x; then
36237 
36238   if test "x$CCACHE" != x; then
36239     CCACHE_FOUND="true"
36240     # Only use ccache if it is 3.1.4 or later, which supports
36241     # precompiled headers.
36242     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36243 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36244     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36245     if test "x$HAS_GOOD_CCACHE" = x; then
36246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36247 $as_echo "no, disabling ccache" >&6; }
36248       CCACHE=
36249     else
36250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36251 $as_echo "yes" >&6; }
36252       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36253 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36254       PUSHED_FLAGS="$CXXFLAGS"
36255       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36256       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36257 /* end confdefs.h.  */
36258 
36259 int
36260 main ()
36261 {
36262 
36263   ;
36264   return 0;
36265 }
36266 _ACEOF
36267 if ac_fn_cxx_try_compile "$LINENO"; then :
36268   CC_KNOWS_CCACHE_TRICK=yes
36269 else
36270   CC_KNOWS_CCACHE_TRICK=no
36271 fi
36272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36273       CXXFLAGS="$PUSHED_FLAGS"
36274       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36276 $as_echo "yes" >&6; }
36277       else
36278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36279 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36280         CCACHE=
36281       fi
36282     fi
36283   fi
36284 
36285   if test "x$CCACHE" != x; then
36286     CCACHE_SLOPPINESS=time_macros
36287     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36288     CCACHE_FLAGS=-fpch-preprocess
36289 
36290     if test "x$SET_CCACHE_DIR" != x; then
36291       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36292       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36293     fi
36294   fi
36295 
36296   fi
36297 
36298 
36299 ###############################################################################
36300 #
36301 # And now the finish...
36302 #
36303 ###############################################################################
36304 
36305 # Check for some common pitfalls
36306 
36307   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36308     file_to_test="$SRC_ROOT/LICENSE"
36309     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36310       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
36311     fi
36312   fi
36313 
36314 
36315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36316 $as_echo_n "checking if build directory is on local disk... " >&6; }
36317 
36318   # df -l lists only local disks; if the given directory is not found then
36319   # a non-zero exit code is given
36320   if test "x$DF" = x; then
36321     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36322       # msys does not have df; use Windows "net use" instead.
36323       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36324       if test "x$IS_NETWORK_DISK" = x; then
36325         OUTPUT_DIR_IS_LOCAL="yes"
36326       else
36327         OUTPUT_DIR_IS_LOCAL="no"
36328       fi
36329     else
36330       # No df here, say it's local
36331       OUTPUT_DIR_IS_LOCAL="yes"
36332     fi
36333   else
36334     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36335       OUTPUT_DIR_IS_LOCAL="yes"
36336     else
36337       OUTPUT_DIR_IS_LOCAL="no"
36338     fi
36339   fi
36340 
36341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36342 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36343 
36344 
36345 
36346   # Check if the user has any old-style ALT_ variables set.
36347   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36348 
36349   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36350   # Since we can't properly handle the dependencies for this, warn the user about the situation
36351   if test -e $OUTPUT_ROOT/spec.gmk; then
36352     IS_RECONFIGURE=yes
36353   else
36354     IS_RECONFIGURE=no
36355   fi
36356 
36357   if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36358     HIDE_PERFORMANCE_HINTS=yes
36359   else
36360     HIDE_PERFORMANCE_HINTS=no
36361     # Hide it the next time around...
36362     $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36363   fi
36364 
36365 
36366 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36367 
36368 
36369 # We're messing a bit with internal autoconf variables to put the config.status
36370 # in the output directory instead of the current directory.
36371 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36372 
36373 # Create the actual output files. Now the main work of configure is done.
36374 cat >confcache <<\_ACEOF
36375 # This file is a shell script that caches the results of configure
36376 # tests run on this system so they can be shared between configure
36377 # scripts and configure runs, see configure's option --config-cache.
36378 # It is not useful on other systems.  If it contains results you don't
36379 # want to keep, you may remove or edit it.
36380 #
36381 # config.status only pays attention to the cache file if you give it
36382 # the --recheck option to rerun configure.
36383 #
36384 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36385 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36386 # following values.
36387 
36388 _ACEOF
36389 
36390 # The following way of writing the cache mishandles newlines in values,
36391 # but we know of no workaround that is simple, portable, and efficient.
36392 # So, we kill variables containing newlines.
36393 # Ultrix sh set writes to stderr and can't be redirected directly,
36394 # and sets the high bit in the cache file unless we assign to the vars.
36395 (
36396   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36397     eval ac_val=\$$ac_var
36398     case $ac_val in #(
36399     *${as_nl}*)
36400       case $ac_var in #(
36401       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36402 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36403       esac
36404       case $ac_var in #(
36405       _ | IFS | as_nl) ;; #(
36406       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36407       *) { eval $ac_var=; unset $ac_var;} ;;
36408       esac ;;
36409     esac
36410   done
36411 
36412   (set) 2>&1 |
36413     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36414     *${as_nl}ac_space=\ *)
36415       # `set' does not quote correctly, so add quotes: double-quote
36416       # substitution turns \\\\ into \\, and sed turns \\ into \.
36417       sed -n \
36418         "s/'/'\\\\''/g;
36419           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36420       ;; #(
36421     *)
36422       # `set' quotes correctly as required by POSIX, so do not add quotes.
36423       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36424       ;;
36425     esac |
36426     sort
36427 ) |
36428   sed '
36429      /^ac_cv_env_/b end
36430      t clear
36431      :clear
36432      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36433      t end
36434      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36435      :end' >>confcache
36436 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36437   if test -w "$cache_file"; then
36438     if test "x$cache_file" != "x/dev/null"; then
36439       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36440 $as_echo "$as_me: updating cache $cache_file" >&6;}
36441       if test ! -f "$cache_file" || test -h "$cache_file"; then
36442         cat confcache >"$cache_file"
36443       else
36444         case $cache_file in #(
36445         */* | ?:*)
36446           mv -f confcache "$cache_file"$$ &&
36447           mv -f "$cache_file"$$ "$cache_file" ;; #(
36448         *)
36449           mv -f confcache "$cache_file" ;;
36450         esac
36451       fi
36452     fi
36453   else
36454     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36455 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36456   fi
36457 fi
36458 rm -f confcache
36459 
36460 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36461 # Let make expand exec_prefix.
36462 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36463 
36464 DEFS=-DHAVE_CONFIG_H
36465 
36466 ac_libobjs=
36467 ac_ltlibobjs=
36468 U=
36469 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36470   # 1. Remove the extension, and $U if already installed.
36471   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36472   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36473   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36474   #    will be set to the directory where LIBOBJS objects are built.
36475   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36476   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36477 done
36478 LIBOBJS=$ac_libobjs
36479 
36480 LTLIBOBJS=$ac_ltlibobjs
36481 
36482 
36483 
36484 : "${CONFIG_STATUS=./config.status}"
36485 ac_write_fail=0
36486 ac_clean_files_save=$ac_clean_files
36487 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36488 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36489 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36490 as_write_fail=0
36491 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36492 #! $SHELL
36493 # Generated by $as_me.
36494 # Run this file to recreate the current configuration.
36495 # Compiler output produced by configure, useful for debugging
36496 # configure, is in config.log if it exists.
36497 
36498 debug=false
36499 ac_cs_recheck=false
36500 ac_cs_silent=false
36501 
36502 SHELL=\${CONFIG_SHELL-$SHELL}
36503 export SHELL
36504 _ASEOF
36505 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36506 ## -------------------- ##
36507 ## M4sh Initialization. ##
36508 ## -------------------- ##
36509 
36510 # Be more Bourne compatible
36511 DUALCASE=1; export DUALCASE # for MKS sh
36512 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36513   emulate sh
36514   NULLCMD=:
36515   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36516   # is contrary to our usage.  Disable this feature.
36517   alias -g '${1+"$@"}'='"$@"'
36518   setopt NO_GLOB_SUBST
36519 else
36520   case `(set -o) 2>/dev/null` in #(
36521   *posix*) :
36522     set -o posix ;; #(
36523   *) :
36524      ;;
36525 esac
36526 fi
36527 
36528 
36529 as_nl='
36530 '
36531 export as_nl
36532 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36533 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36534 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36535 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36536 # Prefer a ksh shell builtin over an external printf program on Solaris,
36537 # but without wasting forks for bash or zsh.
36538 if test -z "$BASH_VERSION$ZSH_VERSION" \
36539     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36540   as_echo='print -r --'
36541   as_echo_n='print -rn --'
36542 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36543   as_echo='printf %s\n'
36544   as_echo_n='printf %s'
36545 else
36546   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36547     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36548     as_echo_n='/usr/ucb/echo -n'
36549   else
36550     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36551     as_echo_n_body='eval
36552       arg=$1;
36553       case $arg in #(
36554       *"$as_nl"*)
36555         expr "X$arg" : "X\\(.*\\)$as_nl";
36556         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36557       esac;
36558       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36559     '
36560     export as_echo_n_body
36561     as_echo_n='sh -c $as_echo_n_body as_echo'
36562   fi
36563   export as_echo_body
36564   as_echo='sh -c $as_echo_body as_echo'
36565 fi
36566 
36567 # The user is always right.
36568 if test "${PATH_SEPARATOR+set}" != set; then
36569   PATH_SEPARATOR=:
36570   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36571     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36572       PATH_SEPARATOR=';'
36573   }
36574 fi
36575 
36576 
36577 # IFS
36578 # We need space, tab and new line, in precisely that order.  Quoting is
36579 # there to prevent editors from complaining about space-tab.
36580 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36581 # splitting by setting IFS to empty value.)
36582 IFS=" ""        $as_nl"
36583 
36584 # Find who we are.  Look in the path if we contain no directory separator.
36585 as_myself=
36586 case $0 in #((
36587   *[\\/]* ) as_myself=$0 ;;
36588   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36589 for as_dir in $PATH
36590 do
36591   IFS=$as_save_IFS
36592   test -z "$as_dir" && as_dir=.
36593     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36594   done
36595 IFS=$as_save_IFS
36596 
36597      ;;
36598 esac
36599 # We did not find ourselves, most probably we were run as `sh COMMAND'
36600 # in which case we are not to be found in the path.
36601 if test "x$as_myself" = x; then
36602   as_myself=$0
36603 fi
36604 if test ! -f "$as_myself"; then
36605   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36606   exit 1
36607 fi
36608 
36609 # Unset variables that we do not need and which cause bugs (e.g. in
36610 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36611 # suppresses any "Segmentation fault" message there.  '((' could
36612 # trigger a bug in pdksh 5.2.14.
36613 for as_var in BASH_ENV ENV MAIL MAILPATH
36614 do eval test x\${$as_var+set} = xset \
36615   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36616 done
36617 PS1='$ '
36618 PS2='> '
36619 PS4='+ '
36620 
36621 # NLS nuisances.
36622 LC_ALL=C
36623 export LC_ALL
36624 LANGUAGE=C
36625 export LANGUAGE
36626 
36627 # CDPATH.
36628 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36629 
36630 
36631 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36632 # ----------------------------------------
36633 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36634 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36635 # script with STATUS, using 1 if that was 0.
36636 as_fn_error ()
36637 {
36638   as_status=$1; test $as_status -eq 0 && as_status=1
36639   if test "$4"; then
36640     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36641     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36642   fi
36643   $as_echo "$as_me: error: $2" >&2
36644   as_fn_exit $as_status
36645 } # as_fn_error
36646 
36647 
36648 # as_fn_set_status STATUS
36649 # -----------------------
36650 # Set $? to STATUS, without forking.
36651 as_fn_set_status ()
36652 {
36653   return $1
36654 } # as_fn_set_status
36655 
36656 # as_fn_exit STATUS
36657 # -----------------
36658 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36659 as_fn_exit ()
36660 {
36661   set +e
36662   as_fn_set_status $1
36663   exit $1
36664 } # as_fn_exit
36665 
36666 # as_fn_unset VAR
36667 # ---------------
36668 # Portably unset VAR.
36669 as_fn_unset ()
36670 {
36671   { eval $1=; unset $1;}
36672 }
36673 as_unset=as_fn_unset
36674 # as_fn_append VAR VALUE
36675 # ----------------------
36676 # Append the text in VALUE to the end of the definition contained in VAR. Take
36677 # advantage of any shell optimizations that allow amortized linear growth over
36678 # repeated appends, instead of the typical quadratic growth present in naive
36679 # implementations.
36680 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36681   eval 'as_fn_append ()
36682   {
36683     eval $1+=\$2
36684   }'
36685 else
36686   as_fn_append ()
36687   {
36688     eval $1=\$$1\$2
36689   }
36690 fi # as_fn_append
36691 
36692 # as_fn_arith ARG...
36693 # ------------------
36694 # Perform arithmetic evaluation on the ARGs, and store the result in the
36695 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36696 # must be portable across $(()) and expr.
36697 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36698   eval 'as_fn_arith ()
36699   {
36700     as_val=$(( $* ))
36701   }'
36702 else
36703   as_fn_arith ()
36704   {
36705     as_val=`expr "$@" || test $? -eq 1`
36706   }
36707 fi # as_fn_arith
36708 
36709 
36710 if expr a : '\(a\)' >/dev/null 2>&1 &&
36711    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36712   as_expr=expr
36713 else
36714   as_expr=false
36715 fi
36716 
36717 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36718   as_basename=basename
36719 else
36720   as_basename=false
36721 fi
36722 
36723 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36724   as_dirname=dirname
36725 else
36726   as_dirname=false
36727 fi
36728 
36729 as_me=`$as_basename -- "$0" ||
36730 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36731          X"$0" : 'X\(//\)$' \| \
36732          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36733 $as_echo X/"$0" |
36734     sed '/^.*\/\([^/][^/]*\)\/*$/{
36735             s//\1/
36736             q
36737           }
36738           /^X\/\(\/\/\)$/{
36739             s//\1/
36740             q
36741           }
36742           /^X\/\(\/\).*/{
36743             s//\1/
36744             q
36745           }
36746           s/.*/./; q'`
36747 
36748 # Avoid depending upon Character Ranges.
36749 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36750 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36751 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36752 as_cr_digits='0123456789'
36753 as_cr_alnum=$as_cr_Letters$as_cr_digits
36754 
36755 ECHO_C= ECHO_N= ECHO_T=
36756 case `echo -n x` in #(((((
36757 -n*)
36758   case `echo 'xy\c'` in
36759   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36760   xy)  ECHO_C='\c';;
36761   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36762        ECHO_T=' ';;
36763   esac;;
36764 *)
36765   ECHO_N='-n';;
36766 esac
36767 
36768 rm -f conf$$ conf$$.exe conf$$.file
36769 if test -d conf$$.dir; then
36770   rm -f conf$$.dir/conf$$.file
36771 else
36772   rm -f conf$$.dir
36773   mkdir conf$$.dir 2>/dev/null
36774 fi
36775 if (echo >conf$$.file) 2>/dev/null; then
36776   if ln -s conf$$.file conf$$ 2>/dev/null; then
36777     as_ln_s='ln -s'
36778     # ... but there are two gotchas:
36779     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36780     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36781     # In both cases, we have to default to `cp -pR'.
36782     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36783       as_ln_s='cp -pR'
36784   elif ln conf$$.file conf$$ 2>/dev/null; then
36785     as_ln_s=ln
36786   else
36787     as_ln_s='cp -pR'
36788   fi
36789 else
36790   as_ln_s='cp -pR'
36791 fi
36792 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36793 rmdir conf$$.dir 2>/dev/null
36794 
36795 
36796 # as_fn_mkdir_p
36797 # -------------
36798 # Create "$as_dir" as a directory, including parents if necessary.
36799 as_fn_mkdir_p ()
36800 {
36801 
36802   case $as_dir in #(
36803   -*) as_dir=./$as_dir;;
36804   esac
36805   test -d "$as_dir" || eval $as_mkdir_p || {
36806     as_dirs=
36807     while :; do
36808       case $as_dir in #(
36809       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36810       *) as_qdir=$as_dir;;
36811       esac
36812       as_dirs="'$as_qdir' $as_dirs"
36813       as_dir=`$as_dirname -- "$as_dir" ||
36814 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36815          X"$as_dir" : 'X\(//\)[^/]' \| \
36816          X"$as_dir" : 'X\(//\)$' \| \
36817          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36818 $as_echo X"$as_dir" |
36819     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36820             s//\1/
36821             q
36822           }
36823           /^X\(\/\/\)[^/].*/{
36824             s//\1/
36825             q
36826           }
36827           /^X\(\/\/\)$/{
36828             s//\1/
36829             q
36830           }
36831           /^X\(\/\).*/{
36832             s//\1/
36833             q
36834           }
36835           s/.*/./; q'`
36836       test -d "$as_dir" && break
36837     done
36838     test -z "$as_dirs" || eval "mkdir $as_dirs"
36839   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36840 
36841 
36842 } # as_fn_mkdir_p
36843 if mkdir -p . 2>/dev/null; then
36844   as_mkdir_p='mkdir -p "$as_dir"'
36845 else
36846   test -d ./-p && rmdir ./-p
36847   as_mkdir_p=false
36848 fi
36849 
36850 
36851 # as_fn_executable_p FILE
36852 # -----------------------
36853 # Test if FILE is an executable regular file.
36854 as_fn_executable_p ()
36855 {
36856   test -f "$1" && test -x "$1"
36857 } # as_fn_executable_p
36858 as_test_x='test -x'
36859 as_executable_p=as_fn_executable_p
36860 
36861 # Sed expression to map a string onto a valid CPP name.
36862 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36863 
36864 # Sed expression to map a string onto a valid variable name.
36865 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36866 
36867 
36868 exec 6>&1
36869 ## ----------------------------------- ##
36870 ## Main body of $CONFIG_STATUS script. ##
36871 ## ----------------------------------- ##
36872 _ASEOF
36873 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36874 
36875 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36876 # Save the log message, to keep $0 and so on meaningful, and to
36877 # report actual input values of CONFIG_FILES etc. instead of their
36878 # values after options handling.
36879 ac_log="
36880 This file was extended by OpenJDK $as_me jdk8, which was
36881 generated by GNU Autoconf 2.69.  Invocation command line was
36882 
36883   CONFIG_FILES    = $CONFIG_FILES
36884   CONFIG_HEADERS  = $CONFIG_HEADERS
36885   CONFIG_LINKS    = $CONFIG_LINKS
36886   CONFIG_COMMANDS = $CONFIG_COMMANDS
36887   $ $0 $@
36888 
36889 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36890 "
36891 
36892 _ACEOF
36893 
36894 case $ac_config_files in *"
36895 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36896 esac
36897 
36898 case $ac_config_headers in *"
36899 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36900 esac
36901 
36902 
36903 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36904 # Files that config.status was made for.
36905 config_files="$ac_config_files"
36906 config_headers="$ac_config_headers"
36907 
36908 _ACEOF
36909 
36910 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36911 ac_cs_usage="\
36912 \`$as_me' instantiates files and other configuration actions
36913 from templates according to the current configuration.  Unless the files
36914 and actions are specified as TAGs, all are instantiated by default.
36915 
36916 Usage: $0 [OPTION]... [TAG]...
36917 
36918   -h, --help       print this help, then exit
36919   -V, --version    print version number and configuration settings, then exit
36920       --config     print configuration, then exit
36921   -q, --quiet, --silent
36922                    do not print progress messages
36923   -d, --debug      don't remove temporary files
36924       --recheck    update $as_me by reconfiguring in the same conditions
36925       --file=FILE[:TEMPLATE]
36926                    instantiate the configuration file FILE
36927       --header=FILE[:TEMPLATE]
36928                    instantiate the configuration header FILE
36929 
36930 Configuration files:
36931 $config_files
36932 
36933 Configuration headers:
36934 $config_headers
36935 
36936 Report bugs to <build-dev@openjdk.java.net>.
36937 OpenJDK home page: <http://openjdk.java.net>."
36938 
36939 _ACEOF
36940 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36941 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36942 ac_cs_version="\\
36943 OpenJDK config.status jdk8
36944 configured by $0, generated by GNU Autoconf 2.69,
36945   with options \\"\$ac_cs_config\\"
36946 
36947 Copyright (C) 2012 Free Software Foundation, Inc.
36948 This config.status script is free software; the Free Software Foundation
36949 gives unlimited permission to copy, distribute and modify it."
36950 
36951 ac_pwd='$ac_pwd'
36952 srcdir='$srcdir'
36953 AWK='$AWK'
36954 test -n "\$AWK" || AWK=awk
36955 _ACEOF
36956 
36957 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36958 # The default lists apply if the user does not specify any file.
36959 ac_need_defaults=:
36960 while test $# != 0
36961 do
36962   case $1 in
36963   --*=?*)
36964     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36965     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36966     ac_shift=:
36967     ;;
36968   --*=)
36969     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36970     ac_optarg=
36971     ac_shift=:
36972     ;;
36973   *)
36974     ac_option=$1
36975     ac_optarg=$2
36976     ac_shift=shift
36977     ;;
36978   esac
36979 
36980   case $ac_option in
36981   # Handling of the options.
36982   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36983     ac_cs_recheck=: ;;
36984   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36985     $as_echo "$ac_cs_version"; exit ;;
36986   --config | --confi | --conf | --con | --co | --c )
36987     $as_echo "$ac_cs_config"; exit ;;
36988   --debug | --debu | --deb | --de | --d | -d )
36989     debug=: ;;
36990   --file | --fil | --fi | --f )
36991     $ac_shift
36992     case $ac_optarg in
36993     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36994     '') as_fn_error $? "missing file argument" ;;
36995     esac
36996     as_fn_append CONFIG_FILES " '$ac_optarg'"
36997     ac_need_defaults=false;;
36998   --header | --heade | --head | --hea )
36999     $ac_shift
37000     case $ac_optarg in
37001     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37002     esac
37003     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37004     ac_need_defaults=false;;
37005   --he | --h)
37006     # Conflict between --help and --header
37007     as_fn_error $? "ambiguous option: \`$1'
37008 Try \`$0 --help' for more information.";;
37009   --help | --hel | -h )
37010     $as_echo "$ac_cs_usage"; exit ;;
37011   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37012   | -silent | --silent | --silen | --sile | --sil | --si | --s)
37013     ac_cs_silent=: ;;
37014 
37015   # This is an error.
37016   -*) as_fn_error $? "unrecognized option: \`$1'
37017 Try \`$0 --help' for more information." ;;
37018 
37019   *) as_fn_append ac_config_targets " $1"
37020      ac_need_defaults=false ;;
37021 
37022   esac
37023   shift
37024 done
37025 
37026 ac_configure_extra_args=
37027 
37028 if $ac_cs_silent; then
37029   exec 6>/dev/null
37030   ac_configure_extra_args="$ac_configure_extra_args --silent"
37031 fi
37032 
37033 _ACEOF
37034 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37035 if \$ac_cs_recheck; then
37036   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37037   shift
37038   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37039   CONFIG_SHELL='$SHELL'
37040   export CONFIG_SHELL
37041   exec "\$@"
37042 fi
37043 
37044 _ACEOF
37045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37046 exec 5>>config.log
37047 {
37048   echo
37049   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37050 ## Running $as_me. ##
37051 _ASBOX
37052   $as_echo "$ac_log"
37053 } >&5
37054 
37055 _ACEOF
37056 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37057 _ACEOF
37058 
37059 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37060 
37061 # Handling of arguments.
37062 for ac_config_target in $ac_config_targets
37063 do
37064   case $ac_config_target in
37065     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
37066     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
37067     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
37068     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
37069     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
37070     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
37071     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
37072 
37073   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37074   esac
37075 done
37076 
37077 
37078 # If the user did not use the arguments to specify the items to instantiate,
37079 # then the envvar interface is used.  Set only those that are not.
37080 # We use the long form for the default assignment because of an extremely
37081 # bizarre bug on SunOS 4.1.3.
37082 if $ac_need_defaults; then
37083   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37084   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37085 fi
37086 
37087 # Have a temporary directory for convenience.  Make it in the build tree
37088 # simply because there is no reason against having it here, and in addition,
37089 # creating and moving files from /tmp can sometimes cause problems.
37090 # Hook for its removal unless debugging.
37091 # Note that there is a small window in which the directory will not be cleaned:
37092 # after its creation but before its name has been assigned to `$tmp'.
37093 $debug ||
37094 {
37095   tmp= ac_tmp=
37096   trap 'exit_status=$?
37097   : "${ac_tmp:=$tmp}"
37098   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37099 ' 0
37100   trap 'as_fn_exit 1' 1 2 13 15
37101 }
37102 # Create a (secure) tmp directory for tmp files.
37103 
37104 {
37105   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37106   test -d "$tmp"
37107 }  ||
37108 {
37109   tmp=./conf$$-$RANDOM
37110   (umask 077 && mkdir "$tmp")
37111 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37112 ac_tmp=$tmp
37113 
37114 # Set up the scripts for CONFIG_FILES section.
37115 # No need to generate them if there are no CONFIG_FILES.
37116 # This happens for instance with `./config.status config.h'.
37117 if test -n "$CONFIG_FILES"; then
37118 
37119 
37120 ac_cr=`echo X | tr X '\015'`
37121 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37122 # But we know of no other shell where ac_cr would be empty at this
37123 # point, so we can use a bashism as a fallback.
37124 if test "x$ac_cr" = x; then
37125   eval ac_cr=\$\'\\r\'
37126 fi
37127 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37128 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37129   ac_cs_awk_cr='\\r'
37130 else
37131   ac_cs_awk_cr=$ac_cr
37132 fi
37133 
37134 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37135 _ACEOF
37136 
37137 
37138 {
37139   echo "cat >conf$$subs.awk <<_ACEOF" &&
37140   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37141   echo "_ACEOF"
37142 } >conf$$subs.sh ||
37143   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37144 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37145 ac_delim='%!_!# '
37146 for ac_last_try in false false false false false :; do
37147   . ./conf$$subs.sh ||
37148     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37149 
37150   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37151   if test $ac_delim_n = $ac_delim_num; then
37152     break
37153   elif $ac_last_try; then
37154     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37155   else
37156     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37157   fi
37158 done
37159 rm -f conf$$subs.sh
37160 
37161 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37162 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37163 _ACEOF
37164 sed -n '
37165 h
37166 s/^/S["/; s/!.*/"]=/
37167 p
37168 g
37169 s/^[^!]*!//
37170 :repl
37171 t repl
37172 s/'"$ac_delim"'$//
37173 t delim
37174 :nl
37175 h
37176 s/\(.\{148\}\)..*/\1/
37177 t more1
37178 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37179 p
37180 n
37181 b repl
37182 :more1
37183 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37184 p
37185 g
37186 s/.\{148\}//
37187 t nl
37188 :delim
37189 h
37190 s/\(.\{148\}\)..*/\1/
37191 t more2
37192 s/["\\]/\\&/g; s/^/"/; s/$/"/
37193 p
37194 b
37195 :more2
37196 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37197 p
37198 g
37199 s/.\{148\}//
37200 t delim
37201 ' <conf$$subs.awk | sed '
37202 /^[^""]/{
37203   N
37204   s/\n//
37205 }
37206 ' >>$CONFIG_STATUS || ac_write_fail=1
37207 rm -f conf$$subs.awk
37208 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37209 _ACAWK
37210 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37211   for (key in S) S_is_set[key] = 1
37212   FS = ""
37213 
37214 }
37215 {
37216   line = $ 0
37217   nfields = split(line, field, "@")
37218   substed = 0
37219   len = length(field[1])
37220   for (i = 2; i < nfields; i++) {
37221     key = field[i]
37222     keylen = length(key)
37223     if (S_is_set[key]) {
37224       value = S[key]
37225       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37226       len += length(value) + length(field[++i])
37227       substed = 1
37228     } else
37229       len += 1 + keylen
37230   }
37231 
37232   print line
37233 }
37234 
37235 _ACAWK
37236 _ACEOF
37237 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37238 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37239   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37240 else
37241   cat
37242 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37243   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37244 _ACEOF
37245 
37246 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37247 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37248 # trailing colons and then remove the whole line if VPATH becomes empty
37249 # (actually we leave an empty line to preserve line numbers).
37250 if test "x$srcdir" = x.; then
37251   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37252 h
37253 s///
37254 s/^/:/
37255 s/[      ]*$/:/
37256 s/:\$(srcdir):/:/g
37257 s/:\${srcdir}:/:/g
37258 s/:@srcdir@:/:/g
37259 s/^:*//
37260 s/:*$//
37261 x
37262 s/\(=[   ]*\).*/\1/
37263 G
37264 s/\n//
37265 s/^[^=]*=[       ]*$//
37266 }'
37267 fi
37268 
37269 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37270 fi # test -n "$CONFIG_FILES"
37271 
37272 # Set up the scripts for CONFIG_HEADERS section.
37273 # No need to generate them if there are no CONFIG_HEADERS.
37274 # This happens for instance with `./config.status Makefile'.
37275 if test -n "$CONFIG_HEADERS"; then
37276 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37277 BEGIN {
37278 _ACEOF
37279 
37280 # Transform confdefs.h into an awk script `defines.awk', embedded as
37281 # here-document in config.status, that substitutes the proper values into
37282 # config.h.in to produce config.h.
37283 
37284 # Create a delimiter string that does not exist in confdefs.h, to ease
37285 # handling of long lines.
37286 ac_delim='%!_!# '
37287 for ac_last_try in false false :; do
37288   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37289   if test -z "$ac_tt"; then
37290     break
37291   elif $ac_last_try; then
37292     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37293   else
37294     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37295   fi
37296 done
37297 
37298 # For the awk script, D is an array of macro values keyed by name,
37299 # likewise P contains macro parameters if any.  Preserve backslash
37300 # newline sequences.
37301 
37302 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37303 sed -n '
37304 s/.\{148\}/&'"$ac_delim"'/g
37305 t rset
37306 :rset
37307 s/^[     ]*#[    ]*define[       ][      ]*/ /
37308 t def
37309 d
37310 :def
37311 s/\\$//
37312 t bsnl
37313 s/["\\]/\\&/g
37314 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37315 D["\1"]=" \3"/p
37316 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37317 d
37318 :bsnl
37319 s/["\\]/\\&/g
37320 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37321 D["\1"]=" \3\\\\\\n"\\/p
37322 t cont
37323 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37324 t cont
37325 d
37326 :cont
37327 n
37328 s/.\{148\}/&'"$ac_delim"'/g
37329 t clear
37330 :clear
37331 s/\\$//
37332 t bsnlc
37333 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37334 d
37335 :bsnlc
37336 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37337 b cont
37338 ' <confdefs.h | sed '
37339 s/'"$ac_delim"'/"\\\
37340 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37341 
37342 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37343   for (key in D) D_is_set[key] = 1
37344   FS = ""
37345 }
37346 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37347   line = \$ 0
37348   split(line, arg, " ")
37349   if (arg[1] == "#") {
37350     defundef = arg[2]
37351     mac1 = arg[3]
37352   } else {
37353     defundef = substr(arg[1], 2)
37354     mac1 = arg[2]
37355   }
37356   split(mac1, mac2, "(") #)
37357   macro = mac2[1]
37358   prefix = substr(line, 1, index(line, defundef) - 1)
37359   if (D_is_set[macro]) {
37360     # Preserve the white space surrounding the "#".
37361     print prefix "define", macro P[macro] D[macro]
37362     next
37363   } else {
37364     # Replace #undef with comments.  This is necessary, for example,
37365     # in the case of _POSIX_SOURCE, which is predefined and required
37366     # on some systems where configure will not decide to define it.
37367     if (defundef == "undef") {
37368       print "/*", prefix defundef, macro, "*/"
37369       next
37370     }
37371   }
37372 }
37373 { print }
37374 _ACAWK
37375 _ACEOF
37376 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37377   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37378 fi # test -n "$CONFIG_HEADERS"
37379 
37380 
37381 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37382 shift
37383 for ac_tag
37384 do
37385   case $ac_tag in
37386   :[FHLC]) ac_mode=$ac_tag; continue;;
37387   esac
37388   case $ac_mode$ac_tag in
37389   :[FHL]*:*);;
37390   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37391   :[FH]-) ac_tag=-:-;;
37392   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37393   esac
37394   ac_save_IFS=$IFS
37395   IFS=:
37396   set x $ac_tag
37397   IFS=$ac_save_IFS
37398   shift
37399   ac_file=$1
37400   shift
37401 
37402   case $ac_mode in
37403   :L) ac_source=$1;;
37404   :[FH])
37405     ac_file_inputs=
37406     for ac_f
37407     do
37408       case $ac_f in
37409       -) ac_f="$ac_tmp/stdin";;
37410       *) # Look for the file first in the build tree, then in the source tree
37411          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37412          # because $ac_f cannot contain `:'.
37413          test -f "$ac_f" ||
37414            case $ac_f in
37415            [\\/$]*) false;;
37416            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37417            esac ||
37418            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37419       esac
37420       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37421       as_fn_append ac_file_inputs " '$ac_f'"
37422     done
37423 
37424     # Let's still pretend it is `configure' which instantiates (i.e., don't
37425     # use $as_me), people would be surprised to read:
37426     #    /* config.h.  Generated by config.status.  */
37427     configure_input='Generated from '`
37428           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37429         `' by configure.'
37430     if test x"$ac_file" != x-; then
37431       configure_input="$ac_file.  $configure_input"
37432       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37433 $as_echo "$as_me: creating $ac_file" >&6;}
37434     fi
37435     # Neutralize special characters interpreted by sed in replacement strings.
37436     case $configure_input in #(
37437     *\&* | *\|* | *\\* )
37438        ac_sed_conf_input=`$as_echo "$configure_input" |
37439        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37440     *) ac_sed_conf_input=$configure_input;;
37441     esac
37442 
37443     case $ac_tag in
37444     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37445       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37446     esac
37447     ;;
37448   esac
37449 
37450   ac_dir=`$as_dirname -- "$ac_file" ||
37451 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37452          X"$ac_file" : 'X\(//\)[^/]' \| \
37453          X"$ac_file" : 'X\(//\)$' \| \
37454          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37455 $as_echo X"$ac_file" |
37456     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37457             s//\1/
37458             q
37459           }
37460           /^X\(\/\/\)[^/].*/{
37461             s//\1/
37462             q
37463           }
37464           /^X\(\/\/\)$/{
37465             s//\1/
37466             q
37467           }
37468           /^X\(\/\).*/{
37469             s//\1/
37470             q
37471           }
37472           s/.*/./; q'`
37473   as_dir="$ac_dir"; as_fn_mkdir_p
37474   ac_builddir=.
37475 
37476 case "$ac_dir" in
37477 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37478 *)
37479   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37480   # A ".." for each directory in $ac_dir_suffix.
37481   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37482   case $ac_top_builddir_sub in
37483   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37484   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37485   esac ;;
37486 esac
37487 ac_abs_top_builddir=$ac_pwd
37488 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37489 # for backward compatibility:
37490 ac_top_builddir=$ac_top_build_prefix
37491 
37492 case $srcdir in
37493   .)  # We are building in place.
37494     ac_srcdir=.
37495     ac_top_srcdir=$ac_top_builddir_sub
37496     ac_abs_top_srcdir=$ac_pwd ;;
37497   [\\/]* | ?:[\\/]* )  # Absolute name.
37498     ac_srcdir=$srcdir$ac_dir_suffix;
37499     ac_top_srcdir=$srcdir
37500     ac_abs_top_srcdir=$srcdir ;;
37501   *) # Relative name.
37502     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37503     ac_top_srcdir=$ac_top_build_prefix$srcdir
37504     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37505 esac
37506 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37507 
37508 
37509   case $ac_mode in
37510   :F)
37511   #
37512   # CONFIG_FILE
37513   #
37514 
37515 _ACEOF
37516 
37517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37518 # If the template does not know about datarootdir, expand it.
37519 # FIXME: This hack should be removed a few years after 2.60.
37520 ac_datarootdir_hack=; ac_datarootdir_seen=
37521 ac_sed_dataroot='
37522 /datarootdir/ {
37523   p
37524   q
37525 }
37526 /@datadir@/p
37527 /@docdir@/p
37528 /@infodir@/p
37529 /@localedir@/p
37530 /@mandir@/p'
37531 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37532 *datarootdir*) ac_datarootdir_seen=yes;;
37533 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37534   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37535 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37536 _ACEOF
37537 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37538   ac_datarootdir_hack='
37539   s&@datadir@&$datadir&g
37540   s&@docdir@&$docdir&g
37541   s&@infodir@&$infodir&g
37542   s&@localedir@&$localedir&g
37543   s&@mandir@&$mandir&g
37544   s&\\\${datarootdir}&$datarootdir&g' ;;
37545 esac
37546 _ACEOF
37547 
37548 # Neutralize VPATH when `$srcdir' = `.'.
37549 # Shell code in configure.ac might set extrasub.
37550 # FIXME: do we really want to maintain this feature?
37551 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37552 ac_sed_extra="$ac_vpsub
37553 $extrasub
37554 _ACEOF
37555 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37556 :t
37557 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37558 s|@configure_input@|$ac_sed_conf_input|;t t
37559 s&@top_builddir@&$ac_top_builddir_sub&;t t
37560 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37561 s&@srcdir@&$ac_srcdir&;t t
37562 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37563 s&@top_srcdir@&$ac_top_srcdir&;t t
37564 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37565 s&@builddir@&$ac_builddir&;t t
37566 s&@abs_builddir@&$ac_abs_builddir&;t t
37567 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37568 $ac_datarootdir_hack
37569 "
37570 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37571   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37572 
37573 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37574   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37575   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37576       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37577   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37578 which seems to be undefined.  Please make sure it is defined" >&5
37579 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37580 which seems to be undefined.  Please make sure it is defined" >&2;}
37581 
37582   rm -f "$ac_tmp/stdin"
37583   case $ac_file in
37584   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37585   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37586   esac \
37587   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37588  ;;
37589   :H)
37590   #
37591   # CONFIG_HEADER
37592   #
37593   if test x"$ac_file" != x-; then
37594     {
37595       $as_echo "/* $configure_input  */" \
37596       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37597     } >"$ac_tmp/config.h" \
37598       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37599     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37600       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37601 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37602     else
37603       rm -f "$ac_file"
37604       mv "$ac_tmp/config.h" "$ac_file" \
37605         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37606     fi
37607   else
37608     $as_echo "/* $configure_input  */" \
37609       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37610       || as_fn_error $? "could not create -" "$LINENO" 5
37611   fi
37612  ;;
37613 
37614 
37615   esac
37616 
37617 done # for ac_tag
37618 
37619 
37620 as_fn_exit 0
37621 _ACEOF
37622 ac_clean_files=$ac_clean_files_save
37623 
37624 test $ac_write_fail = 0 ||
37625   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37626 
37627 
37628 # configure is writing to config.log, and then calls config.status.
37629 # config.status does its own redirection, appending to config.log.
37630 # Unfortunately, on DOS this fails, as config.log is still kept open
37631 # by configure, so config.status won't be able to write to it; its
37632 # output is simply discarded.  So we exec the FD to /dev/null,
37633 # effectively closing config.log, so it can be properly (re)opened and
37634 # appended to by config.status.  When coming back to configure, we
37635 # need to make the FD available again.
37636 if test "$no_create" != yes; then
37637   ac_cs_success=:
37638   ac_config_status_args=
37639   test "$silent" = yes &&
37640     ac_config_status_args="$ac_config_status_args --quiet"
37641   exec 5>/dev/null
37642   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37643   exec 5>>config.log
37644   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37645   # would make configure fail if this is the last instruction.
37646   $ac_cs_success || as_fn_exit 1
37647 fi
37648 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37649   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37650 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37651 fi
37652 
37653 
37654 # Try to move the config.log file to the output directory.
37655 if test -e ./config.log; then
37656   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37657 fi
37658 
37659 # Make the compare script executable
37660 $CHMOD +x $OUTPUT_ROOT/compare.sh
37661 
37662 # Finally output some useful information to the user
37663 
37664   # Finally output some useful information to the user
37665 
37666   if test "x$CCACHE_FOUND" != x; then
37667     if  test "x$HAS_GOOD_CCACHE" = x; then
37668       CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37669       CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37670     else
37671       CCACHE_STATUS="installed and in use"
37672     fi
37673   else
37674     if test "x$GCC" = xyes; then
37675       CCACHE_STATUS="not installed (consider installing)"
37676       CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37677     else
37678       CCACHE_STATUS="not available for your system"
37679     fi
37680   fi
37681 
37682   printf "\n"
37683   printf "====================================================\n"
37684   printf "A new configuration has been successfully created in\n"
37685   printf "$OUTPUT_ROOT\n"
37686   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37687     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37688   else
37689     printf "using default settings.\n"
37690   fi
37691 
37692   printf "\n"
37693   printf "Configuration summary:\n"
37694   printf "* Debug level:    $DEBUG_LEVEL\n"
37695   printf "* JDK variant:    $JDK_VARIANT\n"
37696   printf "* JVM variants:   $with_jvm_variants\n"
37697   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37698 
37699   printf "\n"
37700   printf "Tools summary:\n"
37701   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37702     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37703   fi
37704   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37705   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37706   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37707 
37708   printf "\n"
37709   printf "Build performance summary:\n"
37710   printf "* Cores to use:   $JOBS\n"
37711   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37712   printf "* ccache status:  $CCACHE_STATUS\n"
37713   printf "\n"
37714 
37715   if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37716     printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37717     printf "$CCACHE_HELP_MSG\n"
37718 
37719   # Print a helpful message on how to acquire the necessary build dependency.
37720   # ccache is the help tag: freetype, cups, pulse, alsa etc
37721   MISSING_DEPENDENCY=ccache
37722 
37723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37724     cygwin_help $MISSING_DEPENDENCY
37725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37726     msys_help $MISSING_DEPENDENCY
37727   else
37728     PKGHANDLER_COMMAND=
37729 
37730     case $PKGHANDLER in
37731       apt-get)
37732         apt_help     $MISSING_DEPENDENCY ;;
37733       yum)
37734         yum_help     $MISSING_DEPENDENCY ;;
37735       port)
37736         port_help    $MISSING_DEPENDENCY ;;
37737       pkgutil)
37738         pkgutil_help $MISSING_DEPENDENCY ;;
37739       pkgadd)
37740         pkgadd_help  $MISSING_DEPENDENCY ;;
37741     esac
37742 
37743     if test "x$PKGHANDLER_COMMAND" != x; then
37744       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37745     fi
37746   fi
37747 
37748     printf "$HELP_MSG\n"
37749     printf "\n"
37750   fi
37751 
37752   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37753     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37754     printf "will result in longer build times.\n"
37755     printf "\n"
37756   fi
37757 
37758   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37759     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37760     printf "These are not respected, and will be ignored. It is recommended\n"
37761     printf "that you clean your environment. The following variables are set:\n"
37762     printf "$FOUND_ALT_VARIABLES\n"
37763     printf "\n"
37764   fi
37765 
37766   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37767     printf "WARNING: Your build output directory is not on a local disk.\n"
37768     printf "This will severely degrade build performance!\n"
37769     printf "It is recommended that you create an output directory on a local disk,\n"
37770     printf "and run the configure script again from that directory.\n"
37771     printf "\n"
37772   fi
37773 
37774   if test "x$IS_RECONFIGURE" = "xyes"; then
37775     printf "WARNING: The result of this configuration has overridden an older\n"
37776     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37777     printf "proper build. Failure to do so might result in strange build problems.\n"
37778     printf "\n"
37779   fi
37780