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 BOOT_JDK_JVMARGS
 790 JAVAC_FLAGS
 791 BOOT_JDK_SOURCETARGET
 792 BOOT_JDK
 793 BOOT_TOOLSJAR
 794 BOOT_RTJAR
 795 JAVA_CHECK
 796 JAVAC_CHECK
 797 COOKED_BUILD_NUMBER
 798 JDK_VERSION
 799 COPYRIGHT_YEAR
 800 MACOSX_BUNDLE_ID_BASE
 801 MACOSX_BUNDLE_NAME_BASE
 802 COMPANY_NAME
 803 JDK_RC_PLATFORM_NAME
 804 PRODUCT_SUFFIX
 805 PRODUCT_NAME
 806 LAUNCHER_NAME
 807 MILESTONE
 808 JDK_BUILD_NUMBER
 809 JDK_UPDATE_VERSION
 810 JDK_MICRO_VERSION
 811 JDK_MINOR_VERSION
 812 JDK_MAJOR_VERSION
 813 USER_RELEASE_SUFFIX
 814 COMPRESS_JARS
 815 UNLIMITED_CRYPTO
 816 CACERTS_FILE
 817 TEST_IN_BUILD
 818 BUILD_HEADLESS
 819 SUPPORT_HEADFUL
 820 SUPPORT_HEADLESS
 821 BDEPS_FTP
 822 BDEPS_UNZIP
 823 OS_VERSION_MICRO
 824 OS_VERSION_MINOR
 825 OS_VERSION_MAJOR
 826 PKG_CONFIG
 827 CODESIGN
 828 XATTR
 829 DSYMUTIL
 830 IS_GNU_TIME
 831 TIME
 832 STAT
 833 HG
 834 READELF
 835 OTOOL
 836 LDD
 837 ZIP
 838 UNZIP
 839 FIND_DELETE
 840 MAKE
 841 CHECK_TOOLSDIR_MAKE
 842 CHECK_TOOLSDIR_GMAKE
 843 CHECK_MAKE
 844 CHECK_GMAKE
 845 PKGHANDLER
 846 OUTPUT_ROOT
 847 CONF_NAME
 848 SPEC
 849 BUILD_VARIANT_RELEASE
 850 DEBUG_CLASSFILES
 851 FASTDEBUG
 852 VARIANT
 853 DEBUG_LEVEL
 854 MACOSX_UNIVERSAL
 855 INCLUDE_SA
 856 JVM_VARIANT_CORE
 857 JVM_VARIANT_ZEROSHARK
 858 JVM_VARIANT_ZERO
 859 JVM_VARIANT_KERNEL
 860 JVM_VARIANT_MINIMAL1
 861 JVM_VARIANT_CLIENT
 862 JVM_VARIANT_SERVER
 863 JVM_VARIANTS
 864 JVM_INTERPRETER
 865 JDK_VARIANT
 866 SET_OPENJDK
 867 BUILD_LOG_WRAPPER
 868 BUILD_LOG_PREVIOUS
 869 BUILD_LOG
 870 SYS_ROOT
 871 PATH_SEP
 872 SRC_ROOT
 873 ZERO_ARCHDEF
 874 DEFINE_CROSS_COMPILE_ARCH
 875 LP64
 876 OPENJDK_TARGET_OS_EXPORT_DIR
 877 OPENJDK_TARGET_OS_API_DIR
 878 OPENJDK_TARGET_CPU_JLI_CFLAGS
 879 OPENJDK_TARGET_CPU_OSARCH
 880 OPENJDK_TARGET_CPU_ISADIR
 881 OPENJDK_TARGET_CPU_LIBDIR
 882 OPENJDK_TARGET_CPU_LEGACY_LIB
 883 OPENJDK_TARGET_CPU_LEGACY
 884 REQUIRED_OS_VERSION
 885 REQUIRED_OS_NAME
 886 COMPILE_TYPE
 887 OPENJDK_TARGET_CPU_ENDIAN
 888 OPENJDK_TARGET_CPU_BITS
 889 OPENJDK_TARGET_CPU_ARCH
 890 OPENJDK_TARGET_CPU
 891 OPENJDK_TARGET_OS_API
 892 OPENJDK_TARGET_OS
 893 OPENJDK_BUILD_CPU_ENDIAN
 894 OPENJDK_BUILD_CPU_BITS
 895 OPENJDK_BUILD_CPU_ARCH
 896 OPENJDK_BUILD_CPU
 897 OPENJDK_BUILD_OS_API
 898 OPENJDK_BUILD_OS
 899 OPENJDK_BUILD_AUTOCONF_NAME
 900 OPENJDK_TARGET_AUTOCONF_NAME
 901 target_os
 902 target_vendor
 903 target_cpu
 904 target
 905 host_os
 906 host_vendor
 907 host_cpu
 908 host
 909 build_os
 910 build_vendor
 911 build_cpu
 912 build
 913 SETFILE
 914 DF
 915 READLINK
 916 CYGPATH
 917 NAWK
 918 SED
 919 FGREP
 920 EGREP
 921 GREP
 922 AWK
 923 XARGS
 924 WHICH
 925 WC
 926 UNIQ
 927 UNAME
 928 TR
 929 TOUCH
 930 TEE
 931 TAR
 932 TAIL
 933 SORT
 934 SH
 935 RM
 936 PRINTF
 937 MV
 938 MKTEMP
 939 MKDIR
 940 LS
 941 LN
 942 HEAD
 943 FIND
 944 FILE
 945 EXPR
 946 ECHO
 947 DIRNAME
 948 DIFF
 949 DATE
 950 CUT
 951 CPIO
 952 CP
 953 COMM
 954 CMP
 955 CHMOD
 956 CAT
 957 BASH
 958 BASENAME
 959 DATE_WHEN_CONFIGURED
 960 CONFIGURE_COMMAND_LINE
 961 CUSTOM_MAKE_DIR
 962 target_alias
 963 host_alias
 964 build_alias
 965 LIBS
 966 ECHO_T
 967 ECHO_N
 968 ECHO_C
 969 DEFS
 970 mandir
 971 localedir
 972 libdir
 973 psdir
 974 pdfdir
 975 dvidir
 976 htmldir
 977 infodir
 978 docdir
 979 oldincludedir
 980 includedir
 981 localstatedir
 982 sharedstatedir
 983 sysconfdir
 984 datadir
 985 datarootdir
 986 libexecdir
 987 sbindir
 988 bindir
 989 program_transform_name
 990 prefix
 991 exec_prefix
 992 PACKAGE_URL
 993 PACKAGE_BUGREPORT
 994 PACKAGE_STRING
 995 PACKAGE_VERSION
 996 PACKAGE_TARNAME
 997 PACKAGE_NAME
 998 PATH_SEPARATOR
 999 SHELL'
1000 ac_subst_files=''
1001 ac_user_opts='
1002 enable_option_checking
1003 with_custom_make_dir
1004 with_target_bits
1005 with_sys_root
1006 with_tools_dir
1007 with_devkit
1008 enable_openjdk_only
1009 with_jdk_variant
1010 with_jvm_interpreter
1011 with_jvm_variants
1012 enable_debug
1013 with_debug_level
1014 with_conf_name
1015 with_builddeps_conf
1016 with_builddeps_server
1017 with_builddeps_dir
1018 with_builddeps_group
1019 enable_headful
1020 enable_hotspot_test_in_build
1021 with_cacerts_file
1022 enable_unlimited_crypto
1023 with_milestone
1024 with_update_version
1025 with_user_release_suffix
1026 with_build_number
1027 with_boot_jdk
1028 with_boot_jdk_jvmargs
1029 with_add_source_root
1030 with_override_source_root
1031 with_adds_and_overrides
1032 with_override_langtools
1033 with_override_corba
1034 with_override_jaxp
1035 with_override_jaxws
1036 with_override_hotspot
1037 with_override_nashorn
1038 with_override_jdk
1039 with_import_hotspot
1040 with_msvcr_dll
1041 with_dxsdk
1042 with_dxsdk_lib
1043 with_dxsdk_include
1044 with_jtreg
1045 with_extra_cflags
1046 with_extra_cxxflags
1047 with_extra_ldflags
1048 enable_debug_symbols
1049 enable_zip_debug_info
1050 enable_macosx_runtime_support
1051 with_x
1052 with_cups
1053 with_cups_include
1054 with_freetype
1055 with_freetype_include
1056 with_freetype_lib
1057 enable_freetype_bundling
1058 with_alsa
1059 with_alsa_include
1060 with_alsa_lib
1061 with_giflib
1062 with_zlib
1063 with_stdc__lib
1064 with_num_cores
1065 with_memory_size
1066 with_jobs
1067 with_sjavac_server_java
1068 enable_sjavac
1069 enable_precompiled_headers
1070 enable_ccache
1071 with_ccache_dir
1072 '
1073       ac_precious_vars='build_alias
1074 host_alias
1075 target_alias
1076 PKG_CONFIG
1077 CC
1078 CFLAGS
1079 LDFLAGS
1080 LIBS
1081 CPPFLAGS
1082 CXX
1083 CXXFLAGS
1084 CCC
1085 OBJC
1086 OBJCFLAGS
1087 CPP
1088 CXXCPP
1089 XMKMF
1090 FREETYPE_CFLAGS
1091 FREETYPE_LIBS
1092 ALSA_CFLAGS
1093 ALSA_LIBS
1094 LIBFFI_CFLAGS
1095 LIBFFI_LIBS'
1096 
1097 
1098 # Initialize some variables set by options.
1099 ac_init_help=
1100 ac_init_version=false
1101 ac_unrecognized_opts=
1102 ac_unrecognized_sep=
1103 # The variables have the same names as the options, with
1104 # dashes changed to underlines.
1105 cache_file=/dev/null
1106 exec_prefix=NONE
1107 no_create=
1108 no_recursion=
1109 prefix=NONE
1110 program_prefix=NONE
1111 program_suffix=NONE
1112 program_transform_name=s,x,x,
1113 silent=
1114 site=
1115 srcdir=
1116 verbose=
1117 x_includes=NONE
1118 x_libraries=NONE
1119 
1120 # Installation directory options.
1121 # These are left unexpanded so users can "make install exec_prefix=/foo"
1122 # and all the variables that are supposed to be based on exec_prefix
1123 # by default will actually change.
1124 # Use braces instead of parens because sh, perl, etc. also accept them.
1125 # (The list follows the same order as the GNU Coding Standards.)
1126 bindir='${exec_prefix}/bin'
1127 sbindir='${exec_prefix}/sbin'
1128 libexecdir='${exec_prefix}/libexec'
1129 datarootdir='${prefix}/share'
1130 datadir='${datarootdir}'
1131 sysconfdir='${prefix}/etc'
1132 sharedstatedir='${prefix}/com'
1133 localstatedir='${prefix}/var'
1134 includedir='${prefix}/include'
1135 oldincludedir='/usr/include'
1136 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1137 infodir='${datarootdir}/info'
1138 htmldir='${docdir}'
1139 dvidir='${docdir}'
1140 pdfdir='${docdir}'
1141 psdir='${docdir}'
1142 libdir='${exec_prefix}/lib'
1143 localedir='${datarootdir}/locale'
1144 mandir='${datarootdir}/man'
1145 
1146 ac_prev=
1147 ac_dashdash=
1148 for ac_option
1149 do
1150   # If the previous option needs an argument, assign it.
1151   if test -n "$ac_prev"; then
1152     eval $ac_prev=\$ac_option
1153     ac_prev=
1154     continue
1155   fi
1156 
1157   case $ac_option in
1158   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1159   *=)   ac_optarg= ;;
1160   *)    ac_optarg=yes ;;
1161   esac
1162 
1163   # Accept the important Cygnus configure options, so we can diagnose typos.
1164 
1165   case $ac_dashdash$ac_option in
1166   --)
1167     ac_dashdash=yes ;;
1168 
1169   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1170     ac_prev=bindir ;;
1171   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1172     bindir=$ac_optarg ;;
1173 
1174   -build | --build | --buil | --bui | --bu)
1175     ac_prev=build_alias ;;
1176   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1177     build_alias=$ac_optarg ;;
1178 
1179   -cache-file | --cache-file | --cache-fil | --cache-fi \
1180   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1181     ac_prev=cache_file ;;
1182   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1183   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1184     cache_file=$ac_optarg ;;
1185 
1186   --config-cache | -C)
1187     cache_file=config.cache ;;
1188 
1189   -datadir | --datadir | --datadi | --datad)
1190     ac_prev=datadir ;;
1191   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1192     datadir=$ac_optarg ;;
1193 
1194   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1195   | --dataroo | --dataro | --datar)
1196     ac_prev=datarootdir ;;
1197   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1198   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1199     datarootdir=$ac_optarg ;;
1200 
1201   -disable-* | --disable-*)
1202     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1203     # Reject names that are not valid shell variable names.
1204     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1205       as_fn_error $? "invalid feature name: $ac_useropt"
1206     ac_useropt_orig=$ac_useropt
1207     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208     case $ac_user_opts in
1209       *"
1210 "enable_$ac_useropt"
1211 "*) ;;
1212       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1213          ac_unrecognized_sep=', ';;
1214     esac
1215     eval enable_$ac_useropt=no ;;
1216 
1217   -docdir | --docdir | --docdi | --doc | --do)
1218     ac_prev=docdir ;;
1219   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1220     docdir=$ac_optarg ;;
1221 
1222   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1223     ac_prev=dvidir ;;
1224   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1225     dvidir=$ac_optarg ;;
1226 
1227   -enable-* | --enable-*)
1228     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1229     # Reject names that are not valid shell variable names.
1230     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1231       as_fn_error $? "invalid feature name: $ac_useropt"
1232     ac_useropt_orig=$ac_useropt
1233     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1234     case $ac_user_opts in
1235       *"
1236 "enable_$ac_useropt"
1237 "*) ;;
1238       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1239          ac_unrecognized_sep=', ';;
1240     esac
1241     eval enable_$ac_useropt=\$ac_optarg ;;
1242 
1243   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1244   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1245   | --exec | --exe | --ex)
1246     ac_prev=exec_prefix ;;
1247   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1248   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1249   | --exec=* | --exe=* | --ex=*)
1250     exec_prefix=$ac_optarg ;;
1251 
1252   -gas | --gas | --ga | --g)
1253     # Obsolete; use --with-gas.
1254     with_gas=yes ;;
1255 
1256   -help | --help | --hel | --he | -h)
1257     ac_init_help=long ;;
1258   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1259     ac_init_help=recursive ;;
1260   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1261     ac_init_help=short ;;
1262 
1263   -host | --host | --hos | --ho)
1264     ac_prev=host_alias ;;
1265   -host=* | --host=* | --hos=* | --ho=*)
1266     host_alias=$ac_optarg ;;
1267 
1268   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1269     ac_prev=htmldir ;;
1270   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1271   | --ht=*)
1272     htmldir=$ac_optarg ;;
1273 
1274   -includedir | --includedir | --includedi | --included | --include \
1275   | --includ | --inclu | --incl | --inc)
1276     ac_prev=includedir ;;
1277   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1278   | --includ=* | --inclu=* | --incl=* | --inc=*)
1279     includedir=$ac_optarg ;;
1280 
1281   -infodir | --infodir | --infodi | --infod | --info | --inf)
1282     ac_prev=infodir ;;
1283   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1284     infodir=$ac_optarg ;;
1285 
1286   -libdir | --libdir | --libdi | --libd)
1287     ac_prev=libdir ;;
1288   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1289     libdir=$ac_optarg ;;
1290 
1291   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1292   | --libexe | --libex | --libe)
1293     ac_prev=libexecdir ;;
1294   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1295   | --libexe=* | --libex=* | --libe=*)
1296     libexecdir=$ac_optarg ;;
1297 
1298   -localedir | --localedir | --localedi | --localed | --locale)
1299     ac_prev=localedir ;;
1300   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1301     localedir=$ac_optarg ;;
1302 
1303   -localstatedir | --localstatedir | --localstatedi | --localstated \
1304   | --localstate | --localstat | --localsta | --localst | --locals)
1305     ac_prev=localstatedir ;;
1306   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1307   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1308     localstatedir=$ac_optarg ;;
1309 
1310   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1311     ac_prev=mandir ;;
1312   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1313     mandir=$ac_optarg ;;
1314 
1315   -nfp | --nfp | --nf)
1316     # Obsolete; use --without-fp.
1317     with_fp=no ;;
1318 
1319   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1320   | --no-cr | --no-c | -n)
1321     no_create=yes ;;
1322 
1323   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1324   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1325     no_recursion=yes ;;
1326 
1327   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1328   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1329   | --oldin | --oldi | --old | --ol | --o)
1330     ac_prev=oldincludedir ;;
1331   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1332   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1333   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1334     oldincludedir=$ac_optarg ;;
1335 
1336   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1337     ac_prev=prefix ;;
1338   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1339     prefix=$ac_optarg ;;
1340 
1341   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1342   | --program-pre | --program-pr | --program-p)
1343     ac_prev=program_prefix ;;
1344   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1345   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1346     program_prefix=$ac_optarg ;;
1347 
1348   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1349   | --program-suf | --program-su | --program-s)
1350     ac_prev=program_suffix ;;
1351   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1352   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1353     program_suffix=$ac_optarg ;;
1354 
1355   -program-transform-name | --program-transform-name \
1356   | --program-transform-nam | --program-transform-na \
1357   | --program-transform-n | --program-transform- \
1358   | --program-transform | --program-transfor \
1359   | --program-transfo | --program-transf \
1360   | --program-trans | --program-tran \
1361   | --progr-tra | --program-tr | --program-t)
1362     ac_prev=program_transform_name ;;
1363   -program-transform-name=* | --program-transform-name=* \
1364   | --program-transform-nam=* | --program-transform-na=* \
1365   | --program-transform-n=* | --program-transform-=* \
1366   | --program-transform=* | --program-transfor=* \
1367   | --program-transfo=* | --program-transf=* \
1368   | --program-trans=* | --program-tran=* \
1369   | --progr-tra=* | --program-tr=* | --program-t=*)
1370     program_transform_name=$ac_optarg ;;
1371 
1372   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1373     ac_prev=pdfdir ;;
1374   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1375     pdfdir=$ac_optarg ;;
1376 
1377   -psdir | --psdir | --psdi | --psd | --ps)
1378     ac_prev=psdir ;;
1379   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1380     psdir=$ac_optarg ;;
1381 
1382   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1383   | -silent | --silent | --silen | --sile | --sil)
1384     silent=yes ;;
1385 
1386   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1387     ac_prev=sbindir ;;
1388   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1389   | --sbi=* | --sb=*)
1390     sbindir=$ac_optarg ;;
1391 
1392   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1393   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1394   | --sharedst | --shareds | --shared | --share | --shar \
1395   | --sha | --sh)
1396     ac_prev=sharedstatedir ;;
1397   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1398   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1399   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1400   | --sha=* | --sh=*)
1401     sharedstatedir=$ac_optarg ;;
1402 
1403   -site | --site | --sit)
1404     ac_prev=site ;;
1405   -site=* | --site=* | --sit=*)
1406     site=$ac_optarg ;;
1407 
1408   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1409     ac_prev=srcdir ;;
1410   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1411     srcdir=$ac_optarg ;;
1412 
1413   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1414   | --syscon | --sysco | --sysc | --sys | --sy)
1415     ac_prev=sysconfdir ;;
1416   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1417   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1418     sysconfdir=$ac_optarg ;;
1419 
1420   -target | --target | --targe | --targ | --tar | --ta | --t)
1421     ac_prev=target_alias ;;
1422   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1423     target_alias=$ac_optarg ;;
1424 
1425   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1426     verbose=yes ;;
1427 
1428   -version | --version | --versio | --versi | --vers | -V)
1429     ac_init_version=: ;;
1430 
1431   -with-* | --with-*)
1432     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1433     # Reject names that are not valid shell variable names.
1434     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1435       as_fn_error $? "invalid package name: $ac_useropt"
1436     ac_useropt_orig=$ac_useropt
1437     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1438     case $ac_user_opts in
1439       *"
1440 "with_$ac_useropt"
1441 "*) ;;
1442       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1443          ac_unrecognized_sep=', ';;
1444     esac
1445     eval with_$ac_useropt=\$ac_optarg ;;
1446 
1447   -without-* | --without-*)
1448     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1449     # Reject names that are not valid shell variable names.
1450     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1451       as_fn_error $? "invalid package name: $ac_useropt"
1452     ac_useropt_orig=$ac_useropt
1453     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1454     case $ac_user_opts in
1455       *"
1456 "with_$ac_useropt"
1457 "*) ;;
1458       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1459          ac_unrecognized_sep=', ';;
1460     esac
1461     eval with_$ac_useropt=no ;;
1462 
1463   --x)
1464     # Obsolete; use --with-x.
1465     with_x=yes ;;
1466 
1467   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1468   | --x-incl | --x-inc | --x-in | --x-i)
1469     ac_prev=x_includes ;;
1470   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1471   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1472     x_includes=$ac_optarg ;;
1473 
1474   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1475   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1476     ac_prev=x_libraries ;;
1477   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1478   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1479     x_libraries=$ac_optarg ;;
1480 
1481   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1482 Try \`$0 --help' for more information"
1483     ;;
1484 
1485   *=*)
1486     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1487     # Reject names that are not valid shell variable names.
1488     case $ac_envvar in #(
1489       '' | [0-9]* | *[!_$as_cr_alnum]* )
1490       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1491     esac
1492     eval $ac_envvar=\$ac_optarg
1493     export $ac_envvar ;;
1494 
1495   *)
1496     # FIXME: should be removed in autoconf 3.0.
1497     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1498     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1499       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1500     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1501     ;;
1502 
1503   esac
1504 done
1505 
1506 if test -n "$ac_prev"; then
1507   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1508   as_fn_error $? "missing argument to $ac_option"
1509 fi
1510 
1511 if test -n "$ac_unrecognized_opts"; then
1512   case $enable_option_checking in
1513     no) ;;
1514     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1515     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1516   esac
1517 fi
1518 
1519 # Check all directory arguments for consistency.
1520 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1521                 datadir sysconfdir sharedstatedir localstatedir includedir \
1522                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1523                 libdir localedir mandir
1524 do
1525   eval ac_val=\$$ac_var
1526   # Remove trailing slashes.
1527   case $ac_val in
1528     */ )
1529       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1530       eval $ac_var=\$ac_val;;
1531   esac
1532   # Be sure to have absolute directory names.
1533   case $ac_val in
1534     [\\/$]* | ?:[\\/]* )  continue;;
1535     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1536   esac
1537   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1538 done
1539 
1540 # There might be people who depend on the old broken behavior: `$host'
1541 # used to hold the argument of --host etc.
1542 # FIXME: To remove some day.
1543 build=$build_alias
1544 host=$host_alias
1545 target=$target_alias
1546 
1547 # FIXME: To remove some day.
1548 if test "x$host_alias" != x; then
1549   if test "x$build_alias" = x; then
1550     cross_compiling=maybe
1551   elif test "x$build_alias" != "x$host_alias"; then
1552     cross_compiling=yes
1553   fi
1554 fi
1555 
1556 ac_tool_prefix=
1557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1558 
1559 test "$silent" = yes && exec 6>/dev/null
1560 
1561 
1562 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1563 ac_ls_di=`ls -di .` &&
1564 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1565   as_fn_error $? "working directory cannot be determined"
1566 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1567   as_fn_error $? "pwd does not report name of working directory"
1568 
1569 
1570 # Find the source files, if location was not specified.
1571 if test -z "$srcdir"; then
1572   ac_srcdir_defaulted=yes
1573   # Try the directory containing this script, then the parent directory.
1574   ac_confdir=`$as_dirname -- "$as_myself" ||
1575 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1576          X"$as_myself" : 'X\(//\)[^/]' \| \
1577          X"$as_myself" : 'X\(//\)$' \| \
1578          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1579 $as_echo X"$as_myself" |
1580     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1581             s//\1/
1582             q
1583           }
1584           /^X\(\/\/\)[^/].*/{
1585             s//\1/
1586             q
1587           }
1588           /^X\(\/\/\)$/{
1589             s//\1/
1590             q
1591           }
1592           /^X\(\/\).*/{
1593             s//\1/
1594             q
1595           }
1596           s/.*/./; q'`
1597   srcdir=$ac_confdir
1598   if test ! -r "$srcdir/$ac_unique_file"; then
1599     srcdir=..
1600   fi
1601 else
1602   ac_srcdir_defaulted=no
1603 fi
1604 if test ! -r "$srcdir/$ac_unique_file"; then
1605   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1606   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1607 fi
1608 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1609 ac_abs_confdir=`(
1610         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1611         pwd)`
1612 # When building in place, set srcdir=.
1613 if test "$ac_abs_confdir" = "$ac_pwd"; then
1614   srcdir=.
1615 fi
1616 # Remove unnecessary trailing slashes from srcdir.
1617 # Double slashes in file names in object file debugging info
1618 # mess up M-x gdb in Emacs.
1619 case $srcdir in
1620 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1621 esac
1622 for ac_var in $ac_precious_vars; do
1623   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1624   eval ac_env_${ac_var}_value=\$${ac_var}
1625   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1626   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1627 done
1628 
1629 #
1630 # Report the --help message.
1631 #
1632 if test "$ac_init_help" = "long"; then
1633   # Omit some internal or obsolete options to make the list less imposing.
1634   # This message is too long to be a string in the A/UX 3.1 sh.
1635   cat <<_ACEOF
1636 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1637 
1638 Usage: $0 [OPTION]... [VAR=VALUE]...
1639 
1640 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1641 VAR=VALUE.  See below for descriptions of some of the useful variables.
1642 
1643 Defaults for the options are specified in brackets.
1644 
1645 Configuration:
1646   -h, --help              display this help and exit
1647       --help=short        display options specific to this package
1648       --help=recursive    display the short help of all the included packages
1649   -V, --version           display version information and exit
1650   -q, --quiet, --silent   do not print \`checking ...' messages
1651       --cache-file=FILE   cache test results in FILE [disabled]
1652   -C, --config-cache      alias for \`--cache-file=config.cache'
1653   -n, --no-create         do not create output files
1654       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1655 
1656 Installation directories:
1657   --prefix=PREFIX         install architecture-independent files in PREFIX
1658                           [$ac_default_prefix]
1659   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1660                           [PREFIX]
1661 
1662 By default, \`make install' will install all the files in
1663 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1664 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1665 for instance \`--prefix=\$HOME'.
1666 
1667 For better control, use the options below.
1668 
1669 Fine tuning of the installation directories:
1670   --bindir=DIR            user executables [EPREFIX/bin]
1671   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1672   --libexecdir=DIR        program executables [EPREFIX/libexec]
1673   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1674   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1675   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1676   --libdir=DIR            object code libraries [EPREFIX/lib]
1677   --includedir=DIR        C header files [PREFIX/include]
1678   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1679   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1680   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1681   --infodir=DIR           info documentation [DATAROOTDIR/info]
1682   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1683   --mandir=DIR            man documentation [DATAROOTDIR/man]
1684   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1685   --htmldir=DIR           html documentation [DOCDIR]
1686   --dvidir=DIR            dvi documentation [DOCDIR]
1687   --pdfdir=DIR            pdf documentation [DOCDIR]
1688   --psdir=DIR             ps documentation [DOCDIR]
1689 _ACEOF
1690 
1691   cat <<\_ACEOF
1692 
1693 X features:
1694   --x-includes=DIR    X include files are in DIR
1695   --x-libraries=DIR   X library files are in DIR
1696 
1697 System types:
1698   --build=BUILD     configure for building on BUILD [guessed]
1699   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1700   --target=TARGET   configure for building compilers for TARGET [HOST]
1701 _ACEOF
1702 fi
1703 
1704 if test -n "$ac_init_help"; then
1705   case $ac_init_help in
1706      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1707    esac
1708   cat <<\_ACEOF
1709 
1710 Optional Features:
1711   --disable-option-checking  ignore unrecognized --enable/--with options
1712   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1713   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1714   --enable-openjdk-only   suppress building custom source even if present
1715                           [disabled]
1716   --enable-debug          set the debug level to fastdebug (shorthand for
1717                           --with-debug-level=fastdebug) [disabled]
1718   --disable-headful       disable building headful support (graphical UI
1719                           support) [enabled]
1720   --enable-hotspot-test-in-build
1721                           run the Queens test after Hotspot build [disabled]
1722   --enable-unlimited-crypto
1723                           Enable unlimited crypto policy [disabled]
1724   --disable-debug-symbols disable generation of debug symbols [enabled]
1725   --disable-zip-debug-info
1726                           disable zipping of debug-info files [enabled]
1727   --enable-macosx-runtime-support
1728                           Deprecated. Option is kept for backwards
1729                           compatibility and is ignored
1730   --disable-freetype-bundling
1731                           disable bundling of the freetype library with the
1732                           build result [enabled on Windows or when using
1733                           --with-freetype, disabled otherwise]
1734   --enable-sjavac         use sjavac to do fast incremental compiles
1735                           [disabled]
1736   --disable-precompiled-headers
1737                           disable using precompiled headers when compiling C++
1738                           [enabled]
1739   --disable-ccache        disable using ccache to speed up recompilations
1740                           [enabled]
1741 
1742 Optional Packages:
1743   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1744   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1745   --with-custom-make-dir  use this directory for custom build/make files
1746   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1747                           support it), e.g. --with-target-bits=32 [guessed]
1748   --with-sys-root         pass this sys-root to the compilers and tools (for
1749                           cross-compiling)
1750   --with-tools-dir        search this directory for compilers and tools (for
1751                           cross-compiling)
1752   --with-devkit           use this directory as base for tools-dir and
1753                           sys-root (for cross-compiling)
1754   --with-jdk-variant      JDK variant to build (normal) [normal]
1755   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1756   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1757                           client, minimal1, kernel, zero, zeroshark, core)
1758                           [server]
1759   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1760                           [release]
1761   --with-conf-name        use this as the name of the configuration [generated
1762                           from important configuration options]
1763   --with-builddeps-conf   use this configuration file for the builddeps
1764   --with-builddeps-server download and use build dependencies from this server
1765                           url
1766   --with-builddeps-dir    store downloaded build dependencies here
1767                           [/localhome/builddeps]
1768   --with-builddeps-group  chgrp the downloaded build dependencies to this
1769                           group
1770   --with-cacerts-file     specify alternative cacerts file
1771   --with-milestone        Set milestone value for build [internal]
1772   --with-update-version   Set update version value for build [b00]
1773   --with-user-release-suffix
1774                           Add a custom string to the version string if build
1775                           number isn't set.[username_builddateb00]
1776   --with-build-number     Set build number value for build [b00]
1777   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1778   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1779                           invocations of the Boot JDK, overriding the default
1780                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1781                           -enableassertions"
1782   --with-add-source-root  for each and every source directory, look in this
1783                           additional source root for the same directory; if it
1784                           exists and have files in it, include it in the build
1785   --with-override-source-root
1786                           for each and every source directory, look in this
1787                           override source root for the same directory; if it
1788                           exists, use that directory instead and ignore the
1789                           directory in the original source root
1790   --with-adds-and-overrides
1791                           use the subdirs 'adds' and 'overrides' in the
1792                           specified directory as add-source-root and
1793                           override-source-root
1794   --with-override-langtools
1795                           use this langtools dir for the build
1796   --with-override-corba   use this corba dir for the build
1797   --with-override-jaxp    use this jaxp dir for the build
1798   --with-override-jaxws   use this jaxws dir for the build
1799   --with-override-hotspot use this hotspot dir for the build
1800   --with-override-nashorn use this nashorn dir for the build
1801   --with-override-jdk     use this jdk dir for the build
1802   --with-import-hotspot   import hotspot binaries from this jdk image or
1803                           hotspot build dist dir instead of building from
1804                           source
1805   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1806                           only) [probed]
1807   --with-dxsdk            Deprecated. Option is kept for backwards
1808                           compatibility and is ignored
1809   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1810                           compatibility and is ignored
1811   --with-dxsdk-include    Deprecated. Option is kept for backwards
1812                           compatibility and is ignored
1813   --with-jtreg            Regression Test Harness [probed]
1814   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1815   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1816   --with-extra-ldflags    extra flags to be used when linking jdk
1817   --with-x                use the X Window System
1818   --with-cups             specify prefix directory for the cups package
1819                           (expecting the headers under PATH/include)
1820   --with-cups-include     specify directory for the cups include files
1821   --with-freetype         specify prefix directory for the freetype package
1822                           (expecting the libraries under PATH/lib and the
1823                           headers under PATH/include)
1824   --with-freetype-include specify directory for the freetype include files
1825   --with-freetype-lib     specify directory for the freetype library
1826   --with-alsa             specify prefix directory for the alsa package
1827                           (expecting the libraries under PATH/lib and the
1828                           headers under PATH/include)
1829   --with-alsa-include     specify directory for the alsa include files
1830   --with-alsa-lib         specify directory for the alsa library
1831   --with-giflib           use giflib from build system or OpenJDK source
1832                           (system, bundled) [bundled]
1833   --with-zlib             use zlib from build system or OpenJDK source
1834                           (system, bundled) [bundled]
1835   --with-stdc++lib=<static>,<dynamic>,<default>
1836                           force linking of the C++ runtime on Linux to either
1837                           static or dynamic, default is static with dynamic as
1838                           fallback
1839   --with-num-cores        number of cores in the build system, e.g.
1840                           --with-num-cores=8 [probed]
1841   --with-memory-size      memory (in MB) available in the build system, e.g.
1842                           --with-memory-size=1024 [probed]
1843   --with-jobs             number of parallel jobs to let make run [calculated
1844                           based on cores and memory]
1845   --with-sjavac-server-java
1846                           use this java binary for running the sjavac
1847                           background server [Boot JDK java]
1848   --with-ccache-dir       where to store ccache files [~/.ccache]
1849 
1850 Some influential environment variables:
1851   PKG_CONFIG  path to pkg-config utility
1852   CC          C compiler command
1853   CFLAGS      C compiler flags
1854   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1855               nonstandard directory <lib dir>
1856   LIBS        libraries to pass to the linker, e.g. -l<library>
1857   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1858               you have headers in a nonstandard directory <include dir>
1859   CXX         C++ compiler command
1860   CXXFLAGS    C++ compiler flags
1861   OBJC        Objective C compiler command
1862   OBJCFLAGS   Objective C compiler flags
1863   CPP         C preprocessor
1864   CXXCPP      C++ preprocessor
1865   XMKMF       Path to xmkmf, Makefile generator for X Window System
1866   FREETYPE_CFLAGS
1867               C compiler flags for FREETYPE, overriding pkg-config
1868   FREETYPE_LIBS
1869               linker flags for FREETYPE, overriding pkg-config
1870   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1871   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1872   LIBFFI_CFLAGS
1873               C compiler flags for LIBFFI, overriding pkg-config
1874   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1875 
1876 Use these variables to override the choices made by `configure' or to help
1877 it to find libraries and programs with nonstandard names/locations.
1878 
1879 Report bugs to <build-dev@openjdk.java.net>.
1880 OpenJDK home page: <http://openjdk.java.net>.
1881 _ACEOF
1882 ac_status=$?
1883 fi
1884 
1885 if test "$ac_init_help" = "recursive"; then
1886   # If there are subdirs, report their specific --help.
1887   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1888     test -d "$ac_dir" ||
1889       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1890       continue
1891     ac_builddir=.
1892 
1893 case "$ac_dir" in
1894 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1895 *)
1896   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1897   # A ".." for each directory in $ac_dir_suffix.
1898   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1899   case $ac_top_builddir_sub in
1900   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1901   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1902   esac ;;
1903 esac
1904 ac_abs_top_builddir=$ac_pwd
1905 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1906 # for backward compatibility:
1907 ac_top_builddir=$ac_top_build_prefix
1908 
1909 case $srcdir in
1910   .)  # We are building in place.
1911     ac_srcdir=.
1912     ac_top_srcdir=$ac_top_builddir_sub
1913     ac_abs_top_srcdir=$ac_pwd ;;
1914   [\\/]* | ?:[\\/]* )  # Absolute name.
1915     ac_srcdir=$srcdir$ac_dir_suffix;
1916     ac_top_srcdir=$srcdir
1917     ac_abs_top_srcdir=$srcdir ;;
1918   *) # Relative name.
1919     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1920     ac_top_srcdir=$ac_top_build_prefix$srcdir
1921     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1922 esac
1923 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1924 
1925     cd "$ac_dir" || { ac_status=$?; continue; }
1926     # Check for guested configure.
1927     if test -f "$ac_srcdir/configure.gnu"; then
1928       echo &&
1929       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1930     elif test -f "$ac_srcdir/configure"; then
1931       echo &&
1932       $SHELL "$ac_srcdir/configure" --help=recursive
1933     else
1934       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1935     fi || ac_status=$?
1936     cd "$ac_pwd" || { ac_status=$?; break; }
1937   done
1938 fi
1939 
1940 test -n "$ac_init_help" && exit $ac_status
1941 if $ac_init_version; then
1942   cat <<\_ACEOF
1943 OpenJDK configure jdk8
1944 generated by GNU Autoconf 2.69
1945 
1946 Copyright (C) 2012 Free Software Foundation, Inc.
1947 This configure script is free software; the Free Software Foundation
1948 gives unlimited permission to copy, distribute and modify it.
1949 _ACEOF
1950   exit
1951 fi
1952 
1953 ## ------------------------ ##
1954 ## Autoconf initialization. ##
1955 ## ------------------------ ##
1956 
1957 # ac_fn_c_try_compile LINENO
1958 # --------------------------
1959 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1960 ac_fn_c_try_compile ()
1961 {
1962   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1963   rm -f conftest.$ac_objext
1964   if { { ac_try="$ac_compile"
1965 case "(($ac_try" in
1966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967   *) ac_try_echo=$ac_try;;
1968 esac
1969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970 $as_echo "$ac_try_echo"; } >&5
1971   (eval "$ac_compile") 2>conftest.err
1972   ac_status=$?
1973   if test -s conftest.err; then
1974     grep -v '^ *+' conftest.err >conftest.er1
1975     cat conftest.er1 >&5
1976     mv -f conftest.er1 conftest.err
1977   fi
1978   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979   test $ac_status = 0; } && {
1980          test -z "$ac_c_werror_flag" ||
1981          test ! -s conftest.err
1982        } && test -s conftest.$ac_objext; then :
1983   ac_retval=0
1984 else
1985   $as_echo "$as_me: failed program was:" >&5
1986 sed 's/^/| /' conftest.$ac_ext >&5
1987 
1988         ac_retval=1
1989 fi
1990   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1991   as_fn_set_status $ac_retval
1992 
1993 } # ac_fn_c_try_compile
1994 
1995 # ac_fn_cxx_try_compile LINENO
1996 # ----------------------------
1997 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1998 ac_fn_cxx_try_compile ()
1999 {
2000   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001   rm -f conftest.$ac_objext
2002   if { { ac_try="$ac_compile"
2003 case "(($ac_try" in
2004   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2005   *) ac_try_echo=$ac_try;;
2006 esac
2007 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2008 $as_echo "$ac_try_echo"; } >&5
2009   (eval "$ac_compile") 2>conftest.err
2010   ac_status=$?
2011   if test -s conftest.err; then
2012     grep -v '^ *+' conftest.err >conftest.er1
2013     cat conftest.er1 >&5
2014     mv -f conftest.er1 conftest.err
2015   fi
2016   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2017   test $ac_status = 0; } && {
2018          test -z "$ac_cxx_werror_flag" ||
2019          test ! -s conftest.err
2020        } && test -s conftest.$ac_objext; then :
2021   ac_retval=0
2022 else
2023   $as_echo "$as_me: failed program was:" >&5
2024 sed 's/^/| /' conftest.$ac_ext >&5
2025 
2026         ac_retval=1
2027 fi
2028   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2029   as_fn_set_status $ac_retval
2030 
2031 } # ac_fn_cxx_try_compile
2032 
2033 # ac_fn_objc_try_compile LINENO
2034 # -----------------------------
2035 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2036 ac_fn_objc_try_compile ()
2037 {
2038   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039   rm -f conftest.$ac_objext
2040   if { { ac_try="$ac_compile"
2041 case "(($ac_try" in
2042   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2043   *) ac_try_echo=$ac_try;;
2044 esac
2045 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2046 $as_echo "$ac_try_echo"; } >&5
2047   (eval "$ac_compile") 2>conftest.err
2048   ac_status=$?
2049   if test -s conftest.err; then
2050     grep -v '^ *+' conftest.err >conftest.er1
2051     cat conftest.er1 >&5
2052     mv -f conftest.er1 conftest.err
2053   fi
2054   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2055   test $ac_status = 0; } && {
2056          test -z "$ac_objc_werror_flag" ||
2057          test ! -s conftest.err
2058        } && test -s conftest.$ac_objext; then :
2059   ac_retval=0
2060 else
2061   $as_echo "$as_me: failed program was:" >&5
2062 sed 's/^/| /' conftest.$ac_ext >&5
2063 
2064         ac_retval=1
2065 fi
2066   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2067   as_fn_set_status $ac_retval
2068 
2069 } # ac_fn_objc_try_compile
2070 
2071 # ac_fn_c_try_cpp LINENO
2072 # ----------------------
2073 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2074 ac_fn_c_try_cpp ()
2075 {
2076   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2077   if { { ac_try="$ac_cpp conftest.$ac_ext"
2078 case "(($ac_try" in
2079   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2080   *) ac_try_echo=$ac_try;;
2081 esac
2082 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2083 $as_echo "$ac_try_echo"; } >&5
2084   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2085   ac_status=$?
2086   if test -s conftest.err; then
2087     grep -v '^ *+' conftest.err >conftest.er1
2088     cat conftest.er1 >&5
2089     mv -f conftest.er1 conftest.err
2090   fi
2091   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2092   test $ac_status = 0; } > conftest.i && {
2093          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2094          test ! -s conftest.err
2095        }; then :
2096   ac_retval=0
2097 else
2098   $as_echo "$as_me: failed program was:" >&5
2099 sed 's/^/| /' conftest.$ac_ext >&5
2100 
2101     ac_retval=1
2102 fi
2103   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2104   as_fn_set_status $ac_retval
2105 
2106 } # ac_fn_c_try_cpp
2107 
2108 # ac_fn_cxx_try_cpp LINENO
2109 # ------------------------
2110 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2111 ac_fn_cxx_try_cpp ()
2112 {
2113   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114   if { { ac_try="$ac_cpp conftest.$ac_ext"
2115 case "(($ac_try" in
2116   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2117   *) ac_try_echo=$ac_try;;
2118 esac
2119 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2120 $as_echo "$ac_try_echo"; } >&5
2121   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2122   ac_status=$?
2123   if test -s conftest.err; then
2124     grep -v '^ *+' conftest.err >conftest.er1
2125     cat conftest.er1 >&5
2126     mv -f conftest.er1 conftest.err
2127   fi
2128   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2129   test $ac_status = 0; } > conftest.i && {
2130          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2131          test ! -s conftest.err
2132        }; then :
2133   ac_retval=0
2134 else
2135   $as_echo "$as_me: failed program was:" >&5
2136 sed 's/^/| /' conftest.$ac_ext >&5
2137 
2138     ac_retval=1
2139 fi
2140   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2141   as_fn_set_status $ac_retval
2142 
2143 } # ac_fn_cxx_try_cpp
2144 
2145 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2146 # ---------------------------------------------------------
2147 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2148 # the include files in INCLUDES and setting the cache variable VAR
2149 # accordingly.
2150 ac_fn_cxx_check_header_mongrel ()
2151 {
2152   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153   if eval \${$3+:} false; then :
2154   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2155 $as_echo_n "checking for $2... " >&6; }
2156 if eval \${$3+:} false; then :
2157   $as_echo_n "(cached) " >&6
2158 fi
2159 eval ac_res=\$$3
2160                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2161 $as_echo "$ac_res" >&6; }
2162 else
2163   # Is the header compilable?
2164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2165 $as_echo_n "checking $2 usability... " >&6; }
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h.  */
2168 $4
2169 #include <$2>
2170 _ACEOF
2171 if ac_fn_cxx_try_compile "$LINENO"; then :
2172   ac_header_compiler=yes
2173 else
2174   ac_header_compiler=no
2175 fi
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2178 $as_echo "$ac_header_compiler" >&6; }
2179 
2180 # Is the header present?
2181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2182 $as_echo_n "checking $2 presence... " >&6; }
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184 /* end confdefs.h.  */
2185 #include <$2>
2186 _ACEOF
2187 if ac_fn_cxx_try_cpp "$LINENO"; then :
2188   ac_header_preproc=yes
2189 else
2190   ac_header_preproc=no
2191 fi
2192 rm -f conftest.err conftest.i conftest.$ac_ext
2193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2194 $as_echo "$ac_header_preproc" >&6; }
2195 
2196 # So?  What about this header?
2197 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2198   yes:no: )
2199     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2200 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2201     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2202 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2203     ;;
2204   no:yes:* )
2205     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2206 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2207     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2208 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2209     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2210 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2211     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2212 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2213     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2214 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2215 ( $as_echo "## ----------------------------------------- ##
2216 ## Report this to build-dev@openjdk.java.net ##
2217 ## ----------------------------------------- ##"
2218      ) | sed "s/^/$as_me: WARNING:     /" >&2
2219     ;;
2220 esac
2221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2222 $as_echo_n "checking for $2... " >&6; }
2223 if eval \${$3+:} false; then :
2224   $as_echo_n "(cached) " >&6
2225 else
2226   eval "$3=\$ac_header_compiler"
2227 fi
2228 eval ac_res=\$$3
2229                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230 $as_echo "$ac_res" >&6; }
2231 fi
2232   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2233 
2234 } # ac_fn_cxx_check_header_mongrel
2235 
2236 # ac_fn_cxx_try_run LINENO
2237 # ------------------------
2238 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2239 # that executables *can* be run.
2240 ac_fn_cxx_try_run ()
2241 {
2242   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243   if { { ac_try="$ac_link"
2244 case "(($ac_try" in
2245   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2246   *) ac_try_echo=$ac_try;;
2247 esac
2248 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2249 $as_echo "$ac_try_echo"; } >&5
2250   (eval "$ac_link") 2>&5
2251   ac_status=$?
2252   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2254   { { case "(($ac_try" in
2255   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2256   *) ac_try_echo=$ac_try;;
2257 esac
2258 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2259 $as_echo "$ac_try_echo"; } >&5
2260   (eval "$ac_try") 2>&5
2261   ac_status=$?
2262   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2263   test $ac_status = 0; }; }; then :
2264   ac_retval=0
2265 else
2266   $as_echo "$as_me: program exited with status $ac_status" >&5
2267        $as_echo "$as_me: failed program was:" >&5
2268 sed 's/^/| /' conftest.$ac_ext >&5
2269 
2270        ac_retval=$ac_status
2271 fi
2272   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2273   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274   as_fn_set_status $ac_retval
2275 
2276 } # ac_fn_cxx_try_run
2277 
2278 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2279 # ---------------------------------------------------------
2280 # Tests whether HEADER exists and can be compiled using the include files in
2281 # INCLUDES, setting the cache variable VAR accordingly.
2282 ac_fn_cxx_check_header_compile ()
2283 {
2284   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286 $as_echo_n "checking for $2... " >&6; }
2287 if eval \${$3+:} false; then :
2288   $as_echo_n "(cached) " >&6
2289 else
2290   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291 /* end confdefs.h.  */
2292 $4
2293 #include <$2>
2294 _ACEOF
2295 if ac_fn_cxx_try_compile "$LINENO"; then :
2296   eval "$3=yes"
2297 else
2298   eval "$3=no"
2299 fi
2300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2301 fi
2302 eval ac_res=\$$3
2303                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2304 $as_echo "$ac_res" >&6; }
2305   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2306 
2307 } # ac_fn_cxx_check_header_compile
2308 
2309 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2310 # ----------------------------------------------
2311 # Tries to find the compile-time value of EXPR in a program that includes
2312 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2313 # computed
2314 ac_fn_cxx_compute_int ()
2315 {
2316   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2317   if test "$cross_compiling" = yes; then
2318     # Depending upon the size, compute the lo and hi bounds.
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320 /* end confdefs.h.  */
2321 $4
2322 int
2323 main ()
2324 {
2325 static int test_array [1 - 2 * !(($2) >= 0)];
2326 test_array [0] = 0;
2327 return test_array [0];
2328 
2329   ;
2330   return 0;
2331 }
2332 _ACEOF
2333 if ac_fn_cxx_try_compile "$LINENO"; then :
2334   ac_lo=0 ac_mid=0
2335   while :; do
2336     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2337 /* end confdefs.h.  */
2338 $4
2339 int
2340 main ()
2341 {
2342 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2343 test_array [0] = 0;
2344 return test_array [0];
2345 
2346   ;
2347   return 0;
2348 }
2349 _ACEOF
2350 if ac_fn_cxx_try_compile "$LINENO"; then :
2351   ac_hi=$ac_mid; break
2352 else
2353   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2354                         if test $ac_lo -le $ac_mid; then
2355                           ac_lo= ac_hi=
2356                           break
2357                         fi
2358                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2359 fi
2360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361   done
2362 else
2363   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364 /* end confdefs.h.  */
2365 $4
2366 int
2367 main ()
2368 {
2369 static int test_array [1 - 2 * !(($2) < 0)];
2370 test_array [0] = 0;
2371 return test_array [0];
2372 
2373   ;
2374   return 0;
2375 }
2376 _ACEOF
2377 if ac_fn_cxx_try_compile "$LINENO"; then :
2378   ac_hi=-1 ac_mid=-1
2379   while :; do
2380     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381 /* end confdefs.h.  */
2382 $4
2383 int
2384 main ()
2385 {
2386 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2387 test_array [0] = 0;
2388 return test_array [0];
2389 
2390   ;
2391   return 0;
2392 }
2393 _ACEOF
2394 if ac_fn_cxx_try_compile "$LINENO"; then :
2395   ac_lo=$ac_mid; break
2396 else
2397   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2398                         if test $ac_mid -le $ac_hi; then
2399                           ac_lo= ac_hi=
2400                           break
2401                         fi
2402                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2403 fi
2404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405   done
2406 else
2407   ac_lo= ac_hi=
2408 fi
2409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410 fi
2411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412 # Binary search between lo and hi bounds.
2413 while test "x$ac_lo" != "x$ac_hi"; do
2414   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2415   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416 /* end confdefs.h.  */
2417 $4
2418 int
2419 main ()
2420 {
2421 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2422 test_array [0] = 0;
2423 return test_array [0];
2424 
2425   ;
2426   return 0;
2427 }
2428 _ACEOF
2429 if ac_fn_cxx_try_compile "$LINENO"; then :
2430   ac_hi=$ac_mid
2431 else
2432   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2433 fi
2434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435 done
2436 case $ac_lo in #((
2437 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2438 '') ac_retval=1 ;;
2439 esac
2440   else
2441     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442 /* end confdefs.h.  */
2443 $4
2444 static long int longval () { return $2; }
2445 static unsigned long int ulongval () { return $2; }
2446 #include <stdio.h>
2447 #include <stdlib.h>
2448 int
2449 main ()
2450 {
2451 
2452   FILE *f = fopen ("conftest.val", "w");
2453   if (! f)
2454     return 1;
2455   if (($2) < 0)
2456     {
2457       long int i = longval ();
2458       if (i != ($2))
2459         return 1;
2460       fprintf (f, "%ld", i);
2461     }
2462   else
2463     {
2464       unsigned long int i = ulongval ();
2465       if (i != ($2))
2466         return 1;
2467       fprintf (f, "%lu", i);
2468     }
2469   /* Do not output a trailing newline, as this causes \r\n confusion
2470      on some platforms.  */
2471   return ferror (f) || fclose (f) != 0;
2472 
2473   ;
2474   return 0;
2475 }
2476 _ACEOF
2477 if ac_fn_cxx_try_run "$LINENO"; then :
2478   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2479 else
2480   ac_retval=1
2481 fi
2482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2483   conftest.$ac_objext conftest.beam conftest.$ac_ext
2484 rm -f conftest.val
2485 
2486   fi
2487   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488   as_fn_set_status $ac_retval
2489 
2490 } # ac_fn_cxx_compute_int
2491 
2492 # ac_fn_cxx_try_link LINENO
2493 # -------------------------
2494 # Try to link conftest.$ac_ext, and return whether this succeeded.
2495 ac_fn_cxx_try_link ()
2496 {
2497   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2498   rm -f conftest.$ac_objext conftest$ac_exeext
2499   if { { ac_try="$ac_link"
2500 case "(($ac_try" in
2501   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2502   *) ac_try_echo=$ac_try;;
2503 esac
2504 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2505 $as_echo "$ac_try_echo"; } >&5
2506   (eval "$ac_link") 2>conftest.err
2507   ac_status=$?
2508   if test -s conftest.err; then
2509     grep -v '^ *+' conftest.err >conftest.er1
2510     cat conftest.er1 >&5
2511     mv -f conftest.er1 conftest.err
2512   fi
2513   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514   test $ac_status = 0; } && {
2515          test -z "$ac_cxx_werror_flag" ||
2516          test ! -s conftest.err
2517        } && test -s conftest$ac_exeext && {
2518          test "$cross_compiling" = yes ||
2519          test -x conftest$ac_exeext
2520        }; then :
2521   ac_retval=0
2522 else
2523   $as_echo "$as_me: failed program was:" >&5
2524 sed 's/^/| /' conftest.$ac_ext >&5
2525 
2526         ac_retval=1
2527 fi
2528   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2529   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2530   # interfere with the next link command; also delete a directory that is
2531   # left behind by Apple's compiler.  We do this before executing the actions.
2532   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2533   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2534   as_fn_set_status $ac_retval
2535 
2536 } # ac_fn_cxx_try_link
2537 
2538 # ac_fn_cxx_check_func LINENO FUNC VAR
2539 # ------------------------------------
2540 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2541 ac_fn_cxx_check_func ()
2542 {
2543   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2544   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2545 $as_echo_n "checking for $2... " >&6; }
2546 if eval \${$3+:} false; then :
2547   $as_echo_n "(cached) " >&6
2548 else
2549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550 /* end confdefs.h.  */
2551 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2552    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2553 #define $2 innocuous_$2
2554 
2555 /* System header to define __stub macros and hopefully few prototypes,
2556     which can conflict with char $2 (); below.
2557     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2558     <limits.h> exists even on freestanding compilers.  */
2559 
2560 #ifdef __STDC__
2561 # include <limits.h>
2562 #else
2563 # include <assert.h>
2564 #endif
2565 
2566 #undef $2
2567 
2568 /* Override any GCC internal prototype to avoid an error.
2569    Use char because int might match the return type of a GCC
2570    builtin and then its argument prototype would still apply.  */
2571 #ifdef __cplusplus
2572 extern "C"
2573 #endif
2574 char $2 ();
2575 /* The GNU C library defines this for functions which it implements
2576     to always fail with ENOSYS.  Some functions are actually named
2577     something starting with __ and the normal name is an alias.  */
2578 #if defined __stub_$2 || defined __stub___$2
2579 choke me
2580 #endif
2581 
2582 int
2583 main ()
2584 {
2585 return $2 ();
2586   ;
2587   return 0;
2588 }
2589 _ACEOF
2590 if ac_fn_cxx_try_link "$LINENO"; then :
2591   eval "$3=yes"
2592 else
2593   eval "$3=no"
2594 fi
2595 rm -f core conftest.err conftest.$ac_objext \
2596     conftest$ac_exeext conftest.$ac_ext
2597 fi
2598 eval ac_res=\$$3
2599                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600 $as_echo "$ac_res" >&6; }
2601   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602 
2603 } # ac_fn_cxx_check_func
2604 
2605 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2606 # -------------------------------------------------------
2607 # Tests whether HEADER exists and can be compiled using the include files in
2608 # INCLUDES, setting the cache variable VAR accordingly.
2609 ac_fn_c_check_header_compile ()
2610 {
2611   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2613 $as_echo_n "checking for $2... " >&6; }
2614 if eval \${$3+:} false; then :
2615   $as_echo_n "(cached) " >&6
2616 else
2617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618 /* end confdefs.h.  */
2619 $4
2620 #include <$2>
2621 _ACEOF
2622 if ac_fn_c_try_compile "$LINENO"; then :
2623   eval "$3=yes"
2624 else
2625   eval "$3=no"
2626 fi
2627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2628 fi
2629 eval ac_res=\$$3
2630                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2631 $as_echo "$ac_res" >&6; }
2632   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2633 
2634 } # ac_fn_c_check_header_compile
2635 cat >config.log <<_ACEOF
2636 This file contains any messages produced by compilers while
2637 running configure, to aid debugging if configure makes a mistake.
2638 
2639 It was created by OpenJDK $as_me jdk8, which was
2640 generated by GNU Autoconf 2.69.  Invocation command line was
2641 
2642   $ $0 $@
2643 
2644 _ACEOF
2645 exec 5>>config.log
2646 {
2647 cat <<_ASUNAME
2648 ## --------- ##
2649 ## Platform. ##
2650 ## --------- ##
2651 
2652 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2653 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2654 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2655 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2656 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2657 
2658 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2659 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2660 
2661 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2662 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2663 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2664 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2665 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2666 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2667 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2668 
2669 _ASUNAME
2670 
2671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2672 for as_dir in $PATH
2673 do
2674   IFS=$as_save_IFS
2675   test -z "$as_dir" && as_dir=.
2676     $as_echo "PATH: $as_dir"
2677   done
2678 IFS=$as_save_IFS
2679 
2680 } >&5
2681 
2682 cat >&5 <<_ACEOF
2683 
2684 
2685 ## ----------- ##
2686 ## Core tests. ##
2687 ## ----------- ##
2688 
2689 _ACEOF
2690 
2691 
2692 # Keep a trace of the command line.
2693 # Strip out --no-create and --no-recursion so they do not pile up.
2694 # Strip out --silent because we don't want to record it for future runs.
2695 # Also quote any args containing shell meta-characters.
2696 # Make two passes to allow for proper duplicate-argument suppression.
2697 ac_configure_args=
2698 ac_configure_args0=
2699 ac_configure_args1=
2700 ac_must_keep_next=false
2701 for ac_pass in 1 2
2702 do
2703   for ac_arg
2704   do
2705     case $ac_arg in
2706     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2707     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2708     | -silent | --silent | --silen | --sile | --sil)
2709       continue ;;
2710     *\'*)
2711       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2712     esac
2713     case $ac_pass in
2714     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2715     2)
2716       as_fn_append ac_configure_args1 " '$ac_arg'"
2717       if test $ac_must_keep_next = true; then
2718         ac_must_keep_next=false # Got value, back to normal.
2719       else
2720         case $ac_arg in
2721           *=* | --config-cache | -C | -disable-* | --disable-* \
2722           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2723           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2724           | -with-* | --with-* | -without-* | --without-* | --x)
2725             case "$ac_configure_args0 " in
2726               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2727             esac
2728             ;;
2729           -* ) ac_must_keep_next=true ;;
2730         esac
2731       fi
2732       as_fn_append ac_configure_args " '$ac_arg'"
2733       ;;
2734     esac
2735   done
2736 done
2737 { ac_configure_args0=; unset ac_configure_args0;}
2738 { ac_configure_args1=; unset ac_configure_args1;}
2739 
2740 # When interrupted or exit'd, cleanup temporary files, and complete
2741 # config.log.  We remove comments because anyway the quotes in there
2742 # would cause problems or look ugly.
2743 # WARNING: Use '\'' to represent an apostrophe within the trap.
2744 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2745 trap 'exit_status=$?
2746   # Save into config.log some information that might help in debugging.
2747   {
2748     echo
2749 
2750     $as_echo "## ---------------- ##
2751 ## Cache variables. ##
2752 ## ---------------- ##"
2753     echo
2754     # The following way of writing the cache mishandles newlines in values,
2755 (
2756   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2757     eval ac_val=\$$ac_var
2758     case $ac_val in #(
2759     *${as_nl}*)
2760       case $ac_var in #(
2761       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2762 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2763       esac
2764       case $ac_var in #(
2765       _ | IFS | as_nl) ;; #(
2766       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2767       *) { eval $ac_var=; unset $ac_var;} ;;
2768       esac ;;
2769     esac
2770   done
2771   (set) 2>&1 |
2772     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2773     *${as_nl}ac_space=\ *)
2774       sed -n \
2775         "s/'\''/'\''\\\\'\'''\''/g;
2776           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2777       ;; #(
2778     *)
2779       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2780       ;;
2781     esac |
2782     sort
2783 )
2784     echo
2785 
2786     $as_echo "## ----------------- ##
2787 ## Output variables. ##
2788 ## ----------------- ##"
2789     echo
2790     for ac_var in $ac_subst_vars
2791     do
2792       eval ac_val=\$$ac_var
2793       case $ac_val in
2794       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2795       esac
2796       $as_echo "$ac_var='\''$ac_val'\''"
2797     done | sort
2798     echo
2799 
2800     if test -n "$ac_subst_files"; then
2801       $as_echo "## ------------------- ##
2802 ## File substitutions. ##
2803 ## ------------------- ##"
2804       echo
2805       for ac_var in $ac_subst_files
2806       do
2807         eval ac_val=\$$ac_var
2808         case $ac_val in
2809         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2810         esac
2811         $as_echo "$ac_var='\''$ac_val'\''"
2812       done | sort
2813       echo
2814     fi
2815 
2816     if test -s confdefs.h; then
2817       $as_echo "## ----------- ##
2818 ## confdefs.h. ##
2819 ## ----------- ##"
2820       echo
2821       cat confdefs.h
2822       echo
2823     fi
2824     test "$ac_signal" != 0 &&
2825       $as_echo "$as_me: caught signal $ac_signal"
2826     $as_echo "$as_me: exit $exit_status"
2827   } >&5
2828   rm -f core *.core core.conftest.* &&
2829     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2830     exit $exit_status
2831 ' 0
2832 for ac_signal in 1 2 13 15; do
2833   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2834 done
2835 ac_signal=0
2836 
2837 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2838 rm -f -r conftest* confdefs.h
2839 
2840 $as_echo "/* confdefs.h */" > confdefs.h
2841 
2842 # Predefined preprocessor variables.
2843 
2844 cat >>confdefs.h <<_ACEOF
2845 #define PACKAGE_NAME "$PACKAGE_NAME"
2846 _ACEOF
2847 
2848 cat >>confdefs.h <<_ACEOF
2849 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2850 _ACEOF
2851 
2852 cat >>confdefs.h <<_ACEOF
2853 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2854 _ACEOF
2855 
2856 cat >>confdefs.h <<_ACEOF
2857 #define PACKAGE_STRING "$PACKAGE_STRING"
2858 _ACEOF
2859 
2860 cat >>confdefs.h <<_ACEOF
2861 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2862 _ACEOF
2863 
2864 cat >>confdefs.h <<_ACEOF
2865 #define PACKAGE_URL "$PACKAGE_URL"
2866 _ACEOF
2867 
2868 
2869 # Let the site file select an alternate cache file if it wants to.
2870 # Prefer an explicitly selected file to automatically selected ones.
2871 ac_site_file1=NONE
2872 ac_site_file2=NONE
2873 if test -n "$CONFIG_SITE"; then
2874   # We do not want a PATH search for config.site.
2875   case $CONFIG_SITE in #((
2876     -*)  ac_site_file1=./$CONFIG_SITE;;
2877     */*) ac_site_file1=$CONFIG_SITE;;
2878     *)   ac_site_file1=./$CONFIG_SITE;;
2879   esac
2880 elif test "x$prefix" != xNONE; then
2881   ac_site_file1=$prefix/share/config.site
2882   ac_site_file2=$prefix/etc/config.site
2883 else
2884   ac_site_file1=$ac_default_prefix/share/config.site
2885   ac_site_file2=$ac_default_prefix/etc/config.site
2886 fi
2887 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2888 do
2889   test "x$ac_site_file" = xNONE && continue
2890   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2891     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2892 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2893     sed 's/^/| /' "$ac_site_file" >&5
2894     . "$ac_site_file" \
2895       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2896 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2897 as_fn_error $? "failed to load site script $ac_site_file
2898 See \`config.log' for more details" "$LINENO" 5; }
2899   fi
2900 done
2901 
2902 if test -r "$cache_file"; then
2903   # Some versions of bash will fail to source /dev/null (special files
2904   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2905   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2906     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2907 $as_echo "$as_me: loading cache $cache_file" >&6;}
2908     case $cache_file in
2909       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2910       *)                      . "./$cache_file";;
2911     esac
2912   fi
2913 else
2914   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2915 $as_echo "$as_me: creating cache $cache_file" >&6;}
2916   >$cache_file
2917 fi
2918 
2919 # Check that the precious variables saved in the cache have kept the same
2920 # value.
2921 ac_cache_corrupted=false
2922 for ac_var in $ac_precious_vars; do
2923   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2924   eval ac_new_set=\$ac_env_${ac_var}_set
2925   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2926   eval ac_new_val=\$ac_env_${ac_var}_value
2927   case $ac_old_set,$ac_new_set in
2928     set,)
2929       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2930 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2931       ac_cache_corrupted=: ;;
2932     ,set)
2933       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2934 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2935       ac_cache_corrupted=: ;;
2936     ,);;
2937     *)
2938       if test "x$ac_old_val" != "x$ac_new_val"; then
2939         # differences in whitespace do not lead to failure.
2940         ac_old_val_w=`echo x $ac_old_val`
2941         ac_new_val_w=`echo x $ac_new_val`
2942         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2943           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2944 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2945           ac_cache_corrupted=:
2946         else
2947           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2948 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2949           eval $ac_var=\$ac_old_val
2950         fi
2951         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2952 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2953         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2954 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2955       fi;;
2956   esac
2957   # Pass precious variables to config.status.
2958   if test "$ac_new_set" = set; then
2959     case $ac_new_val in
2960     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2961     *) ac_arg=$ac_var=$ac_new_val ;;
2962     esac
2963     case " $ac_configure_args " in
2964       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2965       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2966     esac
2967   fi
2968 done
2969 if $ac_cache_corrupted; then
2970   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2971 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2972   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2973 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2974   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2975 fi
2976 ## -------------------- ##
2977 ## Main body of script. ##
2978 ## -------------------- ##
2979 
2980 ac_ext=c
2981 ac_cpp='$CPP $CPPFLAGS'
2982 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2983 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2984 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2985 
2986 
2987 
2988 ac_aux_dir=
2989 for ac_dir in build-aux "$srcdir"/build-aux; do
2990   if test -f "$ac_dir/install-sh"; then
2991     ac_aux_dir=$ac_dir
2992     ac_install_sh="$ac_aux_dir/install-sh -c"
2993     break
2994   elif 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/shtool"; then
2999     ac_aux_dir=$ac_dir
3000     ac_install_sh="$ac_aux_dir/shtool install -c"
3001     break
3002   fi
3003 done
3004 if test -z "$ac_aux_dir"; then
3005   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3006 fi
3007 
3008 # These three variables are undocumented and unsupported,
3009 # and are intended to be withdrawn in a future Autoconf release.
3010 # They can cause serious problems if a builder's source tree is in a directory
3011 # whose full name contains unusual characters.
3012 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3013 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3014 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3015 
3016 
3017 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3018 
3019 #
3020 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3021 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3022 #
3023 # This code is free software; you can redistribute it and/or modify it
3024 # under the terms of the GNU General Public License version 2 only, as
3025 # published by the Free Software Foundation.  Oracle designates this
3026 # particular file as subject to the "Classpath" exception as provided
3027 # by Oracle in the LICENSE file that accompanied this code.
3028 #
3029 # This code is distributed in the hope that it will be useful, but WITHOUT
3030 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3031 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3032 # version 2 for more details (a copy is included in the LICENSE file that
3033 # accompanied this code).
3034 #
3035 # You should have received a copy of the GNU General Public License version
3036 # 2 along with this work; if not, write to the Free Software Foundation,
3037 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3038 #
3039 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3040 # or visit www.oracle.com if you need additional information or have any
3041 # questions.
3042 #
3043 
3044 #
3045 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3046 #
3047 # This program is free software; you can redistribute it and/or modify
3048 # it under the terms of the GNU General Public License as published by
3049 # the Free Software Foundation; either version 2 of the License, or
3050 # (at your option) any later version.
3051 #
3052 # This program is distributed in the hope that it will be useful, but
3053 # WITHOUT ANY WARRANTY; without even the implied warranty of
3054 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3055 # General Public License for more details.
3056 #
3057 # You should have received a copy of the GNU General Public License
3058 # along with this program; if not, write to the Free Software
3059 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3060 #
3061 # As a special exception to the GNU General Public License, if you
3062 # distribute this file as part of a program that contains a
3063 # configuration script generated by Autoconf, you may include it under
3064 # the same distribution terms that you use for the rest of that program.
3065 
3066 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3067 # ----------------------------------
3068 # PKG_PROG_PKG_CONFIG
3069 
3070 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3071 #
3072 # Check to see whether a particular set of modules exists.  Similar
3073 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3074 #
3075 #
3076 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3077 # this or PKG_CHECK_MODULES is called, or make sure to call
3078 # PKG_CHECK_EXISTS manually
3079 # --------------------------------------------------------------
3080 
3081 
3082 
3083 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3084 # ---------------------------------------------
3085 # _PKG_CONFIG
3086 
3087 # _PKG_SHORT_ERRORS_SUPPORTED
3088 # -----------------------------
3089 # _PKG_SHORT_ERRORS_SUPPORTED
3090 
3091 
3092 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3093 # [ACTION-IF-NOT-FOUND])
3094 #
3095 #
3096 # Note that if there is a possibility the first call to
3097 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3098 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3099 #
3100 #
3101 # --------------------------------------------------------------
3102 # PKG_CHECK_MODULES
3103 
3104 
3105 # Include these first...
3106 #
3107 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3108 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3109 #
3110 # This code is free software; you can redistribute it and/or modify it
3111 # under the terms of the GNU General Public License version 2 only, as
3112 # published by the Free Software Foundation.  Oracle designates this
3113 # particular file as subject to the "Classpath" exception as provided
3114 # by Oracle in the LICENSE file that accompanied this code.
3115 #
3116 # This code is distributed in the hope that it will be useful, but WITHOUT
3117 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3118 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3119 # version 2 for more details (a copy is included in the LICENSE file that
3120 # accompanied this code).
3121 #
3122 # You should have received a copy of the GNU General Public License version
3123 # 2 along with this work; if not, write to the Free Software Foundation,
3124 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3125 #
3126 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3127 # or visit www.oracle.com if you need additional information or have any
3128 # questions.
3129 #
3130 
3131 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3132 # If so, then append $1 to $2 \
3133 # Also set JVM_ARG_OK to true/false depending on outcome.
3134 
3135 
3136 # Appends a string to a path variable, only adding the : when needed.
3137 
3138 
3139 # This will make sure the given variable points to a full and proper
3140 # path. This means:
3141 # 1) There will be no spaces in the path. On posix platforms,
3142 #    spaces in the path will result in an error. On Windows,
3143 #    the path will be rewritten using short-style to be space-free.
3144 # 2) The path will be absolute, and it will be in unix-style (on
3145 #     cygwin).
3146 # $1: The name of the variable to fix
3147 
3148 
3149 # This will make sure the given variable points to a executable
3150 # with a full and proper path. This means:
3151 # 1) There will be no spaces in the path. On posix platforms,
3152 #    spaces in the path will result in an error. On Windows,
3153 #    the path will be rewritten using short-style to be space-free.
3154 # 2) The path will be absolute, and it will be in unix-style (on
3155 #     cygwin).
3156 # Any arguments given to the executable is preserved.
3157 # If the input variable does not have a directory specification, then
3158 # it need to be in the PATH.
3159 # $1: The name of the variable to fix
3160 
3161 
3162 
3163 
3164 # Register a --with argument but mark it as deprecated
3165 # $1: The name of the with argument to deprecate, not including --with-
3166 
3167 
3168 # Register a --enable argument but mark it as deprecated
3169 # $1: The name of the with argument to deprecate, not including --enable-
3170 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3171 
3172 
3173 
3174 
3175 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3176 # $1: variable to check
3177 # $2: executable name to print in warning (optional)
3178 
3179 
3180 # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3181 # Arguments as AC_PATH_PROG:
3182 # $1: variable to set
3183 # $2: executable name to look for
3184 
3185 
3186 # Setup the most fundamental tools that relies on not much else to set up,
3187 # but is used by much of the early bootstrap code.
3188 
3189 
3190 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3191 
3192 
3193 
3194 
3195 
3196 
3197 
3198 #%%% Simple tools %%%
3199 
3200 # Check if we have found a usable version of make
3201 # $1: the path to a potential make binary (or empty)
3202 # $2: the description on how we found this
3203 
3204 
3205 # Goes looking for a usable version of GNU make.
3206 
3207 
3208 
3209 
3210 
3211 
3212 # Check if build directory is on local disk. If not possible to determine,
3213 # we prefer to claim it's local.
3214 # Argument 1: directory to test
3215 # Argument 2: what to do if it is on local disk
3216 # Argument 3: what to do otherwise (remote disk or failure)
3217 
3218 
3219 # Check that source files have basic read permissions set. This might
3220 # not be the case in cygwin in certain conditions.
3221 
3222 
3223 
3224 
3225 #
3226 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3227 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3228 #
3229 # This code is free software; you can redistribute it and/or modify it
3230 # under the terms of the GNU General Public License version 2 only, as
3231 # published by the Free Software Foundation.  Oracle designates this
3232 # particular file as subject to the "Classpath" exception as provided
3233 # by Oracle in the LICENSE file that accompanied this code.
3234 #
3235 # This code is distributed in the hope that it will be useful, but WITHOUT
3236 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3237 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3238 # version 2 for more details (a copy is included in the LICENSE file that
3239 # accompanied this code).
3240 #
3241 # You should have received a copy of the GNU General Public License version
3242 # 2 along with this work; if not, write to the Free Software Foundation,
3243 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3244 #
3245 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3246 # or visit www.oracle.com if you need additional information or have any
3247 # questions.
3248 #
3249 
3250 
3251 
3252 
3253 
3254 # Helper function which possibly converts a path using DOS-style short mode.
3255 # If so, the updated path is stored in $new_path.
3256 # $1: The path to check
3257 
3258 
3259 # Helper function which possibly converts a path using DOS-style short mode.
3260 # If so, the updated path is stored in $new_path.
3261 # $1: The path to check
3262 
3263 
3264 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3265 # and could probably be heavily simplified. However, all changes in this
3266 # area tend to need lot of testing in different scenarios, and in lack of
3267 # proper unit testing, cleaning this up has not been deemed worth the effort
3268 # at the moment.
3269 
3270 
3271 
3272 
3273 
3274 
3275 
3276 
3277 
3278 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3279 
3280 
3281 
3282 
3283 #
3284 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3285 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3286 #
3287 # This code is free software; you can redistribute it and/or modify it
3288 # under the terms of the GNU General Public License version 2 only, as
3289 # published by the Free Software Foundation.  Oracle designates this
3290 # particular file as subject to the "Classpath" exception as provided
3291 # by Oracle in the LICENSE file that accompanied this code.
3292 #
3293 # This code is distributed in the hope that it will be useful, but WITHOUT
3294 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3295 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3296 # version 2 for more details (a copy is included in the LICENSE file that
3297 # accompanied this code).
3298 #
3299 # You should have received a copy of the GNU General Public License version
3300 # 2 along with this work; if not, write to the Free Software Foundation,
3301 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3302 #
3303 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3304 # or visit www.oracle.com if you need additional information or have any
3305 # questions.
3306 #
3307 
3308 
3309 
3310 
3311 
3312 
3313 
3314 
3315 
3316 
3317 
3318 # ... then the rest
3319 #
3320 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3321 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3322 #
3323 # This code is free software; you can redistribute it and/or modify it
3324 # under the terms of the GNU General Public License version 2 only, as
3325 # published by the Free Software Foundation.  Oracle designates this
3326 # particular file as subject to the "Classpath" exception as provided
3327 # by Oracle in the LICENSE file that accompanied this code.
3328 #
3329 # This code is distributed in the hope that it will be useful, but WITHOUT
3330 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3331 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3332 # version 2 for more details (a copy is included in the LICENSE file that
3333 # accompanied this code).
3334 #
3335 # You should have received a copy of the GNU General Public License version
3336 # 2 along with this work; if not, write to the Free Software Foundation,
3337 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3338 #
3339 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3340 # or visit www.oracle.com if you need additional information or have any
3341 # questions.
3342 #
3343 
3344 # Execute the check given as argument, and verify the result
3345 # If the Boot JDK was previously found, do nothing
3346 # $1 A command line (typically autoconf macro) to execute
3347 
3348 
3349 # Test: Is bootjdk explicitely set by command line arguments?
3350 
3351 
3352 # Test: Is bootjdk available from builddeps?
3353 
3354 
3355 # Test: Is $JAVA_HOME set?
3356 
3357 
3358 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3359 
3360 
3361 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3362 
3363 
3364 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3365 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3366 # $1 = Path to directory containing jdk installations.
3367 # $2 = String to append to the found JDK directory to get the proper JDK home
3368 
3369 
3370 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3371 # environmental variable as base for where to look.
3372 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3373 
3374 
3375 # Test: Is there a JDK installed in default, well-known locations?
3376 
3377 
3378 # Check that a command-line tool in the Boot JDK is correct
3379 # $1 = name of variable to assign
3380 # $2 = name of binary
3381 
3382 
3383 ###############################################################################
3384 #
3385 # We need a Boot JDK to bootstrap the build.
3386 #
3387 
3388 
3389 
3390 
3391 
3392 #
3393 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3394 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3395 #
3396 # This code is free software; you can redistribute it and/or modify it
3397 # under the terms of the GNU General Public License version 2 only, as
3398 # published by the Free Software Foundation.  Oracle designates this
3399 # particular file as subject to the "Classpath" exception as provided
3400 # by Oracle in the LICENSE file that accompanied this code.
3401 #
3402 # This code is distributed in the hope that it will be useful, but WITHOUT
3403 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3404 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3405 # version 2 for more details (a copy is included in the LICENSE file that
3406 # accompanied this code).
3407 #
3408 # You should have received a copy of the GNU General Public License version
3409 # 2 along with this work; if not, write to the Free Software Foundation,
3410 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3411 #
3412 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3413 # or visit www.oracle.com if you need additional information or have any
3414 # questions.
3415 #
3416 
3417 
3418 
3419 
3420 
3421 
3422 
3423 
3424 
3425 
3426 
3427 
3428 
3429 
3430 
3431 
3432 
3433 
3434 
3435 
3436 #
3437 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3438 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3439 #
3440 # This code is free software; you can redistribute it and/or modify it
3441 # under the terms of the GNU General Public License version 2 only, as
3442 # published by the Free Software Foundation.  Oracle designates this
3443 # particular file as subject to the "Classpath" exception as provided
3444 # by Oracle in the LICENSE file that accompanied this code.
3445 #
3446 # This code is distributed in the hope that it will be useful, but WITHOUT
3447 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3448 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3449 # version 2 for more details (a copy is included in the LICENSE file that
3450 # accompanied this code).
3451 #
3452 # You should have received a copy of the GNU General Public License version
3453 # 2 along with this work; if not, write to the Free Software Foundation,
3454 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3455 #
3456 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3457 # or visit www.oracle.com if you need additional information or have any
3458 # questions.
3459 #
3460 
3461 
3462 
3463 
3464 
3465 cygwin_help() {
3466   case $1 in
3467     unzip)
3468       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3469       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3470       ;;
3471     zip)
3472       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3473       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3474       ;;
3475     make)
3476       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3477       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3478       ;;
3479     freetype)
3480       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3481         HELP_MSG="To install freetype, run:
3482 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3483 chmod +x /tmp/freetype-setup.exe
3484 /tmp/freetype-setup.exe
3485 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3486 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3487       else
3488         HELP_MSG="You need to build a 64-bit version of freetype.
3489 This is not readily available.
3490 You can find source code and build instructions on
3491 http://www.freetype.org/
3492 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3493       fi
3494       ;;
3495   esac
3496 }
3497 
3498 msys_help() {
3499   PKGHANDLER_COMMAND=""
3500 }
3501 
3502 apt_help() {
3503   case $1 in
3504     devkit)
3505       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3506     openjdk)
3507       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3508     alsa)
3509       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3510     cups)
3511       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3512     freetype)
3513       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3514     pulse)
3515       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3516     x11)
3517       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3518     ccache)
3519       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3520   esac
3521 }
3522 
3523 yum_help() {
3524   case $1 in
3525     devkit)
3526       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3527     openjdk)
3528       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3529     alsa)
3530       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3531     cups)
3532       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3533     freetype)
3534       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3535     pulse)
3536       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3537     x11)
3538       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3539     ccache)
3540       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3541   esac
3542 }
3543 
3544 port_help() {
3545   PKGHANDLER_COMMAND=""
3546 }
3547 
3548 pkgutil_help() {
3549   PKGHANDLER_COMMAND=""
3550 }
3551 
3552 pkgadd_help() {
3553   PKGHANDLER_COMMAND=""
3554 }
3555 
3556 
3557 
3558 #
3559 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3560 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3561 #
3562 # This code is free software; you can redistribute it and/or modify it
3563 # under the terms of the GNU General Public License version 2 only, as
3564 # published by the Free Software Foundation.  Oracle designates this
3565 # particular file as subject to the "Classpath" exception as provided
3566 # by Oracle in the LICENSE file that accompanied this code.
3567 #
3568 # This code is distributed in the hope that it will be useful, but WITHOUT
3569 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3570 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3571 # version 2 for more details (a copy is included in the LICENSE file that
3572 # accompanied this code).
3573 #
3574 # You should have received a copy of the GNU General Public License version
3575 # 2 along with this work; if not, write to the Free Software Foundation,
3576 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3577 #
3578 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3579 # or visit www.oracle.com if you need additional information or have any
3580 # questions.
3581 #
3582 
3583 
3584 
3585 
3586 
3587 
3588 
3589 
3590 
3591 
3592 ###############################################################################
3593 #
3594 # Should we build only OpenJDK even if closed sources are present?
3595 #
3596 
3597 
3598 
3599 
3600 ###############################################################################
3601 #
3602 # Setup version numbers
3603 #
3604 
3605 
3606 
3607 
3608 
3609 
3610 # Support for customization of the build process. Some build files
3611 # will include counterparts from this location, if they exist. This allows
3612 # for a degree of customization of the build targets and the rules/recipes
3613 # to create them
3614 
3615 # Check whether --with-custom-make-dir was given.
3616 if test "${with_custom_make_dir+set}" = set; then :
3617   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3618 fi
3619 
3620 
3621 
3622 #
3623 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3624 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3625 #
3626 # This code is free software; you can redistribute it and/or modify it
3627 # under the terms of the GNU General Public License version 2 only, as
3628 # published by the Free Software Foundation.  Oracle designates this
3629 # particular file as subject to the "Classpath" exception as provided
3630 # by Oracle in the LICENSE file that accompanied this code.
3631 #
3632 # This code is distributed in the hope that it will be useful, but WITHOUT
3633 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3634 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3635 # version 2 for more details (a copy is included in the LICENSE file that
3636 # accompanied this code).
3637 #
3638 # You should have received a copy of the GNU General Public License version
3639 # 2 along with this work; if not, write to the Free Software Foundation,
3640 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3641 #
3642 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3643 # or visit www.oracle.com if you need additional information or have any
3644 # questions.
3645 #
3646 
3647 
3648 
3649 
3650 
3651 
3652 
3653 
3654 
3655 
3656 
3657 
3658 
3659 
3660 
3661 
3662 
3663 #
3664 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3665 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3666 #
3667 # This code is free software; you can redistribute it and/or modify it
3668 # under the terms of the GNU General Public License version 2 only, as
3669 # published by the Free Software Foundation.  Oracle designates this
3670 # particular file as subject to the "Classpath" exception as provided
3671 # by Oracle in the LICENSE file that accompanied this code.
3672 #
3673 # This code is distributed in the hope that it will be useful, but WITHOUT
3674 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3675 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3676 # version 2 for more details (a copy is included in the LICENSE file that
3677 # accompanied this code).
3678 #
3679 # You should have received a copy of the GNU General Public License version
3680 # 2 along with this work; if not, write to the Free Software Foundation,
3681 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3682 #
3683 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3684 # or visit www.oracle.com if you need additional information or have any
3685 # questions.
3686 #
3687 
3688 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3689 # Converts autoconf style CPU name to OpenJDK style, into
3690 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3691 
3692 
3693 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3694 # Converts autoconf style OS name to OpenJDK style, into
3695 # VAR_OS and VAR_OS_API.
3696 
3697 
3698 # Expects $host_os $host_cpu $build_os and $build_cpu
3699 # and $with_target_bits to have been setup!
3700 #
3701 # Translate the standard triplet(quadruplet) definition
3702 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3703 # OPENJDK_BUILD_OS, etc.
3704 
3705 
3706 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3707 # accordingly. Must be done after setting up build and target system, but before
3708 # doing anything else with these values.
3709 
3710 
3711 # Setup the legacy variables, for controlling the old makefiles.
3712 #
3713 
3714 
3715 
3716 
3717 #%%% Build and target systems %%%
3718 
3719 
3720 
3721 
3722 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3723 # Add -mX to various FLAGS variables.
3724 
3725 
3726 
3727 
3728 
3729 
3730 #
3731 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3732 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3733 #
3734 # This code is free software; you can redistribute it and/or modify it
3735 # under the terms of the GNU General Public License version 2 only, as
3736 # published by the Free Software Foundation.  Oracle designates this
3737 # particular file as subject to the "Classpath" exception as provided
3738 # by Oracle in the LICENSE file that accompanied this code.
3739 #
3740 # This code is distributed in the hope that it will be useful, but WITHOUT
3741 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3742 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3743 # version 2 for more details (a copy is included in the LICENSE file that
3744 # accompanied this code).
3745 #
3746 # You should have received a copy of the GNU General Public License version
3747 # 2 along with this work; if not, write to the Free Software Foundation,
3748 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3749 #
3750 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3751 # or visit www.oracle.com if you need additional information or have any
3752 # questions.
3753 #
3754 
3755 
3756 
3757 
3758 
3759 
3760 
3761 
3762 #
3763 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3764 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3765 #
3766 # This code is free software; you can redistribute it and/or modify it
3767 # under the terms of the GNU General Public License version 2 only, as
3768 # published by the Free Software Foundation.  Oracle designates this
3769 # particular file as subject to the "Classpath" exception as provided
3770 # by Oracle in the LICENSE file that accompanied this code.
3771 #
3772 # This code is distributed in the hope that it will be useful, but WITHOUT
3773 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3774 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3775 # version 2 for more details (a copy is included in the LICENSE file that
3776 # accompanied this code).
3777 #
3778 # You should have received a copy of the GNU General Public License version
3779 # 2 along with this work; if not, write to the Free Software Foundation,
3780 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3781 #
3782 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3783 # or visit www.oracle.com if you need additional information or have any
3784 # questions.
3785 #
3786 
3787 # $1 = compiler to test (CC or CXX)
3788 # $2 = human readable name of compiler (C or C++)
3789 
3790 
3791 
3792 
3793 
3794 # $1 = compiler to test (CC or CXX)
3795 # $2 = human readable name of compiler (C or C++)
3796 # $3 = list of compiler names to search for
3797 
3798 
3799 
3800 
3801 
3802 
3803 
3804 
3805 
3806 
3807 
3808 
3809 
3810 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3811 #                                   [RUN-IF-FALSE])
3812 # ------------------------------------------------------------
3813 # Check that the c and c++ compilers support an argument
3814 
3815 
3816 
3817 
3818 # Setup the JTREG paths
3819 
3820 
3821 #
3822 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3823 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3824 #
3825 # This code is free software; you can redistribute it and/or modify it
3826 # under the terms of the GNU General Public License version 2 only, as
3827 # published by the Free Software Foundation.  Oracle designates this
3828 # particular file as subject to the "Classpath" exception as provided
3829 # by Oracle in the LICENSE file that accompanied this code.
3830 #
3831 # This code is distributed in the hope that it will be useful, but WITHOUT
3832 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3833 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3834 # version 2 for more details (a copy is included in the LICENSE file that
3835 # accompanied this code).
3836 #
3837 # You should have received a copy of the GNU General Public License version
3838 # 2 along with this work; if not, write to the Free Software Foundation,
3839 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3840 #
3841 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3842 # or visit www.oracle.com if you need additional information or have any
3843 # questions.
3844 #
3845 
3846 
3847 
3848 
3849 
3850 
3851 
3852 # Check if the VS env variables were setup prior to running configure.
3853 # If not, then find vcvarsall.bat and run it automatically, and integrate
3854 # the set env variables into the spec file.
3855 
3856 
3857 
3858 
3859 
3860 
3861 
3862 
3863 
3864 
3865 # This line needs to be here, verbatim, after all includes and the dummy hook
3866 # definitions. It is replaced with custom functionality when building
3867 # custom sources.
3868 #CUSTOM_AUTOCONF_INCLUDE
3869 
3870 # Do not change or remove the following line, it is needed for consistency checks:
3871 DATE_WHEN_GENERATED=1383701615
3872 
3873 ###############################################################################
3874 #
3875 # Initialization / Boot-strapping
3876 #
3877 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3878 # thus it jumps back and forth, each time gaining something needed later on.
3879 #
3880 ###############################################################################
3881 
3882 # Basic initialization that must happen first of all
3883 
3884   # Save the original command line. This is passed to us by the wrapper configure script.
3885 
3886   DATE_WHEN_CONFIGURED=`LANG=C date`
3887 
3888   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3889 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3890   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3891 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3892 
3893 
3894 
3895   # Start with tools that do not need have cross compilation support
3896   # and can be expected to be found in the default PATH. These tools are
3897   # used by configure. Nor are these tools expected to be found in the
3898   # devkit from the builddeps server either, since they are
3899   # needed to download the devkit.
3900 
3901   # First are all the simple required tools.
3902 
3903   for ac_prog in basename
3904 do
3905   # Extract the first word of "$ac_prog", so it can be a program name with args.
3906 set dummy $ac_prog; ac_word=$2
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908 $as_echo_n "checking for $ac_word... " >&6; }
3909 if ${ac_cv_path_BASENAME+:} false; then :
3910   $as_echo_n "(cached) " >&6
3911 else
3912   case $BASENAME in
3913   [\\/]* | ?:[\\/]*)
3914   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3915   ;;
3916   *)
3917   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3918 for as_dir in $PATH
3919 do
3920   IFS=$as_save_IFS
3921   test -z "$as_dir" && as_dir=.
3922     for ac_exec_ext in '' $ac_executable_extensions; do
3923   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3924     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3926     break 2
3927   fi
3928 done
3929   done
3930 IFS=$as_save_IFS
3931 
3932   ;;
3933 esac
3934 fi
3935 BASENAME=$ac_cv_path_BASENAME
3936 if test -n "$BASENAME"; then
3937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3938 $as_echo "$BASENAME" >&6; }
3939 else
3940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941 $as_echo "no" >&6; }
3942 fi
3943 
3944 
3945   test -n "$BASENAME" && break
3946 done
3947 
3948 
3949   if test "x$BASENAME" = x; then
3950     if test "xbasename" = x; then
3951       PROG_NAME=basename
3952     else
3953       PROG_NAME=basename
3954     fi
3955     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3956 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3957     as_fn_error $? "Cannot continue" "$LINENO" 5
3958   fi
3959 
3960 
3961 
3962   for ac_prog in bash
3963 do
3964   # Extract the first word of "$ac_prog", so it can be a program name with args.
3965 set dummy $ac_prog; ac_word=$2
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967 $as_echo_n "checking for $ac_word... " >&6; }
3968 if ${ac_cv_path_BASH+:} false; then :
3969   $as_echo_n "(cached) " >&6
3970 else
3971   case $BASH in
3972   [\\/]* | ?:[\\/]*)
3973   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3974   ;;
3975   *)
3976   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3977 for as_dir in $PATH
3978 do
3979   IFS=$as_save_IFS
3980   test -z "$as_dir" && as_dir=.
3981     for ac_exec_ext in '' $ac_executable_extensions; do
3982   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3983     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3985     break 2
3986   fi
3987 done
3988   done
3989 IFS=$as_save_IFS
3990 
3991   ;;
3992 esac
3993 fi
3994 BASH=$ac_cv_path_BASH
3995 if test -n "$BASH"; then
3996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3997 $as_echo "$BASH" >&6; }
3998 else
3999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4000 $as_echo "no" >&6; }
4001 fi
4002 
4003 
4004   test -n "$BASH" && break
4005 done
4006 
4007 
4008   if test "x$BASH" = x; then
4009     if test "xbash" = x; then
4010       PROG_NAME=bash
4011     else
4012       PROG_NAME=bash
4013     fi
4014     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4015 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4016     as_fn_error $? "Cannot continue" "$LINENO" 5
4017   fi
4018 
4019 
4020 
4021   for ac_prog in cat
4022 do
4023   # Extract the first word of "$ac_prog", so it can be a program name with args.
4024 set dummy $ac_prog; ac_word=$2
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026 $as_echo_n "checking for $ac_word... " >&6; }
4027 if ${ac_cv_path_CAT+:} false; then :
4028   $as_echo_n "(cached) " >&6
4029 else
4030   case $CAT in
4031   [\\/]* | ?:[\\/]*)
4032   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4033   ;;
4034   *)
4035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4036 for as_dir in $PATH
4037 do
4038   IFS=$as_save_IFS
4039   test -z "$as_dir" && as_dir=.
4040     for ac_exec_ext in '' $ac_executable_extensions; do
4041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4042     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4044     break 2
4045   fi
4046 done
4047   done
4048 IFS=$as_save_IFS
4049 
4050   ;;
4051 esac
4052 fi
4053 CAT=$ac_cv_path_CAT
4054 if test -n "$CAT"; then
4055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4056 $as_echo "$CAT" >&6; }
4057 else
4058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4059 $as_echo "no" >&6; }
4060 fi
4061 
4062 
4063   test -n "$CAT" && break
4064 done
4065 
4066 
4067   if test "x$CAT" = x; then
4068     if test "xcat" = x; then
4069       PROG_NAME=cat
4070     else
4071       PROG_NAME=cat
4072     fi
4073     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4074 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4075     as_fn_error $? "Cannot continue" "$LINENO" 5
4076   fi
4077 
4078 
4079 
4080   for ac_prog in chmod
4081 do
4082   # Extract the first word of "$ac_prog", so it can be a program name with args.
4083 set dummy $ac_prog; ac_word=$2
4084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4085 $as_echo_n "checking for $ac_word... " >&6; }
4086 if ${ac_cv_path_CHMOD+:} false; then :
4087   $as_echo_n "(cached) " >&6
4088 else
4089   case $CHMOD in
4090   [\\/]* | ?:[\\/]*)
4091   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4092   ;;
4093   *)
4094   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4095 for as_dir in $PATH
4096 do
4097   IFS=$as_save_IFS
4098   test -z "$as_dir" && as_dir=.
4099     for ac_exec_ext in '' $ac_executable_extensions; do
4100   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4101     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4102     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4103     break 2
4104   fi
4105 done
4106   done
4107 IFS=$as_save_IFS
4108 
4109   ;;
4110 esac
4111 fi
4112 CHMOD=$ac_cv_path_CHMOD
4113 if test -n "$CHMOD"; then
4114   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4115 $as_echo "$CHMOD" >&6; }
4116 else
4117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4118 $as_echo "no" >&6; }
4119 fi
4120 
4121 
4122   test -n "$CHMOD" && break
4123 done
4124 
4125 
4126   if test "x$CHMOD" = x; then
4127     if test "xchmod" = x; then
4128       PROG_NAME=chmod
4129     else
4130       PROG_NAME=chmod
4131     fi
4132     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4133 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4134     as_fn_error $? "Cannot continue" "$LINENO" 5
4135   fi
4136 
4137 
4138 
4139   for ac_prog in cmp
4140 do
4141   # Extract the first word of "$ac_prog", so it can be a program name with args.
4142 set dummy $ac_prog; ac_word=$2
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144 $as_echo_n "checking for $ac_word... " >&6; }
4145 if ${ac_cv_path_CMP+:} false; then :
4146   $as_echo_n "(cached) " >&6
4147 else
4148   case $CMP in
4149   [\\/]* | ?:[\\/]*)
4150   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4151   ;;
4152   *)
4153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4154 for as_dir in $PATH
4155 do
4156   IFS=$as_save_IFS
4157   test -z "$as_dir" && as_dir=.
4158     for ac_exec_ext in '' $ac_executable_extensions; do
4159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4160     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4162     break 2
4163   fi
4164 done
4165   done
4166 IFS=$as_save_IFS
4167 
4168   ;;
4169 esac
4170 fi
4171 CMP=$ac_cv_path_CMP
4172 if test -n "$CMP"; then
4173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4174 $as_echo "$CMP" >&6; }
4175 else
4176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4177 $as_echo "no" >&6; }
4178 fi
4179 
4180 
4181   test -n "$CMP" && break
4182 done
4183 
4184 
4185   if test "x$CMP" = x; then
4186     if test "xcmp" = x; then
4187       PROG_NAME=cmp
4188     else
4189       PROG_NAME=cmp
4190     fi
4191     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4192 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4193     as_fn_error $? "Cannot continue" "$LINENO" 5
4194   fi
4195 
4196 
4197 
4198   for ac_prog in comm
4199 do
4200   # Extract the first word of "$ac_prog", so it can be a program name with args.
4201 set dummy $ac_prog; ac_word=$2
4202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4203 $as_echo_n "checking for $ac_word... " >&6; }
4204 if ${ac_cv_path_COMM+:} false; then :
4205   $as_echo_n "(cached) " >&6
4206 else
4207   case $COMM in
4208   [\\/]* | ?:[\\/]*)
4209   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4210   ;;
4211   *)
4212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4213 for as_dir in $PATH
4214 do
4215   IFS=$as_save_IFS
4216   test -z "$as_dir" && as_dir=.
4217     for ac_exec_ext in '' $ac_executable_extensions; do
4218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4219     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4221     break 2
4222   fi
4223 done
4224   done
4225 IFS=$as_save_IFS
4226 
4227   ;;
4228 esac
4229 fi
4230 COMM=$ac_cv_path_COMM
4231 if test -n "$COMM"; then
4232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4233 $as_echo "$COMM" >&6; }
4234 else
4235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4236 $as_echo "no" >&6; }
4237 fi
4238 
4239 
4240   test -n "$COMM" && break
4241 done
4242 
4243 
4244   if test "x$COMM" = x; then
4245     if test "xcomm" = x; then
4246       PROG_NAME=comm
4247     else
4248       PROG_NAME=comm
4249     fi
4250     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4251 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4252     as_fn_error $? "Cannot continue" "$LINENO" 5
4253   fi
4254 
4255 
4256 
4257   for ac_prog in cp
4258 do
4259   # Extract the first word of "$ac_prog", so it can be a program name with args.
4260 set dummy $ac_prog; ac_word=$2
4261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4262 $as_echo_n "checking for $ac_word... " >&6; }
4263 if ${ac_cv_path_CP+:} false; then :
4264   $as_echo_n "(cached) " >&6
4265 else
4266   case $CP in
4267   [\\/]* | ?:[\\/]*)
4268   ac_cv_path_CP="$CP" # Let the user override the test with a path.
4269   ;;
4270   *)
4271   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272 for as_dir in $PATH
4273 do
4274   IFS=$as_save_IFS
4275   test -z "$as_dir" && as_dir=.
4276     for ac_exec_ext in '' $ac_executable_extensions; do
4277   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4278     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4279     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4280     break 2
4281   fi
4282 done
4283   done
4284 IFS=$as_save_IFS
4285 
4286   ;;
4287 esac
4288 fi
4289 CP=$ac_cv_path_CP
4290 if test -n "$CP"; then
4291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4292 $as_echo "$CP" >&6; }
4293 else
4294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4295 $as_echo "no" >&6; }
4296 fi
4297 
4298 
4299   test -n "$CP" && break
4300 done
4301 
4302 
4303   if test "x$CP" = x; then
4304     if test "xcp" = x; then
4305       PROG_NAME=cp
4306     else
4307       PROG_NAME=cp
4308     fi
4309     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4310 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4311     as_fn_error $? "Cannot continue" "$LINENO" 5
4312   fi
4313 
4314 
4315 
4316   for ac_prog in cpio
4317 do
4318   # Extract the first word of "$ac_prog", so it can be a program name with args.
4319 set dummy $ac_prog; ac_word=$2
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4321 $as_echo_n "checking for $ac_word... " >&6; }
4322 if ${ac_cv_path_CPIO+:} false; then :
4323   $as_echo_n "(cached) " >&6
4324 else
4325   case $CPIO in
4326   [\\/]* | ?:[\\/]*)
4327   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4328   ;;
4329   *)
4330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4331 for as_dir in $PATH
4332 do
4333   IFS=$as_save_IFS
4334   test -z "$as_dir" && as_dir=.
4335     for ac_exec_ext in '' $ac_executable_extensions; do
4336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4337     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4339     break 2
4340   fi
4341 done
4342   done
4343 IFS=$as_save_IFS
4344 
4345   ;;
4346 esac
4347 fi
4348 CPIO=$ac_cv_path_CPIO
4349 if test -n "$CPIO"; then
4350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4351 $as_echo "$CPIO" >&6; }
4352 else
4353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4354 $as_echo "no" >&6; }
4355 fi
4356 
4357 
4358   test -n "$CPIO" && break
4359 done
4360 
4361 
4362   if test "x$CPIO" = x; then
4363     if test "xcpio" = x; then
4364       PROG_NAME=cpio
4365     else
4366       PROG_NAME=cpio
4367     fi
4368     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4369 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4370     as_fn_error $? "Cannot continue" "$LINENO" 5
4371   fi
4372 
4373 
4374 
4375   for ac_prog in cut
4376 do
4377   # Extract the first word of "$ac_prog", so it can be a program name with args.
4378 set dummy $ac_prog; ac_word=$2
4379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4380 $as_echo_n "checking for $ac_word... " >&6; }
4381 if ${ac_cv_path_CUT+:} false; then :
4382   $as_echo_n "(cached) " >&6
4383 else
4384   case $CUT in
4385   [\\/]* | ?:[\\/]*)
4386   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4387   ;;
4388   *)
4389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390 for as_dir in $PATH
4391 do
4392   IFS=$as_save_IFS
4393   test -z "$as_dir" && as_dir=.
4394     for ac_exec_ext in '' $ac_executable_extensions; do
4395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4396     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4398     break 2
4399   fi
4400 done
4401   done
4402 IFS=$as_save_IFS
4403 
4404   ;;
4405 esac
4406 fi
4407 CUT=$ac_cv_path_CUT
4408 if test -n "$CUT"; then
4409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4410 $as_echo "$CUT" >&6; }
4411 else
4412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4413 $as_echo "no" >&6; }
4414 fi
4415 
4416 
4417   test -n "$CUT" && break
4418 done
4419 
4420 
4421   if test "x$CUT" = x; then
4422     if test "xcut" = x; then
4423       PROG_NAME=cut
4424     else
4425       PROG_NAME=cut
4426     fi
4427     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4428 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4429     as_fn_error $? "Cannot continue" "$LINENO" 5
4430   fi
4431 
4432 
4433 
4434   for ac_prog in date
4435 do
4436   # Extract the first word of "$ac_prog", so it can be a program name with args.
4437 set dummy $ac_prog; ac_word=$2
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4439 $as_echo_n "checking for $ac_word... " >&6; }
4440 if ${ac_cv_path_DATE+:} false; then :
4441   $as_echo_n "(cached) " >&6
4442 else
4443   case $DATE in
4444   [\\/]* | ?:[\\/]*)
4445   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4446   ;;
4447   *)
4448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449 for as_dir in $PATH
4450 do
4451   IFS=$as_save_IFS
4452   test -z "$as_dir" && as_dir=.
4453     for ac_exec_ext in '' $ac_executable_extensions; do
4454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4455     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4457     break 2
4458   fi
4459 done
4460   done
4461 IFS=$as_save_IFS
4462 
4463   ;;
4464 esac
4465 fi
4466 DATE=$ac_cv_path_DATE
4467 if test -n "$DATE"; then
4468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4469 $as_echo "$DATE" >&6; }
4470 else
4471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4472 $as_echo "no" >&6; }
4473 fi
4474 
4475 
4476   test -n "$DATE" && break
4477 done
4478 
4479 
4480   if test "x$DATE" = x; then
4481     if test "xdate" = x; then
4482       PROG_NAME=date
4483     else
4484       PROG_NAME=date
4485     fi
4486     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4487 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4488     as_fn_error $? "Cannot continue" "$LINENO" 5
4489   fi
4490 
4491 
4492 
4493   for ac_prog in gdiff diff
4494 do
4495   # Extract the first word of "$ac_prog", so it can be a program name with args.
4496 set dummy $ac_prog; ac_word=$2
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4498 $as_echo_n "checking for $ac_word... " >&6; }
4499 if ${ac_cv_path_DIFF+:} false; then :
4500   $as_echo_n "(cached) " >&6
4501 else
4502   case $DIFF in
4503   [\\/]* | ?:[\\/]*)
4504   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4505   ;;
4506   *)
4507   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4508 for as_dir in $PATH
4509 do
4510   IFS=$as_save_IFS
4511   test -z "$as_dir" && as_dir=.
4512     for ac_exec_ext in '' $ac_executable_extensions; do
4513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4514     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4516     break 2
4517   fi
4518 done
4519   done
4520 IFS=$as_save_IFS
4521 
4522   ;;
4523 esac
4524 fi
4525 DIFF=$ac_cv_path_DIFF
4526 if test -n "$DIFF"; then
4527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4528 $as_echo "$DIFF" >&6; }
4529 else
4530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4531 $as_echo "no" >&6; }
4532 fi
4533 
4534 
4535   test -n "$DIFF" && break
4536 done
4537 
4538 
4539   if test "x$DIFF" = x; then
4540     if test "xgdiff diff" = x; then
4541       PROG_NAME=diff
4542     else
4543       PROG_NAME=gdiff diff
4544     fi
4545     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4546 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4547     as_fn_error $? "Cannot continue" "$LINENO" 5
4548   fi
4549 
4550 
4551 
4552   for ac_prog in dirname
4553 do
4554   # Extract the first word of "$ac_prog", so it can be a program name with args.
4555 set dummy $ac_prog; ac_word=$2
4556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557 $as_echo_n "checking for $ac_word... " >&6; }
4558 if ${ac_cv_path_DIRNAME+:} false; then :
4559   $as_echo_n "(cached) " >&6
4560 else
4561   case $DIRNAME in
4562   [\\/]* | ?:[\\/]*)
4563   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4564   ;;
4565   *)
4566   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567 for as_dir in $PATH
4568 do
4569   IFS=$as_save_IFS
4570   test -z "$as_dir" && as_dir=.
4571     for ac_exec_ext in '' $ac_executable_extensions; do
4572   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4573     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4574     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575     break 2
4576   fi
4577 done
4578   done
4579 IFS=$as_save_IFS
4580 
4581   ;;
4582 esac
4583 fi
4584 DIRNAME=$ac_cv_path_DIRNAME
4585 if test -n "$DIRNAME"; then
4586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4587 $as_echo "$DIRNAME" >&6; }
4588 else
4589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590 $as_echo "no" >&6; }
4591 fi
4592 
4593 
4594   test -n "$DIRNAME" && break
4595 done
4596 
4597 
4598   if test "x$DIRNAME" = x; then
4599     if test "xdirname" = x; then
4600       PROG_NAME=dirname
4601     else
4602       PROG_NAME=dirname
4603     fi
4604     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4605 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4606     as_fn_error $? "Cannot continue" "$LINENO" 5
4607   fi
4608 
4609 
4610 
4611   for ac_prog in echo
4612 do
4613   # Extract the first word of "$ac_prog", so it can be a program name with args.
4614 set dummy $ac_prog; ac_word=$2
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616 $as_echo_n "checking for $ac_word... " >&6; }
4617 if ${ac_cv_path_ECHO+:} false; then :
4618   $as_echo_n "(cached) " >&6
4619 else
4620   case $ECHO in
4621   [\\/]* | ?:[\\/]*)
4622   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4623   ;;
4624   *)
4625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4626 for as_dir in $PATH
4627 do
4628   IFS=$as_save_IFS
4629   test -z "$as_dir" && as_dir=.
4630     for ac_exec_ext in '' $ac_executable_extensions; do
4631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4632     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4634     break 2
4635   fi
4636 done
4637   done
4638 IFS=$as_save_IFS
4639 
4640   ;;
4641 esac
4642 fi
4643 ECHO=$ac_cv_path_ECHO
4644 if test -n "$ECHO"; then
4645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4646 $as_echo "$ECHO" >&6; }
4647 else
4648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4649 $as_echo "no" >&6; }
4650 fi
4651 
4652 
4653   test -n "$ECHO" && break
4654 done
4655 
4656 
4657   if test "x$ECHO" = x; then
4658     if test "xecho" = x; then
4659       PROG_NAME=echo
4660     else
4661       PROG_NAME=echo
4662     fi
4663     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4664 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4665     as_fn_error $? "Cannot continue" "$LINENO" 5
4666   fi
4667 
4668 
4669 
4670   for ac_prog in expr
4671 do
4672   # Extract the first word of "$ac_prog", so it can be a program name with args.
4673 set dummy $ac_prog; ac_word=$2
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675 $as_echo_n "checking for $ac_word... " >&6; }
4676 if ${ac_cv_path_EXPR+:} false; then :
4677   $as_echo_n "(cached) " >&6
4678 else
4679   case $EXPR in
4680   [\\/]* | ?:[\\/]*)
4681   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4682   ;;
4683   *)
4684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685 for as_dir in $PATH
4686 do
4687   IFS=$as_save_IFS
4688   test -z "$as_dir" && as_dir=.
4689     for ac_exec_ext in '' $ac_executable_extensions; do
4690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693     break 2
4694   fi
4695 done
4696   done
4697 IFS=$as_save_IFS
4698 
4699   ;;
4700 esac
4701 fi
4702 EXPR=$ac_cv_path_EXPR
4703 if test -n "$EXPR"; then
4704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4705 $as_echo "$EXPR" >&6; }
4706 else
4707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4708 $as_echo "no" >&6; }
4709 fi
4710 
4711 
4712   test -n "$EXPR" && break
4713 done
4714 
4715 
4716   if test "x$EXPR" = x; then
4717     if test "xexpr" = x; then
4718       PROG_NAME=expr
4719     else
4720       PROG_NAME=expr
4721     fi
4722     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4723 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4724     as_fn_error $? "Cannot continue" "$LINENO" 5
4725   fi
4726 
4727 
4728 
4729   for ac_prog in file
4730 do
4731   # Extract the first word of "$ac_prog", so it can be a program name with args.
4732 set dummy $ac_prog; ac_word=$2
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734 $as_echo_n "checking for $ac_word... " >&6; }
4735 if ${ac_cv_path_FILE+:} false; then :
4736   $as_echo_n "(cached) " >&6
4737 else
4738   case $FILE in
4739   [\\/]* | ?:[\\/]*)
4740   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4741   ;;
4742   *)
4743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744 for as_dir in $PATH
4745 do
4746   IFS=$as_save_IFS
4747   test -z "$as_dir" && as_dir=.
4748     for ac_exec_ext in '' $ac_executable_extensions; do
4749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4750     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4752     break 2
4753   fi
4754 done
4755   done
4756 IFS=$as_save_IFS
4757 
4758   ;;
4759 esac
4760 fi
4761 FILE=$ac_cv_path_FILE
4762 if test -n "$FILE"; then
4763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4764 $as_echo "$FILE" >&6; }
4765 else
4766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4767 $as_echo "no" >&6; }
4768 fi
4769 
4770 
4771   test -n "$FILE" && break
4772 done
4773 
4774 
4775   if test "x$FILE" = x; then
4776     if test "xfile" = x; then
4777       PROG_NAME=file
4778     else
4779       PROG_NAME=file
4780     fi
4781     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4782 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4783     as_fn_error $? "Cannot continue" "$LINENO" 5
4784   fi
4785 
4786 
4787 
4788   for ac_prog in find
4789 do
4790   # Extract the first word of "$ac_prog", so it can be a program name with args.
4791 set dummy $ac_prog; ac_word=$2
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793 $as_echo_n "checking for $ac_word... " >&6; }
4794 if ${ac_cv_path_FIND+:} false; then :
4795   $as_echo_n "(cached) " >&6
4796 else
4797   case $FIND in
4798   [\\/]* | ?:[\\/]*)
4799   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4800   ;;
4801   *)
4802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4803 for as_dir in $PATH
4804 do
4805   IFS=$as_save_IFS
4806   test -z "$as_dir" && as_dir=.
4807     for ac_exec_ext in '' $ac_executable_extensions; do
4808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4809     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4811     break 2
4812   fi
4813 done
4814   done
4815 IFS=$as_save_IFS
4816 
4817   ;;
4818 esac
4819 fi
4820 FIND=$ac_cv_path_FIND
4821 if test -n "$FIND"; then
4822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4823 $as_echo "$FIND" >&6; }
4824 else
4825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826 $as_echo "no" >&6; }
4827 fi
4828 
4829 
4830   test -n "$FIND" && break
4831 done
4832 
4833 
4834   if test "x$FIND" = x; then
4835     if test "xfind" = x; then
4836       PROG_NAME=find
4837     else
4838       PROG_NAME=find
4839     fi
4840     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4841 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4842     as_fn_error $? "Cannot continue" "$LINENO" 5
4843   fi
4844 
4845 
4846 
4847   for ac_prog in head
4848 do
4849   # Extract the first word of "$ac_prog", so it can be a program name with args.
4850 set dummy $ac_prog; ac_word=$2
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4852 $as_echo_n "checking for $ac_word... " >&6; }
4853 if ${ac_cv_path_HEAD+:} false; then :
4854   $as_echo_n "(cached) " >&6
4855 else
4856   case $HEAD in
4857   [\\/]* | ?:[\\/]*)
4858   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4859   ;;
4860   *)
4861   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862 for as_dir in $PATH
4863 do
4864   IFS=$as_save_IFS
4865   test -z "$as_dir" && as_dir=.
4866     for ac_exec_ext in '' $ac_executable_extensions; do
4867   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4868     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4869     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4870     break 2
4871   fi
4872 done
4873   done
4874 IFS=$as_save_IFS
4875 
4876   ;;
4877 esac
4878 fi
4879 HEAD=$ac_cv_path_HEAD
4880 if test -n "$HEAD"; then
4881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4882 $as_echo "$HEAD" >&6; }
4883 else
4884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885 $as_echo "no" >&6; }
4886 fi
4887 
4888 
4889   test -n "$HEAD" && break
4890 done
4891 
4892 
4893   if test "x$HEAD" = x; then
4894     if test "xhead" = x; then
4895       PROG_NAME=head
4896     else
4897       PROG_NAME=head
4898     fi
4899     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4900 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4901     as_fn_error $? "Cannot continue" "$LINENO" 5
4902   fi
4903 
4904 
4905 
4906   for ac_prog in ln
4907 do
4908   # Extract the first word of "$ac_prog", so it can be a program name with args.
4909 set dummy $ac_prog; ac_word=$2
4910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4911 $as_echo_n "checking for $ac_word... " >&6; }
4912 if ${ac_cv_path_LN+:} false; then :
4913   $as_echo_n "(cached) " >&6
4914 else
4915   case $LN in
4916   [\\/]* | ?:[\\/]*)
4917   ac_cv_path_LN="$LN" # Let the user override the test with a path.
4918   ;;
4919   *)
4920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4921 for as_dir in $PATH
4922 do
4923   IFS=$as_save_IFS
4924   test -z "$as_dir" && as_dir=.
4925     for ac_exec_ext in '' $ac_executable_extensions; do
4926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4927     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4929     break 2
4930   fi
4931 done
4932   done
4933 IFS=$as_save_IFS
4934 
4935   ;;
4936 esac
4937 fi
4938 LN=$ac_cv_path_LN
4939 if test -n "$LN"; then
4940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4941 $as_echo "$LN" >&6; }
4942 else
4943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4944 $as_echo "no" >&6; }
4945 fi
4946 
4947 
4948   test -n "$LN" && break
4949 done
4950 
4951 
4952   if test "x$LN" = x; then
4953     if test "xln" = x; then
4954       PROG_NAME=ln
4955     else
4956       PROG_NAME=ln
4957     fi
4958     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4959 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4960     as_fn_error $? "Cannot continue" "$LINENO" 5
4961   fi
4962 
4963 
4964 
4965   for ac_prog in ls
4966 do
4967   # Extract the first word of "$ac_prog", so it can be a program name with args.
4968 set dummy $ac_prog; ac_word=$2
4969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4970 $as_echo_n "checking for $ac_word... " >&6; }
4971 if ${ac_cv_path_LS+:} false; then :
4972   $as_echo_n "(cached) " >&6
4973 else
4974   case $LS in
4975   [\\/]* | ?:[\\/]*)
4976   ac_cv_path_LS="$LS" # Let the user override the test with a path.
4977   ;;
4978   *)
4979   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980 for as_dir in $PATH
4981 do
4982   IFS=$as_save_IFS
4983   test -z "$as_dir" && as_dir=.
4984     for ac_exec_ext in '' $ac_executable_extensions; do
4985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4986     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4988     break 2
4989   fi
4990 done
4991   done
4992 IFS=$as_save_IFS
4993 
4994   ;;
4995 esac
4996 fi
4997 LS=$ac_cv_path_LS
4998 if test -n "$LS"; then
4999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
5000 $as_echo "$LS" >&6; }
5001 else
5002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5003 $as_echo "no" >&6; }
5004 fi
5005 
5006 
5007   test -n "$LS" && break
5008 done
5009 
5010 
5011   if test "x$LS" = x; then
5012     if test "xls" = x; then
5013       PROG_NAME=ls
5014     else
5015       PROG_NAME=ls
5016     fi
5017     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5018 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5019     as_fn_error $? "Cannot continue" "$LINENO" 5
5020   fi
5021 
5022 
5023 
5024   for ac_prog in mkdir
5025 do
5026   # Extract the first word of "$ac_prog", so it can be a program name with args.
5027 set dummy $ac_prog; ac_word=$2
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029 $as_echo_n "checking for $ac_word... " >&6; }
5030 if ${ac_cv_path_MKDIR+:} false; then :
5031   $as_echo_n "(cached) " >&6
5032 else
5033   case $MKDIR in
5034   [\\/]* | ?:[\\/]*)
5035   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
5036   ;;
5037   *)
5038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039 for as_dir in $PATH
5040 do
5041   IFS=$as_save_IFS
5042   test -z "$as_dir" && as_dir=.
5043     for ac_exec_ext in '' $ac_executable_extensions; do
5044   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5045     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
5046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5047     break 2
5048   fi
5049 done
5050   done
5051 IFS=$as_save_IFS
5052 
5053   ;;
5054 esac
5055 fi
5056 MKDIR=$ac_cv_path_MKDIR
5057 if test -n "$MKDIR"; then
5058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
5059 $as_echo "$MKDIR" >&6; }
5060 else
5061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062 $as_echo "no" >&6; }
5063 fi
5064 
5065 
5066   test -n "$MKDIR" && break
5067 done
5068 
5069 
5070   if test "x$MKDIR" = x; then
5071     if test "xmkdir" = x; then
5072       PROG_NAME=mkdir
5073     else
5074       PROG_NAME=mkdir
5075     fi
5076     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5077 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5078     as_fn_error $? "Cannot continue" "$LINENO" 5
5079   fi
5080 
5081 
5082 
5083   for ac_prog in mktemp
5084 do
5085   # Extract the first word of "$ac_prog", so it can be a program name with args.
5086 set dummy $ac_prog; ac_word=$2
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088 $as_echo_n "checking for $ac_word... " >&6; }
5089 if ${ac_cv_path_MKTEMP+:} false; then :
5090   $as_echo_n "(cached) " >&6
5091 else
5092   case $MKTEMP in
5093   [\\/]* | ?:[\\/]*)
5094   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5095   ;;
5096   *)
5097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098 for as_dir in $PATH
5099 do
5100   IFS=$as_save_IFS
5101   test -z "$as_dir" && as_dir=.
5102     for ac_exec_ext in '' $ac_executable_extensions; do
5103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106     break 2
5107   fi
5108 done
5109   done
5110 IFS=$as_save_IFS
5111 
5112   ;;
5113 esac
5114 fi
5115 MKTEMP=$ac_cv_path_MKTEMP
5116 if test -n "$MKTEMP"; then
5117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5118 $as_echo "$MKTEMP" >&6; }
5119 else
5120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121 $as_echo "no" >&6; }
5122 fi
5123 
5124 
5125   test -n "$MKTEMP" && break
5126 done
5127 
5128 
5129   if test "x$MKTEMP" = x; then
5130     if test "xmktemp" = x; then
5131       PROG_NAME=mktemp
5132     else
5133       PROG_NAME=mktemp
5134     fi
5135     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5136 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5137     as_fn_error $? "Cannot continue" "$LINENO" 5
5138   fi
5139 
5140 
5141 
5142   for ac_prog in mv
5143 do
5144   # Extract the first word of "$ac_prog", so it can be a program name with args.
5145 set dummy $ac_prog; ac_word=$2
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147 $as_echo_n "checking for $ac_word... " >&6; }
5148 if ${ac_cv_path_MV+:} false; then :
5149   $as_echo_n "(cached) " >&6
5150 else
5151   case $MV in
5152   [\\/]* | ?:[\\/]*)
5153   ac_cv_path_MV="$MV" # Let the user override the test with a path.
5154   ;;
5155   *)
5156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157 for as_dir in $PATH
5158 do
5159   IFS=$as_save_IFS
5160   test -z "$as_dir" && as_dir=.
5161     for ac_exec_ext in '' $ac_executable_extensions; do
5162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5163     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165     break 2
5166   fi
5167 done
5168   done
5169 IFS=$as_save_IFS
5170 
5171   ;;
5172 esac
5173 fi
5174 MV=$ac_cv_path_MV
5175 if test -n "$MV"; then
5176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5177 $as_echo "$MV" >&6; }
5178 else
5179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180 $as_echo "no" >&6; }
5181 fi
5182 
5183 
5184   test -n "$MV" && break
5185 done
5186 
5187 
5188   if test "x$MV" = x; then
5189     if test "xmv" = x; then
5190       PROG_NAME=mv
5191     else
5192       PROG_NAME=mv
5193     fi
5194     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5195 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5196     as_fn_error $? "Cannot continue" "$LINENO" 5
5197   fi
5198 
5199 
5200 
5201   for ac_prog in printf
5202 do
5203   # Extract the first word of "$ac_prog", so it can be a program name with args.
5204 set dummy $ac_prog; ac_word=$2
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206 $as_echo_n "checking for $ac_word... " >&6; }
5207 if ${ac_cv_path_PRINTF+:} false; then :
5208   $as_echo_n "(cached) " >&6
5209 else
5210   case $PRINTF in
5211   [\\/]* | ?:[\\/]*)
5212   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5213   ;;
5214   *)
5215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216 for as_dir in $PATH
5217 do
5218   IFS=$as_save_IFS
5219   test -z "$as_dir" && as_dir=.
5220     for ac_exec_ext in '' $ac_executable_extensions; do
5221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224     break 2
5225   fi
5226 done
5227   done
5228 IFS=$as_save_IFS
5229 
5230   ;;
5231 esac
5232 fi
5233 PRINTF=$ac_cv_path_PRINTF
5234 if test -n "$PRINTF"; then
5235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5236 $as_echo "$PRINTF" >&6; }
5237 else
5238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239 $as_echo "no" >&6; }
5240 fi
5241 
5242 
5243   test -n "$PRINTF" && break
5244 done
5245 
5246 
5247   if test "x$PRINTF" = x; then
5248     if test "xprintf" = x; then
5249       PROG_NAME=printf
5250     else
5251       PROG_NAME=printf
5252     fi
5253     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5254 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5255     as_fn_error $? "Cannot continue" "$LINENO" 5
5256   fi
5257 
5258 
5259 
5260   for ac_prog in rm
5261 do
5262   # Extract the first word of "$ac_prog", so it can be a program name with args.
5263 set dummy $ac_prog; ac_word=$2
5264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265 $as_echo_n "checking for $ac_word... " >&6; }
5266 if ${ac_cv_path_RM+:} false; then :
5267   $as_echo_n "(cached) " >&6
5268 else
5269   case $RM in
5270   [\\/]* | ?:[\\/]*)
5271   ac_cv_path_RM="$RM" # Let the user override the test with a path.
5272   ;;
5273   *)
5274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275 for as_dir in $PATH
5276 do
5277   IFS=$as_save_IFS
5278   test -z "$as_dir" && as_dir=.
5279     for ac_exec_ext in '' $ac_executable_extensions; do
5280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5281     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5283     break 2
5284   fi
5285 done
5286   done
5287 IFS=$as_save_IFS
5288 
5289   ;;
5290 esac
5291 fi
5292 RM=$ac_cv_path_RM
5293 if test -n "$RM"; then
5294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5295 $as_echo "$RM" >&6; }
5296 else
5297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298 $as_echo "no" >&6; }
5299 fi
5300 
5301 
5302   test -n "$RM" && break
5303 done
5304 
5305 
5306   if test "x$RM" = x; then
5307     if test "xrm" = x; then
5308       PROG_NAME=rm
5309     else
5310       PROG_NAME=rm
5311     fi
5312     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5313 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5314     as_fn_error $? "Cannot continue" "$LINENO" 5
5315   fi
5316 
5317 
5318 
5319   for ac_prog in sh
5320 do
5321   # Extract the first word of "$ac_prog", so it can be a program name with args.
5322 set dummy $ac_prog; ac_word=$2
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5324 $as_echo_n "checking for $ac_word... " >&6; }
5325 if ${ac_cv_path_SH+:} false; then :
5326   $as_echo_n "(cached) " >&6
5327 else
5328   case $SH in
5329   [\\/]* | ?:[\\/]*)
5330   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5331   ;;
5332   *)
5333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5334 for as_dir in $PATH
5335 do
5336   IFS=$as_save_IFS
5337   test -z "$as_dir" && as_dir=.
5338     for ac_exec_ext in '' $ac_executable_extensions; do
5339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5340     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5342     break 2
5343   fi
5344 done
5345   done
5346 IFS=$as_save_IFS
5347 
5348   ;;
5349 esac
5350 fi
5351 SH=$ac_cv_path_SH
5352 if test -n "$SH"; then
5353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5354 $as_echo "$SH" >&6; }
5355 else
5356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357 $as_echo "no" >&6; }
5358 fi
5359 
5360 
5361   test -n "$SH" && break
5362 done
5363 
5364 
5365   if test "x$SH" = x; then
5366     if test "xsh" = x; then
5367       PROG_NAME=sh
5368     else
5369       PROG_NAME=sh
5370     fi
5371     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5372 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5373     as_fn_error $? "Cannot continue" "$LINENO" 5
5374   fi
5375 
5376 
5377 
5378   for ac_prog in sort
5379 do
5380   # Extract the first word of "$ac_prog", so it can be a program name with args.
5381 set dummy $ac_prog; ac_word=$2
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5383 $as_echo_n "checking for $ac_word... " >&6; }
5384 if ${ac_cv_path_SORT+:} false; then :
5385   $as_echo_n "(cached) " >&6
5386 else
5387   case $SORT in
5388   [\\/]* | ?:[\\/]*)
5389   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5390   ;;
5391   *)
5392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5393 for as_dir in $PATH
5394 do
5395   IFS=$as_save_IFS
5396   test -z "$as_dir" && as_dir=.
5397     for ac_exec_ext in '' $ac_executable_extensions; do
5398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5399     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5401     break 2
5402   fi
5403 done
5404   done
5405 IFS=$as_save_IFS
5406 
5407   ;;
5408 esac
5409 fi
5410 SORT=$ac_cv_path_SORT
5411 if test -n "$SORT"; then
5412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5413 $as_echo "$SORT" >&6; }
5414 else
5415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5416 $as_echo "no" >&6; }
5417 fi
5418 
5419 
5420   test -n "$SORT" && break
5421 done
5422 
5423 
5424   if test "x$SORT" = x; then
5425     if test "xsort" = x; then
5426       PROG_NAME=sort
5427     else
5428       PROG_NAME=sort
5429     fi
5430     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5431 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5432     as_fn_error $? "Cannot continue" "$LINENO" 5
5433   fi
5434 
5435 
5436 
5437   for ac_prog in tail
5438 do
5439   # Extract the first word of "$ac_prog", so it can be a program name with args.
5440 set dummy $ac_prog; ac_word=$2
5441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442 $as_echo_n "checking for $ac_word... " >&6; }
5443 if ${ac_cv_path_TAIL+:} false; then :
5444   $as_echo_n "(cached) " >&6
5445 else
5446   case $TAIL in
5447   [\\/]* | ?:[\\/]*)
5448   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5449   ;;
5450   *)
5451   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452 for as_dir in $PATH
5453 do
5454   IFS=$as_save_IFS
5455   test -z "$as_dir" && as_dir=.
5456     for ac_exec_ext in '' $ac_executable_extensions; do
5457   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5459     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460     break 2
5461   fi
5462 done
5463   done
5464 IFS=$as_save_IFS
5465 
5466   ;;
5467 esac
5468 fi
5469 TAIL=$ac_cv_path_TAIL
5470 if test -n "$TAIL"; then
5471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5472 $as_echo "$TAIL" >&6; }
5473 else
5474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475 $as_echo "no" >&6; }
5476 fi
5477 
5478 
5479   test -n "$TAIL" && break
5480 done
5481 
5482 
5483   if test "x$TAIL" = x; then
5484     if test "xtail" = x; then
5485       PROG_NAME=tail
5486     else
5487       PROG_NAME=tail
5488     fi
5489     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5490 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5491     as_fn_error $? "Cannot continue" "$LINENO" 5
5492   fi
5493 
5494 
5495 
5496   for ac_prog in tar
5497 do
5498   # Extract the first word of "$ac_prog", so it can be a program name with args.
5499 set dummy $ac_prog; ac_word=$2
5500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5501 $as_echo_n "checking for $ac_word... " >&6; }
5502 if ${ac_cv_path_TAR+:} false; then :
5503   $as_echo_n "(cached) " >&6
5504 else
5505   case $TAR in
5506   [\\/]* | ?:[\\/]*)
5507   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5508   ;;
5509   *)
5510   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5511 for as_dir in $PATH
5512 do
5513   IFS=$as_save_IFS
5514   test -z "$as_dir" && as_dir=.
5515     for ac_exec_ext in '' $ac_executable_extensions; do
5516   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5517     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5518     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5519     break 2
5520   fi
5521 done
5522   done
5523 IFS=$as_save_IFS
5524 
5525   ;;
5526 esac
5527 fi
5528 TAR=$ac_cv_path_TAR
5529 if test -n "$TAR"; then
5530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5531 $as_echo "$TAR" >&6; }
5532 else
5533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5534 $as_echo "no" >&6; }
5535 fi
5536 
5537 
5538   test -n "$TAR" && break
5539 done
5540 
5541 
5542   if test "x$TAR" = x; then
5543     if test "xtar" = x; then
5544       PROG_NAME=tar
5545     else
5546       PROG_NAME=tar
5547     fi
5548     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5549 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5550     as_fn_error $? "Cannot continue" "$LINENO" 5
5551   fi
5552 
5553 
5554 
5555   for ac_prog in tee
5556 do
5557   # Extract the first word of "$ac_prog", so it can be a program name with args.
5558 set dummy $ac_prog; ac_word=$2
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560 $as_echo_n "checking for $ac_word... " >&6; }
5561 if ${ac_cv_path_TEE+:} false; then :
5562   $as_echo_n "(cached) " >&6
5563 else
5564   case $TEE in
5565   [\\/]* | ?:[\\/]*)
5566   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5567   ;;
5568   *)
5569   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5570 for as_dir in $PATH
5571 do
5572   IFS=$as_save_IFS
5573   test -z "$as_dir" && as_dir=.
5574     for ac_exec_ext in '' $ac_executable_extensions; do
5575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5576     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5578     break 2
5579   fi
5580 done
5581   done
5582 IFS=$as_save_IFS
5583 
5584   ;;
5585 esac
5586 fi
5587 TEE=$ac_cv_path_TEE
5588 if test -n "$TEE"; then
5589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5590 $as_echo "$TEE" >&6; }
5591 else
5592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5593 $as_echo "no" >&6; }
5594 fi
5595 
5596 
5597   test -n "$TEE" && break
5598 done
5599 
5600 
5601   if test "x$TEE" = x; then
5602     if test "xtee" = x; then
5603       PROG_NAME=tee
5604     else
5605       PROG_NAME=tee
5606     fi
5607     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5608 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5609     as_fn_error $? "Cannot continue" "$LINENO" 5
5610   fi
5611 
5612 
5613 
5614   for ac_prog in touch
5615 do
5616   # Extract the first word of "$ac_prog", so it can be a program name with args.
5617 set dummy $ac_prog; ac_word=$2
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5619 $as_echo_n "checking for $ac_word... " >&6; }
5620 if ${ac_cv_path_TOUCH+:} false; then :
5621   $as_echo_n "(cached) " >&6
5622 else
5623   case $TOUCH in
5624   [\\/]* | ?:[\\/]*)
5625   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5626   ;;
5627   *)
5628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5629 for as_dir in $PATH
5630 do
5631   IFS=$as_save_IFS
5632   test -z "$as_dir" && as_dir=.
5633     for ac_exec_ext in '' $ac_executable_extensions; do
5634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5635     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5637     break 2
5638   fi
5639 done
5640   done
5641 IFS=$as_save_IFS
5642 
5643   ;;
5644 esac
5645 fi
5646 TOUCH=$ac_cv_path_TOUCH
5647 if test -n "$TOUCH"; then
5648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5649 $as_echo "$TOUCH" >&6; }
5650 else
5651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5652 $as_echo "no" >&6; }
5653 fi
5654 
5655 
5656   test -n "$TOUCH" && break
5657 done
5658 
5659 
5660   if test "x$TOUCH" = x; then
5661     if test "xtouch" = x; then
5662       PROG_NAME=touch
5663     else
5664       PROG_NAME=touch
5665     fi
5666     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5667 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5668     as_fn_error $? "Cannot continue" "$LINENO" 5
5669   fi
5670 
5671 
5672 
5673   for ac_prog in tr
5674 do
5675   # Extract the first word of "$ac_prog", so it can be a program name with args.
5676 set dummy $ac_prog; ac_word=$2
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5678 $as_echo_n "checking for $ac_word... " >&6; }
5679 if ${ac_cv_path_TR+:} false; then :
5680   $as_echo_n "(cached) " >&6
5681 else
5682   case $TR in
5683   [\\/]* | ?:[\\/]*)
5684   ac_cv_path_TR="$TR" # Let the user override the test with a path.
5685   ;;
5686   *)
5687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5688 for as_dir in $PATH
5689 do
5690   IFS=$as_save_IFS
5691   test -z "$as_dir" && as_dir=.
5692     for ac_exec_ext in '' $ac_executable_extensions; do
5693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5694     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5696     break 2
5697   fi
5698 done
5699   done
5700 IFS=$as_save_IFS
5701 
5702   ;;
5703 esac
5704 fi
5705 TR=$ac_cv_path_TR
5706 if test -n "$TR"; then
5707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5708 $as_echo "$TR" >&6; }
5709 else
5710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711 $as_echo "no" >&6; }
5712 fi
5713 
5714 
5715   test -n "$TR" && break
5716 done
5717 
5718 
5719   if test "x$TR" = x; then
5720     if test "xtr" = x; then
5721       PROG_NAME=tr
5722     else
5723       PROG_NAME=tr
5724     fi
5725     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5726 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5727     as_fn_error $? "Cannot continue" "$LINENO" 5
5728   fi
5729 
5730 
5731 
5732   for ac_prog in uname
5733 do
5734   # Extract the first word of "$ac_prog", so it can be a program name with args.
5735 set dummy $ac_prog; ac_word=$2
5736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5737 $as_echo_n "checking for $ac_word... " >&6; }
5738 if ${ac_cv_path_UNAME+:} false; then :
5739   $as_echo_n "(cached) " >&6
5740 else
5741   case $UNAME in
5742   [\\/]* | ?:[\\/]*)
5743   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5744   ;;
5745   *)
5746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747 for as_dir in $PATH
5748 do
5749   IFS=$as_save_IFS
5750   test -z "$as_dir" && as_dir=.
5751     for ac_exec_ext in '' $ac_executable_extensions; do
5752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5753     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5755     break 2
5756   fi
5757 done
5758   done
5759 IFS=$as_save_IFS
5760 
5761   ;;
5762 esac
5763 fi
5764 UNAME=$ac_cv_path_UNAME
5765 if test -n "$UNAME"; then
5766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5767 $as_echo "$UNAME" >&6; }
5768 else
5769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5770 $as_echo "no" >&6; }
5771 fi
5772 
5773 
5774   test -n "$UNAME" && break
5775 done
5776 
5777 
5778   if test "x$UNAME" = x; then
5779     if test "xuname" = x; then
5780       PROG_NAME=uname
5781     else
5782       PROG_NAME=uname
5783     fi
5784     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5785 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5786     as_fn_error $? "Cannot continue" "$LINENO" 5
5787   fi
5788 
5789 
5790 
5791   for ac_prog in uniq
5792 do
5793   # Extract the first word of "$ac_prog", so it can be a program name with args.
5794 set dummy $ac_prog; ac_word=$2
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796 $as_echo_n "checking for $ac_word... " >&6; }
5797 if ${ac_cv_path_UNIQ+:} false; then :
5798   $as_echo_n "(cached) " >&6
5799 else
5800   case $UNIQ in
5801   [\\/]* | ?:[\\/]*)
5802   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5803   ;;
5804   *)
5805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5806 for as_dir in $PATH
5807 do
5808   IFS=$as_save_IFS
5809   test -z "$as_dir" && as_dir=.
5810     for ac_exec_ext in '' $ac_executable_extensions; do
5811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5812     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5814     break 2
5815   fi
5816 done
5817   done
5818 IFS=$as_save_IFS
5819 
5820   ;;
5821 esac
5822 fi
5823 UNIQ=$ac_cv_path_UNIQ
5824 if test -n "$UNIQ"; then
5825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5826 $as_echo "$UNIQ" >&6; }
5827 else
5828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829 $as_echo "no" >&6; }
5830 fi
5831 
5832 
5833   test -n "$UNIQ" && break
5834 done
5835 
5836 
5837   if test "x$UNIQ" = x; then
5838     if test "xuniq" = x; then
5839       PROG_NAME=uniq
5840     else
5841       PROG_NAME=uniq
5842     fi
5843     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5844 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5845     as_fn_error $? "Cannot continue" "$LINENO" 5
5846   fi
5847 
5848 
5849 
5850   for ac_prog in wc
5851 do
5852   # Extract the first word of "$ac_prog", so it can be a program name with args.
5853 set dummy $ac_prog; ac_word=$2
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855 $as_echo_n "checking for $ac_word... " >&6; }
5856 if ${ac_cv_path_WC+:} false; then :
5857   $as_echo_n "(cached) " >&6
5858 else
5859   case $WC in
5860   [\\/]* | ?:[\\/]*)
5861   ac_cv_path_WC="$WC" # Let the user override the test with a path.
5862   ;;
5863   *)
5864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5865 for as_dir in $PATH
5866 do
5867   IFS=$as_save_IFS
5868   test -z "$as_dir" && as_dir=.
5869     for ac_exec_ext in '' $ac_executable_extensions; do
5870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5871     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5873     break 2
5874   fi
5875 done
5876   done
5877 IFS=$as_save_IFS
5878 
5879   ;;
5880 esac
5881 fi
5882 WC=$ac_cv_path_WC
5883 if test -n "$WC"; then
5884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5885 $as_echo "$WC" >&6; }
5886 else
5887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888 $as_echo "no" >&6; }
5889 fi
5890 
5891 
5892   test -n "$WC" && break
5893 done
5894 
5895 
5896   if test "x$WC" = x; then
5897     if test "xwc" = x; then
5898       PROG_NAME=wc
5899     else
5900       PROG_NAME=wc
5901     fi
5902     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5903 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5904     as_fn_error $? "Cannot continue" "$LINENO" 5
5905   fi
5906 
5907 
5908 
5909   for ac_prog in which
5910 do
5911   # Extract the first word of "$ac_prog", so it can be a program name with args.
5912 set dummy $ac_prog; ac_word=$2
5913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914 $as_echo_n "checking for $ac_word... " >&6; }
5915 if ${ac_cv_path_WHICH+:} false; then :
5916   $as_echo_n "(cached) " >&6
5917 else
5918   case $WHICH in
5919   [\\/]* | ?:[\\/]*)
5920   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5921   ;;
5922   *)
5923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924 for as_dir in $PATH
5925 do
5926   IFS=$as_save_IFS
5927   test -z "$as_dir" && as_dir=.
5928     for ac_exec_ext in '' $ac_executable_extensions; do
5929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5930     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5932     break 2
5933   fi
5934 done
5935   done
5936 IFS=$as_save_IFS
5937 
5938   ;;
5939 esac
5940 fi
5941 WHICH=$ac_cv_path_WHICH
5942 if test -n "$WHICH"; then
5943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5944 $as_echo "$WHICH" >&6; }
5945 else
5946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5947 $as_echo "no" >&6; }
5948 fi
5949 
5950 
5951   test -n "$WHICH" && break
5952 done
5953 
5954 
5955   if test "x$WHICH" = x; then
5956     if test "xwhich" = x; then
5957       PROG_NAME=which
5958     else
5959       PROG_NAME=which
5960     fi
5961     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5962 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5963     as_fn_error $? "Cannot continue" "$LINENO" 5
5964   fi
5965 
5966 
5967 
5968   for ac_prog in xargs
5969 do
5970   # Extract the first word of "$ac_prog", so it can be a program name with args.
5971 set dummy $ac_prog; ac_word=$2
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973 $as_echo_n "checking for $ac_word... " >&6; }
5974 if ${ac_cv_path_XARGS+:} false; then :
5975   $as_echo_n "(cached) " >&6
5976 else
5977   case $XARGS in
5978   [\\/]* | ?:[\\/]*)
5979   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5980   ;;
5981   *)
5982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983 for as_dir in $PATH
5984 do
5985   IFS=$as_save_IFS
5986   test -z "$as_dir" && as_dir=.
5987     for ac_exec_ext in '' $ac_executable_extensions; do
5988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991     break 2
5992   fi
5993 done
5994   done
5995 IFS=$as_save_IFS
5996 
5997   ;;
5998 esac
5999 fi
6000 XARGS=$ac_cv_path_XARGS
6001 if test -n "$XARGS"; then
6002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
6003 $as_echo "$XARGS" >&6; }
6004 else
6005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006 $as_echo "no" >&6; }
6007 fi
6008 
6009 
6010   test -n "$XARGS" && break
6011 done
6012 
6013 
6014   if test "x$XARGS" = x; then
6015     if test "xxargs" = x; then
6016       PROG_NAME=xargs
6017     else
6018       PROG_NAME=xargs
6019     fi
6020     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6021 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6022     as_fn_error $? "Cannot continue" "$LINENO" 5
6023   fi
6024 
6025 
6026 
6027   # Then required tools that require some special treatment.
6028   for ac_prog in gawk mawk nawk awk
6029 do
6030   # Extract the first word of "$ac_prog", so it can be a program name with args.
6031 set dummy $ac_prog; ac_word=$2
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6033 $as_echo_n "checking for $ac_word... " >&6; }
6034 if ${ac_cv_prog_AWK+:} false; then :
6035   $as_echo_n "(cached) " >&6
6036 else
6037   if test -n "$AWK"; then
6038   ac_cv_prog_AWK="$AWK" # Let the user override the test.
6039 else
6040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041 for as_dir in $PATH
6042 do
6043   IFS=$as_save_IFS
6044   test -z "$as_dir" && as_dir=.
6045     for ac_exec_ext in '' $ac_executable_extensions; do
6046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047     ac_cv_prog_AWK="$ac_prog"
6048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049     break 2
6050   fi
6051 done
6052   done
6053 IFS=$as_save_IFS
6054 
6055 fi
6056 fi
6057 AWK=$ac_cv_prog_AWK
6058 if test -n "$AWK"; then
6059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6060 $as_echo "$AWK" >&6; }
6061 else
6062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6063 $as_echo "no" >&6; }
6064 fi
6065 
6066 
6067   test -n "$AWK" && break
6068 done
6069 
6070 
6071   if test "x$AWK" = x; then
6072     if test "x" = x; then
6073       PROG_NAME=awk
6074     else
6075       PROG_NAME=
6076     fi
6077     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6078 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6079     as_fn_error $? "Cannot continue" "$LINENO" 5
6080   fi
6081 
6082   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6083 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6084 if ${ac_cv_path_GREP+:} false; then :
6085   $as_echo_n "(cached) " >&6
6086 else
6087   if test -z "$GREP"; then
6088   ac_path_GREP_found=false
6089   # Loop through the user's path and test for each of PROGNAME-LIST
6090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6092 do
6093   IFS=$as_save_IFS
6094   test -z "$as_dir" && as_dir=.
6095     for ac_prog in grep ggrep; do
6096     for ac_exec_ext in '' $ac_executable_extensions; do
6097       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6098       as_fn_executable_p "$ac_path_GREP" || continue
6099 # Check for GNU ac_path_GREP and select it if it is found.
6100   # Check for GNU $ac_path_GREP
6101 case `"$ac_path_GREP" --version 2>&1` in
6102 *GNU*)
6103   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6104 *)
6105   ac_count=0
6106   $as_echo_n 0123456789 >"conftest.in"
6107   while :
6108   do
6109     cat "conftest.in" "conftest.in" >"conftest.tmp"
6110     mv "conftest.tmp" "conftest.in"
6111     cp "conftest.in" "conftest.nl"
6112     $as_echo 'GREP' >> "conftest.nl"
6113     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6114     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6115     as_fn_arith $ac_count + 1 && ac_count=$as_val
6116     if test $ac_count -gt ${ac_path_GREP_max-0}; then
6117       # Best one so far, save it but keep looking for a better one
6118       ac_cv_path_GREP="$ac_path_GREP"
6119       ac_path_GREP_max=$ac_count
6120     fi
6121     # 10*(2^10) chars as input seems more than enough
6122     test $ac_count -gt 10 && break
6123   done
6124   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6125 esac
6126 
6127       $ac_path_GREP_found && break 3
6128     done
6129   done
6130   done
6131 IFS=$as_save_IFS
6132   if test -z "$ac_cv_path_GREP"; then
6133     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6134   fi
6135 else
6136   ac_cv_path_GREP=$GREP
6137 fi
6138 
6139 fi
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6141 $as_echo "$ac_cv_path_GREP" >&6; }
6142  GREP="$ac_cv_path_GREP"
6143 
6144 
6145 
6146   if test "x$GREP" = x; then
6147     if test "x" = x; then
6148       PROG_NAME=grep
6149     else
6150       PROG_NAME=
6151     fi
6152     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6153 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6154     as_fn_error $? "Cannot continue" "$LINENO" 5
6155   fi
6156 
6157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6158 $as_echo_n "checking for egrep... " >&6; }
6159 if ${ac_cv_path_EGREP+:} false; then :
6160   $as_echo_n "(cached) " >&6
6161 else
6162   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6163    then ac_cv_path_EGREP="$GREP -E"
6164    else
6165      if test -z "$EGREP"; then
6166   ac_path_EGREP_found=false
6167   # Loop through the user's path and test for each of PROGNAME-LIST
6168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6169 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6170 do
6171   IFS=$as_save_IFS
6172   test -z "$as_dir" && as_dir=.
6173     for ac_prog in egrep; do
6174     for ac_exec_ext in '' $ac_executable_extensions; do
6175       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6176       as_fn_executable_p "$ac_path_EGREP" || continue
6177 # Check for GNU ac_path_EGREP and select it if it is found.
6178   # Check for GNU $ac_path_EGREP
6179 case `"$ac_path_EGREP" --version 2>&1` in
6180 *GNU*)
6181   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6182 *)
6183   ac_count=0
6184   $as_echo_n 0123456789 >"conftest.in"
6185   while :
6186   do
6187     cat "conftest.in" "conftest.in" >"conftest.tmp"
6188     mv "conftest.tmp" "conftest.in"
6189     cp "conftest.in" "conftest.nl"
6190     $as_echo 'EGREP' >> "conftest.nl"
6191     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6192     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6193     as_fn_arith $ac_count + 1 && ac_count=$as_val
6194     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6195       # Best one so far, save it but keep looking for a better one
6196       ac_cv_path_EGREP="$ac_path_EGREP"
6197       ac_path_EGREP_max=$ac_count
6198     fi
6199     # 10*(2^10) chars as input seems more than enough
6200     test $ac_count -gt 10 && break
6201   done
6202   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6203 esac
6204 
6205       $ac_path_EGREP_found && break 3
6206     done
6207   done
6208   done
6209 IFS=$as_save_IFS
6210   if test -z "$ac_cv_path_EGREP"; then
6211     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6212   fi
6213 else
6214   ac_cv_path_EGREP=$EGREP
6215 fi
6216 
6217    fi
6218 fi
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6220 $as_echo "$ac_cv_path_EGREP" >&6; }
6221  EGREP="$ac_cv_path_EGREP"
6222 
6223 
6224 
6225   if test "x$EGREP" = x; then
6226     if test "x" = x; then
6227       PROG_NAME=egrep
6228     else
6229       PROG_NAME=
6230     fi
6231     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6232 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6233     as_fn_error $? "Cannot continue" "$LINENO" 5
6234   fi
6235 
6236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6237 $as_echo_n "checking for fgrep... " >&6; }
6238 if ${ac_cv_path_FGREP+:} false; then :
6239   $as_echo_n "(cached) " >&6
6240 else
6241   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6242    then ac_cv_path_FGREP="$GREP -F"
6243    else
6244      if test -z "$FGREP"; then
6245   ac_path_FGREP_found=false
6246   # Loop through the user's path and test for each of PROGNAME-LIST
6247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6248 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6249 do
6250   IFS=$as_save_IFS
6251   test -z "$as_dir" && as_dir=.
6252     for ac_prog in fgrep; do
6253     for ac_exec_ext in '' $ac_executable_extensions; do
6254       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6255       as_fn_executable_p "$ac_path_FGREP" || continue
6256 # Check for GNU ac_path_FGREP and select it if it is found.
6257   # Check for GNU $ac_path_FGREP
6258 case `"$ac_path_FGREP" --version 2>&1` in
6259 *GNU*)
6260   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6261 *)
6262   ac_count=0
6263   $as_echo_n 0123456789 >"conftest.in"
6264   while :
6265   do
6266     cat "conftest.in" "conftest.in" >"conftest.tmp"
6267     mv "conftest.tmp" "conftest.in"
6268     cp "conftest.in" "conftest.nl"
6269     $as_echo 'FGREP' >> "conftest.nl"
6270     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6271     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6272     as_fn_arith $ac_count + 1 && ac_count=$as_val
6273     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6274       # Best one so far, save it but keep looking for a better one
6275       ac_cv_path_FGREP="$ac_path_FGREP"
6276       ac_path_FGREP_max=$ac_count
6277     fi
6278     # 10*(2^10) chars as input seems more than enough
6279     test $ac_count -gt 10 && break
6280   done
6281   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6282 esac
6283 
6284       $ac_path_FGREP_found && break 3
6285     done
6286   done
6287   done
6288 IFS=$as_save_IFS
6289   if test -z "$ac_cv_path_FGREP"; then
6290     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6291   fi
6292 else
6293   ac_cv_path_FGREP=$FGREP
6294 fi
6295 
6296    fi
6297 fi
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6299 $as_echo "$ac_cv_path_FGREP" >&6; }
6300  FGREP="$ac_cv_path_FGREP"
6301 
6302 
6303 
6304   if test "x$FGREP" = x; then
6305     if test "x" = x; then
6306       PROG_NAME=fgrep
6307     else
6308       PROG_NAME=
6309     fi
6310     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6311 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6312     as_fn_error $? "Cannot continue" "$LINENO" 5
6313   fi
6314 
6315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6316 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
6317 if ${ac_cv_path_SED+:} false; then :
6318   $as_echo_n "(cached) " >&6
6319 else
6320             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6321      for ac_i in 1 2 3 4 5 6 7; do
6322        ac_script="$ac_script$as_nl$ac_script"
6323      done
6324      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6325      { ac_script=; unset ac_script;}
6326      if test -z "$SED"; then
6327   ac_path_SED_found=false
6328   # Loop through the user's path and test for each of PROGNAME-LIST
6329   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6330 for as_dir in $PATH
6331 do
6332   IFS=$as_save_IFS
6333   test -z "$as_dir" && as_dir=.
6334     for ac_prog in sed gsed; do
6335     for ac_exec_ext in '' $ac_executable_extensions; do
6336       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6337       as_fn_executable_p "$ac_path_SED" || continue
6338 # Check for GNU ac_path_SED and select it if it is found.
6339   # Check for GNU $ac_path_SED
6340 case `"$ac_path_SED" --version 2>&1` in
6341 *GNU*)
6342   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6343 *)
6344   ac_count=0
6345   $as_echo_n 0123456789 >"conftest.in"
6346   while :
6347   do
6348     cat "conftest.in" "conftest.in" >"conftest.tmp"
6349     mv "conftest.tmp" "conftest.in"
6350     cp "conftest.in" "conftest.nl"
6351     $as_echo '' >> "conftest.nl"
6352     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6353     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6354     as_fn_arith $ac_count + 1 && ac_count=$as_val
6355     if test $ac_count -gt ${ac_path_SED_max-0}; then
6356       # Best one so far, save it but keep looking for a better one
6357       ac_cv_path_SED="$ac_path_SED"
6358       ac_path_SED_max=$ac_count
6359     fi
6360     # 10*(2^10) chars as input seems more than enough
6361     test $ac_count -gt 10 && break
6362   done
6363   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6364 esac
6365 
6366       $ac_path_SED_found && break 3
6367     done
6368   done
6369   done
6370 IFS=$as_save_IFS
6371   if test -z "$ac_cv_path_SED"; then
6372     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6373   fi
6374 else
6375   ac_cv_path_SED=$SED
6376 fi
6377 
6378 fi
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6380 $as_echo "$ac_cv_path_SED" >&6; }
6381  SED="$ac_cv_path_SED"
6382   rm -f conftest.sed
6383 
6384 
6385   if test "x$SED" = x; then
6386     if test "x" = x; then
6387       PROG_NAME=sed
6388     else
6389       PROG_NAME=
6390     fi
6391     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6392 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6393     as_fn_error $? "Cannot continue" "$LINENO" 5
6394   fi
6395 
6396 
6397   for ac_prog in nawk gawk awk
6398 do
6399   # Extract the first word of "$ac_prog", so it can be a program name with args.
6400 set dummy $ac_prog; ac_word=$2
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6402 $as_echo_n "checking for $ac_word... " >&6; }
6403 if ${ac_cv_path_NAWK+:} false; then :
6404   $as_echo_n "(cached) " >&6
6405 else
6406   case $NAWK in
6407   [\\/]* | ?:[\\/]*)
6408   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6409   ;;
6410   *)
6411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412 for as_dir in $PATH
6413 do
6414   IFS=$as_save_IFS
6415   test -z "$as_dir" && as_dir=.
6416     for ac_exec_ext in '' $ac_executable_extensions; do
6417   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6418     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6419     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6420     break 2
6421   fi
6422 done
6423   done
6424 IFS=$as_save_IFS
6425 
6426   ;;
6427 esac
6428 fi
6429 NAWK=$ac_cv_path_NAWK
6430 if test -n "$NAWK"; then
6431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6432 $as_echo "$NAWK" >&6; }
6433 else
6434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435 $as_echo "no" >&6; }
6436 fi
6437 
6438 
6439   test -n "$NAWK" && break
6440 done
6441 
6442 
6443   if test "x$NAWK" = x; then
6444     if test "x" = x; then
6445       PROG_NAME=nawk
6446     else
6447       PROG_NAME=
6448     fi
6449     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6450 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6451     as_fn_error $? "Cannot continue" "$LINENO" 5
6452   fi
6453 
6454 
6455   # Always force rm.
6456   RM="$RM -f"
6457 
6458   # pwd behaves differently on various platforms and some don't support the -L flag.
6459   # Always use the bash builtin pwd to get uniform behavior.
6460   THEPWDCMD=pwd
6461 
6462   # These are not required on all platforms
6463   # Extract the first word of "cygpath", so it can be a program name with args.
6464 set dummy cygpath; ac_word=$2
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6466 $as_echo_n "checking for $ac_word... " >&6; }
6467 if ${ac_cv_path_CYGPATH+:} false; then :
6468   $as_echo_n "(cached) " >&6
6469 else
6470   case $CYGPATH in
6471   [\\/]* | ?:[\\/]*)
6472   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6473   ;;
6474   *)
6475   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476 for as_dir in $PATH
6477 do
6478   IFS=$as_save_IFS
6479   test -z "$as_dir" && as_dir=.
6480     for ac_exec_ext in '' $ac_executable_extensions; do
6481   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6482     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6483     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6484     break 2
6485   fi
6486 done
6487   done
6488 IFS=$as_save_IFS
6489 
6490   ;;
6491 esac
6492 fi
6493 CYGPATH=$ac_cv_path_CYGPATH
6494 if test -n "$CYGPATH"; then
6495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6496 $as_echo "$CYGPATH" >&6; }
6497 else
6498   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 $as_echo "no" >&6; }
6500 fi
6501 
6502 
6503   # Extract the first word of "readlink", so it can be a program name with args.
6504 set dummy readlink; ac_word=$2
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6506 $as_echo_n "checking for $ac_word... " >&6; }
6507 if ${ac_cv_path_READLINK+:} false; then :
6508   $as_echo_n "(cached) " >&6
6509 else
6510   case $READLINK in
6511   [\\/]* | ?:[\\/]*)
6512   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6513   ;;
6514   *)
6515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6516 for as_dir in $PATH
6517 do
6518   IFS=$as_save_IFS
6519   test -z "$as_dir" && as_dir=.
6520     for ac_exec_ext in '' $ac_executable_extensions; do
6521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6522     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6524     break 2
6525   fi
6526 done
6527   done
6528 IFS=$as_save_IFS
6529 
6530   ;;
6531 esac
6532 fi
6533 READLINK=$ac_cv_path_READLINK
6534 if test -n "$READLINK"; then
6535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6536 $as_echo "$READLINK" >&6; }
6537 else
6538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539 $as_echo "no" >&6; }
6540 fi
6541 
6542 
6543   # Extract the first word of "df", so it can be a program name with args.
6544 set dummy df; ac_word=$2
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6546 $as_echo_n "checking for $ac_word... " >&6; }
6547 if ${ac_cv_path_DF+:} false; then :
6548   $as_echo_n "(cached) " >&6
6549 else
6550   case $DF in
6551   [\\/]* | ?:[\\/]*)
6552   ac_cv_path_DF="$DF" # Let the user override the test with a path.
6553   ;;
6554   *)
6555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6556 for as_dir in $PATH
6557 do
6558   IFS=$as_save_IFS
6559   test -z "$as_dir" && as_dir=.
6560     for ac_exec_ext in '' $ac_executable_extensions; do
6561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6562     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6564     break 2
6565   fi
6566 done
6567   done
6568 IFS=$as_save_IFS
6569 
6570   ;;
6571 esac
6572 fi
6573 DF=$ac_cv_path_DF
6574 if test -n "$DF"; then
6575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6576 $as_echo "$DF" >&6; }
6577 else
6578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6579 $as_echo "no" >&6; }
6580 fi
6581 
6582 
6583   # Extract the first word of "SetFile", so it can be a program name with args.
6584 set dummy SetFile; ac_word=$2
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6586 $as_echo_n "checking for $ac_word... " >&6; }
6587 if ${ac_cv_path_SETFILE+:} false; then :
6588   $as_echo_n "(cached) " >&6
6589 else
6590   case $SETFILE in
6591   [\\/]* | ?:[\\/]*)
6592   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6593   ;;
6594   *)
6595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6596 for as_dir in $PATH
6597 do
6598   IFS=$as_save_IFS
6599   test -z "$as_dir" && as_dir=.
6600     for ac_exec_ext in '' $ac_executable_extensions; do
6601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6602     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6604     break 2
6605   fi
6606 done
6607   done
6608 IFS=$as_save_IFS
6609 
6610   ;;
6611 esac
6612 fi
6613 SETFILE=$ac_cv_path_SETFILE
6614 if test -n "$SETFILE"; then
6615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6616 $as_echo "$SETFILE" >&6; }
6617 else
6618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6619 $as_echo "no" >&6; }
6620 fi
6621 
6622 
6623 
6624 
6625 # Now we can determine OpenJDK build and target platforms. This is required to
6626 # have early on.
6627 # Make sure we can run config.sub.
6628 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6629   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6630 
6631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6632 $as_echo_n "checking build system type... " >&6; }
6633 if ${ac_cv_build+:} false; then :
6634   $as_echo_n "(cached) " >&6
6635 else
6636   ac_build_alias=$build_alias
6637 test "x$ac_build_alias" = x &&
6638   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6639 test "x$ac_build_alias" = x &&
6640   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6641 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6642   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6643 
6644 fi
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6646 $as_echo "$ac_cv_build" >&6; }
6647 case $ac_cv_build in
6648 *-*-*) ;;
6649 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6650 esac
6651 build=$ac_cv_build
6652 ac_save_IFS=$IFS; IFS='-'
6653 set x $ac_cv_build
6654 shift
6655 build_cpu=$1
6656 build_vendor=$2
6657 shift; shift
6658 # Remember, the first character of IFS is used to create $*,
6659 # except with old shells:
6660 build_os=$*
6661 IFS=$ac_save_IFS
6662 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6663 
6664 
6665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6666 $as_echo_n "checking host system type... " >&6; }
6667 if ${ac_cv_host+:} false; then :
6668   $as_echo_n "(cached) " >&6
6669 else
6670   if test "x$host_alias" = x; then
6671   ac_cv_host=$ac_cv_build
6672 else
6673   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6674     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6675 fi
6676 
6677 fi
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6679 $as_echo "$ac_cv_host" >&6; }
6680 case $ac_cv_host in
6681 *-*-*) ;;
6682 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6683 esac
6684 host=$ac_cv_host
6685 ac_save_IFS=$IFS; IFS='-'
6686 set x $ac_cv_host
6687 shift
6688 host_cpu=$1
6689 host_vendor=$2
6690 shift; shift
6691 # Remember, the first character of IFS is used to create $*,
6692 # except with old shells:
6693 host_os=$*
6694 IFS=$ac_save_IFS
6695 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6696 
6697 
6698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6699 $as_echo_n "checking target system type... " >&6; }
6700 if ${ac_cv_target+:} false; then :
6701   $as_echo_n "(cached) " >&6
6702 else
6703   if test "x$target_alias" = x; then
6704   ac_cv_target=$ac_cv_host
6705 else
6706   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6707     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6708 fi
6709 
6710 fi
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6712 $as_echo "$ac_cv_target" >&6; }
6713 case $ac_cv_target in
6714 *-*-*) ;;
6715 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6716 esac
6717 target=$ac_cv_target
6718 ac_save_IFS=$IFS; IFS='-'
6719 set x $ac_cv_target
6720 shift
6721 target_cpu=$1
6722 target_vendor=$2
6723 shift; shift
6724 # Remember, the first character of IFS is used to create $*,
6725 # except with old shells:
6726 target_os=$*
6727 IFS=$ac_save_IFS
6728 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6729 
6730 
6731 # The aliases save the names the user supplied, while $host etc.
6732 # will get canonicalized.
6733 test -n "$target_alias" &&
6734   test "$program_prefix$program_suffix$program_transform_name" = \
6735     NONENONEs,x,x, &&
6736   program_prefix=${target_alias}-
6737 
6738   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6739   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6740   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
6741   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6742   # to use the configure naming style.
6743 
6744 
6745 
6746 
6747 
6748   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6749   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6750   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6751   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6752   OPENJDK_TARGET_AUTOCONF_NAME="$host"
6753   OPENJDK_BUILD_AUTOCONF_NAME="$build"
6754 
6755 
6756 
6757   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6758 
6759   case "$build_os" in
6760     *linux*)
6761       VAR_OS=linux
6762       VAR_OS_API=posix
6763       VAR_OS_ENV=linux
6764       ;;
6765     *solaris*)
6766       VAR_OS=solaris
6767       VAR_OS_API=posix
6768       VAR_OS_ENV=solaris
6769       ;;
6770     *darwin*)
6771       VAR_OS=macosx
6772       VAR_OS_API=posix
6773       VAR_OS_ENV=macosx
6774       ;;
6775     *bsd*)
6776       VAR_OS=bsd
6777       VAR_OS_API=posix
6778       VAR_OS_ENV=bsd
6779       ;;
6780     *cygwin*)
6781       VAR_OS=windows
6782       VAR_OS_API=winapi
6783       VAR_OS_ENV=windows.cygwin
6784       ;;
6785     *mingw*)
6786       VAR_OS=windows
6787       VAR_OS_API=winapi
6788       VAR_OS_ENV=windows.msys
6789       ;;
6790     *aix*)
6791       VAR_OS=aix
6792       VAR_OS_API=posix
6793       VAR_OS_ENV=aix
6794       ;;
6795     *)
6796       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6797       ;;
6798   esac
6799 
6800 
6801   # First argument is the cpu name from the trip/quad
6802   case "$build_cpu" in
6803     x86_64)
6804       VAR_CPU=x86_64
6805       VAR_CPU_ARCH=x86
6806       VAR_CPU_BITS=64
6807       VAR_CPU_ENDIAN=little
6808       ;;
6809     i?86)
6810       VAR_CPU=x86
6811       VAR_CPU_ARCH=x86
6812       VAR_CPU_BITS=32
6813       VAR_CPU_ENDIAN=little
6814       ;;
6815     arm*)
6816       VAR_CPU=arm
6817       VAR_CPU_ARCH=arm
6818       VAR_CPU_BITS=32
6819       VAR_CPU_ENDIAN=little
6820       ;;
6821     powerpc)
6822       VAR_CPU=ppc
6823       VAR_CPU_ARCH=ppc
6824       VAR_CPU_BITS=32
6825       VAR_CPU_ENDIAN=big
6826       ;;
6827     powerpc64)
6828       VAR_CPU=ppc64
6829       VAR_CPU_ARCH=ppc
6830       VAR_CPU_BITS=64
6831       VAR_CPU_ENDIAN=big
6832       ;;
6833     s390)
6834       VAR_CPU=s390
6835       VAR_CPU_ARCH=s390
6836       VAR_CPU_BITS=32
6837       VAR_CPU_ENDIAN=big
6838       ;;
6839     s390x)
6840       VAR_CPU=s390x
6841       VAR_CPU_ARCH=s390
6842       VAR_CPU_BITS=64
6843       VAR_CPU_ENDIAN=big
6844       ;;
6845     sparc)
6846       VAR_CPU=sparc
6847       VAR_CPU_ARCH=sparc
6848       VAR_CPU_BITS=32
6849       VAR_CPU_ENDIAN=big
6850       ;;
6851     sparcv9)
6852       VAR_CPU=sparcv9
6853       VAR_CPU_ARCH=sparc
6854       VAR_CPU_BITS=64
6855       VAR_CPU_ENDIAN=big
6856       ;;
6857     *)
6858       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6859       ;;
6860   esac
6861 
6862   # ..and setup our own variables. (Do this explicitely to facilitate searching)
6863   OPENJDK_BUILD_OS="$VAR_OS"
6864   OPENJDK_BUILD_OS_API="$VAR_OS_API"
6865   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6866   OPENJDK_BUILD_CPU="$VAR_CPU"
6867   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6868   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6869   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6870 
6871 
6872 
6873 
6874 
6875 
6876 
6877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6878 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
6879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6880 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6881 
6882   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6883 
6884   case "$host_os" in
6885     *linux*)
6886       VAR_OS=linux
6887       VAR_OS_API=posix
6888       VAR_OS_ENV=linux
6889       ;;
6890     *solaris*)
6891       VAR_OS=solaris
6892       VAR_OS_API=posix
6893       VAR_OS_ENV=solaris
6894       ;;
6895     *darwin*)
6896       VAR_OS=macosx
6897       VAR_OS_API=posix
6898       VAR_OS_ENV=macosx
6899       ;;
6900     *bsd*)
6901       VAR_OS=bsd
6902       VAR_OS_API=posix
6903       VAR_OS_ENV=bsd
6904       ;;
6905     *cygwin*)
6906       VAR_OS=windows
6907       VAR_OS_API=winapi
6908       VAR_OS_ENV=windows.cygwin
6909       ;;
6910     *mingw*)
6911       VAR_OS=windows
6912       VAR_OS_API=winapi
6913       VAR_OS_ENV=windows.msys
6914       ;;
6915     *aix*)
6916       VAR_OS=aix
6917       VAR_OS_API=posix
6918       VAR_OS_ENV=aix
6919       ;;
6920     *)
6921       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6922       ;;
6923   esac
6924 
6925 
6926   # First argument is the cpu name from the trip/quad
6927   case "$host_cpu" in
6928     x86_64)
6929       VAR_CPU=x86_64
6930       VAR_CPU_ARCH=x86
6931       VAR_CPU_BITS=64
6932       VAR_CPU_ENDIAN=little
6933       ;;
6934     i?86)
6935       VAR_CPU=x86
6936       VAR_CPU_ARCH=x86
6937       VAR_CPU_BITS=32
6938       VAR_CPU_ENDIAN=little
6939       ;;
6940     arm*)
6941       VAR_CPU=arm
6942       VAR_CPU_ARCH=arm
6943       VAR_CPU_BITS=32
6944       VAR_CPU_ENDIAN=little
6945       ;;
6946     powerpc)
6947       VAR_CPU=ppc
6948       VAR_CPU_ARCH=ppc
6949       VAR_CPU_BITS=32
6950       VAR_CPU_ENDIAN=big
6951       ;;
6952     powerpc64)
6953       VAR_CPU=ppc64
6954       VAR_CPU_ARCH=ppc
6955       VAR_CPU_BITS=64
6956       VAR_CPU_ENDIAN=big
6957       ;;
6958     s390)
6959       VAR_CPU=s390
6960       VAR_CPU_ARCH=s390
6961       VAR_CPU_BITS=32
6962       VAR_CPU_ENDIAN=big
6963       ;;
6964     s390x)
6965       VAR_CPU=s390x
6966       VAR_CPU_ARCH=s390
6967       VAR_CPU_BITS=64
6968       VAR_CPU_ENDIAN=big
6969       ;;
6970     sparc)
6971       VAR_CPU=sparc
6972       VAR_CPU_ARCH=sparc
6973       VAR_CPU_BITS=32
6974       VAR_CPU_ENDIAN=big
6975       ;;
6976     sparcv9)
6977       VAR_CPU=sparcv9
6978       VAR_CPU_ARCH=sparc
6979       VAR_CPU_BITS=64
6980       VAR_CPU_ENDIAN=big
6981       ;;
6982     *)
6983       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6984       ;;
6985   esac
6986 
6987   # ... and setup our own variables. (Do this explicitely to facilitate searching)
6988   OPENJDK_TARGET_OS="$VAR_OS"
6989   OPENJDK_TARGET_OS_API="$VAR_OS_API"
6990   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6991   OPENJDK_TARGET_CPU="$VAR_CPU"
6992   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6993   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6994   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6995 
6996 
6997 
6998 
6999 
7000 
7001 
7002   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
7003 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
7004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
7005 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
7006 
7007 
7008 
7009 # Check whether --with-target-bits was given.
7010 if test "${with_target_bits+set}" = set; then :
7011   withval=$with_target_bits;
7012 fi
7013 
7014 
7015   # We have three types of compiles:
7016   # native  == normal compilation, target system == build system
7017   # cross   == traditional cross compilation, target system != build system; special toolchain needed
7018   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
7019   #
7020   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
7021     # We're doing a proper cross-compilation
7022     COMPILE_TYPE="cross"
7023   else
7024     COMPILE_TYPE="native"
7025   fi
7026 
7027   if test "x$with_target_bits" != x; then
7028     if test "x$COMPILE_TYPE" = "xcross"; then
7029       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
7030     fi
7031 
7032     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7033       # A reduced build is requested
7034       COMPILE_TYPE="reduced"
7035       OPENJDK_TARGET_CPU_BITS=32
7036       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
7037         OPENJDK_TARGET_CPU=x86
7038       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
7039         OPENJDK_TARGET_CPU=sparc
7040       else
7041         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
7042       fi
7043     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
7044       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
7045     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
7046       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
7047 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
7048     else
7049       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
7050     fi
7051   fi
7052 
7053 
7054   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
7055 $as_echo_n "checking compilation type... " >&6; }
7056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
7057 $as_echo "$COMPILE_TYPE" >&6; }
7058 
7059 
7060   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
7061     REQUIRED_OS_NAME=SunOS
7062     REQUIRED_OS_VERSION=5.10
7063   fi
7064   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
7065     REQUIRED_OS_NAME=Linux
7066     REQUIRED_OS_VERSION=2.6
7067   fi
7068   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7069     REQUIRED_OS_NAME=Windows
7070     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7071       REQUIRED_OS_VERSION=5.2
7072     else
7073       REQUIRED_OS_VERSION=5.1
7074     fi
7075   fi
7076   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7077     REQUIRED_OS_NAME=Darwin
7078     REQUIRED_OS_VERSION=11.2
7079   fi
7080 
7081 
7082 
7083 
7084 
7085   # Also store the legacy naming of the cpu.
7086   # Ie i586 and amd64 instead of x86 and x86_64
7087   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7088   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7089     OPENJDK_TARGET_CPU_LEGACY="i586"
7090   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7091     # On all platforms except MacOSX replace x86_64 with amd64.
7092     OPENJDK_TARGET_CPU_LEGACY="amd64"
7093   fi
7094 
7095 
7096   # And the second legacy naming of the cpu.
7097   # Ie i386 and amd64 instead of x86 and x86_64.
7098   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7099   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7100     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7101   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7102     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7103   fi
7104 
7105 
7106   # This is the name of the cpu (but using i386 and amd64 instead of
7107   # x86 and x86_64, respectively), preceeded by a /, to be used when
7108   # locating libraries. On macosx, it's empty, though.
7109   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7110   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7111     OPENJDK_TARGET_CPU_LIBDIR=""
7112   fi
7113 
7114 
7115   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7116   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7117   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7118   OPENJDK_TARGET_CPU_ISADIR=""
7119   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7120     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7121       OPENJDK_TARGET_CPU_ISADIR="/amd64"
7122     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7123       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7124     fi
7125   fi
7126 
7127 
7128   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7129   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7130   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7131     # On linux only, we replace x86 with i386.
7132     OPENJDK_TARGET_CPU_OSARCH="i386"
7133   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7134     # On all platforms except macosx, we replace x86_64 with amd64.
7135     OPENJDK_TARGET_CPU_OSARCH="amd64"
7136   fi
7137 
7138 
7139   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7140   if test "x$OPENJDK_TARGET_CPU" = xx86; then
7141     OPENJDK_TARGET_CPU_JLI="i386"
7142   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7143     # On all platforms except macosx, we replace x86_64 with amd64.
7144     OPENJDK_TARGET_CPU_JLI="amd64"
7145   fi
7146   # Now setup the -D flags for building libjli.
7147   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7148   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7149     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7150       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7151     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7152       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7153     fi
7154   fi
7155 
7156 
7157   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7158   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7159     OPENJDK_TARGET_OS_API_DIR="solaris"
7160   fi
7161   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7162     OPENJDK_TARGET_OS_API_DIR="windows"
7163   fi
7164 
7165 
7166   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7167       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
7168   else
7169       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
7170   fi
7171 
7172 
7173   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7174     A_LP64="LP64:="
7175     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7176     # unpack200.exe
7177     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7178       ADD_LP64="-D_LP64=1"
7179     fi
7180   fi
7181   LP64=$A_LP64
7182 
7183 
7184   if test "x$COMPILE_TYPE" = "xcross"; then
7185     # FIXME: ... or should this include reduced builds..?
7186     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7187   else
7188     DEFINE_CROSS_COMPILE_ARCH=""
7189   fi
7190 
7191 
7192   # ZERO_ARCHDEF is used to enable architecture-specific code
7193   case "${OPENJDK_TARGET_CPU}" in
7194     ppc*)    ZERO_ARCHDEF=PPC   ;;
7195     s390*)   ZERO_ARCHDEF=S390  ;;
7196     sparc*)  ZERO_ARCHDEF=SPARC ;;
7197     x86_64*) ZERO_ARCHDEF=AMD64 ;;
7198     x86)     ZERO_ARCHDEF=IA32  ;;
7199     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7200   esac
7201 
7202 
7203 
7204 
7205 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7206 
7207   # Locate the directory of this script.
7208   SCRIPT="$0"
7209   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
7210 
7211   # Where is the source? It is located two levels above the configure script.
7212   CURDIR="$PWD"
7213   cd "$AUTOCONF_DIR/../.."
7214   SRC_ROOT="`$THEPWDCMD -L`"
7215 
7216   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7217     PATH_SEP=";"
7218 
7219   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
7220   if test $SRC_ROOT_LENGTH -gt 100; then
7221     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7222   fi
7223 
7224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7225     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7226 $as_echo_n "checking cygwin release... " >&6; }
7227     CYGWIN_VERSION=`$UNAME -r`
7228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7229 $as_echo "$CYGWIN_VERSION" >&6; }
7230     WINDOWS_ENV_VENDOR='cygwin'
7231     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7232 
7233     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7234     if test "x$CYGWIN_VERSION_OK" = x; then
7235       { $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
7236 $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;}
7237       as_fn_error $? "Cannot continue" "$LINENO" 5
7238     fi
7239     if test "x$CYGPATH" = x; then
7240       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7241     fi
7242     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7243 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7244     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7245     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7246     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7247     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7249 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
7250     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7251     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7252     if test "x$test_cygdrive_prefix" = x; then
7253       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7254     fi
7255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7256     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7257 $as_echo_n "checking msys release... " >&6; }
7258     MSYS_VERSION=`$UNAME -r`
7259     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7260 $as_echo "$MSYS_VERSION" >&6; }
7261 
7262     WINDOWS_ENV_VENDOR='msys'
7263     WINDOWS_ENV_VERSION="$MSYS_VERSION"
7264 
7265     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7266 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
7267     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7268     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7269 
7270   windows_path="$MSYS_ROOT_PATH"
7271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7272     unix_path=`$CYGPATH -u "$windows_path"`
7273     MSYS_ROOT_PATH="$unix_path"
7274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7276     MSYS_ROOT_PATH="$unix_path"
7277   fi
7278 
7279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7280 $as_echo "$MSYS_ROOT_PATH" >&6; }
7281     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7282   else
7283     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7284   fi
7285 
7286   # Test if windows or unix (cygwin/msys) find is first in path.
7287   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7288 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7289   FIND_BINARY_OUTPUT=`find --version 2>&1`
7290   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7291     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7292 $as_echo "unix style" >&6; }
7293   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7294     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7295 $as_echo "Windows" >&6; }
7296     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7297 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7298     { $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
7299 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7300     as_fn_error $? "Cannot continue" "$LINENO" 5
7301   else
7302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7303 $as_echo "unknown" >&6; }
7304     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7305 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7306   fi
7307 
7308   else
7309     PATH_SEP=":"
7310   fi
7311 
7312 
7313 
7314   cd "$CURDIR"
7315 
7316 
7317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7318 
7319   # Input might be given as Windows format, start by converting to
7320   # unix format.
7321   path="$SRC_ROOT"
7322   new_path=`$CYGPATH -u "$path"`
7323 
7324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7327   # "foo.exe" is OK but "foo" is an error.
7328   #
7329   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7330   # It is also a way to make sure we got the proper file name for the real test later on.
7331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7332   if test "x$test_shortpath" = x; then
7333     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7334 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7335     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7336   fi
7337 
7338   # Call helper function which possibly converts this using DOS-style short mode.
7339   # If so, the updated path is stored in $new_path.
7340 
7341   input_path="$new_path"
7342   # Check if we need to convert this using DOS-style short mode. If the path
7343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7344   # take no chances and rewrite it.
7345   # Note: m4 eats our [], so we need to use [ and ] instead.
7346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7347   if test "x$has_forbidden_chars" != x; then
7348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7349     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7350     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7351     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7352       # Going to short mode and back again did indeed matter. Since short mode is
7353       # case insensitive, let's make it lowercase to improve readability.
7354       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7355       # Now convert it back to Unix-stile (cygpath)
7356       input_path=`$CYGPATH -u "$shortmode_path"`
7357       new_path="$input_path"
7358     fi
7359   fi
7360 
7361   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7362   if test "x$test_cygdrive_prefix" = x; then
7363     # As a simple fix, exclude /usr/bin since it's not a real path.
7364     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7365       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7366       # a path prefixed by /cygdrive for fixpath to work.
7367       new_path="$CYGWIN_ROOT_PATH$input_path"
7368     fi
7369   fi
7370 
7371 
7372   if test "x$path" != "x$new_path"; then
7373     SRC_ROOT="$new_path"
7374     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7375 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7376   fi
7377 
7378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7379 
7380   path="$SRC_ROOT"
7381   has_colon=`$ECHO $path | $GREP ^.:`
7382   new_path="$path"
7383   if test "x$has_colon" = x; then
7384     # Not in mixed or Windows style, start by that.
7385     new_path=`cmd //c echo $path`
7386   fi
7387 
7388 
7389   input_path="$new_path"
7390   # Check if we need to convert this using DOS-style short mode. If the path
7391   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7392   # take no chances and rewrite it.
7393   # Note: m4 eats our [], so we need to use [ and ] instead.
7394   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7395   if test "x$has_forbidden_chars" != x; then
7396     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7397     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7398   fi
7399 
7400 
7401   windows_path="$new_path"
7402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7403     unix_path=`$CYGPATH -u "$windows_path"`
7404     new_path="$unix_path"
7405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7407     new_path="$unix_path"
7408   fi
7409 
7410   if test "x$path" != "x$new_path"; then
7411     SRC_ROOT="$new_path"
7412     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7413 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7414   fi
7415 
7416   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7417   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7418 
7419   else
7420     # We're on a posix platform. Hooray! :)
7421     path="$SRC_ROOT"
7422     has_space=`$ECHO "$path" | $GREP " "`
7423     if test "x$has_space" != x; then
7424       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7425 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7426       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7427     fi
7428 
7429     # Use eval to expand a potential ~
7430     eval path="$path"
7431     if test ! -f "$path" && test ! -d "$path"; then
7432       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7433     fi
7434 
7435     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
7436   fi
7437 
7438 
7439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7440 
7441   # Input might be given as Windows format, start by converting to
7442   # unix format.
7443   path="$CURDIR"
7444   new_path=`$CYGPATH -u "$path"`
7445 
7446   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7447   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7448   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7449   # "foo.exe" is OK but "foo" is an error.
7450   #
7451   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7452   # It is also a way to make sure we got the proper file name for the real test later on.
7453   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7454   if test "x$test_shortpath" = x; then
7455     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7456 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7457     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7458   fi
7459 
7460   # Call helper function which possibly converts this using DOS-style short mode.
7461   # If so, the updated path is stored in $new_path.
7462 
7463   input_path="$new_path"
7464   # Check if we need to convert this using DOS-style short mode. If the path
7465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7466   # take no chances and rewrite it.
7467   # Note: m4 eats our [], so we need to use [ and ] instead.
7468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7469   if test "x$has_forbidden_chars" != x; then
7470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7474       # Going to short mode and back again did indeed matter. Since short mode is
7475       # case insensitive, let's make it lowercase to improve readability.
7476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7477       # Now convert it back to Unix-stile (cygpath)
7478       input_path=`$CYGPATH -u "$shortmode_path"`
7479       new_path="$input_path"
7480     fi
7481   fi
7482 
7483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7484   if test "x$test_cygdrive_prefix" = x; then
7485     # As a simple fix, exclude /usr/bin since it's not a real path.
7486     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7488       # a path prefixed by /cygdrive for fixpath to work.
7489       new_path="$CYGWIN_ROOT_PATH$input_path"
7490     fi
7491   fi
7492 
7493 
7494   if test "x$path" != "x$new_path"; then
7495     CURDIR="$new_path"
7496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7497 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7498   fi
7499 
7500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7501 
7502   path="$CURDIR"
7503   has_colon=`$ECHO $path | $GREP ^.:`
7504   new_path="$path"
7505   if test "x$has_colon" = x; then
7506     # Not in mixed or Windows style, start by that.
7507     new_path=`cmd //c echo $path`
7508   fi
7509 
7510 
7511   input_path="$new_path"
7512   # Check if we need to convert this using DOS-style short mode. If the path
7513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7514   # take no chances and rewrite it.
7515   # Note: m4 eats our [], so we need to use [ and ] instead.
7516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7517   if test "x$has_forbidden_chars" != x; then
7518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7519     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7520   fi
7521 
7522 
7523   windows_path="$new_path"
7524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7525     unix_path=`$CYGPATH -u "$windows_path"`
7526     new_path="$unix_path"
7527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7529     new_path="$unix_path"
7530   fi
7531 
7532   if test "x$path" != "x$new_path"; then
7533     CURDIR="$new_path"
7534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7535 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7536   fi
7537 
7538   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7539   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7540 
7541   else
7542     # We're on a posix platform. Hooray! :)
7543     path="$CURDIR"
7544     has_space=`$ECHO "$path" | $GREP " "`
7545     if test "x$has_space" != x; then
7546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7547 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7548       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7549     fi
7550 
7551     # Use eval to expand a potential ~
7552     eval path="$path"
7553     if test ! -f "$path" && test ! -d "$path"; then
7554       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7555     fi
7556 
7557     CURDIR="`cd "$path"; $THEPWDCMD -L`"
7558   fi
7559 
7560 
7561   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7562     # Add extra search paths on solaris for utilities like ar and as etc...
7563     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7564   fi
7565 
7566   # You can force the sys-root if the sys-root encoded into the cross compiler tools
7567   # is not correct.
7568 
7569 # Check whether --with-sys-root was given.
7570 if test "${with_sys_root+set}" = set; then :
7571   withval=$with_sys_root;
7572 fi
7573 
7574 
7575   if test "x$with_sys_root" != x; then
7576     SYS_ROOT=$with_sys_root
7577   else
7578     SYS_ROOT=/
7579   fi
7580 
7581 
7582 
7583 # Check whether --with-tools-dir was given.
7584 if test "${with_tools_dir+set}" = set; then :
7585   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7586 
7587 fi
7588 
7589 
7590 
7591 # Check whether --with-devkit was given.
7592 if test "${with_devkit+set}" = set; then :
7593   withval=$with_devkit;
7594         if test "x$with_sys_root" != x; then
7595           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7596         fi
7597 
7598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7599 
7600   # Input might be given as Windows format, start by converting to
7601   # unix format.
7602   path="$with_devkit"
7603   new_path=`$CYGPATH -u "$path"`
7604 
7605   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7606   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7607   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7608   # "foo.exe" is OK but "foo" is an error.
7609   #
7610   # This test is therefore slightly more accurate than "test -f" to check for file precense.
7611   # It is also a way to make sure we got the proper file name for the real test later on.
7612   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7613   if test "x$test_shortpath" = x; then
7614     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7615 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7616     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
7617   fi
7618 
7619   # Call helper function which possibly converts this using DOS-style short mode.
7620   # If so, the updated path is stored in $new_path.
7621 
7622   input_path="$new_path"
7623   # Check if we need to convert this using DOS-style short mode. If the path
7624   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7625   # take no chances and rewrite it.
7626   # Note: m4 eats our [], so we need to use [ and ] instead.
7627   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7628   if test "x$has_forbidden_chars" != x; then
7629     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7630     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7631     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7632     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7633       # Going to short mode and back again did indeed matter. Since short mode is
7634       # case insensitive, let's make it lowercase to improve readability.
7635       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7636       # Now convert it back to Unix-stile (cygpath)
7637       input_path=`$CYGPATH -u "$shortmode_path"`
7638       new_path="$input_path"
7639     fi
7640   fi
7641 
7642   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7643   if test "x$test_cygdrive_prefix" = x; then
7644     # As a simple fix, exclude /usr/bin since it's not a real path.
7645     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7646       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7647       # a path prefixed by /cygdrive for fixpath to work.
7648       new_path="$CYGWIN_ROOT_PATH$input_path"
7649     fi
7650   fi
7651 
7652 
7653   if test "x$path" != "x$new_path"; then
7654     with_devkit="$new_path"
7655     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7656 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7657   fi
7658 
7659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7660 
7661   path="$with_devkit"
7662   has_colon=`$ECHO $path | $GREP ^.:`
7663   new_path="$path"
7664   if test "x$has_colon" = x; then
7665     # Not in mixed or Windows style, start by that.
7666     new_path=`cmd //c echo $path`
7667   fi
7668 
7669 
7670   input_path="$new_path"
7671   # Check if we need to convert this using DOS-style short mode. If the path
7672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
7673   # take no chances and rewrite it.
7674   # Note: m4 eats our [], so we need to use [ and ] instead.
7675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7676   if test "x$has_forbidden_chars" != x; then
7677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7678     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7679   fi
7680 
7681 
7682   windows_path="$new_path"
7683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7684     unix_path=`$CYGPATH -u "$windows_path"`
7685     new_path="$unix_path"
7686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7688     new_path="$unix_path"
7689   fi
7690 
7691   if test "x$path" != "x$new_path"; then
7692     with_devkit="$new_path"
7693     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
7694 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
7695   fi
7696 
7697   # Save the first 10 bytes of this path to the storage, so fixpath can work.
7698   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7699 
7700   else
7701     # We're on a posix platform. Hooray! :)
7702     path="$with_devkit"
7703     has_space=`$ECHO "$path" | $GREP " "`
7704     if test "x$has_space" != x; then
7705       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
7706 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
7707       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7708     fi
7709 
7710     # Use eval to expand a potential ~
7711     eval path="$path"
7712     if test ! -f "$path" && test ! -d "$path"; then
7713       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
7714     fi
7715 
7716     with_devkit="`cd "$path"; $THEPWDCMD -L`"
7717   fi
7718 
7719 
7720   if test "x$TOOLS_DIR" = x; then
7721     TOOLS_DIR="$with_devkit/bin"
7722   else
7723     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
7724   fi
7725 
7726         if test -d "$with_devkit/$host_alias/libc"; then
7727           SYS_ROOT=$with_devkit/$host_alias/libc
7728         elif test -d "$with_devkit/$host/sys-root"; then
7729           SYS_ROOT=$with_devkit/$host/sys-root
7730         fi
7731 
7732 fi
7733 
7734 
7735 
7736   # Setup default logging of stdout and stderr to build.log in the output root.
7737   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7738   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7739   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7740 
7741 
7742 
7743 
7744 
7745 # Check if it's a pure open build or if custom sources are to be used.
7746 
7747   # Check whether --enable-openjdk-only was given.
7748 if test "${enable_openjdk_only+set}" = set; then :
7749   enableval=$enable_openjdk_only;
7750 else
7751   enable_openjdk_only="no"
7752 fi
7753 
7754 
7755   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7756 $as_echo_n "checking for presence of closed sources... " >&6; }
7757   if test -d "$SRC_ROOT/jdk/src/closed"; then
7758     CLOSED_SOURCE_PRESENT=yes
7759   else
7760     CLOSED_SOURCE_PRESENT=no
7761   fi
7762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7763 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7764 
7765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7766 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7767   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7769 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7770 
7771   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7772     OPENJDK=true
7773     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7774       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7775 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7776     fi
7777   else
7778     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7779       OPENJDK=true
7780     else
7781       OPENJDK=false
7782     fi
7783   fi
7784 
7785   if test "x$OPENJDK" = "xtrue"; then
7786     SET_OPENJDK="OPENJDK=true"
7787   fi
7788 
7789 
7790 
7791 
7792 # These are needed to be able to create a configuration name (and thus the output directory)
7793 
7794   ###############################################################################
7795   #
7796   # Check which variant of the JDK that we want to build.
7797   # Currently we have:
7798   #    normal:   standard edition
7799   # but the custom make system may add other variants
7800   #
7801   # Effectively the JDK variant gives a name to a specific set of
7802   # modules to compile into the JDK. In the future, these modules
7803   # might even be Jigsaw modules.
7804   #
7805   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7806 $as_echo_n "checking which variant of the JDK to build... " >&6; }
7807 
7808 # Check whether --with-jdk-variant was given.
7809 if test "${with_jdk_variant+set}" = set; then :
7810   withval=$with_jdk_variant;
7811 fi
7812 
7813 
7814   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7815     JDK_VARIANT="normal"
7816   else
7817     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7818   fi
7819 
7820 
7821 
7822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7823 $as_echo "$JDK_VARIANT" >&6; }
7824 
7825 
7826 ###############################################################################
7827 #
7828 # Check which interpreter of the JVM we want to build.
7829 # Currently we have:
7830 #    template: Template interpreter (the default)
7831 #    cpp     : C++ interpreter
7832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
7833 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
7834 
7835 # Check whether --with-jvm-interpreter was given.
7836 if test "${with_jvm_interpreter+set}" = set; then :
7837   withval=$with_jvm_interpreter;
7838 fi
7839 
7840 
7841 if test "x$with_jvm_interpreter" = x; then
7842      with_jvm_interpreter="template"
7843 fi
7844 
7845 JVM_INTERPRETER="$with_jvm_interpreter"
7846 
7847 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
7848    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
7849 fi
7850 
7851 
7852 
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
7854 $as_echo "$with_jvm_interpreter" >&6; }
7855 
7856 
7857 
7858   ###############################################################################
7859   #
7860   # Check which variants of the JVM that we want to build.
7861   # Currently we have:
7862   #    server: normal interpreter and a tiered C1/C2 compiler
7863   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7864   #    minimal1: reduced form of client with optional VM services and features stripped out
7865   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7866   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7867   #    zero: no machine code interpreter, no compiler
7868   #    zeroshark: zero interpreter and shark/llvm compiler backend
7869 #    core: interpreter only, no compiler (only works on some platforms)
7870   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7871 $as_echo_n "checking which variants of the JVM to build... " >&6; }
7872 
7873 # Check whether --with-jvm-variants was given.
7874 if test "${with_jvm_variants+set}" = set; then :
7875   withval=$with_jvm_variants;
7876 fi
7877 
7878 
7879   if test "x$with_jvm_variants" = x; then
7880     with_jvm_variants="server"
7881   fi
7882 
7883   JVM_VARIANTS=",$with_jvm_variants,"
7884   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,//'`
7885 
7886   if test "x$TEST_VARIANTS" != "x,"; then
7887      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
7888   fi
7889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7890 $as_echo "$with_jvm_variants" >&6; }
7891 
7892   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7893   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7894   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7895   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7896   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7897   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7898   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
7899 
7900   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7901     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7902       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7903     fi
7904   fi
7905   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7906     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7907       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7908     fi
7909   fi
7910   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7911     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7912       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7913     fi
7914   fi
7915 
7916   # Replace the commas with AND for use in the build directory name.
7917   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7918   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/'`
7919   if test "x$COUNT_VARIANTS" != "x,1"; then
7920     BUILDING_MULTIPLE_JVM_VARIANTS=yes
7921   else
7922     BUILDING_MULTIPLE_JVM_VARIANTS=no
7923   fi
7924 
7925 
7926 
7927 
7928 
7929 
7930 
7931 
7932 
7933 
7934   INCLUDE_SA=true
7935   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7936     INCLUDE_SA=false
7937   fi
7938   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7939     INCLUDE_SA=false
7940   fi
7941   if test "x$VAR_CPU" = xppc64 ; then
7942     INCLUDE_SA=false
7943   fi
7944 
7945 
7946   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7947     MACOSX_UNIVERSAL="true"
7948   fi
7949 
7950 
7951 
7952 
7953   ###############################################################################
7954   #
7955   # Set the debug level
7956   #    release: no debug information, all optimizations, no asserts.
7957   #    fastdebug: debug information (-g), all optimizations, all asserts
7958   #    slowdebug: debug information (-g), no optimizations, all asserts
7959   #
7960   DEBUG_LEVEL="release"
7961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7962 $as_echo_n "checking which debug level to use... " >&6; }
7963   # Check whether --enable-debug was given.
7964 if test "${enable_debug+set}" = set; then :
7965   enableval=$enable_debug;
7966         ENABLE_DEBUG="${enableval}"
7967         DEBUG_LEVEL="fastdebug"
7968 
7969 else
7970   ENABLE_DEBUG="no"
7971 fi
7972 
7973 
7974 
7975 # Check whether --with-debug-level was given.
7976 if test "${with_debug_level+set}" = set; then :
7977   withval=$with_debug_level;
7978         DEBUG_LEVEL="${withval}"
7979         if test "x$ENABLE_DEBUG" = xyes; then
7980           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7981         fi
7982 
7983 fi
7984 
7985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7986 $as_echo "$DEBUG_LEVEL" >&6; }
7987 
7988   if test "x$DEBUG_LEVEL" != xrelease && \
7989       test "x$DEBUG_LEVEL" != xfastdebug && \
7990       test "x$DEBUG_LEVEL" != xslowdebug; then
7991     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7992   fi
7993 
7994 
7995   ###############################################################################
7996   #
7997   # Setup legacy vars/targets and new vars to deal with different debug levels.
7998   #
7999 
8000   case $DEBUG_LEVEL in
8001     release )
8002       VARIANT="OPT"
8003       FASTDEBUG="false"
8004       DEBUG_CLASSFILES="false"
8005       BUILD_VARIANT_RELEASE=""
8006       HOTSPOT_DEBUG_LEVEL="product"
8007       HOTSPOT_EXPORT="product"
8008       ;;
8009     fastdebug )
8010       VARIANT="DBG"
8011       FASTDEBUG="true"
8012       DEBUG_CLASSFILES="true"
8013       BUILD_VARIANT_RELEASE="-fastdebug"
8014       HOTSPOT_DEBUG_LEVEL="fastdebug"
8015       HOTSPOT_EXPORT="fastdebug"
8016       ;;
8017     slowdebug )
8018       VARIANT="DBG"
8019       FASTDEBUG="false"
8020       DEBUG_CLASSFILES="true"
8021       BUILD_VARIANT_RELEASE="-debug"
8022       HOTSPOT_DEBUG_LEVEL="jvmg"
8023       HOTSPOT_EXPORT="debug"
8024       ;;
8025   esac
8026 
8027   #####
8028   # Generate the legacy makefile targets for hotspot.
8029   # The hotspot api for selecting the build artifacts, really, needs to be improved.
8030   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
8031   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
8032   # But until then ...
8033   HOTSPOT_TARGET=""
8034 
8035   if test "x$JVM_VARIANT_SERVER" = xtrue; then
8036     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
8037   fi
8038 
8039   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
8040     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
8041   fi
8042 
8043   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
8044     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
8045   fi
8046 
8047   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
8048     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
8049   fi
8050 
8051   if test "x$JVM_VARIANT_ZERO" = xtrue; then
8052     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
8053   fi
8054 
8055   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
8056     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
8057   fi
8058 
8059   if test "x$JVM_VARIANT_CORE" = xtrue; then
8060     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
8061   fi
8062 
8063   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
8064 
8065   # On Macosx universal binaries are produced, but they only contain
8066   # 64 bit intel. This invalidates control of which jvms are built
8067   # from configure, but only server is valid anyway. Fix this
8068   # when hotspot makefiles are rewritten.
8069   if test "x$MACOSX_UNIVERSAL" = xtrue; then
8070     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
8071   fi
8072 
8073   #####
8074 
8075 
8076 
8077 
8078 
8079 
8080 
8081 
8082 # With basic setup done, call the custom early hook.
8083 
8084 
8085 # To properly create a configuration name, we need to have the OpenJDK target
8086 # and options (variants and debug level) parsed.
8087 
8088 
8089 
8090 # Check whether --with-conf-name was given.
8091 if test "${with_conf_name+set}" = set; then :
8092   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
8093 fi
8094 
8095 
8096   # Test from where we are running configure, in or outside of src root.
8097   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
8098       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
8099       || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
8100     # We are running configure from the src root.
8101     # Create a default ./build/target-variant-debuglevel output root.
8102     if test "x${CONF_NAME}" = x; then
8103       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
8104     fi
8105     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
8106     $MKDIR -p "$OUTPUT_ROOT"
8107     if test ! -d "$OUTPUT_ROOT"; then
8108       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
8109     fi
8110   else
8111     # We are running configure from outside of the src dir.
8112     # Then use the current directory as output dir!
8113     # If configuration is situated in normal build directory, just use the build
8114     # directory name as configuration name, otherwise use the complete path.
8115     if test "x${CONF_NAME}" = x; then
8116       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
8117     fi
8118     OUTPUT_ROOT="$CURDIR"
8119 
8120     # WARNING: This might be a bad thing to do. You need to be sure you want to
8121     # have a configuration in this directory. Do some sanity checks!
8122 
8123     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
8124       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
8125       # other files
8126       files_present=`$LS $OUTPUT_ROOT`
8127       # Configure has already touched config.log and confdefs.h in the current dir when this check
8128       # is performed.
8129       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
8130       | $TR -d '\n'`
8131       if test "x$filtered_files" != x; then
8132         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
8133 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
8134         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
8135 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
8136         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
8137 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
8138         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
8139 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
8140         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
8141 $as_echo "$as_me: seriously mess up just about everything." >&6;}
8142         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8143 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8144         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8145 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8146         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8147       fi
8148     fi
8149   fi
8150   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8151 $as_echo_n "checking what configuration name to use... " >&6; }
8152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8153 $as_echo "$CONF_NAME" >&6; }
8154 
8155 
8156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8157 
8158   # Input might be given as Windows format, start by converting to
8159   # unix format.
8160   path="$OUTPUT_ROOT"
8161   new_path=`$CYGPATH -u "$path"`
8162 
8163   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8164   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8165   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8166   # "foo.exe" is OK but "foo" is an error.
8167   #
8168   # This test is therefore slightly more accurate than "test -f" to check for file precense.
8169   # It is also a way to make sure we got the proper file name for the real test later on.
8170   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8171   if test "x$test_shortpath" = x; then
8172     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8173 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8174     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8175   fi
8176 
8177   # Call helper function which possibly converts this using DOS-style short mode.
8178   # If so, the updated path is stored in $new_path.
8179 
8180   input_path="$new_path"
8181   # Check if we need to convert this using DOS-style short mode. If the path
8182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8183   # take no chances and rewrite it.
8184   # Note: m4 eats our [], so we need to use [ and ] instead.
8185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8186   if test "x$has_forbidden_chars" != x; then
8187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8188     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8189     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8190     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8191       # Going to short mode and back again did indeed matter. Since short mode is
8192       # case insensitive, let's make it lowercase to improve readability.
8193       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8194       # Now convert it back to Unix-stile (cygpath)
8195       input_path=`$CYGPATH -u "$shortmode_path"`
8196       new_path="$input_path"
8197     fi
8198   fi
8199 
8200   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8201   if test "x$test_cygdrive_prefix" = x; then
8202     # As a simple fix, exclude /usr/bin since it's not a real path.
8203     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8204       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8205       # a path prefixed by /cygdrive for fixpath to work.
8206       new_path="$CYGWIN_ROOT_PATH$input_path"
8207     fi
8208   fi
8209 
8210 
8211   if test "x$path" != "x$new_path"; then
8212     OUTPUT_ROOT="$new_path"
8213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8214 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8215   fi
8216 
8217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8218 
8219   path="$OUTPUT_ROOT"
8220   has_colon=`$ECHO $path | $GREP ^.:`
8221   new_path="$path"
8222   if test "x$has_colon" = x; then
8223     # Not in mixed or Windows style, start by that.
8224     new_path=`cmd //c echo $path`
8225   fi
8226 
8227 
8228   input_path="$new_path"
8229   # Check if we need to convert this using DOS-style short mode. If the path
8230   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8231   # take no chances and rewrite it.
8232   # Note: m4 eats our [], so we need to use [ and ] instead.
8233   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8234   if test "x$has_forbidden_chars" != x; then
8235     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8236     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8237   fi
8238 
8239 
8240   windows_path="$new_path"
8241   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8242     unix_path=`$CYGPATH -u "$windows_path"`
8243     new_path="$unix_path"
8244   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8245     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8246     new_path="$unix_path"
8247   fi
8248 
8249   if test "x$path" != "x$new_path"; then
8250     OUTPUT_ROOT="$new_path"
8251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8252 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8253   fi
8254 
8255   # Save the first 10 bytes of this path to the storage, so fixpath can work.
8256   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8257 
8258   else
8259     # We're on a posix platform. Hooray! :)
8260     path="$OUTPUT_ROOT"
8261     has_space=`$ECHO "$path" | $GREP " "`
8262     if test "x$has_space" != x; then
8263       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8264 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8265       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8266     fi
8267 
8268     # Use eval to expand a potential ~
8269     eval path="$path"
8270     if test ! -f "$path" && test ! -d "$path"; then
8271       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8272     fi
8273 
8274     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
8275   fi
8276 
8277 
8278   SPEC=$OUTPUT_ROOT/spec.gmk
8279 
8280   CONF_NAME=$CONF_NAME
8281 
8282   OUTPUT_ROOT=$OUTPUT_ROOT
8283 
8284 
8285   # Most of the probed defines are put into config.h
8286   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8287 
8288   # The spec.gmk file contains all variables for the make system.
8289   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8290 
8291   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8292   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8293 
8294   # The bootcycle-spec.gmk file contains support for boot cycle builds.
8295   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8296 
8297   # The compare.sh is used to compare the build output to other builds.
8298   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8299 
8300   # Spec.sh is currently used by compare-objects.sh
8301   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8302 
8303   # The generated Makefile knows where the spec.gmk is and where the source is.
8304   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8305   # which will look for generated configurations
8306   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8307 
8308 
8309   # Save the arguments given to us
8310   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8311 
8312 
8313 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8314 
8315   for ac_prog in apt-get yum port pkgutil pkgadd
8316 do
8317   # Extract the first word of "$ac_prog", so it can be a program name with args.
8318 set dummy $ac_prog; ac_word=$2
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8320 $as_echo_n "checking for $ac_word... " >&6; }
8321 if ${ac_cv_prog_PKGHANDLER+:} false; then :
8322   $as_echo_n "(cached) " >&6
8323 else
8324   if test -n "$PKGHANDLER"; then
8325   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8326 else
8327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8328 for as_dir in $PATH
8329 do
8330   IFS=$as_save_IFS
8331   test -z "$as_dir" && as_dir=.
8332     for ac_exec_ext in '' $ac_executable_extensions; do
8333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8334     ac_cv_prog_PKGHANDLER="$ac_prog"
8335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8336     break 2
8337   fi
8338 done
8339   done
8340 IFS=$as_save_IFS
8341 
8342 fi
8343 fi
8344 PKGHANDLER=$ac_cv_prog_PKGHANDLER
8345 if test -n "$PKGHANDLER"; then
8346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8347 $as_echo "$PKGHANDLER" >&6; }
8348 else
8349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8350 $as_echo "no" >&6; }
8351 fi
8352 
8353 
8354   test -n "$PKGHANDLER" && break
8355 done
8356 
8357 
8358 
8359 # Setup tools that requires more complex handling, or that is not needed by the configure script.
8360 
8361 
8362   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8363   if test "x$MAKE" != x; then
8364     # User has supplied a make, test it.
8365     if test ! -f "$MAKE"; then
8366       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8367     fi
8368 
8369   MAKE_CANDIDATE=""$MAKE""
8370   DESCRIPTION="user supplied MAKE=$MAKE"
8371   if test "x$MAKE_CANDIDATE" != x; then
8372     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8373 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8374     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8375     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8376     if test "x$IS_GNU_MAKE" = x; then
8377       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8378 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8379     else
8380       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8381       if test "x$IS_MODERN_MAKE" = x; then
8382         { $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
8383 $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;}
8384       else
8385         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8386           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8387             MAKE_EXPECTED_ENV='cygwin'
8388           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8389             MAKE_EXPECTED_ENV='msys'
8390           else
8391             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8392           fi
8393           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8394           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8395         else
8396           # Not relevant for non-Windows
8397           IS_MAKE_CORRECT_ENV=true
8398         fi
8399         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8400           { $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
8401 $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;}
8402         else
8403           FOUND_MAKE=$MAKE_CANDIDATE
8404 
8405   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8406 
8407   # First separate the path from the arguments. This will split at the first
8408   # space.
8409   complete="$FOUND_MAKE"
8410   path="${complete%% *}"
8411   tmp="$complete EOL"
8412   arguments="${tmp#* }"
8413 
8414   # Input might be given as Windows format, start by converting to
8415   # unix format.
8416   new_path=`$CYGPATH -u "$path"`
8417 
8418   # Now try to locate executable using which
8419   new_path=`$WHICH "$new_path" 2> /dev/null`
8420   # bat and cmd files are not always considered executable in cygwin causing which
8421   # to not find them
8422   if test "x$new_path" = x \
8423       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8424       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8425     new_path=`$CYGPATH -u "$path"`
8426   fi
8427   if test "x$new_path" = x; then
8428     # Oops. Which didn't find the executable.
8429     # The splitting of arguments from the executable at a space might have been incorrect,
8430     # since paths with space are more likely in Windows. Give it another try with the whole
8431     # argument.
8432     path="$complete"
8433     arguments="EOL"
8434     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
8445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8446 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8447       has_space=`$ECHO "$complete" | $GREP " "`
8448       if test "x$has_space" != x; then
8449         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8450 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8451       fi
8452       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8453     fi
8454   fi
8455 
8456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8459   # "foo.exe" is OK but "foo" is an error.
8460   #
8461   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8462   # It is also a way to make sure we got the proper file name for the real test later on.
8463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8464   if test "x$test_shortpath" = x; then
8465     # Short path failed, file does not exist as specified.
8466     # Try adding .exe or .cmd
8467     if test -f "${new_path}.exe"; then
8468       input_to_shortpath="${new_path}.exe"
8469     elif test -f "${new_path}.cmd"; then
8470       input_to_shortpath="${new_path}.cmd"
8471     else
8472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8473 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8474       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8475 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8476       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8477     fi
8478   else
8479     input_to_shortpath="$new_path"
8480   fi
8481 
8482   # Call helper function which possibly converts this using DOS-style short mode.
8483   # If so, the updated path is stored in $new_path.
8484   new_path="$input_to_shortpath"
8485 
8486   input_path="$input_to_shortpath"
8487   # Check if we need to convert this using DOS-style short mode. If the path
8488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8489   # take no chances and rewrite it.
8490   # Note: m4 eats our [], so we need to use [ and ] instead.
8491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8492   if test "x$has_forbidden_chars" != x; then
8493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8497       # Going to short mode and back again did indeed matter. Since short mode is
8498       # case insensitive, let's make it lowercase to improve readability.
8499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8500       # Now convert it back to Unix-stile (cygpath)
8501       input_path=`$CYGPATH -u "$shortmode_path"`
8502       new_path="$input_path"
8503     fi
8504   fi
8505 
8506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8507   if test "x$test_cygdrive_prefix" = x; then
8508     # As a simple fix, exclude /usr/bin since it's not a real path.
8509     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8511       # a path prefixed by /cygdrive for fixpath to work.
8512       new_path="$CYGWIN_ROOT_PATH$input_path"
8513     fi
8514   fi
8515 
8516   # remove trailing .exe if any
8517   new_path="${new_path/%.exe/}"
8518 
8519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8520 
8521   # First separate the path from the arguments. This will split at the first
8522   # space.
8523   complete="$FOUND_MAKE"
8524   path="${complete%% *}"
8525   tmp="$complete EOL"
8526   arguments="${tmp#* }"
8527 
8528   # Input might be given as Windows format, start by converting to
8529   # unix format.
8530   new_path="$path"
8531 
8532   windows_path="$new_path"
8533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8534     unix_path=`$CYGPATH -u "$windows_path"`
8535     new_path="$unix_path"
8536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8538     new_path="$unix_path"
8539   fi
8540 
8541 
8542   # Now try to locate executable using which
8543   new_path=`$WHICH "$new_path" 2> /dev/null`
8544 
8545   if test "x$new_path" = x; then
8546     # Oops. Which didn't find the executable.
8547     # The splitting of arguments from the executable at a space might have been incorrect,
8548     # since paths with space are more likely in Windows. Give it another try with the whole
8549     # argument.
8550     path="$complete"
8551     arguments="EOL"
8552     new_path="$path"
8553 
8554   windows_path="$new_path"
8555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8556     unix_path=`$CYGPATH -u "$windows_path"`
8557     new_path="$unix_path"
8558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8560     new_path="$unix_path"
8561   fi
8562 
8563 
8564     new_path=`$WHICH "$new_path" 2> /dev/null`
8565 
8566     if test "x$new_path" = x; then
8567       # It's still not found. Now this is an unrecoverable error.
8568       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8569 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8570       has_space=`$ECHO "$complete" | $GREP " "`
8571       if test "x$has_space" != x; then
8572         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8573 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8574       fi
8575       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8576     fi
8577   fi
8578 
8579   # Now new_path has a complete unix path to the binary
8580   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8581     # Keep paths in /bin as-is, but remove trailing .exe if any
8582     new_path="${new_path/%.exe/}"
8583     # Do not save /bin paths to all_fixpath_prefixes!
8584   else
8585     # Not in mixed or Windows style, start by that.
8586     new_path=`cmd //c echo $new_path`
8587 
8588   input_path="$new_path"
8589   # Check if we need to convert this using DOS-style short mode. If the path
8590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8591   # take no chances and rewrite it.
8592   # Note: m4 eats our [], so we need to use [ and ] instead.
8593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8594   if test "x$has_forbidden_chars" != x; then
8595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8596     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8597   fi
8598 
8599     # Output is in $new_path
8600 
8601   windows_path="$new_path"
8602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8603     unix_path=`$CYGPATH -u "$windows_path"`
8604     new_path="$unix_path"
8605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8607     new_path="$unix_path"
8608   fi
8609 
8610     # remove trailing .exe if any
8611     new_path="${new_path/%.exe/}"
8612 
8613     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8614     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8615   fi
8616 
8617   else
8618     # We're on a posix platform. Hooray! :)
8619     # First separate the path from the arguments. This will split at the first
8620     # space.
8621     complete="$FOUND_MAKE"
8622     path="${complete%% *}"
8623     tmp="$complete EOL"
8624     arguments="${tmp#* }"
8625 
8626     # Cannot rely on the command "which" here since it doesn't always work.
8627     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8628     if test -z "$is_absolute_path"; then
8629       # Path to executable is not absolute. Find it.
8630       IFS_save="$IFS"
8631       IFS=:
8632       for p in $PATH; do
8633         if test -f "$p/$path" && test -x "$p/$path"; then
8634           new_path="$p/$path"
8635           break
8636         fi
8637       done
8638       IFS="$IFS_save"
8639     else
8640       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8641 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8642       new_path="$path"
8643     fi
8644 
8645     if test "x$new_path" = x; then
8646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8647 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8648       has_space=`$ECHO "$complete" | $GREP " "`
8649       if test "x$has_space" != x; then
8650         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8651 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8652       fi
8653       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8654     fi
8655   fi
8656 
8657   # Now join together the path and the arguments once again
8658   if test "x$arguments" != xEOL; then
8659     new_complete="$new_path ${arguments% *}"
8660   else
8661     new_complete="$new_path"
8662   fi
8663 
8664   if test "x$complete" != "x$new_complete"; then
8665     FOUND_MAKE="$new_complete"
8666     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8667 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8668   fi
8669 
8670         fi
8671       fi
8672     fi
8673   fi
8674 
8675     if test "x$FOUND_MAKE" = x; then
8676       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8677     fi
8678   else
8679     # Try our hardest to locate a correct version of GNU make
8680     for ac_prog in gmake
8681 do
8682   # Extract the first word of "$ac_prog", so it can be a program name with args.
8683 set dummy $ac_prog; ac_word=$2
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8685 $as_echo_n "checking for $ac_word... " >&6; }
8686 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
8687   $as_echo_n "(cached) " >&6
8688 else
8689   case $CHECK_GMAKE in
8690   [\\/]* | ?:[\\/]*)
8691   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8692   ;;
8693   *)
8694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8695 for as_dir in $PATH
8696 do
8697   IFS=$as_save_IFS
8698   test -z "$as_dir" && as_dir=.
8699     for ac_exec_ext in '' $ac_executable_extensions; do
8700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8701     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8703     break 2
8704   fi
8705 done
8706   done
8707 IFS=$as_save_IFS
8708 
8709   ;;
8710 esac
8711 fi
8712 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8713 if test -n "$CHECK_GMAKE"; then
8714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8715 $as_echo "$CHECK_GMAKE" >&6; }
8716 else
8717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718 $as_echo "no" >&6; }
8719 fi
8720 
8721 
8722   test -n "$CHECK_GMAKE" && break
8723 done
8724 
8725 
8726   MAKE_CANDIDATE=""$CHECK_GMAKE""
8727   DESCRIPTION="gmake in PATH"
8728   if test "x$MAKE_CANDIDATE" != x; then
8729     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8730 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8731     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8732     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8733     if test "x$IS_GNU_MAKE" = x; then
8734       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8735 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8736     else
8737       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
8738       if test "x$IS_MODERN_MAKE" = x; then
8739         { $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
8740 $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;}
8741       else
8742         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8743           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8744             MAKE_EXPECTED_ENV='cygwin'
8745           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8746             MAKE_EXPECTED_ENV='msys'
8747           else
8748             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8749           fi
8750           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8751           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8752         else
8753           # Not relevant for non-Windows
8754           IS_MAKE_CORRECT_ENV=true
8755         fi
8756         if test "x$IS_MAKE_CORRECT_ENV" = x; then
8757           { $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
8758 $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;}
8759         else
8760           FOUND_MAKE=$MAKE_CANDIDATE
8761 
8762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8763 
8764   # First separate the path from the arguments. This will split at the first
8765   # space.
8766   complete="$FOUND_MAKE"
8767   path="${complete%% *}"
8768   tmp="$complete EOL"
8769   arguments="${tmp#* }"
8770 
8771   # Input might be given as Windows format, start by converting to
8772   # unix format.
8773   new_path=`$CYGPATH -u "$path"`
8774 
8775   # Now try to locate executable using which
8776   new_path=`$WHICH "$new_path" 2> /dev/null`
8777   # bat and cmd files are not always considered executable in cygwin causing which
8778   # to not find them
8779   if test "x$new_path" = x \
8780       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8781       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8782     new_path=`$CYGPATH -u "$path"`
8783   fi
8784   if test "x$new_path" = x; then
8785     # Oops. Which didn't find the executable.
8786     # The splitting of arguments from the executable at a space might have been incorrect,
8787     # since paths with space are more likely in Windows. Give it another try with the whole
8788     # argument.
8789     path="$complete"
8790     arguments="EOL"
8791     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
8802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8803 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8804       has_space=`$ECHO "$complete" | $GREP " "`
8805       if test "x$has_space" != x; then
8806         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8807 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8808       fi
8809       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8810     fi
8811   fi
8812 
8813   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8814   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8815   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8816   # "foo.exe" is OK but "foo" is an error.
8817   #
8818   # This test is therefore slightly more accurate than "test -f" to check for file presence.
8819   # It is also a way to make sure we got the proper file name for the real test later on.
8820   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8821   if test "x$test_shortpath" = x; then
8822     # Short path failed, file does not exist as specified.
8823     # Try adding .exe or .cmd
8824     if test -f "${new_path}.exe"; then
8825       input_to_shortpath="${new_path}.exe"
8826     elif test -f "${new_path}.cmd"; then
8827       input_to_shortpath="${new_path}.cmd"
8828     else
8829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8830 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8831       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8832 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8833       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8834     fi
8835   else
8836     input_to_shortpath="$new_path"
8837   fi
8838 
8839   # Call helper function which possibly converts this using DOS-style short mode.
8840   # If so, the updated path is stored in $new_path.
8841   new_path="$input_to_shortpath"
8842 
8843   input_path="$input_to_shortpath"
8844   # Check if we need to convert this using DOS-style short mode. If the path
8845   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8846   # take no chances and rewrite it.
8847   # Note: m4 eats our [], so we need to use [ and ] instead.
8848   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8849   if test "x$has_forbidden_chars" != x; then
8850     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8851     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8852     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8853     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8854       # Going to short mode and back again did indeed matter. Since short mode is
8855       # case insensitive, let's make it lowercase to improve readability.
8856       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8857       # Now convert it back to Unix-stile (cygpath)
8858       input_path=`$CYGPATH -u "$shortmode_path"`
8859       new_path="$input_path"
8860     fi
8861   fi
8862 
8863   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8864   if test "x$test_cygdrive_prefix" = x; then
8865     # As a simple fix, exclude /usr/bin since it's not a real path.
8866     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8867       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8868       # a path prefixed by /cygdrive for fixpath to work.
8869       new_path="$CYGWIN_ROOT_PATH$input_path"
8870     fi
8871   fi
8872 
8873   # remove trailing .exe if any
8874   new_path="${new_path/%.exe/}"
8875 
8876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8877 
8878   # First separate the path from the arguments. This will split at the first
8879   # space.
8880   complete="$FOUND_MAKE"
8881   path="${complete%% *}"
8882   tmp="$complete EOL"
8883   arguments="${tmp#* }"
8884 
8885   # Input might be given as Windows format, start by converting to
8886   # unix format.
8887   new_path="$path"
8888 
8889   windows_path="$new_path"
8890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8891     unix_path=`$CYGPATH -u "$windows_path"`
8892     new_path="$unix_path"
8893   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8894     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8895     new_path="$unix_path"
8896   fi
8897 
8898 
8899   # Now try to locate executable using which
8900   new_path=`$WHICH "$new_path" 2> /dev/null`
8901 
8902   if test "x$new_path" = x; then
8903     # Oops. Which didn't find the executable.
8904     # The splitting of arguments from the executable at a space might have been incorrect,
8905     # since paths with space are more likely in Windows. Give it another try with the whole
8906     # argument.
8907     path="$complete"
8908     arguments="EOL"
8909     new_path="$path"
8910 
8911   windows_path="$new_path"
8912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8913     unix_path=`$CYGPATH -u "$windows_path"`
8914     new_path="$unix_path"
8915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8917     new_path="$unix_path"
8918   fi
8919 
8920 
8921     new_path=`$WHICH "$new_path" 2> /dev/null`
8922 
8923     if test "x$new_path" = x; then
8924       # It's still not found. Now this is an unrecoverable error.
8925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8926 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8927       has_space=`$ECHO "$complete" | $GREP " "`
8928       if test "x$has_space" != x; then
8929         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8930 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8931       fi
8932       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8933     fi
8934   fi
8935 
8936   # Now new_path has a complete unix path to the binary
8937   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8938     # Keep paths in /bin as-is, but remove trailing .exe if any
8939     new_path="${new_path/%.exe/}"
8940     # Do not save /bin paths to all_fixpath_prefixes!
8941   else
8942     # Not in mixed or Windows style, start by that.
8943     new_path=`cmd //c echo $new_path`
8944 
8945   input_path="$new_path"
8946   # Check if we need to convert this using DOS-style short mode. If the path
8947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
8948   # take no chances and rewrite it.
8949   # Note: m4 eats our [], so we need to use [ and ] instead.
8950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8951   if test "x$has_forbidden_chars" != x; then
8952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8954   fi
8955 
8956     # Output is in $new_path
8957 
8958   windows_path="$new_path"
8959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8960     unix_path=`$CYGPATH -u "$windows_path"`
8961     new_path="$unix_path"
8962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8964     new_path="$unix_path"
8965   fi
8966 
8967     # remove trailing .exe if any
8968     new_path="${new_path/%.exe/}"
8969 
8970     # Save the first 10 bytes of this path to the storage, so fixpath can work.
8971     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8972   fi
8973 
8974   else
8975     # We're on a posix platform. Hooray! :)
8976     # First separate the path from the arguments. This will split at the first
8977     # space.
8978     complete="$FOUND_MAKE"
8979     path="${complete%% *}"
8980     tmp="$complete EOL"
8981     arguments="${tmp#* }"
8982 
8983     # Cannot rely on the command "which" here since it doesn't always work.
8984     is_absolute_path=`$ECHO "$path" | $GREP ^/`
8985     if test -z "$is_absolute_path"; then
8986       # Path to executable is not absolute. Find it.
8987       IFS_save="$IFS"
8988       IFS=:
8989       for p in $PATH; do
8990         if test -f "$p/$path" && test -x "$p/$path"; then
8991           new_path="$p/$path"
8992           break
8993         fi
8994       done
8995       IFS="$IFS_save"
8996     else
8997       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8998 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8999       new_path="$path"
9000     fi
9001 
9002     if test "x$new_path" = x; then
9003       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9004 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9005       has_space=`$ECHO "$complete" | $GREP " "`
9006       if test "x$has_space" != x; then
9007         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9008 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9009       fi
9010       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9011     fi
9012   fi
9013 
9014   # Now join together the path and the arguments once again
9015   if test "x$arguments" != xEOL; then
9016     new_complete="$new_path ${arguments% *}"
9017   else
9018     new_complete="$new_path"
9019   fi
9020 
9021   if test "x$complete" != "x$new_complete"; then
9022     FOUND_MAKE="$new_complete"
9023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9024 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9025   fi
9026 
9027         fi
9028       fi
9029     fi
9030   fi
9031 
9032 
9033     if test "x$FOUND_MAKE" = x; then
9034       for ac_prog in make
9035 do
9036   # Extract the first word of "$ac_prog", so it can be a program name with args.
9037 set dummy $ac_prog; ac_word=$2
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9039 $as_echo_n "checking for $ac_word... " >&6; }
9040 if ${ac_cv_path_CHECK_MAKE+:} false; then :
9041   $as_echo_n "(cached) " >&6
9042 else
9043   case $CHECK_MAKE in
9044   [\\/]* | ?:[\\/]*)
9045   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
9046   ;;
9047   *)
9048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9049 for as_dir in $PATH
9050 do
9051   IFS=$as_save_IFS
9052   test -z "$as_dir" && as_dir=.
9053     for ac_exec_ext in '' $ac_executable_extensions; do
9054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9055     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
9056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9057     break 2
9058   fi
9059 done
9060   done
9061 IFS=$as_save_IFS
9062 
9063   ;;
9064 esac
9065 fi
9066 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
9067 if test -n "$CHECK_MAKE"; then
9068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
9069 $as_echo "$CHECK_MAKE" >&6; }
9070 else
9071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9072 $as_echo "no" >&6; }
9073 fi
9074 
9075 
9076   test -n "$CHECK_MAKE" && break
9077 done
9078 
9079 
9080   MAKE_CANDIDATE=""$CHECK_MAKE""
9081   DESCRIPTION="make in PATH"
9082   if test "x$MAKE_CANDIDATE" != x; then
9083     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9084 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9085     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9086     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9087     if test "x$IS_GNU_MAKE" = x; then
9088       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9089 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9090     else
9091       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9092       if test "x$IS_MODERN_MAKE" = x; then
9093         { $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
9094 $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;}
9095       else
9096         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9097           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9098             MAKE_EXPECTED_ENV='cygwin'
9099           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9100             MAKE_EXPECTED_ENV='msys'
9101           else
9102             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9103           fi
9104           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9105           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9106         else
9107           # Not relevant for non-Windows
9108           IS_MAKE_CORRECT_ENV=true
9109         fi
9110         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9111           { $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
9112 $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;}
9113         else
9114           FOUND_MAKE=$MAKE_CANDIDATE
9115 
9116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9117 
9118   # First separate the path from the arguments. This will split at the first
9119   # space.
9120   complete="$FOUND_MAKE"
9121   path="${complete%% *}"
9122   tmp="$complete EOL"
9123   arguments="${tmp#* }"
9124 
9125   # Input might be given as Windows format, start by converting to
9126   # unix format.
9127   new_path=`$CYGPATH -u "$path"`
9128 
9129   # Now try to locate executable using which
9130   new_path=`$WHICH "$new_path" 2> /dev/null`
9131   # bat and cmd files are not always considered executable in cygwin causing which
9132   # to not find them
9133   if test "x$new_path" = x \
9134       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9135       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9136     new_path=`$CYGPATH -u "$path"`
9137   fi
9138   if test "x$new_path" = x; then
9139     # Oops. Which didn't find the executable.
9140     # The splitting of arguments from the executable at a space might have been incorrect,
9141     # since paths with space are more likely in Windows. Give it another try with the whole
9142     # argument.
9143     path="$complete"
9144     arguments="EOL"
9145     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
9156       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9157 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9158       has_space=`$ECHO "$complete" | $GREP " "`
9159       if test "x$has_space" != x; then
9160         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9161 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9162       fi
9163       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9164     fi
9165   fi
9166 
9167   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9168   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9169   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9170   # "foo.exe" is OK but "foo" is an error.
9171   #
9172   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9173   # It is also a way to make sure we got the proper file name for the real test later on.
9174   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9175   if test "x$test_shortpath" = x; then
9176     # Short path failed, file does not exist as specified.
9177     # Try adding .exe or .cmd
9178     if test -f "${new_path}.exe"; then
9179       input_to_shortpath="${new_path}.exe"
9180     elif test -f "${new_path}.cmd"; then
9181       input_to_shortpath="${new_path}.cmd"
9182     else
9183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9184 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9185       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9186 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9187       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9188     fi
9189   else
9190     input_to_shortpath="$new_path"
9191   fi
9192 
9193   # Call helper function which possibly converts this using DOS-style short mode.
9194   # If so, the updated path is stored in $new_path.
9195   new_path="$input_to_shortpath"
9196 
9197   input_path="$input_to_shortpath"
9198   # Check if we need to convert this using DOS-style short mode. If the path
9199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9200   # take no chances and rewrite it.
9201   # Note: m4 eats our [], so we need to use [ and ] instead.
9202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9203   if test "x$has_forbidden_chars" != x; then
9204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9205     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9206     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9207     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9208       # Going to short mode and back again did indeed matter. Since short mode is
9209       # case insensitive, let's make it lowercase to improve readability.
9210       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9211       # Now convert it back to Unix-stile (cygpath)
9212       input_path=`$CYGPATH -u "$shortmode_path"`
9213       new_path="$input_path"
9214     fi
9215   fi
9216 
9217   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9218   if test "x$test_cygdrive_prefix" = x; then
9219     # As a simple fix, exclude /usr/bin since it's not a real path.
9220     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9221       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9222       # a path prefixed by /cygdrive for fixpath to work.
9223       new_path="$CYGWIN_ROOT_PATH$input_path"
9224     fi
9225   fi
9226 
9227   # remove trailing .exe if any
9228   new_path="${new_path/%.exe/}"
9229 
9230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9231 
9232   # First separate the path from the arguments. This will split at the first
9233   # space.
9234   complete="$FOUND_MAKE"
9235   path="${complete%% *}"
9236   tmp="$complete EOL"
9237   arguments="${tmp#* }"
9238 
9239   # Input might be given as Windows format, start by converting to
9240   # unix format.
9241   new_path="$path"
9242 
9243   windows_path="$new_path"
9244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9245     unix_path=`$CYGPATH -u "$windows_path"`
9246     new_path="$unix_path"
9247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9249     new_path="$unix_path"
9250   fi
9251 
9252 
9253   # Now try to locate executable using which
9254   new_path=`$WHICH "$new_path" 2> /dev/null`
9255 
9256   if test "x$new_path" = x; then
9257     # Oops. Which didn't find the executable.
9258     # The splitting of arguments from the executable at a space might have been incorrect,
9259     # since paths with space are more likely in Windows. Give it another try with the whole
9260     # argument.
9261     path="$complete"
9262     arguments="EOL"
9263     new_path="$path"
9264 
9265   windows_path="$new_path"
9266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9267     unix_path=`$CYGPATH -u "$windows_path"`
9268     new_path="$unix_path"
9269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9271     new_path="$unix_path"
9272   fi
9273 
9274 
9275     new_path=`$WHICH "$new_path" 2> /dev/null`
9276 
9277     if test "x$new_path" = x; then
9278       # It's still not found. Now this is an unrecoverable error.
9279       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9280 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9281       has_space=`$ECHO "$complete" | $GREP " "`
9282       if test "x$has_space" != x; then
9283         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9284 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9285       fi
9286       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9287     fi
9288   fi
9289 
9290   # Now new_path has a complete unix path to the binary
9291   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9292     # Keep paths in /bin as-is, but remove trailing .exe if any
9293     new_path="${new_path/%.exe/}"
9294     # Do not save /bin paths to all_fixpath_prefixes!
9295   else
9296     # Not in mixed or Windows style, start by that.
9297     new_path=`cmd //c echo $new_path`
9298 
9299   input_path="$new_path"
9300   # Check if we need to convert this using DOS-style short mode. If the path
9301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9302   # take no chances and rewrite it.
9303   # Note: m4 eats our [], so we need to use [ and ] instead.
9304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9305   if test "x$has_forbidden_chars" != x; then
9306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9307     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9308   fi
9309 
9310     # Output is in $new_path
9311 
9312   windows_path="$new_path"
9313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9314     unix_path=`$CYGPATH -u "$windows_path"`
9315     new_path="$unix_path"
9316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9318     new_path="$unix_path"
9319   fi
9320 
9321     # remove trailing .exe if any
9322     new_path="${new_path/%.exe/}"
9323 
9324     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9325     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9326   fi
9327 
9328   else
9329     # We're on a posix platform. Hooray! :)
9330     # First separate the path from the arguments. This will split at the first
9331     # space.
9332     complete="$FOUND_MAKE"
9333     path="${complete%% *}"
9334     tmp="$complete EOL"
9335     arguments="${tmp#* }"
9336 
9337     # Cannot rely on the command "which" here since it doesn't always work.
9338     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9339     if test -z "$is_absolute_path"; then
9340       # Path to executable is not absolute. Find it.
9341       IFS_save="$IFS"
9342       IFS=:
9343       for p in $PATH; do
9344         if test -f "$p/$path" && test -x "$p/$path"; then
9345           new_path="$p/$path"
9346           break
9347         fi
9348       done
9349       IFS="$IFS_save"
9350     else
9351       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9352 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9353       new_path="$path"
9354     fi
9355 
9356     if test "x$new_path" = x; then
9357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9358 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9359       has_space=`$ECHO "$complete" | $GREP " "`
9360       if test "x$has_space" != x; then
9361         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9362 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9363       fi
9364       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9365     fi
9366   fi
9367 
9368   # Now join together the path and the arguments once again
9369   if test "x$arguments" != xEOL; then
9370     new_complete="$new_path ${arguments% *}"
9371   else
9372     new_complete="$new_path"
9373   fi
9374 
9375   if test "x$complete" != "x$new_complete"; then
9376     FOUND_MAKE="$new_complete"
9377     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9378 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9379   fi
9380 
9381         fi
9382       fi
9383     fi
9384   fi
9385 
9386     fi
9387 
9388     if test "x$FOUND_MAKE" = x; then
9389       if test "x$TOOLS_DIR" != x; then
9390         # We have a tools-dir, check that as well before giving up.
9391         OLD_PATH=$PATH
9392         PATH=$TOOLS_DIR:$PATH
9393         for ac_prog in gmake
9394 do
9395   # Extract the first word of "$ac_prog", so it can be a program name with args.
9396 set dummy $ac_prog; ac_word=$2
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9398 $as_echo_n "checking for $ac_word... " >&6; }
9399 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
9400   $as_echo_n "(cached) " >&6
9401 else
9402   case $CHECK_TOOLSDIR_GMAKE in
9403   [\\/]* | ?:[\\/]*)
9404   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9405   ;;
9406   *)
9407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9408 for as_dir in $PATH
9409 do
9410   IFS=$as_save_IFS
9411   test -z "$as_dir" && as_dir=.
9412     for ac_exec_ext in '' $ac_executable_extensions; do
9413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9414     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9416     break 2
9417   fi
9418 done
9419   done
9420 IFS=$as_save_IFS
9421 
9422   ;;
9423 esac
9424 fi
9425 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9426 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9428 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9429 else
9430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9431 $as_echo "no" >&6; }
9432 fi
9433 
9434 
9435   test -n "$CHECK_TOOLSDIR_GMAKE" && break
9436 done
9437 
9438 
9439   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9440   DESCRIPTION="gmake in tools-dir"
9441   if test "x$MAKE_CANDIDATE" != x; then
9442     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9443 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9444     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9445     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9446     if test "x$IS_GNU_MAKE" = x; then
9447       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9448 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9449     else
9450       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9451       if test "x$IS_MODERN_MAKE" = x; then
9452         { $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
9453 $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;}
9454       else
9455         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9456           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9457             MAKE_EXPECTED_ENV='cygwin'
9458           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9459             MAKE_EXPECTED_ENV='msys'
9460           else
9461             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9462           fi
9463           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9464           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9465         else
9466           # Not relevant for non-Windows
9467           IS_MAKE_CORRECT_ENV=true
9468         fi
9469         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9470           { $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
9471 $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;}
9472         else
9473           FOUND_MAKE=$MAKE_CANDIDATE
9474 
9475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9476 
9477   # First separate the path from the arguments. This will split at the first
9478   # space.
9479   complete="$FOUND_MAKE"
9480   path="${complete%% *}"
9481   tmp="$complete EOL"
9482   arguments="${tmp#* }"
9483 
9484   # Input might be given as Windows format, start by converting to
9485   # unix format.
9486   new_path=`$CYGPATH -u "$path"`
9487 
9488   # Now try to locate executable using which
9489   new_path=`$WHICH "$new_path" 2> /dev/null`
9490   # bat and cmd files are not always considered executable in cygwin causing which
9491   # to not find them
9492   if test "x$new_path" = x \
9493       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9494       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9495     new_path=`$CYGPATH -u "$path"`
9496   fi
9497   if test "x$new_path" = x; then
9498     # Oops. Which didn't find the executable.
9499     # The splitting of arguments from the executable at a space might have been incorrect,
9500     # since paths with space are more likely in Windows. Give it another try with the whole
9501     # argument.
9502     path="$complete"
9503     arguments="EOL"
9504     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
9515       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9516 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9517       has_space=`$ECHO "$complete" | $GREP " "`
9518       if test "x$has_space" != x; then
9519         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9520 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9521       fi
9522       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9523     fi
9524   fi
9525 
9526   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9527   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9528   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9529   # "foo.exe" is OK but "foo" is an error.
9530   #
9531   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9532   # It is also a way to make sure we got the proper file name for the real test later on.
9533   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9534   if test "x$test_shortpath" = x; then
9535     # Short path failed, file does not exist as specified.
9536     # Try adding .exe or .cmd
9537     if test -f "${new_path}.exe"; then
9538       input_to_shortpath="${new_path}.exe"
9539     elif test -f "${new_path}.cmd"; then
9540       input_to_shortpath="${new_path}.cmd"
9541     else
9542       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9543 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9544       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9545 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9546       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9547     fi
9548   else
9549     input_to_shortpath="$new_path"
9550   fi
9551 
9552   # Call helper function which possibly converts this using DOS-style short mode.
9553   # If so, the updated path is stored in $new_path.
9554   new_path="$input_to_shortpath"
9555 
9556   input_path="$input_to_shortpath"
9557   # Check if we need to convert this using DOS-style short mode. If the path
9558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9559   # take no chances and rewrite it.
9560   # Note: m4 eats our [], so we need to use [ and ] instead.
9561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9562   if test "x$has_forbidden_chars" != x; then
9563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9564     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9565     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9566     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9567       # Going to short mode and back again did indeed matter. Since short mode is
9568       # case insensitive, let's make it lowercase to improve readability.
9569       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9570       # Now convert it back to Unix-stile (cygpath)
9571       input_path=`$CYGPATH -u "$shortmode_path"`
9572       new_path="$input_path"
9573     fi
9574   fi
9575 
9576   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9577   if test "x$test_cygdrive_prefix" = x; then
9578     # As a simple fix, exclude /usr/bin since it's not a real path.
9579     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9580       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9581       # a path prefixed by /cygdrive for fixpath to work.
9582       new_path="$CYGWIN_ROOT_PATH$input_path"
9583     fi
9584   fi
9585 
9586   # remove trailing .exe if any
9587   new_path="${new_path/%.exe/}"
9588 
9589   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9590 
9591   # First separate the path from the arguments. This will split at the first
9592   # space.
9593   complete="$FOUND_MAKE"
9594   path="${complete%% *}"
9595   tmp="$complete EOL"
9596   arguments="${tmp#* }"
9597 
9598   # Input might be given as Windows format, start by converting to
9599   # unix format.
9600   new_path="$path"
9601 
9602   windows_path="$new_path"
9603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9604     unix_path=`$CYGPATH -u "$windows_path"`
9605     new_path="$unix_path"
9606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9608     new_path="$unix_path"
9609   fi
9610 
9611 
9612   # Now try to locate executable using which
9613   new_path=`$WHICH "$new_path" 2> /dev/null`
9614 
9615   if test "x$new_path" = x; then
9616     # Oops. Which didn't find the executable.
9617     # The splitting of arguments from the executable at a space might have been incorrect,
9618     # since paths with space are more likely in Windows. Give it another try with the whole
9619     # argument.
9620     path="$complete"
9621     arguments="EOL"
9622     new_path="$path"
9623 
9624   windows_path="$new_path"
9625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9626     unix_path=`$CYGPATH -u "$windows_path"`
9627     new_path="$unix_path"
9628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9630     new_path="$unix_path"
9631   fi
9632 
9633 
9634     new_path=`$WHICH "$new_path" 2> /dev/null`
9635 
9636     if test "x$new_path" = x; then
9637       # It's still not found. Now this is an unrecoverable error.
9638       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9639 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9640       has_space=`$ECHO "$complete" | $GREP " "`
9641       if test "x$has_space" != x; then
9642         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9643 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9644       fi
9645       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9646     fi
9647   fi
9648 
9649   # Now new_path has a complete unix path to the binary
9650   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9651     # Keep paths in /bin as-is, but remove trailing .exe if any
9652     new_path="${new_path/%.exe/}"
9653     # Do not save /bin paths to all_fixpath_prefixes!
9654   else
9655     # Not in mixed or Windows style, start by that.
9656     new_path=`cmd //c echo $new_path`
9657 
9658   input_path="$new_path"
9659   # Check if we need to convert this using DOS-style short mode. If the path
9660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9661   # take no chances and rewrite it.
9662   # Note: m4 eats our [], so we need to use [ and ] instead.
9663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9664   if test "x$has_forbidden_chars" != x; then
9665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9667   fi
9668 
9669     # Output is in $new_path
9670 
9671   windows_path="$new_path"
9672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9673     unix_path=`$CYGPATH -u "$windows_path"`
9674     new_path="$unix_path"
9675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9676     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9677     new_path="$unix_path"
9678   fi
9679 
9680     # remove trailing .exe if any
9681     new_path="${new_path/%.exe/}"
9682 
9683     # Save the first 10 bytes of this path to the storage, so fixpath can work.
9684     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9685   fi
9686 
9687   else
9688     # We're on a posix platform. Hooray! :)
9689     # First separate the path from the arguments. This will split at the first
9690     # space.
9691     complete="$FOUND_MAKE"
9692     path="${complete%% *}"
9693     tmp="$complete EOL"
9694     arguments="${tmp#* }"
9695 
9696     # Cannot rely on the command "which" here since it doesn't always work.
9697     is_absolute_path=`$ECHO "$path" | $GREP ^/`
9698     if test -z "$is_absolute_path"; then
9699       # Path to executable is not absolute. Find it.
9700       IFS_save="$IFS"
9701       IFS=:
9702       for p in $PATH; do
9703         if test -f "$p/$path" && test -x "$p/$path"; then
9704           new_path="$p/$path"
9705           break
9706         fi
9707       done
9708       IFS="$IFS_save"
9709     else
9710       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9711 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9712       new_path="$path"
9713     fi
9714 
9715     if test "x$new_path" = x; then
9716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9717 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9718       has_space=`$ECHO "$complete" | $GREP " "`
9719       if test "x$has_space" != x; then
9720         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9721 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9722       fi
9723       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9724     fi
9725   fi
9726 
9727   # Now join together the path and the arguments once again
9728   if test "x$arguments" != xEOL; then
9729     new_complete="$new_path ${arguments% *}"
9730   else
9731     new_complete="$new_path"
9732   fi
9733 
9734   if test "x$complete" != "x$new_complete"; then
9735     FOUND_MAKE="$new_complete"
9736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9737 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9738   fi
9739 
9740         fi
9741       fi
9742     fi
9743   fi
9744 
9745         if test "x$FOUND_MAKE" = x; then
9746           for ac_prog in make
9747 do
9748   # Extract the first word of "$ac_prog", so it can be a program name with args.
9749 set dummy $ac_prog; ac_word=$2
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751 $as_echo_n "checking for $ac_word... " >&6; }
9752 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
9753   $as_echo_n "(cached) " >&6
9754 else
9755   case $CHECK_TOOLSDIR_MAKE in
9756   [\\/]* | ?:[\\/]*)
9757   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9758   ;;
9759   *)
9760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9761 for as_dir in $PATH
9762 do
9763   IFS=$as_save_IFS
9764   test -z "$as_dir" && as_dir=.
9765     for ac_exec_ext in '' $ac_executable_extensions; do
9766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9767     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9769     break 2
9770   fi
9771 done
9772   done
9773 IFS=$as_save_IFS
9774 
9775   ;;
9776 esac
9777 fi
9778 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9779 if test -n "$CHECK_TOOLSDIR_MAKE"; then
9780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9781 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9782 else
9783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784 $as_echo "no" >&6; }
9785 fi
9786 
9787 
9788   test -n "$CHECK_TOOLSDIR_MAKE" && break
9789 done
9790 
9791 
9792   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9793   DESCRIPTION="make in tools-dir"
9794   if test "x$MAKE_CANDIDATE" != x; then
9795     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9796 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9797     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9798     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9799     if test "x$IS_GNU_MAKE" = x; then
9800       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9801 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9802     else
9803       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
9804       if test "x$IS_MODERN_MAKE" = x; then
9805         { $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
9806 $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;}
9807       else
9808         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9809           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9810             MAKE_EXPECTED_ENV='cygwin'
9811           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9812             MAKE_EXPECTED_ENV='msys'
9813           else
9814             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9815           fi
9816           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9817           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9818         else
9819           # Not relevant for non-Windows
9820           IS_MAKE_CORRECT_ENV=true
9821         fi
9822         if test "x$IS_MAKE_CORRECT_ENV" = x; then
9823           { $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
9824 $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;}
9825         else
9826           FOUND_MAKE=$MAKE_CANDIDATE
9827 
9828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9829 
9830   # First separate the path from the arguments. This will split at the first
9831   # space.
9832   complete="$FOUND_MAKE"
9833   path="${complete%% *}"
9834   tmp="$complete EOL"
9835   arguments="${tmp#* }"
9836 
9837   # Input might be given as Windows format, start by converting to
9838   # unix format.
9839   new_path=`$CYGPATH -u "$path"`
9840 
9841   # Now try to locate executable using which
9842   new_path=`$WHICH "$new_path" 2> /dev/null`
9843   # bat and cmd files are not always considered executable in cygwin causing which
9844   # to not find them
9845   if test "x$new_path" = x \
9846       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9847       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9848     new_path=`$CYGPATH -u "$path"`
9849   fi
9850   if test "x$new_path" = x; then
9851     # Oops. Which didn't find the executable.
9852     # The splitting of arguments from the executable at a space might have been incorrect,
9853     # since paths with space are more likely in Windows. Give it another try with the whole
9854     # argument.
9855     path="$complete"
9856     arguments="EOL"
9857     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
9868       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9869 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9870       has_space=`$ECHO "$complete" | $GREP " "`
9871       if test "x$has_space" != x; then
9872         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9873 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9874       fi
9875       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9876     fi
9877   fi
9878 
9879   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9880   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9881   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9882   # "foo.exe" is OK but "foo" is an error.
9883   #
9884   # This test is therefore slightly more accurate than "test -f" to check for file presence.
9885   # It is also a way to make sure we got the proper file name for the real test later on.
9886   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9887   if test "x$test_shortpath" = x; then
9888     # Short path failed, file does not exist as specified.
9889     # Try adding .exe or .cmd
9890     if test -f "${new_path}.exe"; then
9891       input_to_shortpath="${new_path}.exe"
9892     elif test -f "${new_path}.cmd"; then
9893       input_to_shortpath="${new_path}.cmd"
9894     else
9895       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9896 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9897       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9898 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9899       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9900     fi
9901   else
9902     input_to_shortpath="$new_path"
9903   fi
9904 
9905   # Call helper function which possibly converts this using DOS-style short mode.
9906   # If so, the updated path is stored in $new_path.
9907   new_path="$input_to_shortpath"
9908 
9909   input_path="$input_to_shortpath"
9910   # Check if we need to convert this using DOS-style short mode. If the path
9911   # contains just simple characters, use it. Otherwise (spaces, weird characters),
9912   # take no chances and rewrite it.
9913   # Note: m4 eats our [], so we need to use [ and ] instead.
9914   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9915   if test "x$has_forbidden_chars" != x; then
9916     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9917     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9918     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9919     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9920       # Going to short mode and back again did indeed matter. Since short mode is
9921       # case insensitive, let's make it lowercase to improve readability.
9922       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9923       # Now convert it back to Unix-stile (cygpath)
9924       input_path=`$CYGPATH -u "$shortmode_path"`
9925       new_path="$input_path"
9926     fi
9927   fi
9928 
9929   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9930   if test "x$test_cygdrive_prefix" = x; then
9931     # As a simple fix, exclude /usr/bin since it's not a real path.
9932     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9933       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9934       # a path prefixed by /cygdrive for fixpath to work.
9935       new_path="$CYGWIN_ROOT_PATH$input_path"
9936     fi
9937   fi
9938 
9939   # remove trailing .exe if any
9940   new_path="${new_path/%.exe/}"
9941 
9942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9943 
9944   # First separate the path from the arguments. This will split at the first
9945   # space.
9946   complete="$FOUND_MAKE"
9947   path="${complete%% *}"
9948   tmp="$complete EOL"
9949   arguments="${tmp#* }"
9950 
9951   # Input might be given as Windows format, start by converting to
9952   # unix format.
9953   new_path="$path"
9954 
9955   windows_path="$new_path"
9956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9957     unix_path=`$CYGPATH -u "$windows_path"`
9958     new_path="$unix_path"
9959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9961     new_path="$unix_path"
9962   fi
9963 
9964 
9965   # Now try to locate executable using which
9966   new_path=`$WHICH "$new_path" 2> /dev/null`
9967 
9968   if test "x$new_path" = x; then
9969     # Oops. Which didn't find the executable.
9970     # The splitting of arguments from the executable at a space might have been incorrect,
9971     # since paths with space are more likely in Windows. Give it another try with the whole
9972     # argument.
9973     path="$complete"
9974     arguments="EOL"
9975     new_path="$path"
9976 
9977   windows_path="$new_path"
9978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9979     unix_path=`$CYGPATH -u "$windows_path"`
9980     new_path="$unix_path"
9981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9983     new_path="$unix_path"
9984   fi
9985 
9986 
9987     new_path=`$WHICH "$new_path" 2> /dev/null`
9988 
9989     if test "x$new_path" = x; then
9990       # It's still not found. Now this is an unrecoverable error.
9991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9992 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9993       has_space=`$ECHO "$complete" | $GREP " "`
9994       if test "x$has_space" != x; then
9995         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9996 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9997       fi
9998       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9999     fi
10000   fi
10001 
10002   # Now new_path has a complete unix path to the binary
10003   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
10004     # Keep paths in /bin as-is, but remove trailing .exe if any
10005     new_path="${new_path/%.exe/}"
10006     # Do not save /bin paths to all_fixpath_prefixes!
10007   else
10008     # Not in mixed or Windows style, start by that.
10009     new_path=`cmd //c echo $new_path`
10010 
10011   input_path="$new_path"
10012   # Check if we need to convert this using DOS-style short mode. If the path
10013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
10014   # take no chances and rewrite it.
10015   # Note: m4 eats our [], so we need to use [ and ] instead.
10016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10017   if test "x$has_forbidden_chars" != x; then
10018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10020   fi
10021 
10022     # Output is in $new_path
10023 
10024   windows_path="$new_path"
10025   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10026     unix_path=`$CYGPATH -u "$windows_path"`
10027     new_path="$unix_path"
10028   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10029     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10030     new_path="$unix_path"
10031   fi
10032 
10033     # remove trailing .exe if any
10034     new_path="${new_path/%.exe/}"
10035 
10036     # Save the first 10 bytes of this path to the storage, so fixpath can work.
10037     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10038   fi
10039 
10040   else
10041     # We're on a posix platform. Hooray! :)
10042     # First separate the path from the arguments. This will split at the first
10043     # space.
10044     complete="$FOUND_MAKE"
10045     path="${complete%% *}"
10046     tmp="$complete EOL"
10047     arguments="${tmp#* }"
10048 
10049     # Cannot rely on the command "which" here since it doesn't always work.
10050     is_absolute_path=`$ECHO "$path" | $GREP ^/`
10051     if test -z "$is_absolute_path"; then
10052       # Path to executable is not absolute. Find it.
10053       IFS_save="$IFS"
10054       IFS=:
10055       for p in $PATH; do
10056         if test -f "$p/$path" && test -x "$p/$path"; then
10057           new_path="$p/$path"
10058           break
10059         fi
10060       done
10061       IFS="$IFS_save"
10062     else
10063       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
10064 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
10065       new_path="$path"
10066     fi
10067 
10068     if test "x$new_path" = x; then
10069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
10070 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
10071       has_space=`$ECHO "$complete" | $GREP " "`
10072       if test "x$has_space" != x; then
10073         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
10074 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
10075       fi
10076       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
10077     fi
10078   fi
10079 
10080   # Now join together the path and the arguments once again
10081   if test "x$arguments" != xEOL; then
10082     new_complete="$new_path ${arguments% *}"
10083   else
10084     new_complete="$new_path"
10085   fi
10086 
10087   if test "x$complete" != "x$new_complete"; then
10088     FOUND_MAKE="$new_complete"
10089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
10090 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
10091   fi
10092 
10093         fi
10094       fi
10095     fi
10096   fi
10097 
10098         fi
10099         PATH=$OLD_PATH
10100       fi
10101     fi
10102 
10103     if test "x$FOUND_MAKE" = x; then
10104       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
10105     fi
10106   fi
10107 
10108   MAKE=$FOUND_MAKE
10109 
10110   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
10111 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
10112 
10113 
10114 
10115   # Test if find supports -delete
10116   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
10117 $as_echo_n "checking if find supports -delete... " >&6; }
10118   FIND_DELETE="-delete"
10119 
10120   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
10121 
10122   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
10123 
10124   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
10125   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
10126     # No, it does not.
10127     rm $DELETEDIR/TestIfFindSupportsDelete
10128     FIND_DELETE="-exec rm \{\} \+"
10129     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10130 $as_echo "no" >&6; }
10131   else
10132     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10133 $as_echo "yes" >&6; }
10134   fi
10135   rmdir $DELETEDIR
10136 
10137 
10138 
10139   # These tools might not be installed by default,
10140   # need hint on how to install them.
10141 
10142   for ac_prog in unzip
10143 do
10144   # Extract the first word of "$ac_prog", so it can be a program name with args.
10145 set dummy $ac_prog; ac_word=$2
10146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10147 $as_echo_n "checking for $ac_word... " >&6; }
10148 if ${ac_cv_path_UNZIP+:} false; then :
10149   $as_echo_n "(cached) " >&6
10150 else
10151   case $UNZIP in
10152   [\\/]* | ?:[\\/]*)
10153   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10154   ;;
10155   *)
10156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10157 for as_dir in $PATH
10158 do
10159   IFS=$as_save_IFS
10160   test -z "$as_dir" && as_dir=.
10161     for ac_exec_ext in '' $ac_executable_extensions; do
10162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10163     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10165     break 2
10166   fi
10167 done
10168   done
10169 IFS=$as_save_IFS
10170 
10171   ;;
10172 esac
10173 fi
10174 UNZIP=$ac_cv_path_UNZIP
10175 if test -n "$UNZIP"; then
10176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10177 $as_echo "$UNZIP" >&6; }
10178 else
10179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180 $as_echo "no" >&6; }
10181 fi
10182 
10183 
10184   test -n "$UNZIP" && break
10185 done
10186 
10187 
10188   if test "x$UNZIP" = x; then
10189     if test "xunzip" = x; then
10190       PROG_NAME=unzip
10191     else
10192       PROG_NAME=unzip
10193     fi
10194     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10195 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10196     as_fn_error $? "Cannot continue" "$LINENO" 5
10197   fi
10198 
10199 
10200 
10201   for ac_prog in zip
10202 do
10203   # Extract the first word of "$ac_prog", so it can be a program name with args.
10204 set dummy $ac_prog; ac_word=$2
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10206 $as_echo_n "checking for $ac_word... " >&6; }
10207 if ${ac_cv_path_ZIP+:} false; then :
10208   $as_echo_n "(cached) " >&6
10209 else
10210   case $ZIP in
10211   [\\/]* | ?:[\\/]*)
10212   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10213   ;;
10214   *)
10215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216 for as_dir in $PATH
10217 do
10218   IFS=$as_save_IFS
10219   test -z "$as_dir" && as_dir=.
10220     for ac_exec_ext in '' $ac_executable_extensions; do
10221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10222     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10224     break 2
10225   fi
10226 done
10227   done
10228 IFS=$as_save_IFS
10229 
10230   ;;
10231 esac
10232 fi
10233 ZIP=$ac_cv_path_ZIP
10234 if test -n "$ZIP"; then
10235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10236 $as_echo "$ZIP" >&6; }
10237 else
10238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10239 $as_echo "no" >&6; }
10240 fi
10241 
10242 
10243   test -n "$ZIP" && break
10244 done
10245 
10246 
10247   if test "x$ZIP" = x; then
10248     if test "xzip" = x; then
10249       PROG_NAME=zip
10250     else
10251       PROG_NAME=zip
10252     fi
10253     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10254 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10255     as_fn_error $? "Cannot continue" "$LINENO" 5
10256   fi
10257 
10258 
10259 
10260   # Non-required basic tools
10261 
10262   # Extract the first word of "ldd", so it can be a program name with args.
10263 set dummy ldd; ac_word=$2
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10265 $as_echo_n "checking for $ac_word... " >&6; }
10266 if ${ac_cv_path_LDD+:} false; then :
10267   $as_echo_n "(cached) " >&6
10268 else
10269   case $LDD in
10270   [\\/]* | ?:[\\/]*)
10271   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10272   ;;
10273   *)
10274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10275 for as_dir in $PATH
10276 do
10277   IFS=$as_save_IFS
10278   test -z "$as_dir" && as_dir=.
10279     for ac_exec_ext in '' $ac_executable_extensions; do
10280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10281     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10283     break 2
10284   fi
10285 done
10286   done
10287 IFS=$as_save_IFS
10288 
10289   ;;
10290 esac
10291 fi
10292 LDD=$ac_cv_path_LDD
10293 if test -n "$LDD"; then
10294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10295 $as_echo "$LDD" >&6; }
10296 else
10297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298 $as_echo "no" >&6; }
10299 fi
10300 
10301 
10302   if test "x$LDD" = "x"; then
10303     # List shared lib dependencies is used for
10304     # debug output and checking for forbidden dependencies.
10305     # We can build without it.
10306     LDD="true"
10307   fi
10308   # Extract the first word of "otool", so it can be a program name with args.
10309 set dummy otool; ac_word=$2
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10311 $as_echo_n "checking for $ac_word... " >&6; }
10312 if ${ac_cv_path_OTOOL+:} false; then :
10313   $as_echo_n "(cached) " >&6
10314 else
10315   case $OTOOL in
10316   [\\/]* | ?:[\\/]*)
10317   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10318   ;;
10319   *)
10320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10321 for as_dir in $PATH
10322 do
10323   IFS=$as_save_IFS
10324   test -z "$as_dir" && as_dir=.
10325     for ac_exec_ext in '' $ac_executable_extensions; do
10326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10327     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10329     break 2
10330   fi
10331 done
10332   done
10333 IFS=$as_save_IFS
10334 
10335   ;;
10336 esac
10337 fi
10338 OTOOL=$ac_cv_path_OTOOL
10339 if test -n "$OTOOL"; then
10340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10341 $as_echo "$OTOOL" >&6; }
10342 else
10343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344 $as_echo "no" >&6; }
10345 fi
10346 
10347 
10348   if test "x$OTOOL" = "x"; then
10349     OTOOL="true"
10350   fi
10351   for ac_prog in readelf greadelf
10352 do
10353   # Extract the first word of "$ac_prog", so it can be a program name with args.
10354 set dummy $ac_prog; ac_word=$2
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10356 $as_echo_n "checking for $ac_word... " >&6; }
10357 if ${ac_cv_path_READELF+:} false; then :
10358   $as_echo_n "(cached) " >&6
10359 else
10360   case $READELF in
10361   [\\/]* | ?:[\\/]*)
10362   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10363   ;;
10364   *)
10365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10366 for as_dir in $PATH
10367 do
10368   IFS=$as_save_IFS
10369   test -z "$as_dir" && as_dir=.
10370     for ac_exec_ext in '' $ac_executable_extensions; do
10371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10372     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10374     break 2
10375   fi
10376 done
10377   done
10378 IFS=$as_save_IFS
10379 
10380   ;;
10381 esac
10382 fi
10383 READELF=$ac_cv_path_READELF
10384 if test -n "$READELF"; then
10385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10386 $as_echo "$READELF" >&6; }
10387 else
10388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10389 $as_echo "no" >&6; }
10390 fi
10391 
10392 
10393   test -n "$READELF" && break
10394 done
10395 
10396   # Extract the first word of "hg", so it can be a program name with args.
10397 set dummy hg; ac_word=$2
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10399 $as_echo_n "checking for $ac_word... " >&6; }
10400 if ${ac_cv_path_HG+:} false; then :
10401   $as_echo_n "(cached) " >&6
10402 else
10403   case $HG in
10404   [\\/]* | ?:[\\/]*)
10405   ac_cv_path_HG="$HG" # Let the user override the test with a path.
10406   ;;
10407   *)
10408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10409 for as_dir in $PATH
10410 do
10411   IFS=$as_save_IFS
10412   test -z "$as_dir" && as_dir=.
10413     for ac_exec_ext in '' $ac_executable_extensions; do
10414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10415     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10417     break 2
10418   fi
10419 done
10420   done
10421 IFS=$as_save_IFS
10422 
10423   ;;
10424 esac
10425 fi
10426 HG=$ac_cv_path_HG
10427 if test -n "$HG"; then
10428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10429 $as_echo "$HG" >&6; }
10430 else
10431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10432 $as_echo "no" >&6; }
10433 fi
10434 
10435 
10436   # Extract the first word of "stat", so it can be a program name with args.
10437 set dummy stat; ac_word=$2
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439 $as_echo_n "checking for $ac_word... " >&6; }
10440 if ${ac_cv_path_STAT+:} false; then :
10441   $as_echo_n "(cached) " >&6
10442 else
10443   case $STAT in
10444   [\\/]* | ?:[\\/]*)
10445   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10446   ;;
10447   *)
10448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10449 for as_dir in $PATH
10450 do
10451   IFS=$as_save_IFS
10452   test -z "$as_dir" && as_dir=.
10453     for ac_exec_ext in '' $ac_executable_extensions; do
10454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10455     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10457     break 2
10458   fi
10459 done
10460   done
10461 IFS=$as_save_IFS
10462 
10463   ;;
10464 esac
10465 fi
10466 STAT=$ac_cv_path_STAT
10467 if test -n "$STAT"; then
10468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10469 $as_echo "$STAT" >&6; }
10470 else
10471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472 $as_echo "no" >&6; }
10473 fi
10474 
10475 
10476   # Extract the first word of "time", so it can be a program name with args.
10477 set dummy time; ac_word=$2
10478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10479 $as_echo_n "checking for $ac_word... " >&6; }
10480 if ${ac_cv_path_TIME+:} false; then :
10481   $as_echo_n "(cached) " >&6
10482 else
10483   case $TIME in
10484   [\\/]* | ?:[\\/]*)
10485   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10486   ;;
10487   *)
10488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10489 for as_dir in $PATH
10490 do
10491   IFS=$as_save_IFS
10492   test -z "$as_dir" && as_dir=.
10493     for ac_exec_ext in '' $ac_executable_extensions; do
10494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10495     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10497     break 2
10498   fi
10499 done
10500   done
10501 IFS=$as_save_IFS
10502 
10503   ;;
10504 esac
10505 fi
10506 TIME=$ac_cv_path_TIME
10507 if test -n "$TIME"; then
10508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10509 $as_echo "$TIME" >&6; }
10510 else
10511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10512 $as_echo "no" >&6; }
10513 fi
10514 
10515 
10516   # Check if it's GNU time
10517   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
10518   if test "x$IS_GNU_TIME" != x; then
10519     IS_GNU_TIME=yes
10520   else
10521     IS_GNU_TIME=no
10522   fi
10523 
10524 
10525   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10526 
10527   for ac_prog in comm
10528 do
10529   # Extract the first word of "$ac_prog", so it can be a program name with args.
10530 set dummy $ac_prog; ac_word=$2
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10532 $as_echo_n "checking for $ac_word... " >&6; }
10533 if ${ac_cv_path_COMM+:} false; then :
10534   $as_echo_n "(cached) " >&6
10535 else
10536   case $COMM in
10537   [\\/]* | ?:[\\/]*)
10538   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10539   ;;
10540   *)
10541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10542 for as_dir in $PATH
10543 do
10544   IFS=$as_save_IFS
10545   test -z "$as_dir" && as_dir=.
10546     for ac_exec_ext in '' $ac_executable_extensions; do
10547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10548     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10550     break 2
10551   fi
10552 done
10553   done
10554 IFS=$as_save_IFS
10555 
10556   ;;
10557 esac
10558 fi
10559 COMM=$ac_cv_path_COMM
10560 if test -n "$COMM"; then
10561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10562 $as_echo "$COMM" >&6; }
10563 else
10564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10565 $as_echo "no" >&6; }
10566 fi
10567 
10568 
10569   test -n "$COMM" && break
10570 done
10571 
10572 
10573   if test "x$COMM" = x; then
10574     if test "xcomm" = x; then
10575       PROG_NAME=comm
10576     else
10577       PROG_NAME=comm
10578     fi
10579     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10580 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10581     as_fn_error $? "Cannot continue" "$LINENO" 5
10582   fi
10583 
10584 
10585   fi
10586 
10587   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10588 
10589   for ac_prog in dsymutil
10590 do
10591   # Extract the first word of "$ac_prog", so it can be a program name with args.
10592 set dummy $ac_prog; ac_word=$2
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594 $as_echo_n "checking for $ac_word... " >&6; }
10595 if ${ac_cv_path_DSYMUTIL+:} false; then :
10596   $as_echo_n "(cached) " >&6
10597 else
10598   case $DSYMUTIL in
10599   [\\/]* | ?:[\\/]*)
10600   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
10601   ;;
10602   *)
10603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10604 for as_dir in $PATH
10605 do
10606   IFS=$as_save_IFS
10607   test -z "$as_dir" && as_dir=.
10608     for ac_exec_ext in '' $ac_executable_extensions; do
10609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10610     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
10611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10612     break 2
10613   fi
10614 done
10615   done
10616 IFS=$as_save_IFS
10617 
10618   ;;
10619 esac
10620 fi
10621 DSYMUTIL=$ac_cv_path_DSYMUTIL
10622 if test -n "$DSYMUTIL"; then
10623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
10624 $as_echo "$DSYMUTIL" >&6; }
10625 else
10626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627 $as_echo "no" >&6; }
10628 fi
10629 
10630 
10631   test -n "$DSYMUTIL" && break
10632 done
10633 
10634 
10635   if test "x$DSYMUTIL" = x; then
10636     if test "xdsymutil" = x; then
10637       PROG_NAME=dsymutil
10638     else
10639       PROG_NAME=dsymutil
10640     fi
10641     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10642 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10643     as_fn_error $? "Cannot continue" "$LINENO" 5
10644   fi
10645 
10646 
10647 
10648   for ac_prog in xattr
10649 do
10650   # Extract the first word of "$ac_prog", so it can be a program name with args.
10651 set dummy $ac_prog; ac_word=$2
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653 $as_echo_n "checking for $ac_word... " >&6; }
10654 if ${ac_cv_path_XATTR+:} false; then :
10655   $as_echo_n "(cached) " >&6
10656 else
10657   case $XATTR in
10658   [\\/]* | ?:[\\/]*)
10659   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10660   ;;
10661   *)
10662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663 for as_dir in $PATH
10664 do
10665   IFS=$as_save_IFS
10666   test -z "$as_dir" && as_dir=.
10667     for ac_exec_ext in '' $ac_executable_extensions; do
10668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671     break 2
10672   fi
10673 done
10674   done
10675 IFS=$as_save_IFS
10676 
10677   ;;
10678 esac
10679 fi
10680 XATTR=$ac_cv_path_XATTR
10681 if test -n "$XATTR"; then
10682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10683 $as_echo "$XATTR" >&6; }
10684 else
10685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686 $as_echo "no" >&6; }
10687 fi
10688 
10689 
10690   test -n "$XATTR" && break
10691 done
10692 
10693 
10694   if test "x$XATTR" = x; then
10695     if test "xxattr" = x; then
10696       PROG_NAME=xattr
10697     else
10698       PROG_NAME=xattr
10699     fi
10700     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10701 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10702     as_fn_error $? "Cannot continue" "$LINENO" 5
10703   fi
10704 
10705 
10706     # Extract the first word of "codesign", so it can be a program name with args.
10707 set dummy codesign; ac_word=$2
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10709 $as_echo_n "checking for $ac_word... " >&6; }
10710 if ${ac_cv_path_CODESIGN+:} false; then :
10711   $as_echo_n "(cached) " >&6
10712 else
10713   case $CODESIGN in
10714   [\\/]* | ?:[\\/]*)
10715   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
10716   ;;
10717   *)
10718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10719 for as_dir in $PATH
10720 do
10721   IFS=$as_save_IFS
10722   test -z "$as_dir" && as_dir=.
10723     for ac_exec_ext in '' $ac_executable_extensions; do
10724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10725     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
10726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10727     break 2
10728   fi
10729 done
10730   done
10731 IFS=$as_save_IFS
10732 
10733   ;;
10734 esac
10735 fi
10736 CODESIGN=$ac_cv_path_CODESIGN
10737 if test -n "$CODESIGN"; then
10738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
10739 $as_echo "$CODESIGN" >&6; }
10740 else
10741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742 $as_echo "no" >&6; }
10743 fi
10744 
10745 
10746     if test "x$CODESIGN" != "x"; then
10747       # Verify that the openjdk_codesign certificate is present
10748       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
10749 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
10750       rm -f codesign-testfile
10751       touch codesign-testfile
10752       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
10753       rm -f codesign-testfile
10754       if test "x$CODESIGN" = x; then
10755         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756 $as_echo "no" >&6; }
10757       else
10758         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10759 $as_echo "yes" >&6; }
10760       fi
10761     fi
10762   fi
10763 
10764 
10765 # Check if pkg-config is available.
10766 
10767 
10768 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10769         if test -n "$ac_tool_prefix"; then
10770   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10771 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10773 $as_echo_n "checking for $ac_word... " >&6; }
10774 if ${ac_cv_path_PKG_CONFIG+:} false; then :
10775   $as_echo_n "(cached) " >&6
10776 else
10777   case $PKG_CONFIG in
10778   [\\/]* | ?:[\\/]*)
10779   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10780   ;;
10781   *)
10782   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10783 for as_dir in $PATH
10784 do
10785   IFS=$as_save_IFS
10786   test -z "$as_dir" && as_dir=.
10787     for ac_exec_ext in '' $ac_executable_extensions; do
10788   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10789     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10790     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10791     break 2
10792   fi
10793 done
10794   done
10795 IFS=$as_save_IFS
10796 
10797   ;;
10798 esac
10799 fi
10800 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10801 if test -n "$PKG_CONFIG"; then
10802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10803 $as_echo "$PKG_CONFIG" >&6; }
10804 else
10805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10806 $as_echo "no" >&6; }
10807 fi
10808 
10809 
10810 fi
10811 if test -z "$ac_cv_path_PKG_CONFIG"; then
10812   ac_pt_PKG_CONFIG=$PKG_CONFIG
10813   # Extract the first word of "pkg-config", so it can be a program name with args.
10814 set dummy pkg-config; ac_word=$2
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10816 $as_echo_n "checking for $ac_word... " >&6; }
10817 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10818   $as_echo_n "(cached) " >&6
10819 else
10820   case $ac_pt_PKG_CONFIG in
10821   [\\/]* | ?:[\\/]*)
10822   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10823   ;;
10824   *)
10825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826 for as_dir in $PATH
10827 do
10828   IFS=$as_save_IFS
10829   test -z "$as_dir" && as_dir=.
10830     for ac_exec_ext in '' $ac_executable_extensions; do
10831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10832     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10834     break 2
10835   fi
10836 done
10837   done
10838 IFS=$as_save_IFS
10839 
10840   ;;
10841 esac
10842 fi
10843 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10844 if test -n "$ac_pt_PKG_CONFIG"; then
10845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10846 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
10847 else
10848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849 $as_echo "no" >&6; }
10850 fi
10851 
10852   if test "x$ac_pt_PKG_CONFIG" = x; then
10853     PKG_CONFIG=""
10854   else
10855     case $cross_compiling:$ac_tool_warned in
10856 yes:)
10857 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10858 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10859 ac_tool_warned=yes ;;
10860 esac
10861     PKG_CONFIG=$ac_pt_PKG_CONFIG
10862   fi
10863 else
10864   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10865 fi
10866 
10867 fi
10868 if test -n "$PKG_CONFIG"; then
10869         _pkg_min_version=0.9.0
10870         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10871 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10872         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10873                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10874 $as_echo "yes" >&6; }
10875         else
10876                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10877 $as_echo "no" >&6; }
10878                 PKG_CONFIG=""
10879         fi
10880 
10881 fi
10882 
10883 # After basic tools have been setup, we can check build os specific details.
10884 
10885   ###############################################################################
10886 
10887   # Note that this is the build platform OS version!
10888 
10889   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10890   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10891   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10892   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10893 
10894 
10895 
10896 
10897 
10898 # Setup builddeps, for automatic downloading of tools we need.
10899 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10900 # boot-jdk setup, but we need to have basic tools setup first.
10901 
10902 
10903 # Check whether --with-builddeps-conf was given.
10904 if test "${with_builddeps_conf+set}" = set; then :
10905   withval=$with_builddeps_conf;
10906 fi
10907 
10908 
10909 
10910 # Check whether --with-builddeps-server was given.
10911 if test "${with_builddeps_server+set}" = set; then :
10912   withval=$with_builddeps_server;
10913 fi
10914 
10915 
10916 
10917 # Check whether --with-builddeps-dir was given.
10918 if test "${with_builddeps_dir+set}" = set; then :
10919   withval=$with_builddeps_dir;
10920 else
10921   with_builddeps_dir=/localhome/builddeps
10922 fi
10923 
10924 
10925 
10926 # Check whether --with-builddeps-group was given.
10927 if test "${with_builddeps_group+set}" = set; then :
10928   withval=$with_builddeps_group;
10929 fi
10930 
10931 
10932 
10933 
10934   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10935     if test "x$with_builddeps_conf" != x; then
10936       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10937 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10938       builddepsfile=$with_builddeps_conf
10939       if test -s $builddepsfile; then
10940         . $builddepsfile
10941         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10942 $as_echo "loaded!" >&6; }
10943       else
10944         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10945       fi
10946     else
10947       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10948 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10949       builddepsfile=`mktemp`
10950       touch $builddepsfile
10951       # Put all found confs into a single file.
10952       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10953       # Source the file to acquire the variables
10954       if test -s $builddepsfile; then
10955         . $builddepsfile
10956         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10957 $as_echo "found at least one!" >&6; }
10958       else
10959         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10960       fi
10961     fi
10962     # Create build and target names that use _ instead of "-" and ".".
10963     # This is necessary to use them in variable names.
10964     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10965     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10966     # Extract rewrite information for build and target
10967     eval rewritten_build=\${REWRITE_${build_var}}
10968     if test "x$rewritten_build" = x; then
10969       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10970       echo Build stays the same $rewritten_build
10971     else
10972       echo Rewriting build for builddeps into $rewritten_build
10973     fi
10974     eval rewritten_target=\${REWRITE_${target_var}}
10975     if test "x$rewritten_target" = x; then
10976       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10977       echo Target stays the same $rewritten_target
10978     else
10979       echo Rewriting target for builddeps into $rewritten_target
10980     fi
10981     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10982     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10983   fi
10984   for ac_prog in 7z unzip
10985 do
10986   # Extract the first word of "$ac_prog", so it can be a program name with args.
10987 set dummy $ac_prog; ac_word=$2
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10989 $as_echo_n "checking for $ac_word... " >&6; }
10990 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
10991   $as_echo_n "(cached) " >&6
10992 else
10993   if test -n "$BDEPS_UNZIP"; then
10994   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10995 else
10996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10997 for as_dir in $PATH
10998 do
10999   IFS=$as_save_IFS
11000   test -z "$as_dir" && as_dir=.
11001     for ac_exec_ext in '' $ac_executable_extensions; do
11002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11003     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
11004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11005     break 2
11006   fi
11007 done
11008   done
11009 IFS=$as_save_IFS
11010 
11011 fi
11012 fi
11013 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
11014 if test -n "$BDEPS_UNZIP"; then
11015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
11016 $as_echo "$BDEPS_UNZIP" >&6; }
11017 else
11018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019 $as_echo "no" >&6; }
11020 fi
11021 
11022 
11023   test -n "$BDEPS_UNZIP" && break
11024 done
11025 
11026   if test "x$BDEPS_UNZIP" = x7z; then
11027     BDEPS_UNZIP="7z x"
11028   fi
11029 
11030   for ac_prog in wget lftp ftp
11031 do
11032   # Extract the first word of "$ac_prog", so it can be a program name with args.
11033 set dummy $ac_prog; ac_word=$2
11034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11035 $as_echo_n "checking for $ac_word... " >&6; }
11036 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
11037   $as_echo_n "(cached) " >&6
11038 else
11039   if test -n "$BDEPS_FTP"; then
11040   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
11041 else
11042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11043 for as_dir in $PATH
11044 do
11045   IFS=$as_save_IFS
11046   test -z "$as_dir" && as_dir=.
11047     for ac_exec_ext in '' $ac_executable_extensions; do
11048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11049     ac_cv_prog_BDEPS_FTP="$ac_prog"
11050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11051     break 2
11052   fi
11053 done
11054   done
11055 IFS=$as_save_IFS
11056 
11057 fi
11058 fi
11059 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
11060 if test -n "$BDEPS_FTP"; then
11061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
11062 $as_echo "$BDEPS_FTP" >&6; }
11063 else
11064   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11065 $as_echo "no" >&6; }
11066 fi
11067 
11068 
11069   test -n "$BDEPS_FTP" && break
11070 done
11071 
11072 
11073 
11074 ###############################################################################
11075 #
11076 # Determine OpenJDK variants, options and version numbers.
11077 #
11078 ###############################################################################
11079 
11080 # We need build & target for this.
11081 
11082 
11083   ###############################################################################
11084   #
11085   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
11086   # We always build headless support.
11087   #
11088   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
11089 $as_echo_n "checking headful support... " >&6; }
11090   # Check whether --enable-headful was given.
11091 if test "${enable_headful+set}" = set; then :
11092   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
11093 else
11094   SUPPORT_HEADFUL=yes
11095 fi
11096 
11097 
11098   SUPPORT_HEADLESS=yes
11099   BUILD_HEADLESS="BUILD_HEADLESS:=true"
11100 
11101   if test "x$SUPPORT_HEADFUL" = xyes; then
11102     # We are building both headful and headless.
11103     headful_msg="include support for both headful and headless"
11104   fi
11105 
11106   if test "x$SUPPORT_HEADFUL" = xno; then
11107     # Thus we are building headless only.
11108     BUILD_HEADLESS="BUILD_HEADLESS:=true"
11109     headful_msg="headless only"
11110   fi
11111 
11112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
11113 $as_echo "$headful_msg" >&6; }
11114 
11115 
11116 
11117 
11118 
11119   # Control wether Hotspot runs Queens test after build.
11120   # Check whether --enable-hotspot-test-in-build was given.
11121 if test "${enable_hotspot_test_in_build+set}" = set; then :
11122   enableval=$enable_hotspot_test_in_build;
11123 else
11124   enable_hotspot_test_in_build=no
11125 fi
11126 
11127   if test "x$enable_hotspot_test_in_build" = "xyes"; then
11128     TEST_IN_BUILD=true
11129   else
11130     TEST_IN_BUILD=false
11131   fi
11132 
11133 
11134   ###############################################################################
11135   #
11136   # Choose cacerts source file
11137   #
11138 
11139 # Check whether --with-cacerts-file was given.
11140 if test "${with_cacerts_file+set}" = set; then :
11141   withval=$with_cacerts_file;
11142 fi
11143 
11144   if test "x$with_cacerts_file" != x; then
11145     CACERTS_FILE=$with_cacerts_file
11146   else
11147     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
11148   fi
11149 
11150 
11151   ###############################################################################
11152   #
11153   # Enable or disable unlimited crypto
11154   #
11155   # Check whether --enable-unlimited-crypto was given.
11156 if test "${enable_unlimited_crypto+set}" = set; then :
11157   enableval=$enable_unlimited_crypto;
11158 else
11159   enable_unlimited_crypto=no
11160 fi
11161 
11162   if test "x$enable_unlimited_crypto" = "xyes"; then
11163     UNLIMITED_CRYPTO=true
11164   else
11165     UNLIMITED_CRYPTO=false
11166   fi
11167 
11168 
11169   ###############################################################################
11170   #
11171   # Enable or disable the elliptic curve crypto implementation
11172   #
11173 
11174 
11175   ###############################################################################
11176   #
11177   # Compress jars
11178   #
11179   COMPRESS_JARS=false
11180 
11181 
11182 
11183 
11184   # Source the version numbers
11185   . $AUTOCONF_DIR/version-numbers
11186 
11187   # Get the settings from parameters
11188 
11189 # Check whether --with-milestone was given.
11190 if test "${with_milestone+set}" = set; then :
11191   withval=$with_milestone;
11192 fi
11193 
11194   if test "x$with_milestone" = xyes; then
11195     as_fn_error $? "Milestone must have a value" "$LINENO" 5
11196   elif test "x$with_milestone" != x; then
11197     MILESTONE="$with_milestone"
11198   fi
11199   if test "x$MILESTONE" = x; then
11200     MILESTONE=internal
11201   fi
11202 
11203 
11204 # Check whether --with-update-version was given.
11205 if test "${with_update_version+set}" = set; then :
11206   withval=$with_update_version;
11207 fi
11208 
11209   if test "x$with_update_version" = xyes; then
11210     as_fn_error $? "Update version must have a value" "$LINENO" 5
11211   elif test "x$with_update_version" != x; then
11212     JDK_UPDATE_VERSION="$with_update_version"
11213   fi
11214 
11215 
11216 # Check whether --with-user-release-suffix was given.
11217 if test "${with_user_release_suffix+set}" = set; then :
11218   withval=$with_user_release_suffix;
11219 fi
11220 
11221   if test "x$with_user_release_suffix" = xyes; then
11222     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
11223   elif test "x$with_user_release_suffix" != x; then
11224     USER_RELEASE_SUFFIX="$with_user_release_suffix"
11225   fi
11226 
11227 
11228 # Check whether --with-build-number was given.
11229 if test "${with_build_number+set}" = set; then :
11230   withval=$with_build_number;
11231 fi
11232 
11233   if test "x$with_build_number" = xyes; then
11234     as_fn_error $? "Build number must have a value" "$LINENO" 5
11235   elif test "x$with_build_number" != x; then
11236     JDK_BUILD_NUMBER="$with_build_number"
11237   fi
11238   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
11239   if test "x$JDK_BUILD_NUMBER" = x; then
11240     JDK_BUILD_NUMBER=b00
11241     if test "x$USER_RELEASE_SUFFIX" = x; then
11242       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
11243       # Avoid [:alnum:] since it depends on the locale.
11244       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
11245       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11246     fi
11247   fi
11248 
11249   # Now set the JDK version, milestone, build number etc.
11250 
11251 
11252 
11253 
11254 
11255 
11256 
11257 
11258 
11259 
11260 
11261 
11262 
11263 
11264 
11265   COPYRIGHT_YEAR=`date +'%Y'`
11266 
11267 
11268   if test "x$JDK_UPDATE_VERSION" != x; then
11269     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
11270   else
11271     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
11272   fi
11273 
11274 
11275   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11276 
11277 
11278 
11279 ###############################################################################
11280 #
11281 # Setup BootJDK, used to bootstrap the build.
11282 #
11283 ###############################################################################
11284 
11285 
11286   BOOT_JDK_FOUND=no
11287 
11288 # Check whether --with-boot-jdk was given.
11289 if test "${with_boot_jdk+set}" = set; then :
11290   withval=$with_boot_jdk;
11291 fi
11292 
11293 
11294   # We look for the Boot JDK through various means, going from more certain to
11295   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11296   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11297   # must check if this is indeed valid; otherwise we'll continue looking.
11298 
11299   # Test: Is bootjdk explicitely set by command line arguments?
11300 
11301   if test "x$BOOT_JDK_FOUND" = xno; then
11302     # Now execute the test
11303 
11304   if test "x$with_boot_jdk" != x; then
11305     BOOT_JDK=$with_boot_jdk
11306     BOOT_JDK_FOUND=maybe
11307     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11308 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11309   fi
11310 
11311 
11312     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11313     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11314       # Do we have a bin/java?
11315       if test ! -x "$BOOT_JDK/bin/java"; then
11316         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11317 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11318         BOOT_JDK_FOUND=no
11319       else
11320         # Do we have a bin/javac?
11321         if test ! -x "$BOOT_JDK/bin/javac"; then
11322           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11323 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11324           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11325 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11326           BOOT_JDK_FOUND=no
11327         else
11328           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11329           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11330             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11331 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11332             BOOT_JDK_FOUND=no
11333           else
11334             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11335             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11336 
11337             # Extra M4 quote needed to protect [] in grep expression.
11338             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11339             if test "x$FOUND_VERSION_78" = x; then
11340               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11341 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11342               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11343 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11344               BOOT_JDK_FOUND=no
11345             else
11346               # We're done! :-)
11347               BOOT_JDK_FOUND=yes
11348 
11349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11350 
11351   # Input might be given as Windows format, start by converting to
11352   # unix format.
11353   path="$BOOT_JDK"
11354   new_path=`$CYGPATH -u "$path"`
11355 
11356   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11357   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11358   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11359   # "foo.exe" is OK but "foo" is an error.
11360   #
11361   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11362   # It is also a way to make sure we got the proper file name for the real test later on.
11363   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11364   if test "x$test_shortpath" = x; then
11365     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11366 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11367     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11368   fi
11369 
11370   # Call helper function which possibly converts this using DOS-style short mode.
11371   # If so, the updated path is stored in $new_path.
11372 
11373   input_path="$new_path"
11374   # Check if we need to convert this using DOS-style short mode. If the path
11375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11376   # take no chances and rewrite it.
11377   # Note: m4 eats our [], so we need to use [ and ] instead.
11378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11379   if test "x$has_forbidden_chars" != x; then
11380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11381     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11382     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11383     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11384       # Going to short mode and back again did indeed matter. Since short mode is
11385       # case insensitive, let's make it lowercase to improve readability.
11386       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11387       # Now convert it back to Unix-stile (cygpath)
11388       input_path=`$CYGPATH -u "$shortmode_path"`
11389       new_path="$input_path"
11390     fi
11391   fi
11392 
11393   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11394   if test "x$test_cygdrive_prefix" = x; then
11395     # As a simple fix, exclude /usr/bin since it's not a real path.
11396     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11397       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11398       # a path prefixed by /cygdrive for fixpath to work.
11399       new_path="$CYGWIN_ROOT_PATH$input_path"
11400     fi
11401   fi
11402 
11403 
11404   if test "x$path" != "x$new_path"; then
11405     BOOT_JDK="$new_path"
11406     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11407 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11408   fi
11409 
11410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11411 
11412   path="$BOOT_JDK"
11413   has_colon=`$ECHO $path | $GREP ^.:`
11414   new_path="$path"
11415   if test "x$has_colon" = x; then
11416     # Not in mixed or Windows style, start by that.
11417     new_path=`cmd //c echo $path`
11418   fi
11419 
11420 
11421   input_path="$new_path"
11422   # Check if we need to convert this using DOS-style short mode. If the path
11423   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11424   # take no chances and rewrite it.
11425   # Note: m4 eats our [], so we need to use [ and ] instead.
11426   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11427   if test "x$has_forbidden_chars" != x; then
11428     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11429     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11430   fi
11431 
11432 
11433   windows_path="$new_path"
11434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11435     unix_path=`$CYGPATH -u "$windows_path"`
11436     new_path="$unix_path"
11437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11439     new_path="$unix_path"
11440   fi
11441 
11442   if test "x$path" != "x$new_path"; then
11443     BOOT_JDK="$new_path"
11444     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11445 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11446   fi
11447 
11448   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11449   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11450 
11451   else
11452     # We're on a posix platform. Hooray! :)
11453     path="$BOOT_JDK"
11454     has_space=`$ECHO "$path" | $GREP " "`
11455     if test "x$has_space" != x; then
11456       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11457 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11458       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11459     fi
11460 
11461     # Use eval to expand a potential ~
11462     eval path="$path"
11463     if test ! -f "$path" && test ! -d "$path"; then
11464       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11465     fi
11466 
11467     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11468   fi
11469 
11470               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11471 $as_echo_n "checking for Boot JDK... " >&6; }
11472               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11473 $as_echo "$BOOT_JDK" >&6; }
11474               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11475 $as_echo_n "checking Boot JDK version... " >&6; }
11476               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11477               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11478 $as_echo "$BOOT_JDK_VERSION" >&6; }
11479             fi # end check jdk version
11480           fi # end check rt.jar
11481         fi # end check javac
11482       fi # end check java
11483     fi # end check boot jdk found
11484   fi
11485 
11486   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11487     # Having specified an argument which is incorrect will produce an instant failure;
11488     # we should not go on looking
11489     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11490   fi
11491 
11492   # Test: Is bootjdk available from builddeps?
11493 
11494   if test "x$BOOT_JDK_FOUND" = xno; then
11495     # Now execute the test
11496 
11497 
11498 
11499   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11500     # Source the builddeps file again, to make sure it uses the latest variables!
11501     . $builddepsfile
11502     # Look for a target and build machine specific resource!
11503     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11504     if test "x$resource" = x; then
11505       # Ok, lets instead look for a target specific resource
11506       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11507     fi
11508     if test "x$resource" = x; then
11509       # Ok, lets instead look for a build specific resource
11510       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11511     fi
11512     if test "x$resource" = x; then
11513       # Ok, lets instead look for a generic resource
11514       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11515       resource=${builddep_bootjdk}
11516     fi
11517     if test "x$resource" != x; then
11518       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11519 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11520       # If the resource in the builddeps.conf file is an existing directory,
11521       # for example /java/linux/cups
11522       if test -d ${resource}; then
11523         depdir=${resource}
11524       else
11525 
11526   # bootjdk is for example mymodule
11527   # $resource is for example libs/general/libmymod_1_2_3.zip
11528   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11529   # $with_builddeps_dir is for example /localhome/builddeps
11530   # depdir is the name of the variable into which we store the depdir, eg MYMOD
11531   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11532   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11533   filename=`basename $resource`
11534   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11535   filebase=${filename%%.*}
11536   extension=${filename#*.}
11537   installdir=$with_builddeps_dir/$filebase
11538   if test ! -f $installdir/$filename.unpacked; then
11539     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11540 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11541     if test ! -d $installdir; then
11542       mkdir -p $installdir
11543     fi
11544     if test ! -d $installdir; then
11545       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11546     fi
11547     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11548     touch $tmpfile
11549     if test ! -f $tmpfile; then
11550       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11551     fi
11552 
11553   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11554   # $tmpfile is the local file name for the downloaded file.
11555   VALID_TOOL=no
11556   if test "x$BDEPS_FTP" = xwget; then
11557     VALID_TOOL=yes
11558     wget -O $tmpfile $with_builddeps_server/$resource
11559   fi
11560   if test "x$BDEPS_FTP" = xlftp; then
11561     VALID_TOOL=yes
11562     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11563   fi
11564   if test "x$BDEPS_FTP" = xftp; then
11565     VALID_TOOL=yes
11566     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11567     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11568     FTPUSERPWD=${FTPSERVER%%@*}
11569     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11570       FTPUSER=${userpwd%%:*}
11571       FTPPWD=${userpwd#*@}
11572       FTPSERVER=${FTPSERVER#*@}
11573     else
11574       FTPUSER=ftp
11575       FTPPWD=ftp
11576     fi
11577     # the "pass" command does not work on some
11578     # ftp clients (read ftp.exe) but if it works,
11579     # passive mode is better!
11580     ( \
11581         echo "user $FTPUSER $FTPPWD"        ; \
11582         echo "pass"                         ; \
11583         echo "bin"                          ; \
11584         echo "get $FTPPATH $tmpfile"              ; \
11585     ) | ftp -in $FTPSERVER
11586   fi
11587   if test "x$VALID_TOOL" != xyes; then
11588     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11589   fi
11590 
11591     mv $tmpfile $installdir/$filename
11592     if test ! -s $installdir/$filename; then
11593       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11594     fi
11595     case "$extension" in
11596       zip)  echo "Unzipping $installdir/$filename..."
11597         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11598         ;;
11599       tar.gz) echo "Untaring $installdir/$filename..."
11600         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11601         ;;
11602       tgz) echo "Untaring $installdir/$filename..."
11603         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11604         ;;
11605       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11606         ;;
11607     esac
11608   fi
11609   if test -f $installdir/$filename.unpacked; then
11610     depdir=$installdir
11611   fi
11612 
11613       fi
11614       # Source the builddeps file again, because in the previous command, the depdir
11615       # was updated to point at the current build dependency install directory.
11616       . $builddepsfile
11617       # Now extract variables from the builddeps.conf files.
11618       theroot=${builddep_bootjdk_ROOT}
11619       thecflags=${builddep_bootjdk_CFLAGS}
11620       thelibs=${builddep_bootjdk_LIBS}
11621       if test "x$depdir" = x; then
11622         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11623       fi
11624       BOOT_JDK=$depdir
11625       if test "x$theroot" != x; then
11626         BOOT_JDK="$theroot"
11627       fi
11628       if test "x$thecflags" != x; then
11629         BOOT_JDK_CFLAGS="$thecflags"
11630       fi
11631       if test "x$thelibs" != x; then
11632         BOOT_JDK_LIBS="$thelibs"
11633       fi
11634       BOOT_JDK_FOUND=maybe
11635       else BOOT_JDK_FOUND=no
11636 
11637     fi
11638     else BOOT_JDK_FOUND=no
11639 
11640   fi
11641 
11642 
11643 
11644     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11645     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11646       # Do we have a bin/java?
11647       if test ! -x "$BOOT_JDK/bin/java"; then
11648         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11649 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11650         BOOT_JDK_FOUND=no
11651       else
11652         # Do we have a bin/javac?
11653         if test ! -x "$BOOT_JDK/bin/javac"; then
11654           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11655 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11656           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11657 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11658           BOOT_JDK_FOUND=no
11659         else
11660           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11661           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11662             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11663 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11664             BOOT_JDK_FOUND=no
11665           else
11666             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11667             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11668 
11669             # Extra M4 quote needed to protect [] in grep expression.
11670             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11671             if test "x$FOUND_VERSION_78" = x; then
11672               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11673 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11674               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11675 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11676               BOOT_JDK_FOUND=no
11677             else
11678               # We're done! :-)
11679               BOOT_JDK_FOUND=yes
11680 
11681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11682 
11683   # Input might be given as Windows format, start by converting to
11684   # unix format.
11685   path="$BOOT_JDK"
11686   new_path=`$CYGPATH -u "$path"`
11687 
11688   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11689   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11690   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11691   # "foo.exe" is OK but "foo" is an error.
11692   #
11693   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11694   # It is also a way to make sure we got the proper file name for the real test later on.
11695   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11696   if test "x$test_shortpath" = x; then
11697     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11699     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11700   fi
11701 
11702   # Call helper function which possibly converts this using DOS-style short mode.
11703   # If so, the updated path is stored in $new_path.
11704 
11705   input_path="$new_path"
11706   # Check if we need to convert this using DOS-style short mode. If the path
11707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11708   # take no chances and rewrite it.
11709   # Note: m4 eats our [], so we need to use [ and ] instead.
11710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11711   if test "x$has_forbidden_chars" != x; then
11712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11716       # Going to short mode and back again did indeed matter. Since short mode is
11717       # case insensitive, let's make it lowercase to improve readability.
11718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11719       # Now convert it back to Unix-stile (cygpath)
11720       input_path=`$CYGPATH -u "$shortmode_path"`
11721       new_path="$input_path"
11722     fi
11723   fi
11724 
11725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11726   if test "x$test_cygdrive_prefix" = x; then
11727     # As a simple fix, exclude /usr/bin since it's not a real path.
11728     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11730       # a path prefixed by /cygdrive for fixpath to work.
11731       new_path="$CYGWIN_ROOT_PATH$input_path"
11732     fi
11733   fi
11734 
11735 
11736   if test "x$path" != "x$new_path"; then
11737     BOOT_JDK="$new_path"
11738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11739 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11740   fi
11741 
11742   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11743 
11744   path="$BOOT_JDK"
11745   has_colon=`$ECHO $path | $GREP ^.:`
11746   new_path="$path"
11747   if test "x$has_colon" = x; then
11748     # Not in mixed or Windows style, start by that.
11749     new_path=`cmd //c echo $path`
11750   fi
11751 
11752 
11753   input_path="$new_path"
11754   # Check if we need to convert this using DOS-style short mode. If the path
11755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11756   # take no chances and rewrite it.
11757   # Note: m4 eats our [], so we need to use [ and ] instead.
11758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11759   if test "x$has_forbidden_chars" != x; then
11760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11762   fi
11763 
11764 
11765   windows_path="$new_path"
11766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11767     unix_path=`$CYGPATH -u "$windows_path"`
11768     new_path="$unix_path"
11769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11771     new_path="$unix_path"
11772   fi
11773 
11774   if test "x$path" != "x$new_path"; then
11775     BOOT_JDK="$new_path"
11776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11778   fi
11779 
11780   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11781   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11782 
11783   else
11784     # We're on a posix platform. Hooray! :)
11785     path="$BOOT_JDK"
11786     has_space=`$ECHO "$path" | $GREP " "`
11787     if test "x$has_space" != x; then
11788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11789 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11790       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11791     fi
11792 
11793     # Use eval to expand a potential ~
11794     eval path="$path"
11795     if test ! -f "$path" && test ! -d "$path"; then
11796       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11797     fi
11798 
11799     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
11800   fi
11801 
11802               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11803 $as_echo_n "checking for Boot JDK... " >&6; }
11804               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11805 $as_echo "$BOOT_JDK" >&6; }
11806               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11807 $as_echo_n "checking Boot JDK version... " >&6; }
11808               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11809               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11810 $as_echo "$BOOT_JDK_VERSION" >&6; }
11811             fi # end check jdk version
11812           fi # end check rt.jar
11813         fi # end check javac
11814       fi # end check java
11815     fi # end check boot jdk found
11816   fi
11817 
11818 
11819   # Test: Is $JAVA_HOME set?
11820 
11821   if test "x$BOOT_JDK_FOUND" = xno; then
11822     # Now execute the test
11823 
11824   if test "x$JAVA_HOME" != x; then
11825     JAVA_HOME_PROCESSED="$JAVA_HOME"
11826 
11827   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11828 
11829   # Input might be given as Windows format, start by converting to
11830   # unix format.
11831   path="$JAVA_HOME_PROCESSED"
11832   new_path=`$CYGPATH -u "$path"`
11833 
11834   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11835   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11836   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11837   # "foo.exe" is OK but "foo" is an error.
11838   #
11839   # This test is therefore slightly more accurate than "test -f" to check for file precense.
11840   # It is also a way to make sure we got the proper file name for the real test later on.
11841   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11842   if test "x$test_shortpath" = x; then
11843     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11844 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11845     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11846   fi
11847 
11848   # Call helper function which possibly converts this using DOS-style short mode.
11849   # If so, the updated path is stored in $new_path.
11850 
11851   input_path="$new_path"
11852   # Check if we need to convert this using DOS-style short mode. If the path
11853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11854   # take no chances and rewrite it.
11855   # Note: m4 eats our [], so we need to use [ and ] instead.
11856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11857   if test "x$has_forbidden_chars" != x; then
11858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11859     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11860     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11861     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11862       # Going to short mode and back again did indeed matter. Since short mode is
11863       # case insensitive, let's make it lowercase to improve readability.
11864       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11865       # Now convert it back to Unix-stile (cygpath)
11866       input_path=`$CYGPATH -u "$shortmode_path"`
11867       new_path="$input_path"
11868     fi
11869   fi
11870 
11871   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11872   if test "x$test_cygdrive_prefix" = x; then
11873     # As a simple fix, exclude /usr/bin since it's not a real path.
11874     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11875       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11876       # a path prefixed by /cygdrive for fixpath to work.
11877       new_path="$CYGWIN_ROOT_PATH$input_path"
11878     fi
11879   fi
11880 
11881 
11882   if test "x$path" != "x$new_path"; then
11883     JAVA_HOME_PROCESSED="$new_path"
11884     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11885 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11886   fi
11887 
11888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11889 
11890   path="$JAVA_HOME_PROCESSED"
11891   has_colon=`$ECHO $path | $GREP ^.:`
11892   new_path="$path"
11893   if test "x$has_colon" = x; then
11894     # Not in mixed or Windows style, start by that.
11895     new_path=`cmd //c echo $path`
11896   fi
11897 
11898 
11899   input_path="$new_path"
11900   # Check if we need to convert this using DOS-style short mode. If the path
11901   # contains just simple characters, use it. Otherwise (spaces, weird characters),
11902   # take no chances and rewrite it.
11903   # Note: m4 eats our [], so we need to use [ and ] instead.
11904   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11905   if test "x$has_forbidden_chars" != x; then
11906     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11907     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11908   fi
11909 
11910 
11911   windows_path="$new_path"
11912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11913     unix_path=`$CYGPATH -u "$windows_path"`
11914     new_path="$unix_path"
11915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11917     new_path="$unix_path"
11918   fi
11919 
11920   if test "x$path" != "x$new_path"; then
11921     JAVA_HOME_PROCESSED="$new_path"
11922     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11923 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11924   fi
11925 
11926   # Save the first 10 bytes of this path to the storage, so fixpath can work.
11927   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11928 
11929   else
11930     # We're on a posix platform. Hooray! :)
11931     path="$JAVA_HOME_PROCESSED"
11932     has_space=`$ECHO "$path" | $GREP " "`
11933     if test "x$has_space" != x; then
11934       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11935 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11936       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11937     fi
11938 
11939     # Use eval to expand a potential ~
11940     eval path="$path"
11941     if test ! -f "$path" && test ! -d "$path"; then
11942       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11943     fi
11944 
11945     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
11946   fi
11947 
11948     if test ! -d "$JAVA_HOME_PROCESSED"; then
11949       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11950 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11951     else
11952       # Aha, the user has set a JAVA_HOME
11953       # let us use that as the Boot JDK.
11954       BOOT_JDK="$JAVA_HOME_PROCESSED"
11955       BOOT_JDK_FOUND=maybe
11956       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11957 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11958     fi
11959   fi
11960 
11961 
11962     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11963     if test "x$BOOT_JDK_FOUND" = xmaybe; then
11964       # Do we have a bin/java?
11965       if test ! -x "$BOOT_JDK/bin/java"; then
11966         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11967 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11968         BOOT_JDK_FOUND=no
11969       else
11970         # Do we have a bin/javac?
11971         if test ! -x "$BOOT_JDK/bin/javac"; then
11972           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11974           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11975 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11976           BOOT_JDK_FOUND=no
11977         else
11978           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11979           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11980             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11981 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11982             BOOT_JDK_FOUND=no
11983           else
11984             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11985             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11986 
11987             # Extra M4 quote needed to protect [] in grep expression.
11988             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11989             if test "x$FOUND_VERSION_78" = x; then
11990               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11991 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11992               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11993 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11994               BOOT_JDK_FOUND=no
11995             else
11996               # We're done! :-)
11997               BOOT_JDK_FOUND=yes
11998 
11999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12000 
12001   # Input might be given as Windows format, start by converting to
12002   # unix format.
12003   path="$BOOT_JDK"
12004   new_path=`$CYGPATH -u "$path"`
12005 
12006   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12007   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12008   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12009   # "foo.exe" is OK but "foo" is an error.
12010   #
12011   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12012   # It is also a way to make sure we got the proper file name for the real test later on.
12013   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12014   if test "x$test_shortpath" = x; then
12015     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12016 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12017     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12018   fi
12019 
12020   # Call helper function which possibly converts this using DOS-style short mode.
12021   # If so, the updated path is stored in $new_path.
12022 
12023   input_path="$new_path"
12024   # Check if we need to convert this using DOS-style short mode. If the path
12025   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12026   # take no chances and rewrite it.
12027   # Note: m4 eats our [], so we need to use [ and ] instead.
12028   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12029   if test "x$has_forbidden_chars" != x; then
12030     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12031     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12032     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12033     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12034       # Going to short mode and back again did indeed matter. Since short mode is
12035       # case insensitive, let's make it lowercase to improve readability.
12036       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12037       # Now convert it back to Unix-stile (cygpath)
12038       input_path=`$CYGPATH -u "$shortmode_path"`
12039       new_path="$input_path"
12040     fi
12041   fi
12042 
12043   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12044   if test "x$test_cygdrive_prefix" = x; then
12045     # As a simple fix, exclude /usr/bin since it's not a real path.
12046     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12047       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12048       # a path prefixed by /cygdrive for fixpath to work.
12049       new_path="$CYGWIN_ROOT_PATH$input_path"
12050     fi
12051   fi
12052 
12053 
12054   if test "x$path" != "x$new_path"; then
12055     BOOT_JDK="$new_path"
12056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12057 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12058   fi
12059 
12060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12061 
12062   path="$BOOT_JDK"
12063   has_colon=`$ECHO $path | $GREP ^.:`
12064   new_path="$path"
12065   if test "x$has_colon" = x; then
12066     # Not in mixed or Windows style, start by that.
12067     new_path=`cmd //c echo $path`
12068   fi
12069 
12070 
12071   input_path="$new_path"
12072   # Check if we need to convert this using DOS-style short mode. If the path
12073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12074   # take no chances and rewrite it.
12075   # Note: m4 eats our [], so we need to use [ and ] instead.
12076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12077   if test "x$has_forbidden_chars" != x; then
12078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12079     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12080   fi
12081 
12082 
12083   windows_path="$new_path"
12084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12085     unix_path=`$CYGPATH -u "$windows_path"`
12086     new_path="$unix_path"
12087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12089     new_path="$unix_path"
12090   fi
12091 
12092   if test "x$path" != "x$new_path"; then
12093     BOOT_JDK="$new_path"
12094     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12095 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12096   fi
12097 
12098   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12099   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12100 
12101   else
12102     # We're on a posix platform. Hooray! :)
12103     path="$BOOT_JDK"
12104     has_space=`$ECHO "$path" | $GREP " "`
12105     if test "x$has_space" != x; then
12106       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12107 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12108       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12109     fi
12110 
12111     # Use eval to expand a potential ~
12112     eval path="$path"
12113     if test ! -f "$path" && test ! -d "$path"; then
12114       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12115     fi
12116 
12117     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12118   fi
12119 
12120               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12121 $as_echo_n "checking for Boot JDK... " >&6; }
12122               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12123 $as_echo "$BOOT_JDK" >&6; }
12124               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12125 $as_echo_n "checking Boot JDK version... " >&6; }
12126               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12127               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12128 $as_echo "$BOOT_JDK_VERSION" >&6; }
12129             fi # end check jdk version
12130           fi # end check rt.jar
12131         fi # end check javac
12132       fi # end check java
12133     fi # end check boot jdk found
12134   fi
12135 
12136 
12137   # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
12138 
12139   if test "x$BOOT_JDK_FOUND" = xno; then
12140     # Now execute the test
12141 
12142   if test -x /usr/libexec/java_home; then
12143     BOOT_JDK=`/usr/libexec/java_home`
12144     BOOT_JDK_FOUND=maybe
12145     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
12146 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
12147   fi
12148 
12149 
12150     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12151     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12152       # Do we have a bin/java?
12153       if test ! -x "$BOOT_JDK/bin/java"; then
12154         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12155 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12156         BOOT_JDK_FOUND=no
12157       else
12158         # Do we have a bin/javac?
12159         if test ! -x "$BOOT_JDK/bin/javac"; then
12160           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12161 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12162           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12163 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12164           BOOT_JDK_FOUND=no
12165         else
12166           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12167           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12168             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12169 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12170             BOOT_JDK_FOUND=no
12171           else
12172             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12173             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12174 
12175             # Extra M4 quote needed to protect [] in grep expression.
12176             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12177             if test "x$FOUND_VERSION_78" = x; then
12178               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12180               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12181 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12182               BOOT_JDK_FOUND=no
12183             else
12184               # We're done! :-)
12185               BOOT_JDK_FOUND=yes
12186 
12187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12188 
12189   # Input might be given as Windows format, start by converting to
12190   # unix format.
12191   path="$BOOT_JDK"
12192   new_path=`$CYGPATH -u "$path"`
12193 
12194   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12195   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12196   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12197   # "foo.exe" is OK but "foo" is an error.
12198   #
12199   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12200   # It is also a way to make sure we got the proper file name for the real test later on.
12201   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12202   if test "x$test_shortpath" = x; then
12203     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12204 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12205     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12206   fi
12207 
12208   # Call helper function which possibly converts this using DOS-style short mode.
12209   # If so, the updated path is stored in $new_path.
12210 
12211   input_path="$new_path"
12212   # Check if we need to convert this using DOS-style short mode. If the path
12213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12214   # take no chances and rewrite it.
12215   # Note: m4 eats our [], so we need to use [ and ] instead.
12216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12217   if test "x$has_forbidden_chars" != x; then
12218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12222       # Going to short mode and back again did indeed matter. Since short mode is
12223       # case insensitive, let's make it lowercase to improve readability.
12224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12225       # Now convert it back to Unix-stile (cygpath)
12226       input_path=`$CYGPATH -u "$shortmode_path"`
12227       new_path="$input_path"
12228     fi
12229   fi
12230 
12231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12232   if test "x$test_cygdrive_prefix" = x; then
12233     # As a simple fix, exclude /usr/bin since it's not a real path.
12234     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12236       # a path prefixed by /cygdrive for fixpath to work.
12237       new_path="$CYGWIN_ROOT_PATH$input_path"
12238     fi
12239   fi
12240 
12241 
12242   if test "x$path" != "x$new_path"; then
12243     BOOT_JDK="$new_path"
12244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12245 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12246   fi
12247 
12248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12249 
12250   path="$BOOT_JDK"
12251   has_colon=`$ECHO $path | $GREP ^.:`
12252   new_path="$path"
12253   if test "x$has_colon" = x; then
12254     # Not in mixed or Windows style, start by that.
12255     new_path=`cmd //c echo $path`
12256   fi
12257 
12258 
12259   input_path="$new_path"
12260   # Check if we need to convert this using DOS-style short mode. If the path
12261   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12262   # take no chances and rewrite it.
12263   # Note: m4 eats our [], so we need to use [ and ] instead.
12264   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12265   if test "x$has_forbidden_chars" != x; then
12266     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12267     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12268   fi
12269 
12270 
12271   windows_path="$new_path"
12272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12273     unix_path=`$CYGPATH -u "$windows_path"`
12274     new_path="$unix_path"
12275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12277     new_path="$unix_path"
12278   fi
12279 
12280   if test "x$path" != "x$new_path"; then
12281     BOOT_JDK="$new_path"
12282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12283 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12284   fi
12285 
12286   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12287   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12288 
12289   else
12290     # We're on a posix platform. Hooray! :)
12291     path="$BOOT_JDK"
12292     has_space=`$ECHO "$path" | $GREP " "`
12293     if test "x$has_space" != x; then
12294       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12295 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12296       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12297     fi
12298 
12299     # Use eval to expand a potential ~
12300     eval path="$path"
12301     if test ! -f "$path" && test ! -d "$path"; then
12302       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12303     fi
12304 
12305     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12306   fi
12307 
12308               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12309 $as_echo_n "checking for Boot JDK... " >&6; }
12310               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12311 $as_echo "$BOOT_JDK" >&6; }
12312               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12313 $as_echo_n "checking Boot JDK version... " >&6; }
12314               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12315               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12316 $as_echo "$BOOT_JDK_VERSION" >&6; }
12317             fi # end check jdk version
12318           fi # end check rt.jar
12319         fi # end check javac
12320       fi # end check java
12321     fi # end check boot jdk found
12322   fi
12323 
12324 
12325   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12326 
12327   if test "x$BOOT_JDK_FOUND" = xno; then
12328     # Now execute the test
12329 
12330   # Extract the first word of "javac", so it can be a program name with args.
12331 set dummy javac; ac_word=$2
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12333 $as_echo_n "checking for $ac_word... " >&6; }
12334 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
12335   $as_echo_n "(cached) " >&6
12336 else
12337   case $JAVAC_CHECK in
12338   [\\/]* | ?:[\\/]*)
12339   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12340   ;;
12341   *)
12342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12343 for as_dir in $PATH
12344 do
12345   IFS=$as_save_IFS
12346   test -z "$as_dir" && as_dir=.
12347     for ac_exec_ext in '' $ac_executable_extensions; do
12348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12349     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12351     break 2
12352   fi
12353 done
12354   done
12355 IFS=$as_save_IFS
12356 
12357   ;;
12358 esac
12359 fi
12360 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12361 if test -n "$JAVAC_CHECK"; then
12362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12363 $as_echo "$JAVAC_CHECK" >&6; }
12364 else
12365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12366 $as_echo "no" >&6; }
12367 fi
12368 
12369 
12370   # Extract the first word of "java", so it can be a program name with args.
12371 set dummy java; ac_word=$2
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12373 $as_echo_n "checking for $ac_word... " >&6; }
12374 if ${ac_cv_path_JAVA_CHECK+:} false; then :
12375   $as_echo_n "(cached) " >&6
12376 else
12377   case $JAVA_CHECK in
12378   [\\/]* | ?:[\\/]*)
12379   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12380   ;;
12381   *)
12382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12383 for as_dir in $PATH
12384 do
12385   IFS=$as_save_IFS
12386   test -z "$as_dir" && as_dir=.
12387     for ac_exec_ext in '' $ac_executable_extensions; do
12388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12389     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12391     break 2
12392   fi
12393 done
12394   done
12395 IFS=$as_save_IFS
12396 
12397   ;;
12398 esac
12399 fi
12400 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12401 if test -n "$JAVA_CHECK"; then
12402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12403 $as_echo "$JAVA_CHECK" >&6; }
12404 else
12405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406 $as_echo "no" >&6; }
12407 fi
12408 
12409 
12410   BINARY="$JAVAC_CHECK"
12411   if test "x$JAVAC_CHECK" = x; then
12412     BINARY="$JAVA_CHECK"
12413   fi
12414   if test "x$BINARY" != x; then
12415     # So there is a java(c) binary, it might be part of a JDK.
12416     # Lets find the JDK/JRE directory by following symbolic links.
12417     # Linux/GNU systems often have links from /usr/bin/java to
12418     # /etc/alternatives/java to the real JDK binary.
12419 
12420   if test "x$OPENJDK_BUILD_OS" != xwindows; then
12421     # Follow a chain of symbolic links. Use readlink
12422     # where it exists, else fall back to horribly
12423     # complicated shell code.
12424     if test "x$READLINK_TESTED" != yes; then
12425       # On MacOSX there is a readlink tool with a different
12426       # purpose than the GNU readlink tool. Check the found readlink.
12427       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12428       if test "x$ISGNU" = x; then
12429         # A readlink that we do not know how to use.
12430         # Are there other non-GNU readlinks out there?
12431         READLINK_TESTED=yes
12432         READLINK=
12433       fi
12434     fi
12435 
12436     if test "x$READLINK" != x; then
12437       BINARY=`$READLINK -f $BINARY`
12438     else
12439       # Save the current directory for restoring afterwards
12440       STARTDIR=$PWD
12441       COUNTER=0
12442       sym_link_dir=`$DIRNAME $BINARY`
12443       sym_link_file=`$BASENAME $BINARY`
12444       cd $sym_link_dir
12445       # Use -P flag to resolve symlinks in directories.
12446       cd `$THEPWDCMD -P`
12447       sym_link_dir=`$THEPWDCMD -P`
12448       # Resolve file symlinks
12449       while test $COUNTER -lt 20; do
12450         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12451         if test "x$ISLINK" == x; then
12452           # This is not a symbolic link! We are done!
12453           break
12454         fi
12455         # Again resolve directory symlinks since the target of the just found
12456         # link could be in a different directory
12457         cd `$DIRNAME $ISLINK`
12458         sym_link_dir=`$THEPWDCMD -P`
12459         sym_link_file=`$BASENAME $ISLINK`
12460         let COUNTER=COUNTER+1
12461       done
12462       cd $STARTDIR
12463       BINARY=$sym_link_dir/$sym_link_file
12464     fi
12465   fi
12466 
12467     BOOT_JDK=`dirname "$BINARY"`
12468     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12469     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12470       # Looks like we found ourselves an JDK
12471       BOOT_JDK_FOUND=maybe
12472       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12473 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12474     fi
12475   fi
12476 
12477 
12478     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12479     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12480       # Do we have a bin/java?
12481       if test ! -x "$BOOT_JDK/bin/java"; then
12482         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12483 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12484         BOOT_JDK_FOUND=no
12485       else
12486         # Do we have a bin/javac?
12487         if test ! -x "$BOOT_JDK/bin/javac"; then
12488           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12489 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12490           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12491 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12492           BOOT_JDK_FOUND=no
12493         else
12494           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12495           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12496             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12497 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12498             BOOT_JDK_FOUND=no
12499           else
12500             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12501             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12502 
12503             # Extra M4 quote needed to protect [] in grep expression.
12504             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12505             if test "x$FOUND_VERSION_78" = x; then
12506               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12508               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12509 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12510               BOOT_JDK_FOUND=no
12511             else
12512               # We're done! :-)
12513               BOOT_JDK_FOUND=yes
12514 
12515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12516 
12517   # Input might be given as Windows format, start by converting to
12518   # unix format.
12519   path="$BOOT_JDK"
12520   new_path=`$CYGPATH -u "$path"`
12521 
12522   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12523   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12524   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12525   # "foo.exe" is OK but "foo" is an error.
12526   #
12527   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12528   # It is also a way to make sure we got the proper file name for the real test later on.
12529   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12530   if test "x$test_shortpath" = x; then
12531     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12532 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12533     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12534   fi
12535 
12536   # Call helper function which possibly converts this using DOS-style short mode.
12537   # If so, the updated path is stored in $new_path.
12538 
12539   input_path="$new_path"
12540   # Check if we need to convert this using DOS-style short mode. If the path
12541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12542   # take no chances and rewrite it.
12543   # Note: m4 eats our [], so we need to use [ and ] instead.
12544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12545   if test "x$has_forbidden_chars" != x; then
12546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12547     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12548     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12549     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12550       # Going to short mode and back again did indeed matter. Since short mode is
12551       # case insensitive, let's make it lowercase to improve readability.
12552       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12553       # Now convert it back to Unix-stile (cygpath)
12554       input_path=`$CYGPATH -u "$shortmode_path"`
12555       new_path="$input_path"
12556     fi
12557   fi
12558 
12559   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12560   if test "x$test_cygdrive_prefix" = x; then
12561     # As a simple fix, exclude /usr/bin since it's not a real path.
12562     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12563       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12564       # a path prefixed by /cygdrive for fixpath to work.
12565       new_path="$CYGWIN_ROOT_PATH$input_path"
12566     fi
12567   fi
12568 
12569 
12570   if test "x$path" != "x$new_path"; then
12571     BOOT_JDK="$new_path"
12572     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12573 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12574   fi
12575 
12576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12577 
12578   path="$BOOT_JDK"
12579   has_colon=`$ECHO $path | $GREP ^.:`
12580   new_path="$path"
12581   if test "x$has_colon" = x; then
12582     # Not in mixed or Windows style, start by that.
12583     new_path=`cmd //c echo $path`
12584   fi
12585 
12586 
12587   input_path="$new_path"
12588   # Check if we need to convert this using DOS-style short mode. If the path
12589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12590   # take no chances and rewrite it.
12591   # Note: m4 eats our [], so we need to use [ and ] instead.
12592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12593   if test "x$has_forbidden_chars" != x; then
12594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12595     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12596   fi
12597 
12598 
12599   windows_path="$new_path"
12600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12601     unix_path=`$CYGPATH -u "$windows_path"`
12602     new_path="$unix_path"
12603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12605     new_path="$unix_path"
12606   fi
12607 
12608   if test "x$path" != "x$new_path"; then
12609     BOOT_JDK="$new_path"
12610     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12611 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12612   fi
12613 
12614   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12615   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12616 
12617   else
12618     # We're on a posix platform. Hooray! :)
12619     path="$BOOT_JDK"
12620     has_space=`$ECHO "$path" | $GREP " "`
12621     if test "x$has_space" != x; then
12622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12623 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12624       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12625     fi
12626 
12627     # Use eval to expand a potential ~
12628     eval path="$path"
12629     if test ! -f "$path" && test ! -d "$path"; then
12630       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12631     fi
12632 
12633     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12634   fi
12635 
12636               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12637 $as_echo_n "checking for Boot JDK... " >&6; }
12638               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12639 $as_echo "$BOOT_JDK" >&6; }
12640               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12641 $as_echo_n "checking Boot JDK version... " >&6; }
12642               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12643               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12644 $as_echo "$BOOT_JDK_VERSION" >&6; }
12645             fi # end check jdk version
12646           fi # end check rt.jar
12647         fi # end check javac
12648       fi # end check java
12649     fi # end check boot jdk found
12650   fi
12651 
12652 
12653   # Test: Is there a JDK installed in default, well-known locations?
12654 
12655   if test "x$BOOT_JDK_FOUND" = xno; then
12656     # Now execute the test
12657 
12658   if test "x$OPENJDK_TARGET_OS" = xwindows; then
12659 
12660   if test "x$BOOT_JDK_FOUND" = xno; then
12661     # Now execute the test
12662 
12663   if test "x$ProgramW6432" != x; then
12664     VIRTUAL_DIR="$ProgramW6432/Java"
12665 
12666   windows_path="$VIRTUAL_DIR"
12667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12668     unix_path=`$CYGPATH -u "$windows_path"`
12669     VIRTUAL_DIR="$unix_path"
12670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12672     VIRTUAL_DIR="$unix_path"
12673   fi
12674 
12675 
12676   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12677   BOOT_JDK_SUFFIX=""
12678   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12679   if test "x$ALL_JDKS_FOUND" != x; then
12680     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12681 
12682   if test "x$BOOT_JDK_FOUND" = xno; then
12683     # Now execute the test
12684 
12685         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12686         if test -d "$BOOT_JDK"; then
12687           BOOT_JDK_FOUND=maybe
12688           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12689 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12690         fi
12691 
12692 
12693     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12694     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12695       # Do we have a bin/java?
12696       if test ! -x "$BOOT_JDK/bin/java"; then
12697         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12698 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12699         BOOT_JDK_FOUND=no
12700       else
12701         # Do we have a bin/javac?
12702         if test ! -x "$BOOT_JDK/bin/javac"; then
12703           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12704 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12705           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12706 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12707           BOOT_JDK_FOUND=no
12708         else
12709           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12710           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12711             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12712 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12713             BOOT_JDK_FOUND=no
12714           else
12715             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12716             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12717 
12718             # Extra M4 quote needed to protect [] in grep expression.
12719             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12720             if test "x$FOUND_VERSION_78" = x; then
12721               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12722 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12723               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12724 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12725               BOOT_JDK_FOUND=no
12726             else
12727               # We're done! :-)
12728               BOOT_JDK_FOUND=yes
12729 
12730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12731 
12732   # Input might be given as Windows format, start by converting to
12733   # unix format.
12734   path="$BOOT_JDK"
12735   new_path=`$CYGPATH -u "$path"`
12736 
12737   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12738   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12739   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12740   # "foo.exe" is OK but "foo" is an error.
12741   #
12742   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12743   # It is also a way to make sure we got the proper file name for the real test later on.
12744   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12745   if test "x$test_shortpath" = x; then
12746     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12747 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12748     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12749   fi
12750 
12751   # Call helper function which possibly converts this using DOS-style short mode.
12752   # If so, the updated path is stored in $new_path.
12753 
12754   input_path="$new_path"
12755   # Check if we need to convert this using DOS-style short mode. If the path
12756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12757   # take no chances and rewrite it.
12758   # Note: m4 eats our [], so we need to use [ and ] instead.
12759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12760   if test "x$has_forbidden_chars" != x; then
12761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12762     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12763     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12764     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12765       # Going to short mode and back again did indeed matter. Since short mode is
12766       # case insensitive, let's make it lowercase to improve readability.
12767       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12768       # Now convert it back to Unix-stile (cygpath)
12769       input_path=`$CYGPATH -u "$shortmode_path"`
12770       new_path="$input_path"
12771     fi
12772   fi
12773 
12774   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12775   if test "x$test_cygdrive_prefix" = x; then
12776     # As a simple fix, exclude /usr/bin since it's not a real path.
12777     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12778       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12779       # a path prefixed by /cygdrive for fixpath to work.
12780       new_path="$CYGWIN_ROOT_PATH$input_path"
12781     fi
12782   fi
12783 
12784 
12785   if test "x$path" != "x$new_path"; then
12786     BOOT_JDK="$new_path"
12787     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12788 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12789   fi
12790 
12791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12792 
12793   path="$BOOT_JDK"
12794   has_colon=`$ECHO $path | $GREP ^.:`
12795   new_path="$path"
12796   if test "x$has_colon" = x; then
12797     # Not in mixed or Windows style, start by that.
12798     new_path=`cmd //c echo $path`
12799   fi
12800 
12801 
12802   input_path="$new_path"
12803   # Check if we need to convert this using DOS-style short mode. If the path
12804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12805   # take no chances and rewrite it.
12806   # Note: m4 eats our [], so we need to use [ and ] instead.
12807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12808   if test "x$has_forbidden_chars" != x; then
12809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12810     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12811   fi
12812 
12813 
12814   windows_path="$new_path"
12815   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12816     unix_path=`$CYGPATH -u "$windows_path"`
12817     new_path="$unix_path"
12818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12819     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12820     new_path="$unix_path"
12821   fi
12822 
12823   if test "x$path" != "x$new_path"; then
12824     BOOT_JDK="$new_path"
12825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12826 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12827   fi
12828 
12829   # Save the first 10 bytes of this path to the storage, so fixpath can work.
12830   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12831 
12832   else
12833     # We're on a posix platform. Hooray! :)
12834     path="$BOOT_JDK"
12835     has_space=`$ECHO "$path" | $GREP " "`
12836     if test "x$has_space" != x; then
12837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12838 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12839       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12840     fi
12841 
12842     # Use eval to expand a potential ~
12843     eval path="$path"
12844     if test ! -f "$path" && test ! -d "$path"; then
12845       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12846     fi
12847 
12848     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
12849   fi
12850 
12851               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12852 $as_echo_n "checking for Boot JDK... " >&6; }
12853               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12854 $as_echo "$BOOT_JDK" >&6; }
12855               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12856 $as_echo_n "checking Boot JDK version... " >&6; }
12857               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12858               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12859 $as_echo "$BOOT_JDK_VERSION" >&6; }
12860             fi # end check jdk version
12861           fi # end check rt.jar
12862         fi # end check javac
12863       fi # end check java
12864     fi # end check boot jdk found
12865   fi
12866 
12867     done
12868   fi
12869 
12870   fi
12871 
12872 
12873     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12874     if test "x$BOOT_JDK_FOUND" = xmaybe; then
12875       # Do we have a bin/java?
12876       if test ! -x "$BOOT_JDK/bin/java"; then
12877         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12879         BOOT_JDK_FOUND=no
12880       else
12881         # Do we have a bin/javac?
12882         if test ! -x "$BOOT_JDK/bin/javac"; then
12883           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12884 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12885           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12886 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12887           BOOT_JDK_FOUND=no
12888         else
12889           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12890           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12891             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12892 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12893             BOOT_JDK_FOUND=no
12894           else
12895             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12896             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12897 
12898             # Extra M4 quote needed to protect [] in grep expression.
12899             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12900             if test "x$FOUND_VERSION_78" = x; then
12901               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12902 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12903               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12904 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12905               BOOT_JDK_FOUND=no
12906             else
12907               # We're done! :-)
12908               BOOT_JDK_FOUND=yes
12909 
12910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12911 
12912   # Input might be given as Windows format, start by converting to
12913   # unix format.
12914   path="$BOOT_JDK"
12915   new_path=`$CYGPATH -u "$path"`
12916 
12917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12920   # "foo.exe" is OK but "foo" is an error.
12921   #
12922   # This test is therefore slightly more accurate than "test -f" to check for file precense.
12923   # It is also a way to make sure we got the proper file name for the real test later on.
12924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12925   if test "x$test_shortpath" = x; then
12926     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12927 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12928     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12929   fi
12930 
12931   # Call helper function which possibly converts this using DOS-style short mode.
12932   # If so, the updated path is stored in $new_path.
12933 
12934   input_path="$new_path"
12935   # Check if we need to convert this using DOS-style short mode. If the path
12936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12937   # take no chances and rewrite it.
12938   # Note: m4 eats our [], so we need to use [ and ] instead.
12939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12940   if test "x$has_forbidden_chars" != x; then
12941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12945       # Going to short mode and back again did indeed matter. Since short mode is
12946       # case insensitive, let's make it lowercase to improve readability.
12947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12948       # Now convert it back to Unix-stile (cygpath)
12949       input_path=`$CYGPATH -u "$shortmode_path"`
12950       new_path="$input_path"
12951     fi
12952   fi
12953 
12954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12955   if test "x$test_cygdrive_prefix" = x; then
12956     # As a simple fix, exclude /usr/bin since it's not a real path.
12957     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12959       # a path prefixed by /cygdrive for fixpath to work.
12960       new_path="$CYGWIN_ROOT_PATH$input_path"
12961     fi
12962   fi
12963 
12964 
12965   if test "x$path" != "x$new_path"; then
12966     BOOT_JDK="$new_path"
12967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12968 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12969   fi
12970 
12971   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12972 
12973   path="$BOOT_JDK"
12974   has_colon=`$ECHO $path | $GREP ^.:`
12975   new_path="$path"
12976   if test "x$has_colon" = x; then
12977     # Not in mixed or Windows style, start by that.
12978     new_path=`cmd //c echo $path`
12979   fi
12980 
12981 
12982   input_path="$new_path"
12983   # Check if we need to convert this using DOS-style short mode. If the path
12984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
12985   # take no chances and rewrite it.
12986   # Note: m4 eats our [], so we need to use [ and ] instead.
12987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12988   if test "x$has_forbidden_chars" != x; then
12989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12991   fi
12992 
12993 
12994   windows_path="$new_path"
12995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12996     unix_path=`$CYGPATH -u "$windows_path"`
12997     new_path="$unix_path"
12998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13000     new_path="$unix_path"
13001   fi
13002 
13003   if test "x$path" != "x$new_path"; then
13004     BOOT_JDK="$new_path"
13005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13006 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13007   fi
13008 
13009   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13010   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13011 
13012   else
13013     # We're on a posix platform. Hooray! :)
13014     path="$BOOT_JDK"
13015     has_space=`$ECHO "$path" | $GREP " "`
13016     if test "x$has_space" != x; then
13017       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13018 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13019       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13020     fi
13021 
13022     # Use eval to expand a potential ~
13023     eval path="$path"
13024     if test ! -f "$path" && test ! -d "$path"; then
13025       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13026     fi
13027 
13028     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13029   fi
13030 
13031               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13032 $as_echo_n "checking for Boot JDK... " >&6; }
13033               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13034 $as_echo "$BOOT_JDK" >&6; }
13035               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13036 $as_echo_n "checking Boot JDK version... " >&6; }
13037               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13038               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13039 $as_echo "$BOOT_JDK_VERSION" >&6; }
13040             fi # end check jdk version
13041           fi # end check rt.jar
13042         fi # end check javac
13043       fi # end check java
13044     fi # end check boot jdk found
13045   fi
13046 
13047 
13048   if test "x$BOOT_JDK_FOUND" = xno; then
13049     # Now execute the test
13050 
13051   if test "x$PROGRAMW6432" != x; then
13052     VIRTUAL_DIR="$PROGRAMW6432/Java"
13053 
13054   windows_path="$VIRTUAL_DIR"
13055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13056     unix_path=`$CYGPATH -u "$windows_path"`
13057     VIRTUAL_DIR="$unix_path"
13058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13060     VIRTUAL_DIR="$unix_path"
13061   fi
13062 
13063 
13064   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13065   BOOT_JDK_SUFFIX=""
13066   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13067   if test "x$ALL_JDKS_FOUND" != x; then
13068     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13069 
13070   if test "x$BOOT_JDK_FOUND" = xno; then
13071     # Now execute the test
13072 
13073         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13074         if test -d "$BOOT_JDK"; then
13075           BOOT_JDK_FOUND=maybe
13076           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13077 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13078         fi
13079 
13080 
13081     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13082     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13083       # Do we have a bin/java?
13084       if test ! -x "$BOOT_JDK/bin/java"; then
13085         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13087         BOOT_JDK_FOUND=no
13088       else
13089         # Do we have a bin/javac?
13090         if test ! -x "$BOOT_JDK/bin/javac"; then
13091           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13092 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13093           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13094 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13095           BOOT_JDK_FOUND=no
13096         else
13097           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13098           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13099             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13101             BOOT_JDK_FOUND=no
13102           else
13103             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13104             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13105 
13106             # Extra M4 quote needed to protect [] in grep expression.
13107             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13108             if test "x$FOUND_VERSION_78" = x; then
13109               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13110 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13111               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13112 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13113               BOOT_JDK_FOUND=no
13114             else
13115               # We're done! :-)
13116               BOOT_JDK_FOUND=yes
13117 
13118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13119 
13120   # Input might be given as Windows format, start by converting to
13121   # unix format.
13122   path="$BOOT_JDK"
13123   new_path=`$CYGPATH -u "$path"`
13124 
13125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13128   # "foo.exe" is OK but "foo" is an error.
13129   #
13130   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13131   # It is also a way to make sure we got the proper file name for the real test later on.
13132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13133   if test "x$test_shortpath" = x; then
13134     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13135 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13136     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13137   fi
13138 
13139   # Call helper function which possibly converts this using DOS-style short mode.
13140   # If so, the updated path is stored in $new_path.
13141 
13142   input_path="$new_path"
13143   # Check if we need to convert this using DOS-style short mode. If the path
13144   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13145   # take no chances and rewrite it.
13146   # Note: m4 eats our [], so we need to use [ and ] instead.
13147   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13148   if test "x$has_forbidden_chars" != x; then
13149     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13150     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13151     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13152     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13153       # Going to short mode and back again did indeed matter. Since short mode is
13154       # case insensitive, let's make it lowercase to improve readability.
13155       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13156       # Now convert it back to Unix-stile (cygpath)
13157       input_path=`$CYGPATH -u "$shortmode_path"`
13158       new_path="$input_path"
13159     fi
13160   fi
13161 
13162   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13163   if test "x$test_cygdrive_prefix" = x; then
13164     # As a simple fix, exclude /usr/bin since it's not a real path.
13165     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13166       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13167       # a path prefixed by /cygdrive for fixpath to work.
13168       new_path="$CYGWIN_ROOT_PATH$input_path"
13169     fi
13170   fi
13171 
13172 
13173   if test "x$path" != "x$new_path"; then
13174     BOOT_JDK="$new_path"
13175     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13176 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13177   fi
13178 
13179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13180 
13181   path="$BOOT_JDK"
13182   has_colon=`$ECHO $path | $GREP ^.:`
13183   new_path="$path"
13184   if test "x$has_colon" = x; then
13185     # Not in mixed or Windows style, start by that.
13186     new_path=`cmd //c echo $path`
13187   fi
13188 
13189 
13190   input_path="$new_path"
13191   # Check if we need to convert this using DOS-style short mode. If the path
13192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13193   # take no chances and rewrite it.
13194   # Note: m4 eats our [], so we need to use [ and ] instead.
13195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13196   if test "x$has_forbidden_chars" != x; then
13197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13198     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13199   fi
13200 
13201 
13202   windows_path="$new_path"
13203   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13204     unix_path=`$CYGPATH -u "$windows_path"`
13205     new_path="$unix_path"
13206   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13207     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13208     new_path="$unix_path"
13209   fi
13210 
13211   if test "x$path" != "x$new_path"; then
13212     BOOT_JDK="$new_path"
13213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13214 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13215   fi
13216 
13217   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13218   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13219 
13220   else
13221     # We're on a posix platform. Hooray! :)
13222     path="$BOOT_JDK"
13223     has_space=`$ECHO "$path" | $GREP " "`
13224     if test "x$has_space" != x; then
13225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13227       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13228     fi
13229 
13230     # Use eval to expand a potential ~
13231     eval path="$path"
13232     if test ! -f "$path" && test ! -d "$path"; then
13233       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13234     fi
13235 
13236     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13237   fi
13238 
13239               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13240 $as_echo_n "checking for Boot JDK... " >&6; }
13241               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13242 $as_echo "$BOOT_JDK" >&6; }
13243               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13244 $as_echo_n "checking Boot JDK version... " >&6; }
13245               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13246               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13247 $as_echo "$BOOT_JDK_VERSION" >&6; }
13248             fi # end check jdk version
13249           fi # end check rt.jar
13250         fi # end check javac
13251       fi # end check java
13252     fi # end check boot jdk found
13253   fi
13254 
13255     done
13256   fi
13257 
13258   fi
13259 
13260 
13261     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13262     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13263       # Do we have a bin/java?
13264       if test ! -x "$BOOT_JDK/bin/java"; then
13265         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13266 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13267         BOOT_JDK_FOUND=no
13268       else
13269         # Do we have a bin/javac?
13270         if test ! -x "$BOOT_JDK/bin/javac"; then
13271           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13272 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13273           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13274 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13275           BOOT_JDK_FOUND=no
13276         else
13277           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13278           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13279             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13281             BOOT_JDK_FOUND=no
13282           else
13283             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13284             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13285 
13286             # Extra M4 quote needed to protect [] in grep expression.
13287             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13288             if test "x$FOUND_VERSION_78" = x; then
13289               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13290 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13291               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13292 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13293               BOOT_JDK_FOUND=no
13294             else
13295               # We're done! :-)
13296               BOOT_JDK_FOUND=yes
13297 
13298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13299 
13300   # Input might be given as Windows format, start by converting to
13301   # unix format.
13302   path="$BOOT_JDK"
13303   new_path=`$CYGPATH -u "$path"`
13304 
13305   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13306   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13307   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13308   # "foo.exe" is OK but "foo" is an error.
13309   #
13310   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13311   # It is also a way to make sure we got the proper file name for the real test later on.
13312   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13313   if test "x$test_shortpath" = x; then
13314     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13315 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13316     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13317   fi
13318 
13319   # Call helper function which possibly converts this using DOS-style short mode.
13320   # If so, the updated path is stored in $new_path.
13321 
13322   input_path="$new_path"
13323   # Check if we need to convert this using DOS-style short mode. If the path
13324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13325   # take no chances and rewrite it.
13326   # Note: m4 eats our [], so we need to use [ and ] instead.
13327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13328   if test "x$has_forbidden_chars" != x; then
13329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13330     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13331     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13332     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13333       # Going to short mode and back again did indeed matter. Since short mode is
13334       # case insensitive, let's make it lowercase to improve readability.
13335       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13336       # Now convert it back to Unix-stile (cygpath)
13337       input_path=`$CYGPATH -u "$shortmode_path"`
13338       new_path="$input_path"
13339     fi
13340   fi
13341 
13342   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13343   if test "x$test_cygdrive_prefix" = x; then
13344     # As a simple fix, exclude /usr/bin since it's not a real path.
13345     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13346       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13347       # a path prefixed by /cygdrive for fixpath to work.
13348       new_path="$CYGWIN_ROOT_PATH$input_path"
13349     fi
13350   fi
13351 
13352 
13353   if test "x$path" != "x$new_path"; then
13354     BOOT_JDK="$new_path"
13355     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13356 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13357   fi
13358 
13359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13360 
13361   path="$BOOT_JDK"
13362   has_colon=`$ECHO $path | $GREP ^.:`
13363   new_path="$path"
13364   if test "x$has_colon" = x; then
13365     # Not in mixed or Windows style, start by that.
13366     new_path=`cmd //c echo $path`
13367   fi
13368 
13369 
13370   input_path="$new_path"
13371   # Check if we need to convert this using DOS-style short mode. If the path
13372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13373   # take no chances and rewrite it.
13374   # Note: m4 eats our [], so we need to use [ and ] instead.
13375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13376   if test "x$has_forbidden_chars" != x; then
13377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13378     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13379   fi
13380 
13381 
13382   windows_path="$new_path"
13383   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13384     unix_path=`$CYGPATH -u "$windows_path"`
13385     new_path="$unix_path"
13386   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13387     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13388     new_path="$unix_path"
13389   fi
13390 
13391   if test "x$path" != "x$new_path"; then
13392     BOOT_JDK="$new_path"
13393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13394 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13395   fi
13396 
13397   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13398   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13399 
13400   else
13401     # We're on a posix platform. Hooray! :)
13402     path="$BOOT_JDK"
13403     has_space=`$ECHO "$path" | $GREP " "`
13404     if test "x$has_space" != x; then
13405       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13406 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13407       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13408     fi
13409 
13410     # Use eval to expand a potential ~
13411     eval path="$path"
13412     if test ! -f "$path" && test ! -d "$path"; then
13413       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13414     fi
13415 
13416     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13417   fi
13418 
13419               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13420 $as_echo_n "checking for Boot JDK... " >&6; }
13421               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13422 $as_echo "$BOOT_JDK" >&6; }
13423               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13424 $as_echo_n "checking Boot JDK version... " >&6; }
13425               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13426               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13427 $as_echo "$BOOT_JDK_VERSION" >&6; }
13428             fi # end check jdk version
13429           fi # end check rt.jar
13430         fi # end check javac
13431       fi # end check java
13432     fi # end check boot jdk found
13433   fi
13434 
13435 
13436   if test "x$BOOT_JDK_FOUND" = xno; then
13437     # Now execute the test
13438 
13439   if test "x$PROGRAMFILES" != x; then
13440     VIRTUAL_DIR="$PROGRAMFILES/Java"
13441 
13442   windows_path="$VIRTUAL_DIR"
13443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13444     unix_path=`$CYGPATH -u "$windows_path"`
13445     VIRTUAL_DIR="$unix_path"
13446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13448     VIRTUAL_DIR="$unix_path"
13449   fi
13450 
13451 
13452   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13453   BOOT_JDK_SUFFIX=""
13454   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13455   if test "x$ALL_JDKS_FOUND" != x; then
13456     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13457 
13458   if test "x$BOOT_JDK_FOUND" = xno; then
13459     # Now execute the test
13460 
13461         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13462         if test -d "$BOOT_JDK"; then
13463           BOOT_JDK_FOUND=maybe
13464           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13465 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13466         fi
13467 
13468 
13469     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13470     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13471       # Do we have a bin/java?
13472       if test ! -x "$BOOT_JDK/bin/java"; then
13473         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13474 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13475         BOOT_JDK_FOUND=no
13476       else
13477         # Do we have a bin/javac?
13478         if test ! -x "$BOOT_JDK/bin/javac"; then
13479           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13480 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13481           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13482 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13483           BOOT_JDK_FOUND=no
13484         else
13485           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13486           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13487             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13489             BOOT_JDK_FOUND=no
13490           else
13491             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13492             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13493 
13494             # Extra M4 quote needed to protect [] in grep expression.
13495             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13496             if test "x$FOUND_VERSION_78" = x; then
13497               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13498 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13499               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13500 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13501               BOOT_JDK_FOUND=no
13502             else
13503               # We're done! :-)
13504               BOOT_JDK_FOUND=yes
13505 
13506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13507 
13508   # Input might be given as Windows format, start by converting to
13509   # unix format.
13510   path="$BOOT_JDK"
13511   new_path=`$CYGPATH -u "$path"`
13512 
13513   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13514   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13515   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13516   # "foo.exe" is OK but "foo" is an error.
13517   #
13518   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13519   # It is also a way to make sure we got the proper file name for the real test later on.
13520   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13521   if test "x$test_shortpath" = x; then
13522     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13523 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13524     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13525   fi
13526 
13527   # Call helper function which possibly converts this using DOS-style short mode.
13528   # If so, the updated path is stored in $new_path.
13529 
13530   input_path="$new_path"
13531   # Check if we need to convert this using DOS-style short mode. If the path
13532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13533   # take no chances and rewrite it.
13534   # Note: m4 eats our [], so we need to use [ and ] instead.
13535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13536   if test "x$has_forbidden_chars" != x; then
13537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13538     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13539     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13540     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13541       # Going to short mode and back again did indeed matter. Since short mode is
13542       # case insensitive, let's make it lowercase to improve readability.
13543       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13544       # Now convert it back to Unix-stile (cygpath)
13545       input_path=`$CYGPATH -u "$shortmode_path"`
13546       new_path="$input_path"
13547     fi
13548   fi
13549 
13550   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13551   if test "x$test_cygdrive_prefix" = x; then
13552     # As a simple fix, exclude /usr/bin since it's not a real path.
13553     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13554       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13555       # a path prefixed by /cygdrive for fixpath to work.
13556       new_path="$CYGWIN_ROOT_PATH$input_path"
13557     fi
13558   fi
13559 
13560 
13561   if test "x$path" != "x$new_path"; then
13562     BOOT_JDK="$new_path"
13563     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13564 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13565   fi
13566 
13567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13568 
13569   path="$BOOT_JDK"
13570   has_colon=`$ECHO $path | $GREP ^.:`
13571   new_path="$path"
13572   if test "x$has_colon" = x; then
13573     # Not in mixed or Windows style, start by that.
13574     new_path=`cmd //c echo $path`
13575   fi
13576 
13577 
13578   input_path="$new_path"
13579   # Check if we need to convert this using DOS-style short mode. If the path
13580   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13581   # take no chances and rewrite it.
13582   # Note: m4 eats our [], so we need to use [ and ] instead.
13583   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13584   if test "x$has_forbidden_chars" != x; then
13585     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13586     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13587   fi
13588 
13589 
13590   windows_path="$new_path"
13591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13592     unix_path=`$CYGPATH -u "$windows_path"`
13593     new_path="$unix_path"
13594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13596     new_path="$unix_path"
13597   fi
13598 
13599   if test "x$path" != "x$new_path"; then
13600     BOOT_JDK="$new_path"
13601     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13602 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13603   fi
13604 
13605   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13606   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13607 
13608   else
13609     # We're on a posix platform. Hooray! :)
13610     path="$BOOT_JDK"
13611     has_space=`$ECHO "$path" | $GREP " "`
13612     if test "x$has_space" != x; then
13613       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13614 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13615       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13616     fi
13617 
13618     # Use eval to expand a potential ~
13619     eval path="$path"
13620     if test ! -f "$path" && test ! -d "$path"; then
13621       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13622     fi
13623 
13624     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13625   fi
13626 
13627               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13628 $as_echo_n "checking for Boot JDK... " >&6; }
13629               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13630 $as_echo "$BOOT_JDK" >&6; }
13631               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13632 $as_echo_n "checking Boot JDK version... " >&6; }
13633               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13634               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13635 $as_echo "$BOOT_JDK_VERSION" >&6; }
13636             fi # end check jdk version
13637           fi # end check rt.jar
13638         fi # end check javac
13639       fi # end check java
13640     fi # end check boot jdk found
13641   fi
13642 
13643     done
13644   fi
13645 
13646   fi
13647 
13648 
13649     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13650     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13651       # Do we have a bin/java?
13652       if test ! -x "$BOOT_JDK/bin/java"; then
13653         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13654 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13655         BOOT_JDK_FOUND=no
13656       else
13657         # Do we have a bin/javac?
13658         if test ! -x "$BOOT_JDK/bin/javac"; then
13659           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13660 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13661           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13662 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13663           BOOT_JDK_FOUND=no
13664         else
13665           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13666           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13667             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13669             BOOT_JDK_FOUND=no
13670           else
13671             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13672             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13673 
13674             # Extra M4 quote needed to protect [] in grep expression.
13675             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13676             if test "x$FOUND_VERSION_78" = x; then
13677               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13678 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13679               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13680 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13681               BOOT_JDK_FOUND=no
13682             else
13683               # We're done! :-)
13684               BOOT_JDK_FOUND=yes
13685 
13686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13687 
13688   # Input might be given as Windows format, start by converting to
13689   # unix format.
13690   path="$BOOT_JDK"
13691   new_path=`$CYGPATH -u "$path"`
13692 
13693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13696   # "foo.exe" is OK but "foo" is an error.
13697   #
13698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13699   # It is also a way to make sure we got the proper file name for the real test later on.
13700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13701   if test "x$test_shortpath" = x; then
13702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13703 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13704     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13705   fi
13706 
13707   # Call helper function which possibly converts this using DOS-style short mode.
13708   # If so, the updated path is stored in $new_path.
13709 
13710   input_path="$new_path"
13711   # Check if we need to convert this using DOS-style short mode. If the path
13712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13713   # take no chances and rewrite it.
13714   # Note: m4 eats our [], so we need to use [ and ] instead.
13715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13716   if test "x$has_forbidden_chars" != x; then
13717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13721       # Going to short mode and back again did indeed matter. Since short mode is
13722       # case insensitive, let's make it lowercase to improve readability.
13723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13724       # Now convert it back to Unix-stile (cygpath)
13725       input_path=`$CYGPATH -u "$shortmode_path"`
13726       new_path="$input_path"
13727     fi
13728   fi
13729 
13730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13731   if test "x$test_cygdrive_prefix" = x; then
13732     # As a simple fix, exclude /usr/bin since it's not a real path.
13733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13735       # a path prefixed by /cygdrive for fixpath to work.
13736       new_path="$CYGWIN_ROOT_PATH$input_path"
13737     fi
13738   fi
13739 
13740 
13741   if test "x$path" != "x$new_path"; then
13742     BOOT_JDK="$new_path"
13743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13745   fi
13746 
13747   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13748 
13749   path="$BOOT_JDK"
13750   has_colon=`$ECHO $path | $GREP ^.:`
13751   new_path="$path"
13752   if test "x$has_colon" = x; then
13753     # Not in mixed or Windows style, start by that.
13754     new_path=`cmd //c echo $path`
13755   fi
13756 
13757 
13758   input_path="$new_path"
13759   # Check if we need to convert this using DOS-style short mode. If the path
13760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13761   # take no chances and rewrite it.
13762   # Note: m4 eats our [], so we need to use [ and ] instead.
13763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13764   if test "x$has_forbidden_chars" != x; then
13765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13767   fi
13768 
13769 
13770   windows_path="$new_path"
13771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13772     unix_path=`$CYGPATH -u "$windows_path"`
13773     new_path="$unix_path"
13774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13776     new_path="$unix_path"
13777   fi
13778 
13779   if test "x$path" != "x$new_path"; then
13780     BOOT_JDK="$new_path"
13781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13782 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13783   fi
13784 
13785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13787 
13788   else
13789     # We're on a posix platform. Hooray! :)
13790     path="$BOOT_JDK"
13791     has_space=`$ECHO "$path" | $GREP " "`
13792     if test "x$has_space" != x; then
13793       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13794 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13795       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13796     fi
13797 
13798     # Use eval to expand a potential ~
13799     eval path="$path"
13800     if test ! -f "$path" && test ! -d "$path"; then
13801       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13802     fi
13803 
13804     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
13805   fi
13806 
13807               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13808 $as_echo_n "checking for Boot JDK... " >&6; }
13809               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13810 $as_echo "$BOOT_JDK" >&6; }
13811               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13812 $as_echo_n "checking Boot JDK version... " >&6; }
13813               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13814               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13815 $as_echo "$BOOT_JDK_VERSION" >&6; }
13816             fi # end check jdk version
13817           fi # end check rt.jar
13818         fi # end check javac
13819       fi # end check java
13820     fi # end check boot jdk found
13821   fi
13822 
13823 
13824   if test "x$BOOT_JDK_FOUND" = xno; then
13825     # Now execute the test
13826 
13827   if test "x$ProgramFiles" != x; then
13828     VIRTUAL_DIR="$ProgramFiles/Java"
13829 
13830   windows_path="$VIRTUAL_DIR"
13831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13832     unix_path=`$CYGPATH -u "$windows_path"`
13833     VIRTUAL_DIR="$unix_path"
13834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13836     VIRTUAL_DIR="$unix_path"
13837   fi
13838 
13839 
13840   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13841   BOOT_JDK_SUFFIX=""
13842   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13843   if test "x$ALL_JDKS_FOUND" != x; then
13844     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13845 
13846   if test "x$BOOT_JDK_FOUND" = xno; then
13847     # Now execute the test
13848 
13849         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13850         if test -d "$BOOT_JDK"; then
13851           BOOT_JDK_FOUND=maybe
13852           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13853 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13854         fi
13855 
13856 
13857     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13858     if test "x$BOOT_JDK_FOUND" = xmaybe; then
13859       # Do we have a bin/java?
13860       if test ! -x "$BOOT_JDK/bin/java"; then
13861         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13862 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13863         BOOT_JDK_FOUND=no
13864       else
13865         # Do we have a bin/javac?
13866         if test ! -x "$BOOT_JDK/bin/javac"; then
13867           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13868 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13869           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13870 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13871           BOOT_JDK_FOUND=no
13872         else
13873           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13874           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13875             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13876 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13877             BOOT_JDK_FOUND=no
13878           else
13879             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13880             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13881 
13882             # Extra M4 quote needed to protect [] in grep expression.
13883             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13884             if test "x$FOUND_VERSION_78" = x; then
13885               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13886 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13887               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13888 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13889               BOOT_JDK_FOUND=no
13890             else
13891               # We're done! :-)
13892               BOOT_JDK_FOUND=yes
13893 
13894   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13895 
13896   # Input might be given as Windows format, start by converting to
13897   # unix format.
13898   path="$BOOT_JDK"
13899   new_path=`$CYGPATH -u "$path"`
13900 
13901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13904   # "foo.exe" is OK but "foo" is an error.
13905   #
13906   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13907   # It is also a way to make sure we got the proper file name for the real test later on.
13908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13909   if test "x$test_shortpath" = x; then
13910     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13911 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13912     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13913   fi
13914 
13915   # Call helper function which possibly converts this using DOS-style short mode.
13916   # If so, the updated path is stored in $new_path.
13917 
13918   input_path="$new_path"
13919   # Check if we need to convert this using DOS-style short mode. If the path
13920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13921   # take no chances and rewrite it.
13922   # Note: m4 eats our [], so we need to use [ and ] instead.
13923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13924   if test "x$has_forbidden_chars" != x; then
13925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13926     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13927     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13928     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13929       # Going to short mode and back again did indeed matter. Since short mode is
13930       # case insensitive, let's make it lowercase to improve readability.
13931       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13932       # Now convert it back to Unix-stile (cygpath)
13933       input_path=`$CYGPATH -u "$shortmode_path"`
13934       new_path="$input_path"
13935     fi
13936   fi
13937 
13938   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13939   if test "x$test_cygdrive_prefix" = x; then
13940     # As a simple fix, exclude /usr/bin since it's not a real path.
13941     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13942       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13943       # a path prefixed by /cygdrive for fixpath to work.
13944       new_path="$CYGWIN_ROOT_PATH$input_path"
13945     fi
13946   fi
13947 
13948 
13949   if test "x$path" != "x$new_path"; then
13950     BOOT_JDK="$new_path"
13951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13952 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13953   fi
13954 
13955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13956 
13957   path="$BOOT_JDK"
13958   has_colon=`$ECHO $path | $GREP ^.:`
13959   new_path="$path"
13960   if test "x$has_colon" = x; then
13961     # Not in mixed or Windows style, start by that.
13962     new_path=`cmd //c echo $path`
13963   fi
13964 
13965 
13966   input_path="$new_path"
13967   # Check if we need to convert this using DOS-style short mode. If the path
13968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13969   # take no chances and rewrite it.
13970   # Note: m4 eats our [], so we need to use [ and ] instead.
13971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13972   if test "x$has_forbidden_chars" != x; then
13973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13975   fi
13976 
13977 
13978   windows_path="$new_path"
13979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13980     unix_path=`$CYGPATH -u "$windows_path"`
13981     new_path="$unix_path"
13982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13984     new_path="$unix_path"
13985   fi
13986 
13987   if test "x$path" != "x$new_path"; then
13988     BOOT_JDK="$new_path"
13989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13990 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13991   fi
13992 
13993   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13994   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13995 
13996   else
13997     # We're on a posix platform. Hooray! :)
13998     path="$BOOT_JDK"
13999     has_space=`$ECHO "$path" | $GREP " "`
14000     if test "x$has_space" != x; then
14001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14002 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14003       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14004     fi
14005 
14006     # Use eval to expand a potential ~
14007     eval path="$path"
14008     if test ! -f "$path" && test ! -d "$path"; then
14009       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14010     fi
14011 
14012     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14013   fi
14014 
14015               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14016 $as_echo_n "checking for Boot JDK... " >&6; }
14017               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14018 $as_echo "$BOOT_JDK" >&6; }
14019               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14020 $as_echo_n "checking Boot JDK version... " >&6; }
14021               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14022               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14023 $as_echo "$BOOT_JDK_VERSION" >&6; }
14024             fi # end check jdk version
14025           fi # end check rt.jar
14026         fi # end check javac
14027       fi # end check java
14028     fi # end check boot jdk found
14029   fi
14030 
14031     done
14032   fi
14033 
14034   fi
14035 
14036 
14037     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14038     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14039       # Do we have a bin/java?
14040       if test ! -x "$BOOT_JDK/bin/java"; then
14041         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14042 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14043         BOOT_JDK_FOUND=no
14044       else
14045         # Do we have a bin/javac?
14046         if test ! -x "$BOOT_JDK/bin/javac"; then
14047           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14048 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14049           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14050 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14051           BOOT_JDK_FOUND=no
14052         else
14053           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14054           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14055             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14057             BOOT_JDK_FOUND=no
14058           else
14059             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14060             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14061 
14062             # Extra M4 quote needed to protect [] in grep expression.
14063             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14064             if test "x$FOUND_VERSION_78" = x; then
14065               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14066 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14067               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14068 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14069               BOOT_JDK_FOUND=no
14070             else
14071               # We're done! :-)
14072               BOOT_JDK_FOUND=yes
14073 
14074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14075 
14076   # Input might be given as Windows format, start by converting to
14077   # unix format.
14078   path="$BOOT_JDK"
14079   new_path=`$CYGPATH -u "$path"`
14080 
14081   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14082   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14083   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14084   # "foo.exe" is OK but "foo" is an error.
14085   #
14086   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14087   # It is also a way to make sure we got the proper file name for the real test later on.
14088   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14089   if test "x$test_shortpath" = x; then
14090     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14091 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14092     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14093   fi
14094 
14095   # Call helper function which possibly converts this using DOS-style short mode.
14096   # If so, the updated path is stored in $new_path.
14097 
14098   input_path="$new_path"
14099   # Check if we need to convert this using DOS-style short mode. If the path
14100   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14101   # take no chances and rewrite it.
14102   # Note: m4 eats our [], so we need to use [ and ] instead.
14103   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14104   if test "x$has_forbidden_chars" != x; then
14105     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14106     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14107     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14108     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14109       # Going to short mode and back again did indeed matter. Since short mode is
14110       # case insensitive, let's make it lowercase to improve readability.
14111       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14112       # Now convert it back to Unix-stile (cygpath)
14113       input_path=`$CYGPATH -u "$shortmode_path"`
14114       new_path="$input_path"
14115     fi
14116   fi
14117 
14118   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14119   if test "x$test_cygdrive_prefix" = x; then
14120     # As a simple fix, exclude /usr/bin since it's not a real path.
14121     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14122       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14123       # a path prefixed by /cygdrive for fixpath to work.
14124       new_path="$CYGWIN_ROOT_PATH$input_path"
14125     fi
14126   fi
14127 
14128 
14129   if test "x$path" != "x$new_path"; then
14130     BOOT_JDK="$new_path"
14131     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14132 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14133   fi
14134 
14135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14136 
14137   path="$BOOT_JDK"
14138   has_colon=`$ECHO $path | $GREP ^.:`
14139   new_path="$path"
14140   if test "x$has_colon" = x; then
14141     # Not in mixed or Windows style, start by that.
14142     new_path=`cmd //c echo $path`
14143   fi
14144 
14145 
14146   input_path="$new_path"
14147   # Check if we need to convert this using DOS-style short mode. If the path
14148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14149   # take no chances and rewrite it.
14150   # Note: m4 eats our [], so we need to use [ and ] instead.
14151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14152   if test "x$has_forbidden_chars" != x; then
14153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14154     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14155   fi
14156 
14157 
14158   windows_path="$new_path"
14159   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14160     unix_path=`$CYGPATH -u "$windows_path"`
14161     new_path="$unix_path"
14162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14163     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14164     new_path="$unix_path"
14165   fi
14166 
14167   if test "x$path" != "x$new_path"; then
14168     BOOT_JDK="$new_path"
14169     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14170 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14171   fi
14172 
14173   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14174   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14175 
14176   else
14177     # We're on a posix platform. Hooray! :)
14178     path="$BOOT_JDK"
14179     has_space=`$ECHO "$path" | $GREP " "`
14180     if test "x$has_space" != x; then
14181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14182 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14183       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14184     fi
14185 
14186     # Use eval to expand a potential ~
14187     eval path="$path"
14188     if test ! -f "$path" && test ! -d "$path"; then
14189       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14190     fi
14191 
14192     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14193   fi
14194 
14195               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14196 $as_echo_n "checking for Boot JDK... " >&6; }
14197               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14198 $as_echo "$BOOT_JDK" >&6; }
14199               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14200 $as_echo_n "checking Boot JDK version... " >&6; }
14201               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14202               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14203 $as_echo "$BOOT_JDK_VERSION" >&6; }
14204             fi # end check jdk version
14205           fi # end check rt.jar
14206         fi # end check javac
14207       fi # end check java
14208     fi # end check boot jdk found
14209   fi
14210 
14211 
14212   if test "x$BOOT_JDK_FOUND" = xno; then
14213     # Now execute the test
14214 
14215   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
14216   BOOT_JDK_SUFFIX=""
14217   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14218   if test "x$ALL_JDKS_FOUND" != x; then
14219     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14220 
14221   if test "x$BOOT_JDK_FOUND" = xno; then
14222     # Now execute the test
14223 
14224         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14225         if test -d "$BOOT_JDK"; then
14226           BOOT_JDK_FOUND=maybe
14227           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14228 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14229         fi
14230 
14231 
14232     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14233     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14234       # Do we have a bin/java?
14235       if test ! -x "$BOOT_JDK/bin/java"; then
14236         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14237 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14238         BOOT_JDK_FOUND=no
14239       else
14240         # Do we have a bin/javac?
14241         if test ! -x "$BOOT_JDK/bin/javac"; then
14242           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14243 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14244           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14245 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14246           BOOT_JDK_FOUND=no
14247         else
14248           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14249           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14250             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14252             BOOT_JDK_FOUND=no
14253           else
14254             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14255             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14256 
14257             # Extra M4 quote needed to protect [] in grep expression.
14258             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14259             if test "x$FOUND_VERSION_78" = x; then
14260               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14261 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14262               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14263 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14264               BOOT_JDK_FOUND=no
14265             else
14266               # We're done! :-)
14267               BOOT_JDK_FOUND=yes
14268 
14269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14270 
14271   # Input might be given as Windows format, start by converting to
14272   # unix format.
14273   path="$BOOT_JDK"
14274   new_path=`$CYGPATH -u "$path"`
14275 
14276   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14277   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14278   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14279   # "foo.exe" is OK but "foo" is an error.
14280   #
14281   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14282   # It is also a way to make sure we got the proper file name for the real test later on.
14283   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14284   if test "x$test_shortpath" = x; then
14285     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14286 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14287     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14288   fi
14289 
14290   # Call helper function which possibly converts this using DOS-style short mode.
14291   # If so, the updated path is stored in $new_path.
14292 
14293   input_path="$new_path"
14294   # Check if we need to convert this using DOS-style short mode. If the path
14295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14296   # take no chances and rewrite it.
14297   # Note: m4 eats our [], so we need to use [ and ] instead.
14298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14299   if test "x$has_forbidden_chars" != x; then
14300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14301     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14302     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14303     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14304       # Going to short mode and back again did indeed matter. Since short mode is
14305       # case insensitive, let's make it lowercase to improve readability.
14306       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14307       # Now convert it back to Unix-stile (cygpath)
14308       input_path=`$CYGPATH -u "$shortmode_path"`
14309       new_path="$input_path"
14310     fi
14311   fi
14312 
14313   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14314   if test "x$test_cygdrive_prefix" = x; then
14315     # As a simple fix, exclude /usr/bin since it's not a real path.
14316     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14317       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14318       # a path prefixed by /cygdrive for fixpath to work.
14319       new_path="$CYGWIN_ROOT_PATH$input_path"
14320     fi
14321   fi
14322 
14323 
14324   if test "x$path" != "x$new_path"; then
14325     BOOT_JDK="$new_path"
14326     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14327 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14328   fi
14329 
14330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14331 
14332   path="$BOOT_JDK"
14333   has_colon=`$ECHO $path | $GREP ^.:`
14334   new_path="$path"
14335   if test "x$has_colon" = x; then
14336     # Not in mixed or Windows style, start by that.
14337     new_path=`cmd //c echo $path`
14338   fi
14339 
14340 
14341   input_path="$new_path"
14342   # Check if we need to convert this using DOS-style short mode. If the path
14343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14344   # take no chances and rewrite it.
14345   # Note: m4 eats our [], so we need to use [ and ] instead.
14346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14347   if test "x$has_forbidden_chars" != x; then
14348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14349     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14350   fi
14351 
14352 
14353   windows_path="$new_path"
14354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14355     unix_path=`$CYGPATH -u "$windows_path"`
14356     new_path="$unix_path"
14357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14359     new_path="$unix_path"
14360   fi
14361 
14362   if test "x$path" != "x$new_path"; then
14363     BOOT_JDK="$new_path"
14364     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14365 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14366   fi
14367 
14368   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14369   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14370 
14371   else
14372     # We're on a posix platform. Hooray! :)
14373     path="$BOOT_JDK"
14374     has_space=`$ECHO "$path" | $GREP " "`
14375     if test "x$has_space" != x; then
14376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14377 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14378       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14379     fi
14380 
14381     # Use eval to expand a potential ~
14382     eval path="$path"
14383     if test ! -f "$path" && test ! -d "$path"; then
14384       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14385     fi
14386 
14387     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14388   fi
14389 
14390               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14391 $as_echo_n "checking for Boot JDK... " >&6; }
14392               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14393 $as_echo "$BOOT_JDK" >&6; }
14394               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14395 $as_echo_n "checking Boot JDK version... " >&6; }
14396               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14397               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14398 $as_echo "$BOOT_JDK_VERSION" >&6; }
14399             fi # end check jdk version
14400           fi # end check rt.jar
14401         fi # end check javac
14402       fi # end check java
14403     fi # end check boot jdk found
14404   fi
14405 
14406     done
14407   fi
14408 
14409 
14410     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14411     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14412       # Do we have a bin/java?
14413       if test ! -x "$BOOT_JDK/bin/java"; then
14414         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14415 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14416         BOOT_JDK_FOUND=no
14417       else
14418         # Do we have a bin/javac?
14419         if test ! -x "$BOOT_JDK/bin/javac"; then
14420           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14421 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14422           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14423 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14424           BOOT_JDK_FOUND=no
14425         else
14426           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14427           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14428             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14430             BOOT_JDK_FOUND=no
14431           else
14432             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14433             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14434 
14435             # Extra M4 quote needed to protect [] in grep expression.
14436             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14437             if test "x$FOUND_VERSION_78" = x; then
14438               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14439 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14440               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14441 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14442               BOOT_JDK_FOUND=no
14443             else
14444               # We're done! :-)
14445               BOOT_JDK_FOUND=yes
14446 
14447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14448 
14449   # Input might be given as Windows format, start by converting to
14450   # unix format.
14451   path="$BOOT_JDK"
14452   new_path=`$CYGPATH -u "$path"`
14453 
14454   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14455   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14456   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14457   # "foo.exe" is OK but "foo" is an error.
14458   #
14459   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14460   # It is also a way to make sure we got the proper file name for the real test later on.
14461   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14462   if test "x$test_shortpath" = x; then
14463     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14464 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14465     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14466   fi
14467 
14468   # Call helper function which possibly converts this using DOS-style short mode.
14469   # If so, the updated path is stored in $new_path.
14470 
14471   input_path="$new_path"
14472   # Check if we need to convert this using DOS-style short mode. If the path
14473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14474   # take no chances and rewrite it.
14475   # Note: m4 eats our [], so we need to use [ and ] instead.
14476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14477   if test "x$has_forbidden_chars" != x; then
14478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14479     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14480     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14481     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14482       # Going to short mode and back again did indeed matter. Since short mode is
14483       # case insensitive, let's make it lowercase to improve readability.
14484       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14485       # Now convert it back to Unix-stile (cygpath)
14486       input_path=`$CYGPATH -u "$shortmode_path"`
14487       new_path="$input_path"
14488     fi
14489   fi
14490 
14491   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14492   if test "x$test_cygdrive_prefix" = x; then
14493     # As a simple fix, exclude /usr/bin since it's not a real path.
14494     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14495       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14496       # a path prefixed by /cygdrive for fixpath to work.
14497       new_path="$CYGWIN_ROOT_PATH$input_path"
14498     fi
14499   fi
14500 
14501 
14502   if test "x$path" != "x$new_path"; then
14503     BOOT_JDK="$new_path"
14504     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14505 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14506   fi
14507 
14508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14509 
14510   path="$BOOT_JDK"
14511   has_colon=`$ECHO $path | $GREP ^.:`
14512   new_path="$path"
14513   if test "x$has_colon" = x; then
14514     # Not in mixed or Windows style, start by that.
14515     new_path=`cmd //c echo $path`
14516   fi
14517 
14518 
14519   input_path="$new_path"
14520   # Check if we need to convert this using DOS-style short mode. If the path
14521   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14522   # take no chances and rewrite it.
14523   # Note: m4 eats our [], so we need to use [ and ] instead.
14524   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14525   if test "x$has_forbidden_chars" != x; then
14526     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14527     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14528   fi
14529 
14530 
14531   windows_path="$new_path"
14532   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14533     unix_path=`$CYGPATH -u "$windows_path"`
14534     new_path="$unix_path"
14535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14536     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14537     new_path="$unix_path"
14538   fi
14539 
14540   if test "x$path" != "x$new_path"; then
14541     BOOT_JDK="$new_path"
14542     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14543 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14544   fi
14545 
14546   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14547   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14548 
14549   else
14550     # We're on a posix platform. Hooray! :)
14551     path="$BOOT_JDK"
14552     has_space=`$ECHO "$path" | $GREP " "`
14553     if test "x$has_space" != x; then
14554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14555 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14556       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14557     fi
14558 
14559     # Use eval to expand a potential ~
14560     eval path="$path"
14561     if test ! -f "$path" && test ! -d "$path"; then
14562       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14563     fi
14564 
14565     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14566   fi
14567 
14568               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14569 $as_echo_n "checking for Boot JDK... " >&6; }
14570               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14571 $as_echo "$BOOT_JDK" >&6; }
14572               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14573 $as_echo_n "checking Boot JDK version... " >&6; }
14574               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14575               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14576 $as_echo "$BOOT_JDK_VERSION" >&6; }
14577             fi # end check jdk version
14578           fi # end check rt.jar
14579         fi # end check javac
14580       fi # end check java
14581     fi # end check boot jdk found
14582   fi
14583 
14584   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14585 
14586   if test "x$BOOT_JDK_FOUND" = xno; then
14587     # Now execute the test
14588 
14589   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14590   BOOT_JDK_SUFFIX="/Contents/Home"
14591   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14592   if test "x$ALL_JDKS_FOUND" != x; then
14593     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14594 
14595   if test "x$BOOT_JDK_FOUND" = xno; then
14596     # Now execute the test
14597 
14598         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14599         if test -d "$BOOT_JDK"; then
14600           BOOT_JDK_FOUND=maybe
14601           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14602 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14603         fi
14604 
14605 
14606     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14607     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14608       # Do we have a bin/java?
14609       if test ! -x "$BOOT_JDK/bin/java"; then
14610         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14611 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14612         BOOT_JDK_FOUND=no
14613       else
14614         # Do we have a bin/javac?
14615         if test ! -x "$BOOT_JDK/bin/javac"; then
14616           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14617 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14618           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14619 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14620           BOOT_JDK_FOUND=no
14621         else
14622           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14623           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14624             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14626             BOOT_JDK_FOUND=no
14627           else
14628             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14629             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14630 
14631             # Extra M4 quote needed to protect [] in grep expression.
14632             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14633             if test "x$FOUND_VERSION_78" = x; then
14634               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14635 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14636               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14637 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14638               BOOT_JDK_FOUND=no
14639             else
14640               # We're done! :-)
14641               BOOT_JDK_FOUND=yes
14642 
14643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14644 
14645   # Input might be given as Windows format, start by converting to
14646   # unix format.
14647   path="$BOOT_JDK"
14648   new_path=`$CYGPATH -u "$path"`
14649 
14650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14653   # "foo.exe" is OK but "foo" is an error.
14654   #
14655   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14656   # It is also a way to make sure we got the proper file name for the real test later on.
14657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14658   if test "x$test_shortpath" = x; then
14659     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14660 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14661     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14662   fi
14663 
14664   # Call helper function which possibly converts this using DOS-style short mode.
14665   # If so, the updated path is stored in $new_path.
14666 
14667   input_path="$new_path"
14668   # Check if we need to convert this using DOS-style short mode. If the path
14669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14670   # take no chances and rewrite it.
14671   # Note: m4 eats our [], so we need to use [ and ] instead.
14672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14673   if test "x$has_forbidden_chars" != x; then
14674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14675     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14676     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14677     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14678       # Going to short mode and back again did indeed matter. Since short mode is
14679       # case insensitive, let's make it lowercase to improve readability.
14680       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14681       # Now convert it back to Unix-stile (cygpath)
14682       input_path=`$CYGPATH -u "$shortmode_path"`
14683       new_path="$input_path"
14684     fi
14685   fi
14686 
14687   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14688   if test "x$test_cygdrive_prefix" = x; then
14689     # As a simple fix, exclude /usr/bin since it's not a real path.
14690     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14691       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14692       # a path prefixed by /cygdrive for fixpath to work.
14693       new_path="$CYGWIN_ROOT_PATH$input_path"
14694     fi
14695   fi
14696 
14697 
14698   if test "x$path" != "x$new_path"; then
14699     BOOT_JDK="$new_path"
14700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14701 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14702   fi
14703 
14704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14705 
14706   path="$BOOT_JDK"
14707   has_colon=`$ECHO $path | $GREP ^.:`
14708   new_path="$path"
14709   if test "x$has_colon" = x; then
14710     # Not in mixed or Windows style, start by that.
14711     new_path=`cmd //c echo $path`
14712   fi
14713 
14714 
14715   input_path="$new_path"
14716   # Check if we need to convert this using DOS-style short mode. If the path
14717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14718   # take no chances and rewrite it.
14719   # Note: m4 eats our [], so we need to use [ and ] instead.
14720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14721   if test "x$has_forbidden_chars" != x; then
14722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14723     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14724   fi
14725 
14726 
14727   windows_path="$new_path"
14728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14729     unix_path=`$CYGPATH -u "$windows_path"`
14730     new_path="$unix_path"
14731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14733     new_path="$unix_path"
14734   fi
14735 
14736   if test "x$path" != "x$new_path"; then
14737     BOOT_JDK="$new_path"
14738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14739 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14740   fi
14741 
14742   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14743   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14744 
14745   else
14746     # We're on a posix platform. Hooray! :)
14747     path="$BOOT_JDK"
14748     has_space=`$ECHO "$path" | $GREP " "`
14749     if test "x$has_space" != x; then
14750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14751 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14752       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14753     fi
14754 
14755     # Use eval to expand a potential ~
14756     eval path="$path"
14757     if test ! -f "$path" && test ! -d "$path"; then
14758       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14759     fi
14760 
14761     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14762   fi
14763 
14764               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14765 $as_echo_n "checking for Boot JDK... " >&6; }
14766               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14767 $as_echo "$BOOT_JDK" >&6; }
14768               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14769 $as_echo_n "checking Boot JDK version... " >&6; }
14770               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14771               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14772 $as_echo "$BOOT_JDK_VERSION" >&6; }
14773             fi # end check jdk version
14774           fi # end check rt.jar
14775         fi # end check javac
14776       fi # end check java
14777     fi # end check boot jdk found
14778   fi
14779 
14780     done
14781   fi
14782 
14783 
14784     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14785     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14786       # Do we have a bin/java?
14787       if test ! -x "$BOOT_JDK/bin/java"; then
14788         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14789 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14790         BOOT_JDK_FOUND=no
14791       else
14792         # Do we have a bin/javac?
14793         if test ! -x "$BOOT_JDK/bin/javac"; then
14794           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14795 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14796           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14797 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14798           BOOT_JDK_FOUND=no
14799         else
14800           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14801           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14802             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14804             BOOT_JDK_FOUND=no
14805           else
14806             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14807             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14808 
14809             # Extra M4 quote needed to protect [] in grep expression.
14810             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14811             if test "x$FOUND_VERSION_78" = x; then
14812               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14813 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14814               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14815 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14816               BOOT_JDK_FOUND=no
14817             else
14818               # We're done! :-)
14819               BOOT_JDK_FOUND=yes
14820 
14821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14822 
14823   # Input might be given as Windows format, start by converting to
14824   # unix format.
14825   path="$BOOT_JDK"
14826   new_path=`$CYGPATH -u "$path"`
14827 
14828   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14829   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14830   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14831   # "foo.exe" is OK but "foo" is an error.
14832   #
14833   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14834   # It is also a way to make sure we got the proper file name for the real test later on.
14835   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14836   if test "x$test_shortpath" = x; then
14837     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14838 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14839     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14840   fi
14841 
14842   # Call helper function which possibly converts this using DOS-style short mode.
14843   # If so, the updated path is stored in $new_path.
14844 
14845   input_path="$new_path"
14846   # Check if we need to convert this using DOS-style short mode. If the path
14847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14848   # take no chances and rewrite it.
14849   # Note: m4 eats our [], so we need to use [ and ] instead.
14850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14851   if test "x$has_forbidden_chars" != x; then
14852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14853     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14854     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14855     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14856       # Going to short mode and back again did indeed matter. Since short mode is
14857       # case insensitive, let's make it lowercase to improve readability.
14858       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14859       # Now convert it back to Unix-stile (cygpath)
14860       input_path=`$CYGPATH -u "$shortmode_path"`
14861       new_path="$input_path"
14862     fi
14863   fi
14864 
14865   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14866   if test "x$test_cygdrive_prefix" = x; then
14867     # As a simple fix, exclude /usr/bin since it's not a real path.
14868     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14869       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14870       # a path prefixed by /cygdrive for fixpath to work.
14871       new_path="$CYGWIN_ROOT_PATH$input_path"
14872     fi
14873   fi
14874 
14875 
14876   if test "x$path" != "x$new_path"; then
14877     BOOT_JDK="$new_path"
14878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14879 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14880   fi
14881 
14882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14883 
14884   path="$BOOT_JDK"
14885   has_colon=`$ECHO $path | $GREP ^.:`
14886   new_path="$path"
14887   if test "x$has_colon" = x; then
14888     # Not in mixed or Windows style, start by that.
14889     new_path=`cmd //c echo $path`
14890   fi
14891 
14892 
14893   input_path="$new_path"
14894   # Check if we need to convert this using DOS-style short mode. If the path
14895   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14896   # take no chances and rewrite it.
14897   # Note: m4 eats our [], so we need to use [ and ] instead.
14898   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14899   if test "x$has_forbidden_chars" != x; then
14900     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14901     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14902   fi
14903 
14904 
14905   windows_path="$new_path"
14906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14907     unix_path=`$CYGPATH -u "$windows_path"`
14908     new_path="$unix_path"
14909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14911     new_path="$unix_path"
14912   fi
14913 
14914   if test "x$path" != "x$new_path"; then
14915     BOOT_JDK="$new_path"
14916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14917 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14918   fi
14919 
14920   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14921   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14922 
14923   else
14924     # We're on a posix platform. Hooray! :)
14925     path="$BOOT_JDK"
14926     has_space=`$ECHO "$path" | $GREP " "`
14927     if test "x$has_space" != x; then
14928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14930       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14931     fi
14932 
14933     # Use eval to expand a potential ~
14934     eval path="$path"
14935     if test ! -f "$path" && test ! -d "$path"; then
14936       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14937     fi
14938 
14939     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
14940   fi
14941 
14942               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14943 $as_echo_n "checking for Boot JDK... " >&6; }
14944               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14945 $as_echo "$BOOT_JDK" >&6; }
14946               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14947 $as_echo_n "checking Boot JDK version... " >&6; }
14948               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14949               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14950 $as_echo "$BOOT_JDK_VERSION" >&6; }
14951             fi # end check jdk version
14952           fi # end check rt.jar
14953         fi # end check javac
14954       fi # end check java
14955     fi # end check boot jdk found
14956   fi
14957 
14958 
14959   if test "x$BOOT_JDK_FOUND" = xno; then
14960     # Now execute the test
14961 
14962   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14963   BOOT_JDK_SUFFIX="/Contents/Home"
14964   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14965   if test "x$ALL_JDKS_FOUND" != x; then
14966     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14967 
14968   if test "x$BOOT_JDK_FOUND" = xno; then
14969     # Now execute the test
14970 
14971         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14972         if test -d "$BOOT_JDK"; then
14973           BOOT_JDK_FOUND=maybe
14974           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14975 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14976         fi
14977 
14978 
14979     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14980     if test "x$BOOT_JDK_FOUND" = xmaybe; then
14981       # Do we have a bin/java?
14982       if test ! -x "$BOOT_JDK/bin/java"; then
14983         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14984 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14985         BOOT_JDK_FOUND=no
14986       else
14987         # Do we have a bin/javac?
14988         if test ! -x "$BOOT_JDK/bin/javac"; then
14989           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14991           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14992 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14993           BOOT_JDK_FOUND=no
14994         else
14995           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14996           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14997             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14999             BOOT_JDK_FOUND=no
15000           else
15001             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15002             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15003 
15004             # Extra M4 quote needed to protect [] in grep expression.
15005             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15006             if test "x$FOUND_VERSION_78" = x; then
15007               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15009               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15010 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15011               BOOT_JDK_FOUND=no
15012             else
15013               # We're done! :-)
15014               BOOT_JDK_FOUND=yes
15015 
15016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15017 
15018   # Input might be given as Windows format, start by converting to
15019   # unix format.
15020   path="$BOOT_JDK"
15021   new_path=`$CYGPATH -u "$path"`
15022 
15023   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15024   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15025   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15026   # "foo.exe" is OK but "foo" is an error.
15027   #
15028   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15029   # It is also a way to make sure we got the proper file name for the real test later on.
15030   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15031   if test "x$test_shortpath" = x; then
15032     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15033 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15034     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15035   fi
15036 
15037   # Call helper function which possibly converts this using DOS-style short mode.
15038   # If so, the updated path is stored in $new_path.
15039 
15040   input_path="$new_path"
15041   # Check if we need to convert this using DOS-style short mode. If the path
15042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15043   # take no chances and rewrite it.
15044   # Note: m4 eats our [], so we need to use [ and ] instead.
15045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15046   if test "x$has_forbidden_chars" != x; then
15047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15051       # Going to short mode and back again did indeed matter. Since short mode is
15052       # case insensitive, let's make it lowercase to improve readability.
15053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15054       # Now convert it back to Unix-stile (cygpath)
15055       input_path=`$CYGPATH -u "$shortmode_path"`
15056       new_path="$input_path"
15057     fi
15058   fi
15059 
15060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15061   if test "x$test_cygdrive_prefix" = x; then
15062     # As a simple fix, exclude /usr/bin since it's not a real path.
15063     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15065       # a path prefixed by /cygdrive for fixpath to work.
15066       new_path="$CYGWIN_ROOT_PATH$input_path"
15067     fi
15068   fi
15069 
15070 
15071   if test "x$path" != "x$new_path"; then
15072     BOOT_JDK="$new_path"
15073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15074 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15075   fi
15076 
15077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15078 
15079   path="$BOOT_JDK"
15080   has_colon=`$ECHO $path | $GREP ^.:`
15081   new_path="$path"
15082   if test "x$has_colon" = x; then
15083     # Not in mixed or Windows style, start by that.
15084     new_path=`cmd //c echo $path`
15085   fi
15086 
15087 
15088   input_path="$new_path"
15089   # Check if we need to convert this using DOS-style short mode. If the path
15090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15091   # take no chances and rewrite it.
15092   # Note: m4 eats our [], so we need to use [ and ] instead.
15093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15094   if test "x$has_forbidden_chars" != x; then
15095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15097   fi
15098 
15099 
15100   windows_path="$new_path"
15101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15102     unix_path=`$CYGPATH -u "$windows_path"`
15103     new_path="$unix_path"
15104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15106     new_path="$unix_path"
15107   fi
15108 
15109   if test "x$path" != "x$new_path"; then
15110     BOOT_JDK="$new_path"
15111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15112 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15113   fi
15114 
15115   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15116   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15117 
15118   else
15119     # We're on a posix platform. Hooray! :)
15120     path="$BOOT_JDK"
15121     has_space=`$ECHO "$path" | $GREP " "`
15122     if test "x$has_space" != x; then
15123       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15124 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15125       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15126     fi
15127 
15128     # Use eval to expand a potential ~
15129     eval path="$path"
15130     if test ! -f "$path" && test ! -d "$path"; then
15131       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15132     fi
15133 
15134     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15135   fi
15136 
15137               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15138 $as_echo_n "checking for Boot JDK... " >&6; }
15139               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15140 $as_echo "$BOOT_JDK" >&6; }
15141               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15142 $as_echo_n "checking Boot JDK version... " >&6; }
15143               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15144               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15145 $as_echo "$BOOT_JDK_VERSION" >&6; }
15146             fi # end check jdk version
15147           fi # end check rt.jar
15148         fi # end check javac
15149       fi # end check java
15150     fi # end check boot jdk found
15151   fi
15152 
15153     done
15154   fi
15155 
15156 
15157     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15158     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15159       # Do we have a bin/java?
15160       if test ! -x "$BOOT_JDK/bin/java"; then
15161         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15162 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15163         BOOT_JDK_FOUND=no
15164       else
15165         # Do we have a bin/javac?
15166         if test ! -x "$BOOT_JDK/bin/javac"; then
15167           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15168 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15169           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15170 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15171           BOOT_JDK_FOUND=no
15172         else
15173           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15174           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15175             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15177             BOOT_JDK_FOUND=no
15178           else
15179             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15180             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15181 
15182             # Extra M4 quote needed to protect [] in grep expression.
15183             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15184             if test "x$FOUND_VERSION_78" = x; then
15185               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15186 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15187               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15188 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15189               BOOT_JDK_FOUND=no
15190             else
15191               # We're done! :-)
15192               BOOT_JDK_FOUND=yes
15193 
15194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15195 
15196   # Input might be given as Windows format, start by converting to
15197   # unix format.
15198   path="$BOOT_JDK"
15199   new_path=`$CYGPATH -u "$path"`
15200 
15201   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15202   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15203   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15204   # "foo.exe" is OK but "foo" is an error.
15205   #
15206   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15207   # It is also a way to make sure we got the proper file name for the real test later on.
15208   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15209   if test "x$test_shortpath" = x; then
15210     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15211 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15212     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15213   fi
15214 
15215   # Call helper function which possibly converts this using DOS-style short mode.
15216   # If so, the updated path is stored in $new_path.
15217 
15218   input_path="$new_path"
15219   # Check if we need to convert this using DOS-style short mode. If the path
15220   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15221   # take no chances and rewrite it.
15222   # Note: m4 eats our [], so we need to use [ and ] instead.
15223   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15224   if test "x$has_forbidden_chars" != x; then
15225     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15226     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15227     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15228     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15229       # Going to short mode and back again did indeed matter. Since short mode is
15230       # case insensitive, let's make it lowercase to improve readability.
15231       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15232       # Now convert it back to Unix-stile (cygpath)
15233       input_path=`$CYGPATH -u "$shortmode_path"`
15234       new_path="$input_path"
15235     fi
15236   fi
15237 
15238   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15239   if test "x$test_cygdrive_prefix" = x; then
15240     # As a simple fix, exclude /usr/bin since it's not a real path.
15241     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15242       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15243       # a path prefixed by /cygdrive for fixpath to work.
15244       new_path="$CYGWIN_ROOT_PATH$input_path"
15245     fi
15246   fi
15247 
15248 
15249   if test "x$path" != "x$new_path"; then
15250     BOOT_JDK="$new_path"
15251     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15252 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15253   fi
15254 
15255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256 
15257   path="$BOOT_JDK"
15258   has_colon=`$ECHO $path | $GREP ^.:`
15259   new_path="$path"
15260   if test "x$has_colon" = x; then
15261     # Not in mixed or Windows style, start by that.
15262     new_path=`cmd //c echo $path`
15263   fi
15264 
15265 
15266   input_path="$new_path"
15267   # Check if we need to convert this using DOS-style short mode. If the path
15268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15269   # take no chances and rewrite it.
15270   # Note: m4 eats our [], so we need to use [ and ] instead.
15271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15272   if test "x$has_forbidden_chars" != x; then
15273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15274     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15275   fi
15276 
15277 
15278   windows_path="$new_path"
15279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15280     unix_path=`$CYGPATH -u "$windows_path"`
15281     new_path="$unix_path"
15282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15284     new_path="$unix_path"
15285   fi
15286 
15287   if test "x$path" != "x$new_path"; then
15288     BOOT_JDK="$new_path"
15289     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15290 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15291   fi
15292 
15293   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15294   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15295 
15296   else
15297     # We're on a posix platform. Hooray! :)
15298     path="$BOOT_JDK"
15299     has_space=`$ECHO "$path" | $GREP " "`
15300     if test "x$has_space" != x; then
15301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15302 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15303       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15304     fi
15305 
15306     # Use eval to expand a potential ~
15307     eval path="$path"
15308     if test ! -f "$path" && test ! -d "$path"; then
15309       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15310     fi
15311 
15312     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15313   fi
15314 
15315               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15316 $as_echo_n "checking for Boot JDK... " >&6; }
15317               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15318 $as_echo "$BOOT_JDK" >&6; }
15319               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15320 $as_echo_n "checking Boot JDK version... " >&6; }
15321               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15322               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15323 $as_echo "$BOOT_JDK_VERSION" >&6; }
15324             fi # end check jdk version
15325           fi # end check rt.jar
15326         fi # end check javac
15327       fi # end check java
15328     fi # end check boot jdk found
15329   fi
15330 
15331   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15332 
15333   if test "x$BOOT_JDK_FOUND" = xno; then
15334     # Now execute the test
15335 
15336   BOOT_JDK_PREFIX="/usr/lib/jvm"
15337   BOOT_JDK_SUFFIX=""
15338   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15339   if test "x$ALL_JDKS_FOUND" != x; then
15340     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15341 
15342   if test "x$BOOT_JDK_FOUND" = xno; then
15343     # Now execute the test
15344 
15345         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15346         if test -d "$BOOT_JDK"; then
15347           BOOT_JDK_FOUND=maybe
15348           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15349 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15350         fi
15351 
15352 
15353     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15354     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15355       # Do we have a bin/java?
15356       if test ! -x "$BOOT_JDK/bin/java"; then
15357         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15358 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15359         BOOT_JDK_FOUND=no
15360       else
15361         # Do we have a bin/javac?
15362         if test ! -x "$BOOT_JDK/bin/javac"; then
15363           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15364 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15365           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15366 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15367           BOOT_JDK_FOUND=no
15368         else
15369           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15370           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15371             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15372 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15373             BOOT_JDK_FOUND=no
15374           else
15375             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15376             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15377 
15378             # Extra M4 quote needed to protect [] in grep expression.
15379             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15380             if test "x$FOUND_VERSION_78" = x; then
15381               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15382 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15383               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15384 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15385               BOOT_JDK_FOUND=no
15386             else
15387               # We're done! :-)
15388               BOOT_JDK_FOUND=yes
15389 
15390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15391 
15392   # Input might be given as Windows format, start by converting to
15393   # unix format.
15394   path="$BOOT_JDK"
15395   new_path=`$CYGPATH -u "$path"`
15396 
15397   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15398   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15399   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15400   # "foo.exe" is OK but "foo" is an error.
15401   #
15402   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15403   # It is also a way to make sure we got the proper file name for the real test later on.
15404   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15405   if test "x$test_shortpath" = x; then
15406     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15407 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15408     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15409   fi
15410 
15411   # Call helper function which possibly converts this using DOS-style short mode.
15412   # If so, the updated path is stored in $new_path.
15413 
15414   input_path="$new_path"
15415   # Check if we need to convert this using DOS-style short mode. If the path
15416   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15417   # take no chances and rewrite it.
15418   # Note: m4 eats our [], so we need to use [ and ] instead.
15419   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15420   if test "x$has_forbidden_chars" != x; then
15421     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15422     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15423     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15424     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15425       # Going to short mode and back again did indeed matter. Since short mode is
15426       # case insensitive, let's make it lowercase to improve readability.
15427       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15428       # Now convert it back to Unix-stile (cygpath)
15429       input_path=`$CYGPATH -u "$shortmode_path"`
15430       new_path="$input_path"
15431     fi
15432   fi
15433 
15434   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15435   if test "x$test_cygdrive_prefix" = x; then
15436     # As a simple fix, exclude /usr/bin since it's not a real path.
15437     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15438       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15439       # a path prefixed by /cygdrive for fixpath to work.
15440       new_path="$CYGWIN_ROOT_PATH$input_path"
15441     fi
15442   fi
15443 
15444 
15445   if test "x$path" != "x$new_path"; then
15446     BOOT_JDK="$new_path"
15447     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15448 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15449   fi
15450 
15451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15452 
15453   path="$BOOT_JDK"
15454   has_colon=`$ECHO $path | $GREP ^.:`
15455   new_path="$path"
15456   if test "x$has_colon" = x; then
15457     # Not in mixed or Windows style, start by that.
15458     new_path=`cmd //c echo $path`
15459   fi
15460 
15461 
15462   input_path="$new_path"
15463   # Check if we need to convert this using DOS-style short mode. If the path
15464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15465   # take no chances and rewrite it.
15466   # Note: m4 eats our [], so we need to use [ and ] instead.
15467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15468   if test "x$has_forbidden_chars" != x; then
15469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15471   fi
15472 
15473 
15474   windows_path="$new_path"
15475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15476     unix_path=`$CYGPATH -u "$windows_path"`
15477     new_path="$unix_path"
15478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15479     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15480     new_path="$unix_path"
15481   fi
15482 
15483   if test "x$path" != "x$new_path"; then
15484     BOOT_JDK="$new_path"
15485     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15486 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15487   fi
15488 
15489   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15490   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15491 
15492   else
15493     # We're on a posix platform. Hooray! :)
15494     path="$BOOT_JDK"
15495     has_space=`$ECHO "$path" | $GREP " "`
15496     if test "x$has_space" != x; then
15497       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15498 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15499       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15500     fi
15501 
15502     # Use eval to expand a potential ~
15503     eval path="$path"
15504     if test ! -f "$path" && test ! -d "$path"; then
15505       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15506     fi
15507 
15508     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15509   fi
15510 
15511               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15512 $as_echo_n "checking for Boot JDK... " >&6; }
15513               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15514 $as_echo "$BOOT_JDK" >&6; }
15515               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15516 $as_echo_n "checking Boot JDK version... " >&6; }
15517               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15518               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15519 $as_echo "$BOOT_JDK_VERSION" >&6; }
15520             fi # end check jdk version
15521           fi # end check rt.jar
15522         fi # end check javac
15523       fi # end check java
15524     fi # end check boot jdk found
15525   fi
15526 
15527     done
15528   fi
15529 
15530 
15531     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15532     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15533       # Do we have a bin/java?
15534       if test ! -x "$BOOT_JDK/bin/java"; then
15535         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15536 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15537         BOOT_JDK_FOUND=no
15538       else
15539         # Do we have a bin/javac?
15540         if test ! -x "$BOOT_JDK/bin/javac"; then
15541           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15542 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15543           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15544 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15545           BOOT_JDK_FOUND=no
15546         else
15547           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15548           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15549             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15550 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15551             BOOT_JDK_FOUND=no
15552           else
15553             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15554             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15555 
15556             # Extra M4 quote needed to protect [] in grep expression.
15557             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15558             if test "x$FOUND_VERSION_78" = x; then
15559               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15560 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15561               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15562 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15563               BOOT_JDK_FOUND=no
15564             else
15565               # We're done! :-)
15566               BOOT_JDK_FOUND=yes
15567 
15568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15569 
15570   # Input might be given as Windows format, start by converting to
15571   # unix format.
15572   path="$BOOT_JDK"
15573   new_path=`$CYGPATH -u "$path"`
15574 
15575   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15576   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15577   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15578   # "foo.exe" is OK but "foo" is an error.
15579   #
15580   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15581   # It is also a way to make sure we got the proper file name for the real test later on.
15582   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15583   if test "x$test_shortpath" = x; then
15584     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15585 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15586     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15587   fi
15588 
15589   # Call helper function which possibly converts this using DOS-style short mode.
15590   # If so, the updated path is stored in $new_path.
15591 
15592   input_path="$new_path"
15593   # Check if we need to convert this using DOS-style short mode. If the path
15594   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15595   # take no chances and rewrite it.
15596   # Note: m4 eats our [], so we need to use [ and ] instead.
15597   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15598   if test "x$has_forbidden_chars" != x; then
15599     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15600     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15601     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15602     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15603       # Going to short mode and back again did indeed matter. Since short mode is
15604       # case insensitive, let's make it lowercase to improve readability.
15605       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15606       # Now convert it back to Unix-stile (cygpath)
15607       input_path=`$CYGPATH -u "$shortmode_path"`
15608       new_path="$input_path"
15609     fi
15610   fi
15611 
15612   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15613   if test "x$test_cygdrive_prefix" = x; then
15614     # As a simple fix, exclude /usr/bin since it's not a real path.
15615     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15616       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15617       # a path prefixed by /cygdrive for fixpath to work.
15618       new_path="$CYGWIN_ROOT_PATH$input_path"
15619     fi
15620   fi
15621 
15622 
15623   if test "x$path" != "x$new_path"; then
15624     BOOT_JDK="$new_path"
15625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15627   fi
15628 
15629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15630 
15631   path="$BOOT_JDK"
15632   has_colon=`$ECHO $path | $GREP ^.:`
15633   new_path="$path"
15634   if test "x$has_colon" = x; then
15635     # Not in mixed or Windows style, start by that.
15636     new_path=`cmd //c echo $path`
15637   fi
15638 
15639 
15640   input_path="$new_path"
15641   # Check if we need to convert this using DOS-style short mode. If the path
15642   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15643   # take no chances and rewrite it.
15644   # Note: m4 eats our [], so we need to use [ and ] instead.
15645   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15646   if test "x$has_forbidden_chars" != x; then
15647     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15648     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15649   fi
15650 
15651 
15652   windows_path="$new_path"
15653   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15654     unix_path=`$CYGPATH -u "$windows_path"`
15655     new_path="$unix_path"
15656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15657     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15658     new_path="$unix_path"
15659   fi
15660 
15661   if test "x$path" != "x$new_path"; then
15662     BOOT_JDK="$new_path"
15663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15664 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15665   fi
15666 
15667   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15668   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15669 
15670   else
15671     # We're on a posix platform. Hooray! :)
15672     path="$BOOT_JDK"
15673     has_space=`$ECHO "$path" | $GREP " "`
15674     if test "x$has_space" != x; then
15675       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15676 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15677       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15678     fi
15679 
15680     # Use eval to expand a potential ~
15681     eval path="$path"
15682     if test ! -f "$path" && test ! -d "$path"; then
15683       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15684     fi
15685 
15686     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15687   fi
15688 
15689               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15690 $as_echo_n "checking for Boot JDK... " >&6; }
15691               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15692 $as_echo "$BOOT_JDK" >&6; }
15693               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15694 $as_echo_n "checking Boot JDK version... " >&6; }
15695               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15696               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15697 $as_echo "$BOOT_JDK_VERSION" >&6; }
15698             fi # end check jdk version
15699           fi # end check rt.jar
15700         fi # end check javac
15701       fi # end check java
15702     fi # end check boot jdk found
15703   fi
15704 
15705   fi
15706 
15707 
15708     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15709     if test "x$BOOT_JDK_FOUND" = xmaybe; then
15710       # Do we have a bin/java?
15711       if test ! -x "$BOOT_JDK/bin/java"; then
15712         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15713 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15714         BOOT_JDK_FOUND=no
15715       else
15716         # Do we have a bin/javac?
15717         if test ! -x "$BOOT_JDK/bin/javac"; then
15718           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15719 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15720           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15721 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15722           BOOT_JDK_FOUND=no
15723         else
15724           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15725           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15726             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15728             BOOT_JDK_FOUND=no
15729           else
15730             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15731             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15732 
15733             # Extra M4 quote needed to protect [] in grep expression.
15734             FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15735             if test "x$FOUND_VERSION_78" = x; then
15736               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15737 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15738               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15739 $as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15740               BOOT_JDK_FOUND=no
15741             else
15742               # We're done! :-)
15743               BOOT_JDK_FOUND=yes
15744 
15745   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15746 
15747   # Input might be given as Windows format, start by converting to
15748   # unix format.
15749   path="$BOOT_JDK"
15750   new_path=`$CYGPATH -u "$path"`
15751 
15752   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15753   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15754   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15755   # "foo.exe" is OK but "foo" is an error.
15756   #
15757   # This test is therefore slightly more accurate than "test -f" to check for file precense.
15758   # It is also a way to make sure we got the proper file name for the real test later on.
15759   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15760   if test "x$test_shortpath" = x; then
15761     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15762 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15763     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15764   fi
15765 
15766   # Call helper function which possibly converts this using DOS-style short mode.
15767   # If so, the updated path is stored in $new_path.
15768 
15769   input_path="$new_path"
15770   # Check if we need to convert this using DOS-style short mode. If the path
15771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15772   # take no chances and rewrite it.
15773   # Note: m4 eats our [], so we need to use [ and ] instead.
15774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15775   if test "x$has_forbidden_chars" != x; then
15776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15777     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15778     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15779     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15780       # Going to short mode and back again did indeed matter. Since short mode is
15781       # case insensitive, let's make it lowercase to improve readability.
15782       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15783       # Now convert it back to Unix-stile (cygpath)
15784       input_path=`$CYGPATH -u "$shortmode_path"`
15785       new_path="$input_path"
15786     fi
15787   fi
15788 
15789   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15790   if test "x$test_cygdrive_prefix" = x; then
15791     # As a simple fix, exclude /usr/bin since it's not a real path.
15792     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15793       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15794       # a path prefixed by /cygdrive for fixpath to work.
15795       new_path="$CYGWIN_ROOT_PATH$input_path"
15796     fi
15797   fi
15798 
15799 
15800   if test "x$path" != "x$new_path"; then
15801     BOOT_JDK="$new_path"
15802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15804   fi
15805 
15806   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15807 
15808   path="$BOOT_JDK"
15809   has_colon=`$ECHO $path | $GREP ^.:`
15810   new_path="$path"
15811   if test "x$has_colon" = x; then
15812     # Not in mixed or Windows style, start by that.
15813     new_path=`cmd //c echo $path`
15814   fi
15815 
15816 
15817   input_path="$new_path"
15818   # Check if we need to convert this using DOS-style short mode. If the path
15819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15820   # take no chances and rewrite it.
15821   # Note: m4 eats our [], so we need to use [ and ] instead.
15822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15823   if test "x$has_forbidden_chars" != x; then
15824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15825     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15826   fi
15827 
15828 
15829   windows_path="$new_path"
15830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15831     unix_path=`$CYGPATH -u "$windows_path"`
15832     new_path="$unix_path"
15833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15835     new_path="$unix_path"
15836   fi
15837 
15838   if test "x$path" != "x$new_path"; then
15839     BOOT_JDK="$new_path"
15840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15841 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15842   fi
15843 
15844   # Save the first 10 bytes of this path to the storage, so fixpath can work.
15845   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15846 
15847   else
15848     # We're on a posix platform. Hooray! :)
15849     path="$BOOT_JDK"
15850     has_space=`$ECHO "$path" | $GREP " "`
15851     if test "x$has_space" != x; then
15852       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15853 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15854       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15855     fi
15856 
15857     # Use eval to expand a potential ~
15858     eval path="$path"
15859     if test ! -f "$path" && test ! -d "$path"; then
15860       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15861     fi
15862 
15863     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
15864   fi
15865 
15866               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15867 $as_echo_n "checking for Boot JDK... " >&6; }
15868               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15869 $as_echo "$BOOT_JDK" >&6; }
15870               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15871 $as_echo_n "checking Boot JDK version... " >&6; }
15872               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15873               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15874 $as_echo "$BOOT_JDK_VERSION" >&6; }
15875             fi # end check jdk version
15876           fi # end check rt.jar
15877         fi # end check javac
15878       fi # end check java
15879     fi # end check boot jdk found
15880   fi
15881 
15882 
15883   # If we haven't found anything yet, we've truly lost. Give up.
15884   if test "x$BOOT_JDK_FOUND" = xno; then
15885 
15886   # Print a helpful message on how to acquire the necessary build dependency.
15887   # openjdk is the help tag: freetype, cups, pulse, alsa etc
15888   MISSING_DEPENDENCY=openjdk
15889 
15890   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15891     cygwin_help $MISSING_DEPENDENCY
15892   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15893     msys_help $MISSING_DEPENDENCY
15894   else
15895     PKGHANDLER_COMMAND=
15896 
15897     case $PKGHANDLER in
15898       apt-get)
15899         apt_help     $MISSING_DEPENDENCY ;;
15900       yum)
15901         yum_help     $MISSING_DEPENDENCY ;;
15902       port)
15903         port_help    $MISSING_DEPENDENCY ;;
15904       pkgutil)
15905         pkgutil_help $MISSING_DEPENDENCY ;;
15906       pkgadd)
15907         pkgadd_help  $MISSING_DEPENDENCY ;;
15908     esac
15909 
15910     if test "x$PKGHANDLER_COMMAND" != x; then
15911       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15912     fi
15913   fi
15914 
15915     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15916 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15917     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15918 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15919     as_fn_error $? "Cannot continue" "$LINENO" 5
15920   fi
15921 
15922   # Setup proper paths for what we found
15923   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15924   if test ! -f "$BOOT_RTJAR"; then
15925     # On MacOSX it is called classes.jar
15926     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15927     if test -f "$BOOT_RTJAR"; then
15928       # Remove the ..
15929       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15930     fi
15931   fi
15932   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15933   BOOT_JDK="$BOOT_JDK"
15934 
15935 
15936 
15937 
15938   # Setup tools from the Boot JDK.
15939 
15940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15941 $as_echo_n "checking for java in Boot JDK... " >&6; }
15942   JAVA=$BOOT_JDK/bin/java
15943   if test ! -x $JAVA; then
15944     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15945 $as_echo "not found" >&6; }
15946     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15947 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15948     as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15949   fi
15950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15951 $as_echo "ok" >&6; }
15952 
15953 
15954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15955 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15956   JAVAC=$BOOT_JDK/bin/javac
15957   if test ! -x $JAVAC; then
15958     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15959 $as_echo "not found" >&6; }
15960     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15961 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15962     as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15963   fi
15964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15965 $as_echo "ok" >&6; }
15966 
15967 
15968   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15969 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15970   JAVAH=$BOOT_JDK/bin/javah
15971   if test ! -x $JAVAH; then
15972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15973 $as_echo "not found" >&6; }
15974     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15975 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15976     as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15977   fi
15978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15979 $as_echo "ok" >&6; }
15980 
15981 
15982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15983 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15984   JAVAP=$BOOT_JDK/bin/javap
15985   if test ! -x $JAVAP; then
15986     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15987 $as_echo "not found" >&6; }
15988     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15989 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15990     as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15991   fi
15992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15993 $as_echo "ok" >&6; }
15994 
15995 
15996   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15997 $as_echo_n "checking for jar in Boot JDK... " >&6; }
15998   JAR=$BOOT_JDK/bin/jar
15999   if test ! -x $JAR; then
16000     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16001 $as_echo "not found" >&6; }
16002     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16003 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16004     as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
16005   fi
16006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16007 $as_echo "ok" >&6; }
16008 
16009 
16010   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
16011 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16012   RMIC=$BOOT_JDK/bin/rmic
16013   if test ! -x $RMIC; then
16014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16015 $as_echo "not found" >&6; }
16016     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16017 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16018     as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
16019   fi
16020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16021 $as_echo "ok" >&6; }
16022 
16023 
16024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16025 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16026   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16027   if test ! -x $NATIVE2ASCII; then
16028     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16029 $as_echo "not found" >&6; }
16030     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16031 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16032     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16033   fi
16034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16035 $as_echo "ok" >&6; }
16036 
16037 
16038   # Finally, set some other options...
16039 
16040   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16041   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16042 
16043 
16044 
16045 
16046   ##############################################################################
16047   #
16048   # Specify options for anything that is run with the Boot JDK.
16049   #
16050 
16051 # Check whether --with-boot-jdk-jvmargs was given.
16052 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16053   withval=$with_boot_jdk_jvmargs;
16054 fi
16055 
16056 
16057   if test "x$with_boot_jdk_jvmargs" = x; then
16058     # Not all JVM:s accept the same arguments on the command line.
16059     # OpenJDK specific increase in thread stack for JDK build,
16060     # well more specifically, when running javac.
16061     if test "x$BUILD_NUM_BITS" = x32; then
16062       STACK_SIZE=768
16063     else
16064       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16065       # since 64-bit pointers are pushed on the stach. Apparently, we need
16066       # to increase the stack space when javacing the JDK....
16067       STACK_SIZE=1536
16068     fi
16069 
16070     # Minimum amount of heap memory.
16071 
16072   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16073   $ECHO "Command: $JAVA -Xms64M -version" >&5
16074   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16075   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16076   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16077   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16078     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16079     JVM_ARG_OK=true
16080   else
16081     $ECHO "Arg failed:" >&5
16082     $ECHO "$OUTPUT" >&5
16083     JVM_ARG_OK=false
16084   fi
16085 
16086     if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
16087       # Why does macosx need more heap? Its the huge JDK batch.
16088 
16089   $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16090   $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16091   OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16092   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16093   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16094   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16095     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16096     JVM_ARG_OK=true
16097   else
16098     $ECHO "Arg failed:" >&5
16099     $ECHO "$OUTPUT" >&5
16100     JVM_ARG_OK=false
16101   fi
16102 
16103     else
16104 
16105   $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16106   $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16107   OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16108   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16109   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16110   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16111     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16112     JVM_ARG_OK=true
16113   else
16114     $ECHO "Arg failed:" >&5
16115     $ECHO "$OUTPUT" >&5
16116     JVM_ARG_OK=false
16117   fi
16118 
16119     fi
16120     # When is adding -client something that speeds up the JVM?
16121     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16122 
16123   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16124   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16125   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16126   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16127   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16128   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16129     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16130     JVM_ARG_OK=true
16131   else
16132     $ECHO "Arg failed:" >&5
16133     $ECHO "$OUTPUT" >&5
16134     JVM_ARG_OK=false
16135   fi
16136 
16137 
16138   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16139   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16140   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16141   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16142   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16143   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16144     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16145     JVM_ARG_OK=true
16146   else
16147     $ECHO "Arg failed:" >&5
16148     $ECHO "$OUTPUT" >&5
16149     JVM_ARG_OK=false
16150   fi
16151 
16152 
16153   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16154   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16155   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16156   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16157   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16158   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16159     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16160     JVM_ARG_OK=true
16161   else
16162     $ECHO "Arg failed:" >&5
16163     $ECHO "$OUTPUT" >&5
16164     JVM_ARG_OK=false
16165   fi
16166 
16167     # Disable special log output when a debug build is used as Boot JDK...
16168 
16169   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16170   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16171   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16172   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16173   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16174   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16175     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16176     JVM_ARG_OK=true
16177   else
16178     $ECHO "Arg failed:" >&5
16179     $ECHO "$OUTPUT" >&5
16180     JVM_ARG_OK=false
16181   fi
16182 
16183   fi
16184 
16185   BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16186 
16187 
16188 
16189 ###############################################################################
16190 #
16191 # Configure the sources to use. We can add or override individual directories.
16192 #
16193 ###############################################################################
16194 
16195 
16196   # Where are the sources. Any of these can be overridden
16197   # using --with-override-corba and the likes.
16198   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16199   CORBA_TOPDIR="$SRC_ROOT/corba"
16200   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16201   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16202   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16203   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16204   JDK_TOPDIR="$SRC_ROOT/jdk"
16205 
16206 
16207 
16208 
16209 
16210 
16211 
16212 
16213 
16214 
16215   ###############################################################################
16216   #
16217   # Pickup additional source for a component from outside of the source root
16218   # or override source for a component.
16219   #
16220 
16221 # Check whether --with-add-source-root was given.
16222 if test "${with_add_source_root+set}" = set; then :
16223   withval=$with_add_source_root;
16224 fi
16225 
16226 
16227 
16228 # Check whether --with-override-source-root was given.
16229 if test "${with_override_source_root+set}" = set; then :
16230   withval=$with_override_source_root;
16231 fi
16232 
16233 
16234 
16235 # Check whether --with-adds-and-overrides was given.
16236 if test "${with_adds_and_overrides+set}" = set; then :
16237   withval=$with_adds_and_overrides;
16238 fi
16239 
16240 
16241   if test "x$with_adds_and_overrides" != x; then
16242     with_add_source_root="$with_adds_and_overrides/adds"
16243     with_override_source_root="$with_adds_and_overrides/overrides"
16244   fi
16245 
16246   if test "x$with_add_source_root" != x; then
16247     if ! test -d $with_add_source_root; then
16248       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16249     fi
16250     CURDIR="$PWD"
16251     cd "$with_add_source_root"
16252     ADD_SRC_ROOT="`pwd`"
16253     cd "$CURDIR"
16254     # Verify that the addon source root does not have any root makefiles.
16255     # If it does, then it is usually an error, prevent this.
16256     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16257       test -f $with_add_source_root/langtools/make/Makefile; then
16258       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
16259     fi
16260     if test -f $with_add_source_root/corba/makefiles/Makefile || \
16261       test -f $with_add_source_root/corba/make/Makefile; then
16262       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
16263     fi
16264     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16265       test -f $with_add_source_root/jaxp/make/Makefile; then
16266       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
16267     fi
16268     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16269       test -f $with_add_source_root/jaxws/make/Makefile; then
16270       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
16271     fi
16272     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16273       test -f $with_add_source_root/hotspot/make/Makefile; then
16274       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
16275     fi
16276     if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16277       test -f $with_add_source_root/nashorn/make/Makefile; then
16278       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
16279     fi
16280     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16281       test -f $with_add_source_root/jdk/make/Makefile; then
16282       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
16283     fi
16284   fi
16285 
16286 
16287   if test "x$with_override_source_root" != x; then
16288     if ! test -d $with_override_source_root; then
16289       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16290     fi
16291     CURDIR="$PWD"
16292     cd "$with_override_source_root"
16293     OVERRIDE_SRC_ROOT="`pwd`"
16294     cd "$CURDIR"
16295     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16296       test -f $with_override_source_root/langtools/make/Makefile; then
16297       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
16298     fi
16299     if test -f $with_override_source_root/corba/makefiles/Makefile || \
16300       test -f $with_override_source_root/corba/make/Makefile; then
16301       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
16302     fi
16303     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16304       test -f $with_override_source_root/jaxp/make/Makefile; then
16305       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
16306     fi
16307     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16308       test -f $with_override_source_root/jaxws/make/Makefile; then
16309       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
16310     fi
16311     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16312       test -f $with_override_source_root/hotspot/make/Makefile; then
16313       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
16314     fi
16315     if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16316       test -f $with_override_source_root/nashorn/make/Makefile; then
16317       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
16318     fi
16319     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16320       test -f $with_override_source_root/jdk/make/Makefile; then
16321       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
16322     fi
16323   fi
16324 
16325 
16326   ###############################################################################
16327   #
16328   # Override a repo completely, this is used for example when you have 3 small
16329   # development sandboxes of the langtools sources and want to avoid having 3 full
16330   # OpenJDK sources checked out on disk.
16331   #
16332   # Assuming that the 3 langtools sandboxes are located here:
16333   # /home/fredrik/sandbox1/langtools
16334   # /home/fredrik/sandbox2/langtools
16335   # /home/fredrik/sandbox3/langtools
16336   #
16337   # From the source root you create build subdirs manually:
16338   #     mkdir -p build1 build2 build3
16339   # in each build directory run:
16340   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16341   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16342   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16343   #
16344 
16345 
16346 # Check whether --with-override-langtools was given.
16347 if test "${with_override_langtools+set}" = set; then :
16348   withval=$with_override_langtools;
16349 fi
16350 
16351 
16352 
16353 # Check whether --with-override-corba was given.
16354 if test "${with_override_corba+set}" = set; then :
16355   withval=$with_override_corba;
16356 fi
16357 
16358 
16359 
16360 # Check whether --with-override-jaxp was given.
16361 if test "${with_override_jaxp+set}" = set; then :
16362   withval=$with_override_jaxp;
16363 fi
16364 
16365 
16366 
16367 # Check whether --with-override-jaxws was given.
16368 if test "${with_override_jaxws+set}" = set; then :
16369   withval=$with_override_jaxws;
16370 fi
16371 
16372 
16373 
16374 # Check whether --with-override-hotspot was given.
16375 if test "${with_override_hotspot+set}" = set; then :
16376   withval=$with_override_hotspot;
16377 fi
16378 
16379 
16380 
16381 # Check whether --with-override-nashorn was given.
16382 if test "${with_override_nashorn+set}" = set; then :
16383   withval=$with_override_nashorn;
16384 fi
16385 
16386 
16387 
16388 # Check whether --with-override-jdk was given.
16389 if test "${with_override_jdk+set}" = set; then :
16390   withval=$with_override_jdk;
16391 fi
16392 
16393 
16394   if test "x$with_override_langtools" != x; then
16395     CURDIR="$PWD"
16396     cd "$with_override_langtools"
16397     LANGTOOLS_TOPDIR="`pwd`"
16398     cd "$CURDIR"
16399     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16400       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16401     fi
16402     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16403 $as_echo_n "checking if langtools should be overridden... " >&6; }
16404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16405 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16406   fi
16407   if test "x$with_override_corba" != x; then
16408     CURDIR="$PWD"
16409     cd "$with_override_corba"
16410     CORBA_TOPDIR="`pwd`"
16411     cd "$CURDIR"
16412     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16413       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16414     fi
16415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16416 $as_echo_n "checking if corba should be overridden... " >&6; }
16417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16418 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16419   fi
16420   if test "x$with_override_jaxp" != x; then
16421     CURDIR="$PWD"
16422     cd "$with_override_jaxp"
16423     JAXP_TOPDIR="`pwd`"
16424     cd "$CURDIR"
16425     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16426       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16427     fi
16428     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16429 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16430     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16431 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16432   fi
16433   if test "x$with_override_jaxws" != x; then
16434     CURDIR="$PWD"
16435     cd "$with_override_jaxws"
16436     JAXWS_TOPDIR="`pwd`"
16437     cd "$CURDIR"
16438     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16439       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16440     fi
16441     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16442 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16443     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16444 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16445   fi
16446   if test "x$with_override_hotspot" != x; then
16447     CURDIR="$PWD"
16448     cd "$with_override_hotspot"
16449     HOTSPOT_TOPDIR="`pwd`"
16450     cd "$CURDIR"
16451     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16452         ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16453       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16454     fi
16455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16456 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16457     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16458 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16459   fi
16460   if test "x$with_override_nashorn" != x; then
16461     CURDIR="$PWD"
16462     cd "$with_override_nashorn"
16463     NASHORN_TOPDIR="`pwd`"
16464     cd "$CURDIR"
16465     if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16466       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16467     fi
16468     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16469 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16471 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16472   fi
16473   if test "x$with_override_jdk" != x; then
16474     CURDIR="$PWD"
16475     cd "$with_override_jdk"
16476     JDK_TOPDIR="`pwd`"
16477     cd "$CURDIR"
16478     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16479       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16480     fi
16481     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16482 $as_echo_n "checking if JDK should be overridden... " >&6; }
16483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16484 $as_echo "yes with $JDK_TOPDIR" >&6; }
16485   fi
16486 
16487 
16488   BUILD_OUTPUT="$OUTPUT_ROOT"
16489 
16490 
16491   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16492   BUILD_HOTSPOT=true
16493 
16494 
16495 
16496 # Check whether --with-import-hotspot was given.
16497 if test "${with_import_hotspot+set}" = set; then :
16498   withval=$with_import_hotspot;
16499 fi
16500 
16501   if test "x$with_import_hotspot" != x; then
16502     CURDIR="$PWD"
16503     cd "$with_import_hotspot"
16504     HOTSPOT_DIST="`pwd`"
16505     cd "$CURDIR"
16506     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16507       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16508     fi
16509     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16510 $as_echo_n "checking if hotspot should be imported... " >&6; }
16511     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16512 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16513     BUILD_HOTSPOT=false
16514   fi
16515 
16516   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16517 
16518 
16519 ###############################################################################
16520 #
16521 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16522 # cross-compilation aware.
16523 #
16524 ###############################################################################
16525 
16526 
16527   ###############################################################################
16528   #
16529   # Configure the development tool paths and potential sysroot.
16530   #
16531   ac_ext=cpp
16532 ac_cpp='$CXXCPP $CPPFLAGS'
16533 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16534 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16535 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16536 
16537 
16538   # The option used to specify the target .o,.a or .so file.
16539   # When compiling, how to specify the to be created object file.
16540   CC_OUT_OPTION='-o$(SPACE)'
16541   # When linking, how to specify the to be created executable.
16542   EXE_OUT_OPTION='-o$(SPACE)'
16543   # When linking, how to specify the to be created dynamically linkable library.
16544   LD_OUT_OPTION='-o$(SPACE)'
16545   # When archiving, how to specify the to be create static archive for object files.
16546   AR_OUT_OPTION='rcs$(SPACE)'
16547 
16548 
16549 
16550 
16551 
16552 # Locate the actual tools
16553 
16554 
16555 # Check whether --with-jtreg was given.
16556 if test "${with_jtreg+set}" = set; then :
16557   withval=$with_jtreg;
16558 else
16559   with_jtreg=no
16560 fi
16561 
16562 
16563   if test "x$with_jtreg" = xno; then
16564     # jtreg disabled
16565     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16566 $as_echo_n "checking for jtreg... " >&6; }
16567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16568 $as_echo "no" >&6; }
16569   else
16570     if test "x$with_jtreg" != xyes; then
16571       # with path specified.
16572       JT_HOME="$with_jtreg"
16573     fi
16574 
16575     if test "x$JT_HOME" != x; then
16576       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16577 $as_echo_n "checking for jtreg... " >&6; }
16578 
16579       # use JT_HOME enviroment var.
16580 
16581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16582 
16583   # Input might be given as Windows format, start by converting to
16584   # unix format.
16585   path="$JT_HOME"
16586   new_path=`$CYGPATH -u "$path"`
16587 
16588   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16589   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16590   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16591   # "foo.exe" is OK but "foo" is an error.
16592   #
16593   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16594   # It is also a way to make sure we got the proper file name for the real test later on.
16595   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16596   if test "x$test_shortpath" = x; then
16597     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16598 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16599     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16600   fi
16601 
16602   # Call helper function which possibly converts this using DOS-style short mode.
16603   # If so, the updated path is stored in $new_path.
16604 
16605   input_path="$new_path"
16606   # Check if we need to convert this using DOS-style short mode. If the path
16607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16608   # take no chances and rewrite it.
16609   # Note: m4 eats our [], so we need to use [ and ] instead.
16610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16611   if test "x$has_forbidden_chars" != x; then
16612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16613     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16614     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16615     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16616       # Going to short mode and back again did indeed matter. Since short mode is
16617       # case insensitive, let's make it lowercase to improve readability.
16618       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16619       # Now convert it back to Unix-stile (cygpath)
16620       input_path=`$CYGPATH -u "$shortmode_path"`
16621       new_path="$input_path"
16622     fi
16623   fi
16624 
16625   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16626   if test "x$test_cygdrive_prefix" = x; then
16627     # As a simple fix, exclude /usr/bin since it's not a real path.
16628     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16629       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16630       # a path prefixed by /cygdrive for fixpath to work.
16631       new_path="$CYGWIN_ROOT_PATH$input_path"
16632     fi
16633   fi
16634 
16635 
16636   if test "x$path" != "x$new_path"; then
16637     JT_HOME="$new_path"
16638     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16639 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16640   fi
16641 
16642   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16643 
16644   path="$JT_HOME"
16645   has_colon=`$ECHO $path | $GREP ^.:`
16646   new_path="$path"
16647   if test "x$has_colon" = x; then
16648     # Not in mixed or Windows style, start by that.
16649     new_path=`cmd //c echo $path`
16650   fi
16651 
16652 
16653   input_path="$new_path"
16654   # Check if we need to convert this using DOS-style short mode. If the path
16655   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16656   # take no chances and rewrite it.
16657   # Note: m4 eats our [], so we need to use [ and ] instead.
16658   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16659   if test "x$has_forbidden_chars" != x; then
16660     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16661     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16662   fi
16663 
16664 
16665   windows_path="$new_path"
16666   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16667     unix_path=`$CYGPATH -u "$windows_path"`
16668     new_path="$unix_path"
16669   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16670     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16671     new_path="$unix_path"
16672   fi
16673 
16674   if test "x$path" != "x$new_path"; then
16675     JT_HOME="$new_path"
16676     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16677 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16678   fi
16679 
16680   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16681   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16682 
16683   else
16684     # We're on a posix platform. Hooray! :)
16685     path="$JT_HOME"
16686     has_space=`$ECHO "$path" | $GREP " "`
16687     if test "x$has_space" != x; then
16688       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16689 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16690       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16691     fi
16692 
16693     # Use eval to expand a potential ~
16694     eval path="$path"
16695     if test ! -f "$path" && test ! -d "$path"; then
16696       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16697     fi
16698 
16699     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16700   fi
16701 
16702 
16703       # jtreg win32 script works for everybody
16704       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16705 
16706       if test ! -f "$JTREGEXE"; then
16707         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16708       fi
16709 
16710       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16711 $as_echo "$JTREGEXE" >&6; }
16712     else
16713       # try to find jtreg on path
16714 
16715   for ac_prog in jtreg
16716 do
16717   # Extract the first word of "$ac_prog", so it can be a program name with args.
16718 set dummy $ac_prog; ac_word=$2
16719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16720 $as_echo_n "checking for $ac_word... " >&6; }
16721 if ${ac_cv_path_JTREGEXE+:} false; then :
16722   $as_echo_n "(cached) " >&6
16723 else
16724   case $JTREGEXE in
16725   [\\/]* | ?:[\\/]*)
16726   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16727   ;;
16728   *)
16729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16730 for as_dir in $PATH
16731 do
16732   IFS=$as_save_IFS
16733   test -z "$as_dir" && as_dir=.
16734     for ac_exec_ext in '' $ac_executable_extensions; do
16735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16736     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16738     break 2
16739   fi
16740 done
16741   done
16742 IFS=$as_save_IFS
16743 
16744   ;;
16745 esac
16746 fi
16747 JTREGEXE=$ac_cv_path_JTREGEXE
16748 if test -n "$JTREGEXE"; then
16749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16750 $as_echo "$JTREGEXE" >&6; }
16751 else
16752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16753 $as_echo "no" >&6; }
16754 fi
16755 
16756 
16757   test -n "$JTREGEXE" && break
16758 done
16759 
16760 
16761   if test "x$JTREGEXE" = x; then
16762     if test "xjtreg" = x; then
16763       PROG_NAME=jtregexe
16764     else
16765       PROG_NAME=jtreg
16766     fi
16767     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16768 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16769     as_fn_error $? "Cannot continue" "$LINENO" 5
16770   fi
16771 
16772 
16773       JT_HOME="`$DIRNAME $JTREGEXE`"
16774     fi
16775   fi
16776 
16777 
16778 
16779 
16780 
16781   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16782 
16783   # Store path to cygwin link.exe to help excluding it when searching for
16784   # VS linker. This must be done before changing the PATH when looking for VS.
16785   # Extract the first word of "link", so it can be a program name with args.
16786 set dummy link; ac_word=$2
16787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16788 $as_echo_n "checking for $ac_word... " >&6; }
16789 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16790   $as_echo_n "(cached) " >&6
16791 else
16792   case $CYGWIN_LINK in
16793   [\\/]* | ?:[\\/]*)
16794   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16795   ;;
16796   *)
16797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16798 for as_dir in $PATH
16799 do
16800   IFS=$as_save_IFS
16801   test -z "$as_dir" && as_dir=.
16802     for ac_exec_ext in '' $ac_executable_extensions; do
16803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16804     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16806     break 2
16807   fi
16808 done
16809   done
16810 IFS=$as_save_IFS
16811 
16812   ;;
16813 esac
16814 fi
16815 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16816 if test -n "$CYGWIN_LINK"; then
16817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16818 $as_echo "$CYGWIN_LINK" >&6; }
16819 else
16820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16821 $as_echo "no" >&6; }
16822 fi
16823 
16824 
16825   if test "x$CYGWIN_LINK" != x; then
16826     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16827 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16828     "$CYGWIN_LINK" --version > /dev/null
16829     if test $? -eq 0 ; then
16830       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16831 $as_echo "yes" >&6; }
16832     else
16833       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16834 $as_echo "no" >&6; }
16835       # This might be the VS linker. Don't exclude it later on.
16836       CYGWIN_LINK=""
16837     fi
16838   fi
16839 
16840   # First-hand choice is to locate and run the vsvars bat file.
16841 
16842   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16843     VCVARSFILE="vc/bin/vcvars32.bat"
16844   else
16845     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16846   fi
16847 
16848   VS_ENV_CMD=""
16849   VS_ENV_ARGS=""
16850   if test "x$with_toolsdir" != x; then
16851 
16852   if test "x$VS_ENV_CMD" = x; then
16853     VS100BASE="$with_toolsdir/../.."
16854     METHOD="--with-tools-dir"
16855 
16856   windows_path="$VS100BASE"
16857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16858     unix_path=`$CYGPATH -u "$windows_path"`
16859     VS100BASE="$unix_path"
16860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16862     VS100BASE="$unix_path"
16863   fi
16864 
16865     if test -d "$VS100BASE"; then
16866       if test -f "$VS100BASE/$VCVARSFILE"; then
16867         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16868 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16869         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16870       else
16871         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16872 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16873         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16874 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16875       fi
16876     fi
16877   fi
16878 
16879   fi
16880 
16881   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16882     # Having specified an argument which is incorrect will produce an instant failure;
16883     # we should not go on looking
16884     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16885 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16886     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16887 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16888     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16889   fi
16890 
16891   if test "x$VS100COMNTOOLS" != x; then
16892 
16893   if test "x$VS_ENV_CMD" = x; then
16894     VS100BASE="$VS100COMNTOOLS/../.."
16895     METHOD="VS100COMNTOOLS variable"
16896 
16897   windows_path="$VS100BASE"
16898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16899     unix_path=`$CYGPATH -u "$windows_path"`
16900     VS100BASE="$unix_path"
16901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16903     VS100BASE="$unix_path"
16904   fi
16905 
16906     if test -d "$VS100BASE"; then
16907       if test -f "$VS100BASE/$VCVARSFILE"; then
16908         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16909 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16910         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16911       else
16912         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16913 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16914         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16915 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16916       fi
16917     fi
16918   fi
16919 
16920   fi
16921   if test "x$PROGRAMFILES" != x; then
16922 
16923   if test "x$VS_ENV_CMD" = x; then
16924     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16925     METHOD="well-known name"
16926 
16927   windows_path="$VS100BASE"
16928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16929     unix_path=`$CYGPATH -u "$windows_path"`
16930     VS100BASE="$unix_path"
16931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16933     VS100BASE="$unix_path"
16934   fi
16935 
16936     if test -d "$VS100BASE"; then
16937       if test -f "$VS100BASE/$VCVARSFILE"; then
16938         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16939 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16940         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16941       else
16942         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16943 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16944         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16945 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16946       fi
16947     fi
16948   fi
16949 
16950   fi
16951 
16952   if test "x$VS_ENV_CMD" = x; then
16953     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16954     METHOD="well-known name"
16955 
16956   windows_path="$VS100BASE"
16957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16958     unix_path=`$CYGPATH -u "$windows_path"`
16959     VS100BASE="$unix_path"
16960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16962     VS100BASE="$unix_path"
16963   fi
16964 
16965     if test -d "$VS100BASE"; then
16966       if test -f "$VS100BASE/$VCVARSFILE"; then
16967         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16968 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16969         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16970       else
16971         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16972 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16973         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16974 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16975       fi
16976     fi
16977   fi
16978 
16979 
16980   if test "x$VS_ENV_CMD" = x; then
16981     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16982     METHOD="well-known name"
16983 
16984   windows_path="$VS100BASE"
16985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16986     unix_path=`$CYGPATH -u "$windows_path"`
16987     VS100BASE="$unix_path"
16988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16990     VS100BASE="$unix_path"
16991   fi
16992 
16993     if test -d "$VS100BASE"; then
16994       if test -f "$VS100BASE/$VCVARSFILE"; then
16995         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16996 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16997         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16998       else
16999         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17000 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17001         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17002 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17003       fi
17004     fi
17005   fi
17006 
17007 
17008   if test "x$ProgramW6432" != x; then
17009 
17010   if test "x$VS_ENV_CMD" = x; then
17011     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17012     METHOD="well-known name"
17013 
17014   windows_path="$WIN_SDK_BASE"
17015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016     unix_path=`$CYGPATH -u "$windows_path"`
17017     WIN_SDK_BASE="$unix_path"
17018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17020     WIN_SDK_BASE="$unix_path"
17021   fi
17022 
17023     if test -d "$WIN_SDK_BASE"; then
17024       # There have been cases of partial or broken SDK installations. A missing
17025       # lib dir is not going to work.
17026       if test ! -d "$WIN_SDK_BASE/../lib"; then
17027         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17028 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17029         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17030 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17031       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17032         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17033 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17034         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17035         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17036           VS_ENV_ARGS="/x86"
17037         else
17038           VS_ENV_ARGS="/x64"
17039         fi
17040       else
17041         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17042 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17043         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17044 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17045       fi
17046     fi
17047   fi
17048 
17049   fi
17050   if test "x$PROGRAMW6432" != x; then
17051 
17052   if test "x$VS_ENV_CMD" = x; then
17053     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17054     METHOD="well-known name"
17055 
17056   windows_path="$WIN_SDK_BASE"
17057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17058     unix_path=`$CYGPATH -u "$windows_path"`
17059     WIN_SDK_BASE="$unix_path"
17060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17062     WIN_SDK_BASE="$unix_path"
17063   fi
17064 
17065     if test -d "$WIN_SDK_BASE"; then
17066       # There have been cases of partial or broken SDK installations. A missing
17067       # lib dir is not going to work.
17068       if test ! -d "$WIN_SDK_BASE/../lib"; then
17069         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17070 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17071         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17072 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17073       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17074         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17075 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17076         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17077         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17078           VS_ENV_ARGS="/x86"
17079         else
17080           VS_ENV_ARGS="/x64"
17081         fi
17082       else
17083         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17084 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17085         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17086 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17087       fi
17088     fi
17089   fi
17090 
17091   fi
17092   if test "x$PROGRAMFILES" != x; then
17093 
17094   if test "x$VS_ENV_CMD" = x; then
17095     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17096     METHOD="well-known name"
17097 
17098   windows_path="$WIN_SDK_BASE"
17099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17100     unix_path=`$CYGPATH -u "$windows_path"`
17101     WIN_SDK_BASE="$unix_path"
17102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17103     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17104     WIN_SDK_BASE="$unix_path"
17105   fi
17106 
17107     if test -d "$WIN_SDK_BASE"; then
17108       # There have been cases of partial or broken SDK installations. A missing
17109       # lib dir is not going to work.
17110       if test ! -d "$WIN_SDK_BASE/../lib"; then
17111         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17112 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17113         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17114 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17115       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17116         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17117 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17118         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17119         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17120           VS_ENV_ARGS="/x86"
17121         else
17122           VS_ENV_ARGS="/x64"
17123         fi
17124       else
17125         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17126 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17127         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17128 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17129       fi
17130     fi
17131   fi
17132 
17133   fi
17134 
17135   if test "x$VS_ENV_CMD" = x; then
17136     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17137     METHOD="well-known name"
17138 
17139   windows_path="$WIN_SDK_BASE"
17140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141     unix_path=`$CYGPATH -u "$windows_path"`
17142     WIN_SDK_BASE="$unix_path"
17143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17145     WIN_SDK_BASE="$unix_path"
17146   fi
17147 
17148     if test -d "$WIN_SDK_BASE"; then
17149       # There have been cases of partial or broken SDK installations. A missing
17150       # lib dir is not going to work.
17151       if test ! -d "$WIN_SDK_BASE/../lib"; then
17152         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17153 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17154         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17155 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17156       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17157         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17158 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17159         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17160         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17161           VS_ENV_ARGS="/x86"
17162         else
17163           VS_ENV_ARGS="/x64"
17164         fi
17165       else
17166         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17167 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17168         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17169 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17170       fi
17171     fi
17172   fi
17173 
17174 
17175   if test "x$VS_ENV_CMD" = x; then
17176     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17177     METHOD="well-known name"
17178 
17179   windows_path="$WIN_SDK_BASE"
17180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17181     unix_path=`$CYGPATH -u "$windows_path"`
17182     WIN_SDK_BASE="$unix_path"
17183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17185     WIN_SDK_BASE="$unix_path"
17186   fi
17187 
17188     if test -d "$WIN_SDK_BASE"; then
17189       # There have been cases of partial or broken SDK installations. A missing
17190       # lib dir is not going to work.
17191       if test ! -d "$WIN_SDK_BASE/../lib"; then
17192         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17193 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17194         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17195 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17196       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17197         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17198 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17199         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17200         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17201           VS_ENV_ARGS="/x86"
17202         else
17203           VS_ENV_ARGS="/x64"
17204         fi
17205       else
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         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17209 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17210       fi
17211     fi
17212   fi
17213 
17214 
17215   if test "x$VS_ENV_CMD" != x; then
17216     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17217 
17218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17219 
17220   # First separate the path from the arguments. This will split at the first
17221   # space.
17222   complete="$VS_ENV_CMD"
17223   path="${complete%% *}"
17224   tmp="$complete EOL"
17225   arguments="${tmp#* }"
17226 
17227   # Input might be given as Windows format, start by converting to
17228   # unix format.
17229   new_path=`$CYGPATH -u "$path"`
17230 
17231   # Now try to locate executable using which
17232   new_path=`$WHICH "$new_path" 2> /dev/null`
17233   # bat and cmd files are not always considered executable in cygwin causing which
17234   # to not find them
17235   if test "x$new_path" = x \
17236       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17237       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17238     new_path=`$CYGPATH -u "$path"`
17239   fi
17240   if test "x$new_path" = x; then
17241     # Oops. Which didn't find the executable.
17242     # The splitting of arguments from the executable at a space might have been incorrect,
17243     # since paths with space are more likely in Windows. Give it another try with the whole
17244     # argument.
17245     path="$complete"
17246     arguments="EOL"
17247     new_path=`$CYGPATH -u "$path"`
17248     new_path=`$WHICH "$new_path" 2> /dev/null`
17249     # bat and cmd files are not always considered executable in cygwin causing which
17250     # to not find them
17251     if test "x$new_path" = x \
17252         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17253         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17254       new_path=`$CYGPATH -u "$path"`
17255     fi
17256     if test "x$new_path" = x; then
17257       # It's still not found. Now this is an unrecoverable error.
17258       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17259 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17260       has_space=`$ECHO "$complete" | $GREP " "`
17261       if test "x$has_space" != x; then
17262         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17263 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17264       fi
17265       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17266     fi
17267   fi
17268 
17269   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17270   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17271   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17272   # "foo.exe" is OK but "foo" is an error.
17273   #
17274   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17275   # It is also a way to make sure we got the proper file name for the real test later on.
17276   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17277   if test "x$test_shortpath" = x; then
17278     # Short path failed, file does not exist as specified.
17279     # Try adding .exe or .cmd
17280     if test -f "${new_path}.exe"; then
17281       input_to_shortpath="${new_path}.exe"
17282     elif test -f "${new_path}.cmd"; then
17283       input_to_shortpath="${new_path}.cmd"
17284     else
17285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17286 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17287       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17288 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17289       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17290     fi
17291   else
17292     input_to_shortpath="$new_path"
17293   fi
17294 
17295   # Call helper function which possibly converts this using DOS-style short mode.
17296   # If so, the updated path is stored in $new_path.
17297   new_path="$input_to_shortpath"
17298 
17299   input_path="$input_to_shortpath"
17300   # Check if we need to convert this using DOS-style short mode. If the path
17301   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17302   # take no chances and rewrite it.
17303   # Note: m4 eats our [], so we need to use [ and ] instead.
17304   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17305   if test "x$has_forbidden_chars" != x; then
17306     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17307     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17308     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17309     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17310       # Going to short mode and back again did indeed matter. Since short mode is
17311       # case insensitive, let's make it lowercase to improve readability.
17312       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17313       # Now convert it back to Unix-stile (cygpath)
17314       input_path=`$CYGPATH -u "$shortmode_path"`
17315       new_path="$input_path"
17316     fi
17317   fi
17318 
17319   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17320   if test "x$test_cygdrive_prefix" = x; then
17321     # As a simple fix, exclude /usr/bin since it's not a real path.
17322     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17323       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17324       # a path prefixed by /cygdrive for fixpath to work.
17325       new_path="$CYGWIN_ROOT_PATH$input_path"
17326     fi
17327   fi
17328 
17329   # remove trailing .exe if any
17330   new_path="${new_path/%.exe/}"
17331 
17332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17333 
17334   # First separate the path from the arguments. This will split at the first
17335   # space.
17336   complete="$VS_ENV_CMD"
17337   path="${complete%% *}"
17338   tmp="$complete EOL"
17339   arguments="${tmp#* }"
17340 
17341   # Input might be given as Windows format, start by converting to
17342   # unix format.
17343   new_path="$path"
17344 
17345   windows_path="$new_path"
17346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17347     unix_path=`$CYGPATH -u "$windows_path"`
17348     new_path="$unix_path"
17349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17351     new_path="$unix_path"
17352   fi
17353 
17354 
17355   # Now try to locate executable using which
17356   new_path=`$WHICH "$new_path" 2> /dev/null`
17357 
17358   if test "x$new_path" = x; then
17359     # Oops. Which didn't find the executable.
17360     # The splitting of arguments from the executable at a space might have been incorrect,
17361     # since paths with space are more likely in Windows. Give it another try with the whole
17362     # argument.
17363     path="$complete"
17364     arguments="EOL"
17365     new_path="$path"
17366 
17367   windows_path="$new_path"
17368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17369     unix_path=`$CYGPATH -u "$windows_path"`
17370     new_path="$unix_path"
17371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17373     new_path="$unix_path"
17374   fi
17375 
17376 
17377     new_path=`$WHICH "$new_path" 2> /dev/null`
17378 
17379     if test "x$new_path" = x; then
17380       # It's still not found. Now this is an unrecoverable error.
17381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17382 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17383       has_space=`$ECHO "$complete" | $GREP " "`
17384       if test "x$has_space" != x; then
17385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17387       fi
17388       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17389     fi
17390   fi
17391 
17392   # Now new_path has a complete unix path to the binary
17393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17394     # Keep paths in /bin as-is, but remove trailing .exe if any
17395     new_path="${new_path/%.exe/}"
17396     # Do not save /bin paths to all_fixpath_prefixes!
17397   else
17398     # Not in mixed or Windows style, start by that.
17399     new_path=`cmd //c echo $new_path`
17400 
17401   input_path="$new_path"
17402   # Check if we need to convert this using DOS-style short mode. If the path
17403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17404   # take no chances and rewrite it.
17405   # Note: m4 eats our [], so we need to use [ and ] instead.
17406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17407   if test "x$has_forbidden_chars" != x; then
17408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17410   fi
17411 
17412     # Output is in $new_path
17413 
17414   windows_path="$new_path"
17415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17416     unix_path=`$CYGPATH -u "$windows_path"`
17417     new_path="$unix_path"
17418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17420     new_path="$unix_path"
17421   fi
17422 
17423     # remove trailing .exe if any
17424     new_path="${new_path/%.exe/}"
17425 
17426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17428   fi
17429 
17430   else
17431     # We're on a posix platform. Hooray! :)
17432     # First separate the path from the arguments. This will split at the first
17433     # space.
17434     complete="$VS_ENV_CMD"
17435     path="${complete%% *}"
17436     tmp="$complete EOL"
17437     arguments="${tmp#* }"
17438 
17439     # Cannot rely on the command "which" here since it doesn't always work.
17440     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17441     if test -z "$is_absolute_path"; then
17442       # Path to executable is not absolute. Find it.
17443       IFS_save="$IFS"
17444       IFS=:
17445       for p in $PATH; do
17446         if test -f "$p/$path" && test -x "$p/$path"; then
17447           new_path="$p/$path"
17448           break
17449         fi
17450       done
17451       IFS="$IFS_save"
17452     else
17453       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17454 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17455       new_path="$path"
17456     fi
17457 
17458     if test "x$new_path" = x; then
17459       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17460 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17461       has_space=`$ECHO "$complete" | $GREP " "`
17462       if test "x$has_space" != x; then
17463         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17464 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17465       fi
17466       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17467     fi
17468   fi
17469 
17470   # Now join together the path and the arguments once again
17471   if test "x$arguments" != xEOL; then
17472     new_complete="$new_path ${arguments% *}"
17473   else
17474     new_complete="$new_path"
17475   fi
17476 
17477   if test "x$complete" != "x$new_complete"; then
17478     VS_ENV_CMD="$new_complete"
17479     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17480 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17481   fi
17482 
17483 
17484     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17485     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17486 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17487     cd $OUTPUT_ROOT
17488     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17489     # to autoconf standards.
17490 
17491     #----
17492 
17493     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17494     # but calculate the difference in Cygwin environment before/after running it and then
17495     # apply the diff.
17496 
17497     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17498       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17499       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17500       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17501     else
17502       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17503       _dosbash=`cmd //c echo \`which bash\``
17504     fi
17505 
17506     # generate the set of exported vars before/after the vs10 setup
17507     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17508     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17509     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17510     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17511 
17512     # Now execute the newly created bat file.
17513     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17514     cmd /c localdevenvtmp.bat | cat
17515 
17516     # apply the diff (less some non-vs10 vars named by "!")
17517     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17518     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17519     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17520 
17521     # cleanup
17522     $RM localdevenvtmp*
17523     #----
17524     cd $CURDIR
17525     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17526       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17527 $as_echo "no" >&6; }
17528       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17529 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17530       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17531 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17532       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17533 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17534       as_fn_error $? "Cannot continue" "$LINENO" 5
17535     fi
17536 
17537     # Now set all paths and other env variables. This will allow the rest of
17538     # the configure script to find and run the compiler in the proper way.
17539     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17540 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17541     . $OUTPUT_ROOT/localdevenv.sh
17542   else
17543     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17544     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17545 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17546   fi
17547 
17548   # At this point, we should have corrent variables in the environment, or we can't continue.
17549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17550 $as_echo_n "checking for Visual Studio variables... " >&6; }
17551 
17552   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17553     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17554       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17555 $as_echo "present but broken" >&6; }
17556       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17557     else
17558       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17559 $as_echo "ok" >&6; }
17560       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17561       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17562       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17563       # Remove any paths containing # (typically F#) as that messes up make
17564       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17565       VS_PATH="$PATH"
17566 
17567 
17568 
17569     fi
17570   else
17571     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17572 $as_echo "not found" >&6; }
17573 
17574     if test "x$VS_ENV_CMD" = x; then
17575       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17576 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17577       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17578 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17579     else
17580       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17581 $as_echo "$as_me: Running the extraction script failed." >&6;}
17582     fi
17583     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17584 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17585     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17586 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17587     as_fn_error $? "Cannot continue" "$LINENO" 5
17588   fi
17589 
17590 
17591 
17592 # Check whether --with-msvcr-dll was given.
17593 if test "${with_msvcr_dll+set}" = set; then :
17594   withval=$with_msvcr_dll;
17595 fi
17596 
17597 
17598   if test "x$with_msvcr_dll" != x; then
17599     # If given explicitely by user, do not probe. If not present, fail directly.
17600 
17601   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17602   METHOD="--with-msvcr-dll"
17603   if test -e "$POSSIBLE_MSVCR_DLL"; then
17604     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17605 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17606 
17607     # Need to check if the found msvcr is correct architecture
17608     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17609 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17610     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17611     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17612       CORRECT_MSVCR_ARCH=386
17613     else
17614       CORRECT_MSVCR_ARCH=x86-64
17615     fi
17616     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17617       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17618 $as_echo "ok" >&6; }
17619       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17620       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17621 $as_echo_n "checking for msvcr100.dll... " >&6; }
17622       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17623 $as_echo "$MSVCR_DLL" >&6; }
17624     else
17625       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17626 $as_echo "incorrect, ignoring" >&6; }
17627       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17628 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17629     fi
17630   fi
17631 
17632     if test "x$MSVCR_DLL" = x; then
17633       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17634     fi
17635   fi
17636 
17637   if test "x$MSVCR_DLL" = x; then
17638     # Probe: Using well-known location from Visual Studio 10.0
17639     if test "x$VCINSTALLDIR" != x; then
17640       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17641 
17642   windows_path="$CYGWIN_VC_INSTALL_DIR"
17643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17644     unix_path=`$CYGPATH -u "$windows_path"`
17645     CYGWIN_VC_INSTALL_DIR="$unix_path"
17646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17648     CYGWIN_VC_INSTALL_DIR="$unix_path"
17649   fi
17650 
17651       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17652         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17653       else
17654         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17655       fi
17656 
17657   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17658   METHOD="well-known location in VCINSTALLDIR"
17659   if test -e "$POSSIBLE_MSVCR_DLL"; then
17660     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17661 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17662 
17663     # Need to check if the found msvcr is correct architecture
17664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17665 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17666     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17667     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17668       CORRECT_MSVCR_ARCH=386
17669     else
17670       CORRECT_MSVCR_ARCH=x86-64
17671     fi
17672     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17673       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17674 $as_echo "ok" >&6; }
17675       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17676       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17677 $as_echo_n "checking for msvcr100.dll... " >&6; }
17678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17679 $as_echo "$MSVCR_DLL" >&6; }
17680     else
17681       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17682 $as_echo "incorrect, ignoring" >&6; }
17683       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17684 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17685     fi
17686   fi
17687 
17688     fi
17689   fi
17690 
17691   if test "x$MSVCR_DLL" = x; then
17692     # Probe: Check in the Boot JDK directory.
17693     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17694 
17695   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17696   METHOD="well-known location in Boot JDK"
17697   if test -e "$POSSIBLE_MSVCR_DLL"; then
17698     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17699 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17700 
17701     # Need to check if the found msvcr is correct architecture
17702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17703 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17704     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17705     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17706       CORRECT_MSVCR_ARCH=386
17707     else
17708       CORRECT_MSVCR_ARCH=x86-64
17709     fi
17710     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17711       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17712 $as_echo "ok" >&6; }
17713       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17714       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17715 $as_echo_n "checking for msvcr100.dll... " >&6; }
17716       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17717 $as_echo "$MSVCR_DLL" >&6; }
17718     else
17719       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17720 $as_echo "incorrect, ignoring" >&6; }
17721       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17722 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17723     fi
17724   fi
17725 
17726   fi
17727 
17728   if test "x$MSVCR_DLL" = x; then
17729     # Probe: Look in the Windows system32 directory
17730     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17731 
17732   windows_path="$CYGWIN_SYSTEMROOT"
17733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17734     unix_path=`$CYGPATH -u "$windows_path"`
17735     CYGWIN_SYSTEMROOT="$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_SYSTEMROOT="$unix_path"
17739   fi
17740 
17741     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17742 
17743   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17744   METHOD="well-known location in SYSTEMROOT"
17745   if test -e "$POSSIBLE_MSVCR_DLL"; then
17746     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17747 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17748 
17749     # Need to check if the found msvcr is correct architecture
17750     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17751 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17752     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17753     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17754       CORRECT_MSVCR_ARCH=386
17755     else
17756       CORRECT_MSVCR_ARCH=x86-64
17757     fi
17758     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17759       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17760 $as_echo "ok" >&6; }
17761       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17762       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17763 $as_echo_n "checking for msvcr100.dll... " >&6; }
17764       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17765 $as_echo "$MSVCR_DLL" >&6; }
17766     else
17767       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17768 $as_echo "incorrect, ignoring" >&6; }
17769       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17770 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17771     fi
17772   fi
17773 
17774   fi
17775 
17776   if test "x$MSVCR_DLL" = x; then
17777     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17778     if test "x$VS100COMNTOOLS" != x; then
17779       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17780 
17781   windows_path="$CYGWIN_VS_TOOLS_DIR"
17782   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17783     unix_path=`$CYGPATH -u "$windows_path"`
17784     CYGWIN_VS_TOOLS_DIR="$unix_path"
17785   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17786     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17787     CYGWIN_VS_TOOLS_DIR="$unix_path"
17788   fi
17789 
17790       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17791         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17792       else
17793         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17794       fi
17795 
17796   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17797   METHOD="search of VS100COMNTOOLS"
17798   if test -e "$POSSIBLE_MSVCR_DLL"; then
17799     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17800 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17801 
17802     # Need to check if the found msvcr is correct architecture
17803     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17804 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17805     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17806     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17807       CORRECT_MSVCR_ARCH=386
17808     else
17809       CORRECT_MSVCR_ARCH=x86-64
17810     fi
17811     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17812       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17813 $as_echo "ok" >&6; }
17814       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17815       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17816 $as_echo_n "checking for msvcr100.dll... " >&6; }
17817       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17818 $as_echo "$MSVCR_DLL" >&6; }
17819     else
17820       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17821 $as_echo "incorrect, ignoring" >&6; }
17822       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17823 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17824     fi
17825   fi
17826 
17827     fi
17828   fi
17829 
17830   if test "x$MSVCR_DLL" = x; then
17831     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17832     # (This was the original behaviour; kept since it might turn up something)
17833     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17834       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17835         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17836       else
17837         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17838         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17839           # We're grasping at straws now...
17840           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17841         fi
17842       fi
17843 
17844 
17845   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17846   METHOD="search of VCINSTALLDIR"
17847   if test -e "$POSSIBLE_MSVCR_DLL"; then
17848     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17849 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17850 
17851     # Need to check if the found msvcr is correct architecture
17852     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17853 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17854     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17855     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17856       CORRECT_MSVCR_ARCH=386
17857     else
17858       CORRECT_MSVCR_ARCH=x86-64
17859     fi
17860     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17861       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17862 $as_echo "ok" >&6; }
17863       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17864       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17865 $as_echo_n "checking for msvcr100.dll... " >&6; }
17866       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17867 $as_echo "$MSVCR_DLL" >&6; }
17868     else
17869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17870 $as_echo "incorrect, ignoring" >&6; }
17871       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17872 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17873     fi
17874   fi
17875 
17876     fi
17877   fi
17878 
17879   if test "x$MSVCR_DLL" = x; then
17880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17881 $as_echo_n "checking for msvcr100.dll... " >&6; }
17882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17883 $as_echo "no" >&6; }
17884     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17885   fi
17886 
17887 
17888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17889 
17890   # Input might be given as Windows format, start by converting to
17891   # unix format.
17892   path="$MSVCR_DLL"
17893   new_path=`$CYGPATH -u "$path"`
17894 
17895   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17896   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17897   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17898   # "foo.exe" is OK but "foo" is an error.
17899   #
17900   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17901   # It is also a way to make sure we got the proper file name for the real test later on.
17902   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17903   if test "x$test_shortpath" = x; then
17904     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17905 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17906     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17907   fi
17908 
17909   # Call helper function which possibly converts this using DOS-style short mode.
17910   # If so, the updated path is stored in $new_path.
17911 
17912   input_path="$new_path"
17913   # Check if we need to convert this using DOS-style short mode. If the path
17914   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17915   # take no chances and rewrite it.
17916   # Note: m4 eats our [], so we need to use [ and ] instead.
17917   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17918   if test "x$has_forbidden_chars" != x; then
17919     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17920     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17921     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17922     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17923       # Going to short mode and back again did indeed matter. Since short mode is
17924       # case insensitive, let's make it lowercase to improve readability.
17925       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17926       # Now convert it back to Unix-stile (cygpath)
17927       input_path=`$CYGPATH -u "$shortmode_path"`
17928       new_path="$input_path"
17929     fi
17930   fi
17931 
17932   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17933   if test "x$test_cygdrive_prefix" = x; then
17934     # As a simple fix, exclude /usr/bin since it's not a real path.
17935     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17936       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17937       # a path prefixed by /cygdrive for fixpath to work.
17938       new_path="$CYGWIN_ROOT_PATH$input_path"
17939     fi
17940   fi
17941 
17942 
17943   if test "x$path" != "x$new_path"; then
17944     MSVCR_DLL="$new_path"
17945     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17946 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17947   fi
17948 
17949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17950 
17951   path="$MSVCR_DLL"
17952   has_colon=`$ECHO $path | $GREP ^.:`
17953   new_path="$path"
17954   if test "x$has_colon" = x; then
17955     # Not in mixed or Windows style, start by that.
17956     new_path=`cmd //c echo $path`
17957   fi
17958 
17959 
17960   input_path="$new_path"
17961   # Check if we need to convert this using DOS-style short mode. If the path
17962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17963   # take no chances and rewrite it.
17964   # Note: m4 eats our [], so we need to use [ and ] instead.
17965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17966   if test "x$has_forbidden_chars" != x; then
17967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17969   fi
17970 
17971 
17972   windows_path="$new_path"
17973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17974     unix_path=`$CYGPATH -u "$windows_path"`
17975     new_path="$unix_path"
17976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17978     new_path="$unix_path"
17979   fi
17980 
17981   if test "x$path" != "x$new_path"; then
17982     MSVCR_DLL="$new_path"
17983     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17984 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17985   fi
17986 
17987   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17988   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17989 
17990   else
17991     # We're on a posix platform. Hooray! :)
17992     path="$MSVCR_DLL"
17993     has_space=`$ECHO "$path" | $GREP " "`
17994     if test "x$has_space" != x; then
17995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17996 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17997       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17998     fi
17999 
18000     # Use eval to expand a potential ~
18001     eval path="$path"
18002     if test ! -f "$path" && test ! -d "$path"; then
18003       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18004     fi
18005 
18006     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18007   fi
18008 
18009 
18010 
18011 
18012 # Check whether --with-dxsdk was given.
18013 if test "${with_dxsdk+set}" = set; then :
18014   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18015 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18016 fi
18017 
18018 
18019 
18020 
18021 # Check whether --with-dxsdk-lib was given.
18022 if test "${with_dxsdk_lib+set}" = set; then :
18023   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18024 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18025 fi
18026 
18027 
18028 
18029 
18030 # Check whether --with-dxsdk-include was given.
18031 if test "${with_dxsdk_include+set}" = set; then :
18032   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18033 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18034 fi
18035 
18036 
18037   fi
18038 
18039 
18040 
18041   # If --build AND --host is set, then the configure script will find any
18042   # cross compilation tools in the PATH. Cross compilation tools
18043   # follows the cross compilation standard where they are prefixed with ${host}.
18044   # For example the binary i686-sun-solaris2.10-gcc
18045   # will cross compile for i686-sun-solaris2.10
18046   # If neither of build and host is not set, then build=host and the
18047   # default compiler found in the path will be used.
18048   # Setting only --host, does not seem to be really supported.
18049   # Please set both --build and --host if you want to cross compile.
18050 
18051   if test "x$COMPILE_TYPE" = "xcross"; then
18052     # Now we to find a C/C++ compiler that can build executables for the build
18053     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18054     # once. Also, we need to do this before adding a tools dir to the path,
18055     # otherwise we might pick up cross-compilers which don't use standard naming.
18056     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18057     # to wait until they are properly discovered.
18058     for ac_prog in cl cc gcc
18059 do
18060   # Extract the first word of "$ac_prog", so it can be a program name with args.
18061 set dummy $ac_prog; ac_word=$2
18062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18063 $as_echo_n "checking for $ac_word... " >&6; }
18064 if ${ac_cv_path_BUILD_CC+:} false; then :
18065   $as_echo_n "(cached) " >&6
18066 else
18067   case $BUILD_CC in
18068   [\\/]* | ?:[\\/]*)
18069   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18070   ;;
18071   *)
18072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18073 for as_dir in $PATH
18074 do
18075   IFS=$as_save_IFS
18076   test -z "$as_dir" && as_dir=.
18077     for ac_exec_ext in '' $ac_executable_extensions; do
18078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18079     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18081     break 2
18082   fi
18083 done
18084   done
18085 IFS=$as_save_IFS
18086 
18087   ;;
18088 esac
18089 fi
18090 BUILD_CC=$ac_cv_path_BUILD_CC
18091 if test -n "$BUILD_CC"; then
18092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18093 $as_echo "$BUILD_CC" >&6; }
18094 else
18095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18096 $as_echo "no" >&6; }
18097 fi
18098 
18099 
18100   test -n "$BUILD_CC" && break
18101 done
18102 
18103 
18104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18105 
18106   # First separate the path from the arguments. This will split at the first
18107   # space.
18108   complete="$BUILD_CC"
18109   path="${complete%% *}"
18110   tmp="$complete EOL"
18111   arguments="${tmp#* }"
18112 
18113   # Input might be given as Windows format, start by converting to
18114   # unix format.
18115   new_path=`$CYGPATH -u "$path"`
18116 
18117   # Now try to locate executable using which
18118   new_path=`$WHICH "$new_path" 2> /dev/null`
18119   # bat and cmd files are not always considered executable in cygwin causing which
18120   # to not find them
18121   if test "x$new_path" = x \
18122       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18123       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18124     new_path=`$CYGPATH -u "$path"`
18125   fi
18126   if test "x$new_path" = x; then
18127     # Oops. Which didn't find the executable.
18128     # The splitting of arguments from the executable at a space might have been incorrect,
18129     # since paths with space are more likely in Windows. Give it another try with the whole
18130     # argument.
18131     path="$complete"
18132     arguments="EOL"
18133     new_path=`$CYGPATH -u "$path"`
18134     new_path=`$WHICH "$new_path" 2> /dev/null`
18135     # bat and cmd files are not always considered executable in cygwin causing which
18136     # to not find them
18137     if test "x$new_path" = x \
18138         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18139         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18140       new_path=`$CYGPATH -u "$path"`
18141     fi
18142     if test "x$new_path" = x; then
18143       # It's still not found. Now this is an unrecoverable error.
18144       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18145 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18146       has_space=`$ECHO "$complete" | $GREP " "`
18147       if test "x$has_space" != x; then
18148         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18149 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18150       fi
18151       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18152     fi
18153   fi
18154 
18155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18158   # "foo.exe" is OK but "foo" is an error.
18159   #
18160   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18161   # It is also a way to make sure we got the proper file name for the real test later on.
18162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18163   if test "x$test_shortpath" = x; then
18164     # Short path failed, file does not exist as specified.
18165     # Try adding .exe or .cmd
18166     if test -f "${new_path}.exe"; then
18167       input_to_shortpath="${new_path}.exe"
18168     elif test -f "${new_path}.cmd"; then
18169       input_to_shortpath="${new_path}.cmd"
18170     else
18171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18172 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18173       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18174 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18175       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18176     fi
18177   else
18178     input_to_shortpath="$new_path"
18179   fi
18180 
18181   # Call helper function which possibly converts this using DOS-style short mode.
18182   # If so, the updated path is stored in $new_path.
18183   new_path="$input_to_shortpath"
18184 
18185   input_path="$input_to_shortpath"
18186   # Check if we need to convert this using DOS-style short mode. If the path
18187   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18188   # take no chances and rewrite it.
18189   # Note: m4 eats our [], so we need to use [ and ] instead.
18190   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18191   if test "x$has_forbidden_chars" != x; then
18192     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18193     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18194     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18195     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18196       # Going to short mode and back again did indeed matter. Since short mode is
18197       # case insensitive, let's make it lowercase to improve readability.
18198       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18199       # Now convert it back to Unix-stile (cygpath)
18200       input_path=`$CYGPATH -u "$shortmode_path"`
18201       new_path="$input_path"
18202     fi
18203   fi
18204 
18205   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18206   if test "x$test_cygdrive_prefix" = x; then
18207     # As a simple fix, exclude /usr/bin since it's not a real path.
18208     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18209       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18210       # a path prefixed by /cygdrive for fixpath to work.
18211       new_path="$CYGWIN_ROOT_PATH$input_path"
18212     fi
18213   fi
18214 
18215   # remove trailing .exe if any
18216   new_path="${new_path/%.exe/}"
18217 
18218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18219 
18220   # First separate the path from the arguments. This will split at the first
18221   # space.
18222   complete="$BUILD_CC"
18223   path="${complete%% *}"
18224   tmp="$complete EOL"
18225   arguments="${tmp#* }"
18226 
18227   # Input might be given as Windows format, start by converting to
18228   # unix format.
18229   new_path="$path"
18230 
18231   windows_path="$new_path"
18232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18233     unix_path=`$CYGPATH -u "$windows_path"`
18234     new_path="$unix_path"
18235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18237     new_path="$unix_path"
18238   fi
18239 
18240 
18241   # Now try to locate executable using which
18242   new_path=`$WHICH "$new_path" 2> /dev/null`
18243 
18244   if test "x$new_path" = x; then
18245     # Oops. Which didn't find the executable.
18246     # The splitting of arguments from the executable at a space might have been incorrect,
18247     # since paths with space are more likely in Windows. Give it another try with the whole
18248     # argument.
18249     path="$complete"
18250     arguments="EOL"
18251     new_path="$path"
18252 
18253   windows_path="$new_path"
18254   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18255     unix_path=`$CYGPATH -u "$windows_path"`
18256     new_path="$unix_path"
18257   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18258     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18259     new_path="$unix_path"
18260   fi
18261 
18262 
18263     new_path=`$WHICH "$new_path" 2> /dev/null`
18264 
18265     if test "x$new_path" = x; then
18266       # It's still not found. Now this is an unrecoverable error.
18267       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18268 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18269       has_space=`$ECHO "$complete" | $GREP " "`
18270       if test "x$has_space" != x; then
18271         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18272 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18273       fi
18274       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18275     fi
18276   fi
18277 
18278   # Now new_path has a complete unix path to the binary
18279   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18280     # Keep paths in /bin as-is, but remove trailing .exe if any
18281     new_path="${new_path/%.exe/}"
18282     # Do not save /bin paths to all_fixpath_prefixes!
18283   else
18284     # Not in mixed or Windows style, start by that.
18285     new_path=`cmd //c echo $new_path`
18286 
18287   input_path="$new_path"
18288   # Check if we need to convert this using DOS-style short mode. If the path
18289   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18290   # take no chances and rewrite it.
18291   # Note: m4 eats our [], so we need to use [ and ] instead.
18292   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18293   if test "x$has_forbidden_chars" != x; then
18294     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18295     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18296   fi
18297 
18298     # Output is in $new_path
18299 
18300   windows_path="$new_path"
18301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18302     unix_path=`$CYGPATH -u "$windows_path"`
18303     new_path="$unix_path"
18304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18306     new_path="$unix_path"
18307   fi
18308 
18309     # remove trailing .exe if any
18310     new_path="${new_path/%.exe/}"
18311 
18312     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18313     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18314   fi
18315 
18316   else
18317     # We're on a posix platform. Hooray! :)
18318     # First separate the path from the arguments. This will split at the first
18319     # space.
18320     complete="$BUILD_CC"
18321     path="${complete%% *}"
18322     tmp="$complete EOL"
18323     arguments="${tmp#* }"
18324 
18325     # Cannot rely on the command "which" here since it doesn't always work.
18326     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18327     if test -z "$is_absolute_path"; then
18328       # Path to executable is not absolute. Find it.
18329       IFS_save="$IFS"
18330       IFS=:
18331       for p in $PATH; do
18332         if test -f "$p/$path" && test -x "$p/$path"; then
18333           new_path="$p/$path"
18334           break
18335         fi
18336       done
18337       IFS="$IFS_save"
18338     else
18339       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18340 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18341       new_path="$path"
18342     fi
18343 
18344     if test "x$new_path" = x; then
18345       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18346 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18347       has_space=`$ECHO "$complete" | $GREP " "`
18348       if test "x$has_space" != x; then
18349         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18350 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18351       fi
18352       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18353     fi
18354   fi
18355 
18356   # Now join together the path and the arguments once again
18357   if test "x$arguments" != xEOL; then
18358     new_complete="$new_path ${arguments% *}"
18359   else
18360     new_complete="$new_path"
18361   fi
18362 
18363   if test "x$complete" != "x$new_complete"; then
18364     BUILD_CC="$new_complete"
18365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18366 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18367   fi
18368 
18369     for ac_prog in cl CC g++
18370 do
18371   # Extract the first word of "$ac_prog", so it can be a program name with args.
18372 set dummy $ac_prog; ac_word=$2
18373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18374 $as_echo_n "checking for $ac_word... " >&6; }
18375 if ${ac_cv_path_BUILD_CXX+:} false; then :
18376   $as_echo_n "(cached) " >&6
18377 else
18378   case $BUILD_CXX in
18379   [\\/]* | ?:[\\/]*)
18380   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18381   ;;
18382   *)
18383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18384 for as_dir in $PATH
18385 do
18386   IFS=$as_save_IFS
18387   test -z "$as_dir" && as_dir=.
18388     for ac_exec_ext in '' $ac_executable_extensions; do
18389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18390     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18392     break 2
18393   fi
18394 done
18395   done
18396 IFS=$as_save_IFS
18397 
18398   ;;
18399 esac
18400 fi
18401 BUILD_CXX=$ac_cv_path_BUILD_CXX
18402 if test -n "$BUILD_CXX"; then
18403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18404 $as_echo "$BUILD_CXX" >&6; }
18405 else
18406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18407 $as_echo "no" >&6; }
18408 fi
18409 
18410 
18411   test -n "$BUILD_CXX" && break
18412 done
18413 
18414 
18415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18416 
18417   # First separate the path from the arguments. This will split at the first
18418   # space.
18419   complete="$BUILD_CXX"
18420   path="${complete%% *}"
18421   tmp="$complete EOL"
18422   arguments="${tmp#* }"
18423 
18424   # Input might be given as Windows format, start by converting to
18425   # unix format.
18426   new_path=`$CYGPATH -u "$path"`
18427 
18428   # Now try to locate executable using which
18429   new_path=`$WHICH "$new_path" 2> /dev/null`
18430   # bat and cmd files are not always considered executable in cygwin causing which
18431   # to not find them
18432   if test "x$new_path" = x \
18433       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435     new_path=`$CYGPATH -u "$path"`
18436   fi
18437   if test "x$new_path" = x; then
18438     # Oops. Which didn't find the executable.
18439     # The splitting of arguments from the executable at a space might have been incorrect,
18440     # since paths with space are more likely in Windows. Give it another try with the whole
18441     # argument.
18442     path="$complete"
18443     arguments="EOL"
18444     new_path=`$CYGPATH -u "$path"`
18445     new_path=`$WHICH "$new_path" 2> /dev/null`
18446     # bat and cmd files are not always considered executable in cygwin causing which
18447     # to not find them
18448     if test "x$new_path" = x \
18449         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18450         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18451       new_path=`$CYGPATH -u "$path"`
18452     fi
18453     if test "x$new_path" = x; then
18454       # It's still not found. Now this is an unrecoverable error.
18455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18456 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18457       has_space=`$ECHO "$complete" | $GREP " "`
18458       if test "x$has_space" != x; then
18459         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18460 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18461       fi
18462       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18463     fi
18464   fi
18465 
18466   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18467   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18468   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18469   # "foo.exe" is OK but "foo" is an error.
18470   #
18471   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18472   # It is also a way to make sure we got the proper file name for the real test later on.
18473   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18474   if test "x$test_shortpath" = x; then
18475     # Short path failed, file does not exist as specified.
18476     # Try adding .exe or .cmd
18477     if test -f "${new_path}.exe"; then
18478       input_to_shortpath="${new_path}.exe"
18479     elif test -f "${new_path}.cmd"; then
18480       input_to_shortpath="${new_path}.cmd"
18481     else
18482       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18483 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18484       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18485 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18486       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18487     fi
18488   else
18489     input_to_shortpath="$new_path"
18490   fi
18491 
18492   # Call helper function which possibly converts this using DOS-style short mode.
18493   # If so, the updated path is stored in $new_path.
18494   new_path="$input_to_shortpath"
18495 
18496   input_path="$input_to_shortpath"
18497   # Check if we need to convert this using DOS-style short mode. If the path
18498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18499   # take no chances and rewrite it.
18500   # Note: m4 eats our [], so we need to use [ and ] instead.
18501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18502   if test "x$has_forbidden_chars" != x; then
18503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18507       # Going to short mode and back again did indeed matter. Since short mode is
18508       # case insensitive, let's make it lowercase to improve readability.
18509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18510       # Now convert it back to Unix-stile (cygpath)
18511       input_path=`$CYGPATH -u "$shortmode_path"`
18512       new_path="$input_path"
18513     fi
18514   fi
18515 
18516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18517   if test "x$test_cygdrive_prefix" = x; then
18518     # As a simple fix, exclude /usr/bin since it's not a real path.
18519     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18521       # a path prefixed by /cygdrive for fixpath to work.
18522       new_path="$CYGWIN_ROOT_PATH$input_path"
18523     fi
18524   fi
18525 
18526   # remove trailing .exe if any
18527   new_path="${new_path/%.exe/}"
18528 
18529   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18530 
18531   # First separate the path from the arguments. This will split at the first
18532   # space.
18533   complete="$BUILD_CXX"
18534   path="${complete%% *}"
18535   tmp="$complete EOL"
18536   arguments="${tmp#* }"
18537 
18538   # Input might be given as Windows format, start by converting to
18539   # unix format.
18540   new_path="$path"
18541 
18542   windows_path="$new_path"
18543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18544     unix_path=`$CYGPATH -u "$windows_path"`
18545     new_path="$unix_path"
18546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18548     new_path="$unix_path"
18549   fi
18550 
18551 
18552   # Now try to locate executable using which
18553   new_path=`$WHICH "$new_path" 2> /dev/null`
18554 
18555   if test "x$new_path" = x; then
18556     # Oops. Which didn't find the executable.
18557     # The splitting of arguments from the executable at a space might have been incorrect,
18558     # since paths with space are more likely in Windows. Give it another try with the whole
18559     # argument.
18560     path="$complete"
18561     arguments="EOL"
18562     new_path="$path"
18563 
18564   windows_path="$new_path"
18565   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18566     unix_path=`$CYGPATH -u "$windows_path"`
18567     new_path="$unix_path"
18568   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18569     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18570     new_path="$unix_path"
18571   fi
18572 
18573 
18574     new_path=`$WHICH "$new_path" 2> /dev/null`
18575 
18576     if test "x$new_path" = x; then
18577       # It's still not found. Now this is an unrecoverable error.
18578       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18579 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18580       has_space=`$ECHO "$complete" | $GREP " "`
18581       if test "x$has_space" != x; then
18582         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18583 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18584       fi
18585       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18586     fi
18587   fi
18588 
18589   # Now new_path has a complete unix path to the binary
18590   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18591     # Keep paths in /bin as-is, but remove trailing .exe if any
18592     new_path="${new_path/%.exe/}"
18593     # Do not save /bin paths to all_fixpath_prefixes!
18594   else
18595     # Not in mixed or Windows style, start by that.
18596     new_path=`cmd //c echo $new_path`
18597 
18598   input_path="$new_path"
18599   # Check if we need to convert this using DOS-style short mode. If the path
18600   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18601   # take no chances and rewrite it.
18602   # Note: m4 eats our [], so we need to use [ and ] instead.
18603   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18604   if test "x$has_forbidden_chars" != x; then
18605     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18606     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18607   fi
18608 
18609     # Output is in $new_path
18610 
18611   windows_path="$new_path"
18612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18613     unix_path=`$CYGPATH -u "$windows_path"`
18614     new_path="$unix_path"
18615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18617     new_path="$unix_path"
18618   fi
18619 
18620     # remove trailing .exe if any
18621     new_path="${new_path/%.exe/}"
18622 
18623     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18624     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18625   fi
18626 
18627   else
18628     # We're on a posix platform. Hooray! :)
18629     # First separate the path from the arguments. This will split at the first
18630     # space.
18631     complete="$BUILD_CXX"
18632     path="${complete%% *}"
18633     tmp="$complete EOL"
18634     arguments="${tmp#* }"
18635 
18636     # Cannot rely on the command "which" here since it doesn't always work.
18637     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18638     if test -z "$is_absolute_path"; then
18639       # Path to executable is not absolute. Find it.
18640       IFS_save="$IFS"
18641       IFS=:
18642       for p in $PATH; do
18643         if test -f "$p/$path" && test -x "$p/$path"; then
18644           new_path="$p/$path"
18645           break
18646         fi
18647       done
18648       IFS="$IFS_save"
18649     else
18650       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18651 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18652       new_path="$path"
18653     fi
18654 
18655     if test "x$new_path" = x; then
18656       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18657 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18658       has_space=`$ECHO "$complete" | $GREP " "`
18659       if test "x$has_space" != x; then
18660         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662       fi
18663       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18664     fi
18665   fi
18666 
18667   # Now join together the path and the arguments once again
18668   if test "x$arguments" != xEOL; then
18669     new_complete="$new_path ${arguments% *}"
18670   else
18671     new_complete="$new_path"
18672   fi
18673 
18674   if test "x$complete" != "x$new_complete"; then
18675     BUILD_CXX="$new_complete"
18676     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18677 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18678   fi
18679 
18680     # Extract the first word of "ld", so it can be a program name with args.
18681 set dummy ld; ac_word=$2
18682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18683 $as_echo_n "checking for $ac_word... " >&6; }
18684 if ${ac_cv_path_BUILD_LD+:} false; then :
18685   $as_echo_n "(cached) " >&6
18686 else
18687   case $BUILD_LD in
18688   [\\/]* | ?:[\\/]*)
18689   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18690   ;;
18691   *)
18692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18693 for as_dir in $PATH
18694 do
18695   IFS=$as_save_IFS
18696   test -z "$as_dir" && as_dir=.
18697     for ac_exec_ext in '' $ac_executable_extensions; do
18698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18699     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18701     break 2
18702   fi
18703 done
18704   done
18705 IFS=$as_save_IFS
18706 
18707   ;;
18708 esac
18709 fi
18710 BUILD_LD=$ac_cv_path_BUILD_LD
18711 if test -n "$BUILD_LD"; then
18712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18713 $as_echo "$BUILD_LD" >&6; }
18714 else
18715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18716 $as_echo "no" >&6; }
18717 fi
18718 
18719 
18720 
18721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18722 
18723   # First separate the path from the arguments. This will split at the first
18724   # space.
18725   complete="$BUILD_LD"
18726   path="${complete%% *}"
18727   tmp="$complete EOL"
18728   arguments="${tmp#* }"
18729 
18730   # Input might be given as Windows format, start by converting to
18731   # unix format.
18732   new_path=`$CYGPATH -u "$path"`
18733 
18734   # Now try to locate executable using which
18735   new_path=`$WHICH "$new_path" 2> /dev/null`
18736   # bat and cmd files are not always considered executable in cygwin causing which
18737   # to not find them
18738   if test "x$new_path" = x \
18739       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18740       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18741     new_path=`$CYGPATH -u "$path"`
18742   fi
18743   if test "x$new_path" = x; then
18744     # Oops. Which didn't find the executable.
18745     # The splitting of arguments from the executable at a space might have been incorrect,
18746     # since paths with space are more likely in Windows. Give it another try with the whole
18747     # argument.
18748     path="$complete"
18749     arguments="EOL"
18750     new_path=`$CYGPATH -u "$path"`
18751     new_path=`$WHICH "$new_path" 2> /dev/null`
18752     # bat and cmd files are not always considered executable in cygwin causing which
18753     # to not find them
18754     if test "x$new_path" = x \
18755         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18756         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18757       new_path=`$CYGPATH -u "$path"`
18758     fi
18759     if test "x$new_path" = x; then
18760       # It's still not found. Now this is an unrecoverable error.
18761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18762 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18763       has_space=`$ECHO "$complete" | $GREP " "`
18764       if test "x$has_space" != x; then
18765         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18766 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18767       fi
18768       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18769     fi
18770   fi
18771 
18772   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18773   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18774   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18775   # "foo.exe" is OK but "foo" is an error.
18776   #
18777   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18778   # It is also a way to make sure we got the proper file name for the real test later on.
18779   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18780   if test "x$test_shortpath" = x; then
18781     # Short path failed, file does not exist as specified.
18782     # Try adding .exe or .cmd
18783     if test -f "${new_path}.exe"; then
18784       input_to_shortpath="${new_path}.exe"
18785     elif test -f "${new_path}.cmd"; then
18786       input_to_shortpath="${new_path}.cmd"
18787     else
18788       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18789 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18790       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18791 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18792       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18793     fi
18794   else
18795     input_to_shortpath="$new_path"
18796   fi
18797 
18798   # Call helper function which possibly converts this using DOS-style short mode.
18799   # If so, the updated path is stored in $new_path.
18800   new_path="$input_to_shortpath"
18801 
18802   input_path="$input_to_shortpath"
18803   # Check if we need to convert this using DOS-style short mode. If the path
18804   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18805   # take no chances and rewrite it.
18806   # Note: m4 eats our [], so we need to use [ and ] instead.
18807   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18808   if test "x$has_forbidden_chars" != x; then
18809     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18810     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18811     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18812     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18813       # Going to short mode and back again did indeed matter. Since short mode is
18814       # case insensitive, let's make it lowercase to improve readability.
18815       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18816       # Now convert it back to Unix-stile (cygpath)
18817       input_path=`$CYGPATH -u "$shortmode_path"`
18818       new_path="$input_path"
18819     fi
18820   fi
18821 
18822   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18823   if test "x$test_cygdrive_prefix" = x; then
18824     # As a simple fix, exclude /usr/bin since it's not a real path.
18825     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18826       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18827       # a path prefixed by /cygdrive for fixpath to work.
18828       new_path="$CYGWIN_ROOT_PATH$input_path"
18829     fi
18830   fi
18831 
18832   # remove trailing .exe if any
18833   new_path="${new_path/%.exe/}"
18834 
18835   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18836 
18837   # First separate the path from the arguments. This will split at the first
18838   # space.
18839   complete="$BUILD_LD"
18840   path="${complete%% *}"
18841   tmp="$complete EOL"
18842   arguments="${tmp#* }"
18843 
18844   # Input might be given as Windows format, start by converting to
18845   # unix format.
18846   new_path="$path"
18847 
18848   windows_path="$new_path"
18849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18850     unix_path=`$CYGPATH -u "$windows_path"`
18851     new_path="$unix_path"
18852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18854     new_path="$unix_path"
18855   fi
18856 
18857 
18858   # Now try to locate executable using which
18859   new_path=`$WHICH "$new_path" 2> /dev/null`
18860 
18861   if test "x$new_path" = x; then
18862     # Oops. Which didn't find the executable.
18863     # The splitting of arguments from the executable at a space might have been incorrect,
18864     # since paths with space are more likely in Windows. Give it another try with the whole
18865     # argument.
18866     path="$complete"
18867     arguments="EOL"
18868     new_path="$path"
18869 
18870   windows_path="$new_path"
18871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18872     unix_path=`$CYGPATH -u "$windows_path"`
18873     new_path="$unix_path"
18874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18876     new_path="$unix_path"
18877   fi
18878 
18879 
18880     new_path=`$WHICH "$new_path" 2> /dev/null`
18881 
18882     if test "x$new_path" = x; then
18883       # It's still not found. Now this is an unrecoverable error.
18884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18885 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18886       has_space=`$ECHO "$complete" | $GREP " "`
18887       if test "x$has_space" != x; then
18888         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18889 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18890       fi
18891       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18892     fi
18893   fi
18894 
18895   # Now new_path has a complete unix path to the binary
18896   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18897     # Keep paths in /bin as-is, but remove trailing .exe if any
18898     new_path="${new_path/%.exe/}"
18899     # Do not save /bin paths to all_fixpath_prefixes!
18900   else
18901     # Not in mixed or Windows style, start by that.
18902     new_path=`cmd //c echo $new_path`
18903 
18904   input_path="$new_path"
18905   # Check if we need to convert this using DOS-style short mode. If the path
18906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18907   # take no chances and rewrite it.
18908   # Note: m4 eats our [], so we need to use [ and ] instead.
18909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18910   if test "x$has_forbidden_chars" != x; then
18911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18912     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18913   fi
18914 
18915     # Output is in $new_path
18916 
18917   windows_path="$new_path"
18918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18919     unix_path=`$CYGPATH -u "$windows_path"`
18920     new_path="$unix_path"
18921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18923     new_path="$unix_path"
18924   fi
18925 
18926     # remove trailing .exe if any
18927     new_path="${new_path/%.exe/}"
18928 
18929     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18930     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18931   fi
18932 
18933   else
18934     # We're on a posix platform. Hooray! :)
18935     # First separate the path from the arguments. This will split at the first
18936     # space.
18937     complete="$BUILD_LD"
18938     path="${complete%% *}"
18939     tmp="$complete EOL"
18940     arguments="${tmp#* }"
18941 
18942     # Cannot rely on the command "which" here since it doesn't always work.
18943     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18944     if test -z "$is_absolute_path"; then
18945       # Path to executable is not absolute. Find it.
18946       IFS_save="$IFS"
18947       IFS=:
18948       for p in $PATH; do
18949         if test -f "$p/$path" && test -x "$p/$path"; then
18950           new_path="$p/$path"
18951           break
18952         fi
18953       done
18954       IFS="$IFS_save"
18955     else
18956       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18957 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18958       new_path="$path"
18959     fi
18960 
18961     if test "x$new_path" = x; then
18962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18963 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18964       has_space=`$ECHO "$complete" | $GREP " "`
18965       if test "x$has_space" != x; then
18966         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18967 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18968       fi
18969       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18970     fi
18971   fi
18972 
18973   # Now join together the path and the arguments once again
18974   if test "x$arguments" != xEOL; then
18975     new_complete="$new_path ${arguments% *}"
18976   else
18977     new_complete="$new_path"
18978   fi
18979 
18980   if test "x$complete" != "x$new_complete"; then
18981     BUILD_LD="$new_complete"
18982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18983 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18984   fi
18985 
18986   fi
18987 
18988 
18989 
18990 
18991   # If a devkit is found on the builddeps server, then prepend its path to the
18992   # PATH variable. If there are cross compilers available in the devkit, these
18993   # will be found by AC_PROG_CC et al.
18994   DEVKIT=
18995 
18996 
18997   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18998     # Source the builddeps file again, to make sure it uses the latest variables!
18999     . $builddepsfile
19000     # Look for a target and build machine specific resource!
19001     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19002     if test "x$resource" = x; then
19003       # Ok, lets instead look for a target specific resource
19004       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19005     fi
19006     if test "x$resource" = x; then
19007       # Ok, lets instead look for a build specific resource
19008       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19009     fi
19010     if test "x$resource" = x; then
19011       # Ok, lets instead look for a generic resource
19012       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19013       resource=${builddep_devkit}
19014     fi
19015     if test "x$resource" != x; then
19016       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19017 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19018       # If the resource in the builddeps.conf file is an existing directory,
19019       # for example /java/linux/cups
19020       if test -d ${resource}; then
19021         depdir=${resource}
19022       else
19023 
19024   # devkit is for example mymodule
19025   # $resource is for example libs/general/libmymod_1_2_3.zip
19026   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19027   # $with_builddeps_dir is for example /localhome/builddeps
19028   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19029   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19030   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19031   filename=`basename $resource`
19032   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19033   filebase=${filename%%.*}
19034   extension=${filename#*.}
19035   installdir=$with_builddeps_dir/$filebase
19036   if test ! -f $installdir/$filename.unpacked; then
19037     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19038 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19039     if test ! -d $installdir; then
19040       mkdir -p $installdir
19041     fi
19042     if test ! -d $installdir; then
19043       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19044     fi
19045     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19046     touch $tmpfile
19047     if test ! -f $tmpfile; then
19048       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19049     fi
19050 
19051   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19052   # $tmpfile is the local file name for the downloaded file.
19053   VALID_TOOL=no
19054   if test "x$BDEPS_FTP" = xwget; then
19055     VALID_TOOL=yes
19056     wget -O $tmpfile $with_builddeps_server/$resource
19057   fi
19058   if test "x$BDEPS_FTP" = xlftp; then
19059     VALID_TOOL=yes
19060     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19061   fi
19062   if test "x$BDEPS_FTP" = xftp; then
19063     VALID_TOOL=yes
19064     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19065     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19066     FTPUSERPWD=${FTPSERVER%%@*}
19067     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19068       FTPUSER=${userpwd%%:*}
19069       FTPPWD=${userpwd#*@}
19070       FTPSERVER=${FTPSERVER#*@}
19071     else
19072       FTPUSER=ftp
19073       FTPPWD=ftp
19074     fi
19075     # the "pass" command does not work on some
19076     # ftp clients (read ftp.exe) but if it works,
19077     # passive mode is better!
19078     ( \
19079         echo "user $FTPUSER $FTPPWD"        ; \
19080         echo "pass"                         ; \
19081         echo "bin"                          ; \
19082         echo "get $FTPPATH $tmpfile"              ; \
19083     ) | ftp -in $FTPSERVER
19084   fi
19085   if test "x$VALID_TOOL" != xyes; then
19086     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19087   fi
19088 
19089     mv $tmpfile $installdir/$filename
19090     if test ! -s $installdir/$filename; then
19091       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19092     fi
19093     case "$extension" in
19094       zip)  echo "Unzipping $installdir/$filename..."
19095         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19096         ;;
19097       tar.gz) echo "Untaring $installdir/$filename..."
19098         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19099         ;;
19100       tgz) echo "Untaring $installdir/$filename..."
19101         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19102         ;;
19103       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19104         ;;
19105     esac
19106   fi
19107   if test -f $installdir/$filename.unpacked; then
19108     depdir=$installdir
19109   fi
19110 
19111       fi
19112       # Source the builddeps file again, because in the previous command, the depdir
19113       # was updated to point at the current build dependency install directory.
19114       . $builddepsfile
19115       # Now extract variables from the builddeps.conf files.
19116       theroot=${builddep_devkit_ROOT}
19117       thecflags=${builddep_devkit_CFLAGS}
19118       thelibs=${builddep_devkit_LIBS}
19119       if test "x$depdir" = x; then
19120         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19121       fi
19122       DEVKIT=$depdir
19123       if test "x$theroot" != x; then
19124         DEVKIT="$theroot"
19125       fi
19126       if test "x$thecflags" != x; then
19127         DEVKIT_CFLAGS="$thecflags"
19128       fi
19129       if test "x$thelibs" != x; then
19130         DEVKIT_LIBS="$thelibs"
19131       fi
19132 
19133         # Found devkit
19134         PATH="$DEVKIT/bin:$PATH"
19135         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19136         if test "x$x_includes" = "xNONE"; then
19137           x_includes="$SYS_ROOT/usr/include/X11"
19138         fi
19139         if test "x$x_libraries" = "xNONE"; then
19140           x_libraries="$SYS_ROOT/usr/lib"
19141         fi
19142 
19143 
19144     fi
19145 
19146   fi
19147 
19148 
19149   # Store the CFLAGS etal passed to the configure script.
19150   ORG_CFLAGS="$CFLAGS"
19151   ORG_CXXFLAGS="$CXXFLAGS"
19152   ORG_OBJCFLAGS="$OBJCFLAGS"
19153 
19154   # autoconf magic only relies on PATH, so update it if tools dir is specified
19155   OLD_PATH="$PATH"
19156   if test "x$TOOLS_DIR" != x; then
19157     PATH=$TOOLS_DIR:$PATH
19158   fi
19159 
19160 
19161   ### Locate C compiler (CC)
19162 
19163   # On windows, only cl.exe is supported.
19164   # On Solaris, cc is preferred to gcc.
19165   # Elsewhere, gcc is preferred to cc.
19166 
19167   if test "x$CC" != x; then
19168     COMPILER_CHECK_LIST="$CC"
19169   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19170     COMPILER_CHECK_LIST="cl"
19171   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19172     COMPILER_CHECK_LIST="cc gcc"
19173   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19174     # Do not probe for cc on AIX.
19175     COMPILER_CHECK_LIST="xlc_r"
19176   else
19177     COMPILER_CHECK_LIST="gcc cc"
19178   fi
19179 
19180 
19181   COMPILER_NAME=C
19182 
19183   CC=
19184   # If TOOLS_DIR is set, check for all compiler names in there first
19185   # before checking the rest of the PATH.
19186   if test -n "$TOOLS_DIR"; then
19187     PATH_save="$PATH"
19188     PATH="$TOOLS_DIR"
19189     for ac_prog in $COMPILER_CHECK_LIST
19190 do
19191   # Extract the first word of "$ac_prog", so it can be a program name with args.
19192 set dummy $ac_prog; ac_word=$2
19193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19194 $as_echo_n "checking for $ac_word... " >&6; }
19195 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19196   $as_echo_n "(cached) " >&6
19197 else
19198   case $TOOLS_DIR_CC in
19199   [\\/]* | ?:[\\/]*)
19200   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19201   ;;
19202   *)
19203   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19204 for as_dir in $PATH
19205 do
19206   IFS=$as_save_IFS
19207   test -z "$as_dir" && as_dir=.
19208     for ac_exec_ext in '' $ac_executable_extensions; do
19209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19210     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19212     break 2
19213   fi
19214 done
19215   done
19216 IFS=$as_save_IFS
19217 
19218   ;;
19219 esac
19220 fi
19221 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19222 if test -n "$TOOLS_DIR_CC"; then
19223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19224 $as_echo "$TOOLS_DIR_CC" >&6; }
19225 else
19226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19227 $as_echo "no" >&6; }
19228 fi
19229 
19230 
19231   test -n "$TOOLS_DIR_CC" && break
19232 done
19233 
19234     CC=$TOOLS_DIR_CC
19235     PATH="$PATH_save"
19236   fi
19237 
19238   # AC_PATH_PROGS can't be run multiple times with the same variable,
19239   # so create a new name for this run.
19240   if test "x$CC" = x; then
19241     for ac_prog in $COMPILER_CHECK_LIST
19242 do
19243   # Extract the first word of "$ac_prog", so it can be a program name with args.
19244 set dummy $ac_prog; ac_word=$2
19245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19246 $as_echo_n "checking for $ac_word... " >&6; }
19247 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19248   $as_echo_n "(cached) " >&6
19249 else
19250   case $POTENTIAL_CC in
19251   [\\/]* | ?:[\\/]*)
19252   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19253   ;;
19254   *)
19255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19256 for as_dir in $PATH
19257 do
19258   IFS=$as_save_IFS
19259   test -z "$as_dir" && as_dir=.
19260     for ac_exec_ext in '' $ac_executable_extensions; do
19261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19262     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19264     break 2
19265   fi
19266 done
19267   done
19268 IFS=$as_save_IFS
19269 
19270   ;;
19271 esac
19272 fi
19273 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19274 if test -n "$POTENTIAL_CC"; then
19275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19276 $as_echo "$POTENTIAL_CC" >&6; }
19277 else
19278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19279 $as_echo "no" >&6; }
19280 fi
19281 
19282 
19283   test -n "$POTENTIAL_CC" && break
19284 done
19285 
19286     CC=$POTENTIAL_CC
19287   fi
19288 
19289   if test "x$CC" = x; then
19290 
19291   # Print a helpful message on how to acquire the necessary build dependency.
19292   # devkit is the help tag: freetype, cups, pulse, alsa etc
19293   MISSING_DEPENDENCY=devkit
19294 
19295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19296     cygwin_help $MISSING_DEPENDENCY
19297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19298     msys_help $MISSING_DEPENDENCY
19299   else
19300     PKGHANDLER_COMMAND=
19301 
19302     case $PKGHANDLER in
19303       apt-get)
19304         apt_help     $MISSING_DEPENDENCY ;;
19305       yum)
19306         yum_help     $MISSING_DEPENDENCY ;;
19307       port)
19308         port_help    $MISSING_DEPENDENCY ;;
19309       pkgutil)
19310         pkgutil_help $MISSING_DEPENDENCY ;;
19311       pkgadd)
19312         pkgadd_help  $MISSING_DEPENDENCY ;;
19313     esac
19314 
19315     if test "x$PKGHANDLER_COMMAND" != x; then
19316       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19317     fi
19318   fi
19319 
19320     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19321   fi
19322 
19323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19324 
19325   # First separate the path from the arguments. This will split at the first
19326   # space.
19327   complete="$CC"
19328   path="${complete%% *}"
19329   tmp="$complete EOL"
19330   arguments="${tmp#* }"
19331 
19332   # Input might be given as Windows format, start by converting to
19333   # unix format.
19334   new_path=`$CYGPATH -u "$path"`
19335 
19336   # Now try to locate executable using which
19337   new_path=`$WHICH "$new_path" 2> /dev/null`
19338   # bat and cmd files are not always considered executable in cygwin causing which
19339   # to not find them
19340   if test "x$new_path" = x \
19341       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19342       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19343     new_path=`$CYGPATH -u "$path"`
19344   fi
19345   if test "x$new_path" = x; then
19346     # Oops. Which didn't find the executable.
19347     # The splitting of arguments from the executable at a space might have been incorrect,
19348     # since paths with space are more likely in Windows. Give it another try with the whole
19349     # argument.
19350     path="$complete"
19351     arguments="EOL"
19352     new_path=`$CYGPATH -u "$path"`
19353     new_path=`$WHICH "$new_path" 2> /dev/null`
19354     # bat and cmd files are not always considered executable in cygwin causing which
19355     # to not find them
19356     if test "x$new_path" = x \
19357         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19358         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19359       new_path=`$CYGPATH -u "$path"`
19360     fi
19361     if test "x$new_path" = x; then
19362       # It's still not found. Now this is an unrecoverable error.
19363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19364 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19365       has_space=`$ECHO "$complete" | $GREP " "`
19366       if test "x$has_space" != x; then
19367         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19368 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19369       fi
19370       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19371     fi
19372   fi
19373 
19374   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19375   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19376   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19377   # "foo.exe" is OK but "foo" is an error.
19378   #
19379   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19380   # It is also a way to make sure we got the proper file name for the real test later on.
19381   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19382   if test "x$test_shortpath" = x; then
19383     # Short path failed, file does not exist as specified.
19384     # Try adding .exe or .cmd
19385     if test -f "${new_path}.exe"; then
19386       input_to_shortpath="${new_path}.exe"
19387     elif test -f "${new_path}.cmd"; then
19388       input_to_shortpath="${new_path}.cmd"
19389     else
19390       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19391 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19392       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19393 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19394       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19395     fi
19396   else
19397     input_to_shortpath="$new_path"
19398   fi
19399 
19400   # Call helper function which possibly converts this using DOS-style short mode.
19401   # If so, the updated path is stored in $new_path.
19402   new_path="$input_to_shortpath"
19403 
19404   input_path="$input_to_shortpath"
19405   # Check if we need to convert this using DOS-style short mode. If the path
19406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19407   # take no chances and rewrite it.
19408   # Note: m4 eats our [], so we need to use [ and ] instead.
19409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19410   if test "x$has_forbidden_chars" != x; then
19411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19415       # Going to short mode and back again did indeed matter. Since short mode is
19416       # case insensitive, let's make it lowercase to improve readability.
19417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19418       # Now convert it back to Unix-stile (cygpath)
19419       input_path=`$CYGPATH -u "$shortmode_path"`
19420       new_path="$input_path"
19421     fi
19422   fi
19423 
19424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19425   if test "x$test_cygdrive_prefix" = x; then
19426     # As a simple fix, exclude /usr/bin since it's not a real path.
19427     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19429       # a path prefixed by /cygdrive for fixpath to work.
19430       new_path="$CYGWIN_ROOT_PATH$input_path"
19431     fi
19432   fi
19433 
19434   # remove trailing .exe if any
19435   new_path="${new_path/%.exe/}"
19436 
19437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19438 
19439   # First separate the path from the arguments. This will split at the first
19440   # space.
19441   complete="$CC"
19442   path="${complete%% *}"
19443   tmp="$complete EOL"
19444   arguments="${tmp#* }"
19445 
19446   # Input might be given as Windows format, start by converting to
19447   # unix format.
19448   new_path="$path"
19449 
19450   windows_path="$new_path"
19451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19452     unix_path=`$CYGPATH -u "$windows_path"`
19453     new_path="$unix_path"
19454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19456     new_path="$unix_path"
19457   fi
19458 
19459 
19460   # Now try to locate executable using which
19461   new_path=`$WHICH "$new_path" 2> /dev/null`
19462 
19463   if test "x$new_path" = x; then
19464     # Oops. Which didn't find the executable.
19465     # The splitting of arguments from the executable at a space might have been incorrect,
19466     # since paths with space are more likely in Windows. Give it another try with the whole
19467     # argument.
19468     path="$complete"
19469     arguments="EOL"
19470     new_path="$path"
19471 
19472   windows_path="$new_path"
19473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19474     unix_path=`$CYGPATH -u "$windows_path"`
19475     new_path="$unix_path"
19476   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19477     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19478     new_path="$unix_path"
19479   fi
19480 
19481 
19482     new_path=`$WHICH "$new_path" 2> /dev/null`
19483 
19484     if test "x$new_path" = x; then
19485       # It's still not found. Now this is an unrecoverable error.
19486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19487 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19488       has_space=`$ECHO "$complete" | $GREP " "`
19489       if test "x$has_space" != x; then
19490         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19491 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19492       fi
19493       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19494     fi
19495   fi
19496 
19497   # Now new_path has a complete unix path to the binary
19498   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19499     # Keep paths in /bin as-is, but remove trailing .exe if any
19500     new_path="${new_path/%.exe/}"
19501     # Do not save /bin paths to all_fixpath_prefixes!
19502   else
19503     # Not in mixed or Windows style, start by that.
19504     new_path=`cmd //c echo $new_path`
19505 
19506   input_path="$new_path"
19507   # Check if we need to convert this using DOS-style short mode. If the path
19508   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19509   # take no chances and rewrite it.
19510   # Note: m4 eats our [], so we need to use [ and ] instead.
19511   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19512   if test "x$has_forbidden_chars" != x; then
19513     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19514     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19515   fi
19516 
19517     # Output is in $new_path
19518 
19519   windows_path="$new_path"
19520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19521     unix_path=`$CYGPATH -u "$windows_path"`
19522     new_path="$unix_path"
19523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19525     new_path="$unix_path"
19526   fi
19527 
19528     # remove trailing .exe if any
19529     new_path="${new_path/%.exe/}"
19530 
19531     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19532     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19533   fi
19534 
19535   else
19536     # We're on a posix platform. Hooray! :)
19537     # First separate the path from the arguments. This will split at the first
19538     # space.
19539     complete="$CC"
19540     path="${complete%% *}"
19541     tmp="$complete EOL"
19542     arguments="${tmp#* }"
19543 
19544     # Cannot rely on the command "which" here since it doesn't always work.
19545     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19546     if test -z "$is_absolute_path"; then
19547       # Path to executable is not absolute. Find it.
19548       IFS_save="$IFS"
19549       IFS=:
19550       for p in $PATH; do
19551         if test -f "$p/$path" && test -x "$p/$path"; then
19552           new_path="$p/$path"
19553           break
19554         fi
19555       done
19556       IFS="$IFS_save"
19557     else
19558       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19559 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19560       new_path="$path"
19561     fi
19562 
19563     if test "x$new_path" = x; then
19564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19565 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19566       has_space=`$ECHO "$complete" | $GREP " "`
19567       if test "x$has_space" != x; then
19568         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19569 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19570       fi
19571       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19572     fi
19573   fi
19574 
19575   # Now join together the path and the arguments once again
19576   if test "x$arguments" != xEOL; then
19577     new_complete="$new_path ${arguments% *}"
19578   else
19579     new_complete="$new_path"
19580   fi
19581 
19582   if test "x$complete" != "x$new_complete"; then
19583     CC="$new_complete"
19584     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19585 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19586   fi
19587 
19588   TEST_COMPILER="$CC"
19589   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19590   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19591   if test "x$OPENJDK_BUILD_OS" != xaix; then
19592     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19593 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19594 
19595   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19596     # Follow a chain of symbolic links. Use readlink
19597     # where it exists, else fall back to horribly
19598     # complicated shell code.
19599     if test "x$READLINK_TESTED" != yes; then
19600       # On MacOSX there is a readlink tool with a different
19601       # purpose than the GNU readlink tool. Check the found readlink.
19602       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19603       if test "x$ISGNU" = x; then
19604         # A readlink that we do not know how to use.
19605         # Are there other non-GNU readlinks out there?
19606         READLINK_TESTED=yes
19607         READLINK=
19608       fi
19609     fi
19610 
19611     if test "x$READLINK" != x; then
19612       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19613     else
19614       # Save the current directory for restoring afterwards
19615       STARTDIR=$PWD
19616       COUNTER=0
19617       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19618       sym_link_file=`$BASENAME $TEST_COMPILER`
19619       cd $sym_link_dir
19620       # Use -P flag to resolve symlinks in directories.
19621       cd `$THEPWDCMD -P`
19622       sym_link_dir=`$THEPWDCMD -P`
19623       # Resolve file symlinks
19624       while test $COUNTER -lt 20; do
19625         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19626         if test "x$ISLINK" == x; then
19627           # This is not a symbolic link! We are done!
19628           break
19629         fi
19630         # Again resolve directory symlinks since the target of the just found
19631         # link could be in a different directory
19632         cd `$DIRNAME $ISLINK`
19633         sym_link_dir=`$THEPWDCMD -P`
19634         sym_link_file=`$BASENAME $ISLINK`
19635         let COUNTER=COUNTER+1
19636       done
19637       cd $STARTDIR
19638       TEST_COMPILER=$sym_link_dir/$sym_link_file
19639     fi
19640   fi
19641 
19642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19643 $as_echo "$TEST_COMPILER" >&6; }
19644   fi
19645   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19646 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19647 
19648   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19649   if test "x$COMPILER_BASENAME" = "xccache"; then
19650     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19651 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19652     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19653     # We want to control ccache invocation ourselves, so ignore this cc and try
19654     # searching again.
19655 
19656     # Remove the path to the fake ccache cc from the PATH
19657     RETRY_COMPILER_SAVED_PATH="$PATH"
19658     COMPILER_DIRNAME=`$DIRNAME $CC`
19659     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19660 
19661     # Try again looking for our compiler
19662     if test -n "$ac_tool_prefix"; then
19663   for ac_prog in $COMPILER_CHECK_LIST
19664   do
19665     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19666 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19668 $as_echo_n "checking for $ac_word... " >&6; }
19669 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19670   $as_echo_n "(cached) " >&6
19671 else
19672   if test -n "$PROPER_COMPILER_CC"; then
19673   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19674 else
19675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19676 for as_dir in $PATH
19677 do
19678   IFS=$as_save_IFS
19679   test -z "$as_dir" && as_dir=.
19680     for ac_exec_ext in '' $ac_executable_extensions; do
19681   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19682     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19683     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19684     break 2
19685   fi
19686 done
19687   done
19688 IFS=$as_save_IFS
19689 
19690 fi
19691 fi
19692 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19693 if test -n "$PROPER_COMPILER_CC"; then
19694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19695 $as_echo "$PROPER_COMPILER_CC" >&6; }
19696 else
19697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19698 $as_echo "no" >&6; }
19699 fi
19700 
19701 
19702     test -n "$PROPER_COMPILER_CC" && break
19703   done
19704 fi
19705 if test -z "$PROPER_COMPILER_CC"; then
19706   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19707   for ac_prog in $COMPILER_CHECK_LIST
19708 do
19709   # Extract the first word of "$ac_prog", so it can be a program name with args.
19710 set dummy $ac_prog; ac_word=$2
19711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19712 $as_echo_n "checking for $ac_word... " >&6; }
19713 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19714   $as_echo_n "(cached) " >&6
19715 else
19716   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19717   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19718 else
19719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19720 for as_dir in $PATH
19721 do
19722   IFS=$as_save_IFS
19723   test -z "$as_dir" && as_dir=.
19724     for ac_exec_ext in '' $ac_executable_extensions; do
19725   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19726     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19727     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19728     break 2
19729   fi
19730 done
19731   done
19732 IFS=$as_save_IFS
19733 
19734 fi
19735 fi
19736 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19737 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19739 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19740 else
19741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19742 $as_echo "no" >&6; }
19743 fi
19744 
19745 
19746   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19747 done
19748 
19749   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19750     PROPER_COMPILER_CC=""
19751   else
19752     case $cross_compiling:$ac_tool_warned in
19753 yes:)
19754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19755 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19756 ac_tool_warned=yes ;;
19757 esac
19758     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19759   fi
19760 fi
19761 
19762 
19763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19764 
19765   # First separate the path from the arguments. This will split at the first
19766   # space.
19767   complete="$PROPER_COMPILER_CC"
19768   path="${complete%% *}"
19769   tmp="$complete EOL"
19770   arguments="${tmp#* }"
19771 
19772   # Input might be given as Windows format, start by converting to
19773   # unix format.
19774   new_path=`$CYGPATH -u "$path"`
19775 
19776   # Now try to locate executable using which
19777   new_path=`$WHICH "$new_path" 2> /dev/null`
19778   # bat and cmd files are not always considered executable in cygwin causing which
19779   # to not find them
19780   if test "x$new_path" = x \
19781       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19782       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19783     new_path=`$CYGPATH -u "$path"`
19784   fi
19785   if test "x$new_path" = x; then
19786     # Oops. Which didn't find the executable.
19787     # The splitting of arguments from the executable at a space might have been incorrect,
19788     # since paths with space are more likely in Windows. Give it another try with the whole
19789     # argument.
19790     path="$complete"
19791     arguments="EOL"
19792     new_path=`$CYGPATH -u "$path"`
19793     new_path=`$WHICH "$new_path" 2> /dev/null`
19794     # bat and cmd files are not always considered executable in cygwin causing which
19795     # to not find them
19796     if test "x$new_path" = x \
19797         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19798         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19799       new_path=`$CYGPATH -u "$path"`
19800     fi
19801     if test "x$new_path" = x; then
19802       # It's still not found. Now this is an unrecoverable error.
19803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19804 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19805       has_space=`$ECHO "$complete" | $GREP " "`
19806       if test "x$has_space" != x; then
19807         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19808 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19809       fi
19810       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19811     fi
19812   fi
19813 
19814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19817   # "foo.exe" is OK but "foo" is an error.
19818   #
19819   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19820   # It is also a way to make sure we got the proper file name for the real test later on.
19821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19822   if test "x$test_shortpath" = x; then
19823     # Short path failed, file does not exist as specified.
19824     # Try adding .exe or .cmd
19825     if test -f "${new_path}.exe"; then
19826       input_to_shortpath="${new_path}.exe"
19827     elif test -f "${new_path}.cmd"; then
19828       input_to_shortpath="${new_path}.cmd"
19829     else
19830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19831 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19832       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19833 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19834       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19835     fi
19836   else
19837     input_to_shortpath="$new_path"
19838   fi
19839 
19840   # Call helper function which possibly converts this using DOS-style short mode.
19841   # If so, the updated path is stored in $new_path.
19842   new_path="$input_to_shortpath"
19843 
19844   input_path="$input_to_shortpath"
19845   # Check if we need to convert this using DOS-style short mode. If the path
19846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19847   # take no chances and rewrite it.
19848   # Note: m4 eats our [], so we need to use [ and ] instead.
19849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19850   if test "x$has_forbidden_chars" != x; then
19851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19852     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19853     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19854     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19855       # Going to short mode and back again did indeed matter. Since short mode is
19856       # case insensitive, let's make it lowercase to improve readability.
19857       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19858       # Now convert it back to Unix-stile (cygpath)
19859       input_path=`$CYGPATH -u "$shortmode_path"`
19860       new_path="$input_path"
19861     fi
19862   fi
19863 
19864   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19865   if test "x$test_cygdrive_prefix" = x; then
19866     # As a simple fix, exclude /usr/bin since it's not a real path.
19867     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19868       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19869       # a path prefixed by /cygdrive for fixpath to work.
19870       new_path="$CYGWIN_ROOT_PATH$input_path"
19871     fi
19872   fi
19873 
19874   # remove trailing .exe if any
19875   new_path="${new_path/%.exe/}"
19876 
19877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19878 
19879   # First separate the path from the arguments. This will split at the first
19880   # space.
19881   complete="$PROPER_COMPILER_CC"
19882   path="${complete%% *}"
19883   tmp="$complete EOL"
19884   arguments="${tmp#* }"
19885 
19886   # Input might be given as Windows format, start by converting to
19887   # unix format.
19888   new_path="$path"
19889 
19890   windows_path="$new_path"
19891   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19892     unix_path=`$CYGPATH -u "$windows_path"`
19893     new_path="$unix_path"
19894   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19895     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19896     new_path="$unix_path"
19897   fi
19898 
19899 
19900   # Now try to locate executable using which
19901   new_path=`$WHICH "$new_path" 2> /dev/null`
19902 
19903   if test "x$new_path" = x; then
19904     # Oops. Which didn't find the executable.
19905     # The splitting of arguments from the executable at a space might have been incorrect,
19906     # since paths with space are more likely in Windows. Give it another try with the whole
19907     # argument.
19908     path="$complete"
19909     arguments="EOL"
19910     new_path="$path"
19911 
19912   windows_path="$new_path"
19913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19914     unix_path=`$CYGPATH -u "$windows_path"`
19915     new_path="$unix_path"
19916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19918     new_path="$unix_path"
19919   fi
19920 
19921 
19922     new_path=`$WHICH "$new_path" 2> /dev/null`
19923 
19924     if test "x$new_path" = x; then
19925       # It's still not found. Now this is an unrecoverable error.
19926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19927 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19928       has_space=`$ECHO "$complete" | $GREP " "`
19929       if test "x$has_space" != x; then
19930         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19931 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19932       fi
19933       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19934     fi
19935   fi
19936 
19937   # Now new_path has a complete unix path to the binary
19938   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19939     # Keep paths in /bin as-is, but remove trailing .exe if any
19940     new_path="${new_path/%.exe/}"
19941     # Do not save /bin paths to all_fixpath_prefixes!
19942   else
19943     # Not in mixed or Windows style, start by that.
19944     new_path=`cmd //c echo $new_path`
19945 
19946   input_path="$new_path"
19947   # Check if we need to convert this using DOS-style short mode. If the path
19948   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19949   # take no chances and rewrite it.
19950   # Note: m4 eats our [], so we need to use [ and ] instead.
19951   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19952   if test "x$has_forbidden_chars" != x; then
19953     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19954     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19955   fi
19956 
19957     # Output is in $new_path
19958 
19959   windows_path="$new_path"
19960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19961     unix_path=`$CYGPATH -u "$windows_path"`
19962     new_path="$unix_path"
19963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19964     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19965     new_path="$unix_path"
19966   fi
19967 
19968     # remove trailing .exe if any
19969     new_path="${new_path/%.exe/}"
19970 
19971     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19972     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19973   fi
19974 
19975   else
19976     # We're on a posix platform. Hooray! :)
19977     # First separate the path from the arguments. This will split at the first
19978     # space.
19979     complete="$PROPER_COMPILER_CC"
19980     path="${complete%% *}"
19981     tmp="$complete EOL"
19982     arguments="${tmp#* }"
19983 
19984     # Cannot rely on the command "which" here since it doesn't always work.
19985     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19986     if test -z "$is_absolute_path"; then
19987       # Path to executable is not absolute. Find it.
19988       IFS_save="$IFS"
19989       IFS=:
19990       for p in $PATH; do
19991         if test -f "$p/$path" && test -x "$p/$path"; then
19992           new_path="$p/$path"
19993           break
19994         fi
19995       done
19996       IFS="$IFS_save"
19997     else
19998       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19999 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20000       new_path="$path"
20001     fi
20002 
20003     if test "x$new_path" = x; then
20004       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20005 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20006       has_space=`$ECHO "$complete" | $GREP " "`
20007       if test "x$has_space" != x; then
20008         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20009 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20010       fi
20011       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20012     fi
20013   fi
20014 
20015   # Now join together the path and the arguments once again
20016   if test "x$arguments" != xEOL; then
20017     new_complete="$new_path ${arguments% *}"
20018   else
20019     new_complete="$new_path"
20020   fi
20021 
20022   if test "x$complete" != "x$new_complete"; then
20023     PROPER_COMPILER_CC="$new_complete"
20024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20025 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20026   fi
20027 
20028     PATH="$RETRY_COMPILER_SAVED_PATH"
20029 
20030     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20031 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20032 
20033   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20034     # Follow a chain of symbolic links. Use readlink
20035     # where it exists, else fall back to horribly
20036     # complicated shell code.
20037     if test "x$READLINK_TESTED" != yes; then
20038       # On MacOSX there is a readlink tool with a different
20039       # purpose than the GNU readlink tool. Check the found readlink.
20040       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20041       if test "x$ISGNU" = x; then
20042         # A readlink that we do not know how to use.
20043         # Are there other non-GNU readlinks out there?
20044         READLINK_TESTED=yes
20045         READLINK=
20046       fi
20047     fi
20048 
20049     if test "x$READLINK" != x; then
20050       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20051     else
20052       # Save the current directory for restoring afterwards
20053       STARTDIR=$PWD
20054       COUNTER=0
20055       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20056       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20057       cd $sym_link_dir
20058       # Use -P flag to resolve symlinks in directories.
20059       cd `$THEPWDCMD -P`
20060       sym_link_dir=`$THEPWDCMD -P`
20061       # Resolve file symlinks
20062       while test $COUNTER -lt 20; do
20063         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20064         if test "x$ISLINK" == x; then
20065           # This is not a symbolic link! We are done!
20066           break
20067         fi
20068         # Again resolve directory symlinks since the target of the just found
20069         # link could be in a different directory
20070         cd `$DIRNAME $ISLINK`
20071         sym_link_dir=`$THEPWDCMD -P`
20072         sym_link_file=`$BASENAME $ISLINK`
20073         let COUNTER=COUNTER+1
20074       done
20075       cd $STARTDIR
20076       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20077     fi
20078   fi
20079 
20080     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20081 $as_echo "$PROPER_COMPILER_CC" >&6; }
20082     CC="$PROPER_COMPILER_CC"
20083   else
20084     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20085 $as_echo "no, keeping CC" >&6; }
20086     CC="$TEST_COMPILER"
20087   fi
20088 
20089   COMPILER=$CC
20090   COMPILER_NAME=$COMPILER_NAME
20091 
20092   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20093     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20094     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20095     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20096     if test $? -ne 0; then
20097       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20098 
20099       { $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
20100 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20101       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20102 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20103       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20104     else
20105       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20106       COMPILER_VENDOR="Sun Studio"
20107     fi
20108   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20109       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20110       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20111       if test $? -ne 0; then
20112         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20113       else
20114         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20115         COMPILER_VENDOR='IBM'
20116       fi
20117   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20118     # First line typically looks something like:
20119     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20120     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20121     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20122     COMPILER_VENDOR="Microsoft CL.EXE"
20123     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20124     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20125       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20126         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20127       fi
20128     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20129       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20130         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20131       fi
20132     fi
20133   else
20134     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20135     # Check that this is likely to be GCC.
20136     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20137     if test $? -ne 0; then
20138       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20139 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20140       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20141 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20142       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20143     fi
20144 
20145     # First line typically looks something like:
20146     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20147     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20148     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20149   fi
20150   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20151   CC_VERSION="$COMPILER_VERSION"
20152   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20153   CC_VENDOR="$COMPILER_VENDOR"
20154 
20155   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20156 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20157 
20158 
20159   # Now that we have resolved CC ourself, let autoconf have its go at it
20160   ac_ext=c
20161 ac_cpp='$CPP $CPPFLAGS'
20162 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20163 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20164 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20165 if test -n "$ac_tool_prefix"; then
20166   for ac_prog in $CC
20167   do
20168     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20169 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20171 $as_echo_n "checking for $ac_word... " >&6; }
20172 if ${ac_cv_prog_CC+:} false; then :
20173   $as_echo_n "(cached) " >&6
20174 else
20175   if test -n "$CC"; then
20176   ac_cv_prog_CC="$CC" # Let the user override the test.
20177 else
20178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20179 for as_dir in $PATH
20180 do
20181   IFS=$as_save_IFS
20182   test -z "$as_dir" && as_dir=.
20183     for ac_exec_ext in '' $ac_executable_extensions; do
20184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20185     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20187     break 2
20188   fi
20189 done
20190   done
20191 IFS=$as_save_IFS
20192 
20193 fi
20194 fi
20195 CC=$ac_cv_prog_CC
20196 if test -n "$CC"; then
20197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20198 $as_echo "$CC" >&6; }
20199 else
20200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20201 $as_echo "no" >&6; }
20202 fi
20203 
20204 
20205     test -n "$CC" && break
20206   done
20207 fi
20208 if test -z "$CC"; then
20209   ac_ct_CC=$CC
20210   for ac_prog in $CC
20211 do
20212   # Extract the first word of "$ac_prog", so it can be a program name with args.
20213 set dummy $ac_prog; ac_word=$2
20214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20215 $as_echo_n "checking for $ac_word... " >&6; }
20216 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20217   $as_echo_n "(cached) " >&6
20218 else
20219   if test -n "$ac_ct_CC"; then
20220   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20221 else
20222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20223 for as_dir in $PATH
20224 do
20225   IFS=$as_save_IFS
20226   test -z "$as_dir" && as_dir=.
20227     for ac_exec_ext in '' $ac_executable_extensions; do
20228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20229     ac_cv_prog_ac_ct_CC="$ac_prog"
20230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20231     break 2
20232   fi
20233 done
20234   done
20235 IFS=$as_save_IFS
20236 
20237 fi
20238 fi
20239 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20240 if test -n "$ac_ct_CC"; then
20241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20242 $as_echo "$ac_ct_CC" >&6; }
20243 else
20244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20245 $as_echo "no" >&6; }
20246 fi
20247 
20248 
20249   test -n "$ac_ct_CC" && break
20250 done
20251 
20252   if test "x$ac_ct_CC" = x; then
20253     CC=""
20254   else
20255     case $cross_compiling:$ac_tool_warned in
20256 yes:)
20257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20258 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20259 ac_tool_warned=yes ;;
20260 esac
20261     CC=$ac_ct_CC
20262   fi
20263 fi
20264 
20265 
20266 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20267 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20268 as_fn_error $? "no acceptable C compiler found in \$PATH
20269 See \`config.log' for more details" "$LINENO" 5; }
20270 
20271 # Provide some information about the compiler.
20272 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20273 set X $ac_compile
20274 ac_compiler=$2
20275 for ac_option in --version -v -V -qversion; do
20276   { { ac_try="$ac_compiler $ac_option >&5"
20277 case "(($ac_try" in
20278   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20279   *) ac_try_echo=$ac_try;;
20280 esac
20281 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20282 $as_echo "$ac_try_echo"; } >&5
20283   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20284   ac_status=$?
20285   if test -s conftest.err; then
20286     sed '10a\
20287 ... rest of stderr output deleted ...
20288          10q' conftest.err >conftest.er1
20289     cat conftest.er1 >&5
20290   fi
20291   rm -f conftest.er1 conftest.err
20292   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20293   test $ac_status = 0; }
20294 done
20295 
20296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20297 /* end confdefs.h.  */
20298 
20299 int
20300 main ()
20301 {
20302 
20303   ;
20304   return 0;
20305 }
20306 _ACEOF
20307 ac_clean_files_save=$ac_clean_files
20308 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20309 # Try to create an executable without -o first, disregard a.out.
20310 # It will help us diagnose broken compilers, and finding out an intuition
20311 # of exeext.
20312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20313 $as_echo_n "checking whether the C compiler works... " >&6; }
20314 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20315 
20316 # The possible output files:
20317 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20318 
20319 ac_rmfiles=
20320 for ac_file in $ac_files
20321 do
20322   case $ac_file in
20323     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20324     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20325   esac
20326 done
20327 rm -f $ac_rmfiles
20328 
20329 if { { ac_try="$ac_link_default"
20330 case "(($ac_try" in
20331   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332   *) ac_try_echo=$ac_try;;
20333 esac
20334 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20335 $as_echo "$ac_try_echo"; } >&5
20336   (eval "$ac_link_default") 2>&5
20337   ac_status=$?
20338   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20339   test $ac_status = 0; }; then :
20340   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20341 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20342 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20343 # so that the user can short-circuit this test for compilers unknown to
20344 # Autoconf.
20345 for ac_file in $ac_files ''
20346 do
20347   test -f "$ac_file" || continue
20348   case $ac_file in
20349     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20350         ;;
20351     [ab].out )
20352         # We found the default executable, but exeext='' is most
20353         # certainly right.
20354         break;;
20355     *.* )
20356         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20357         then :; else
20358            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20359         fi
20360         # We set ac_cv_exeext here because the later test for it is not
20361         # safe: cross compilers may not add the suffix if given an `-o'
20362         # argument, so we may need to know it at that point already.
20363         # Even if this section looks crufty: it has the advantage of
20364         # actually working.
20365         break;;
20366     * )
20367         break;;
20368   esac
20369 done
20370 test "$ac_cv_exeext" = no && ac_cv_exeext=
20371 
20372 else
20373   ac_file=''
20374 fi
20375 if test -z "$ac_file"; then :
20376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20377 $as_echo "no" >&6; }
20378 $as_echo "$as_me: failed program was:" >&5
20379 sed 's/^/| /' conftest.$ac_ext >&5
20380 
20381 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20382 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20383 as_fn_error 77 "C compiler cannot create executables
20384 See \`config.log' for more details" "$LINENO" 5; }
20385 else
20386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20387 $as_echo "yes" >&6; }
20388 fi
20389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20390 $as_echo_n "checking for C compiler default output file name... " >&6; }
20391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20392 $as_echo "$ac_file" >&6; }
20393 ac_exeext=$ac_cv_exeext
20394 
20395 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20396 ac_clean_files=$ac_clean_files_save
20397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20398 $as_echo_n "checking for suffix of executables... " >&6; }
20399 if { { ac_try="$ac_link"
20400 case "(($ac_try" in
20401   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20402   *) ac_try_echo=$ac_try;;
20403 esac
20404 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20405 $as_echo "$ac_try_echo"; } >&5
20406   (eval "$ac_link") 2>&5
20407   ac_status=$?
20408   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20409   test $ac_status = 0; }; then :
20410   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20411 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20412 # work properly (i.e., refer to `conftest.exe'), while it won't with
20413 # `rm'.
20414 for ac_file in conftest.exe conftest conftest.*; do
20415   test -f "$ac_file" || continue
20416   case $ac_file in
20417     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20418     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20419           break;;
20420     * ) break;;
20421   esac
20422 done
20423 else
20424   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20425 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20426 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20427 See \`config.log' for more details" "$LINENO" 5; }
20428 fi
20429 rm -f conftest conftest$ac_cv_exeext
20430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20431 $as_echo "$ac_cv_exeext" >&6; }
20432 
20433 rm -f conftest.$ac_ext
20434 EXEEXT=$ac_cv_exeext
20435 ac_exeext=$EXEEXT
20436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20437 /* end confdefs.h.  */
20438 #include <stdio.h>
20439 int
20440 main ()
20441 {
20442 FILE *f = fopen ("conftest.out", "w");
20443  return ferror (f) || fclose (f) != 0;
20444 
20445   ;
20446   return 0;
20447 }
20448 _ACEOF
20449 ac_clean_files="$ac_clean_files conftest.out"
20450 # Check that the compiler produces executables we can run.  If not, either
20451 # the compiler is broken, or we cross compile.
20452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20453 $as_echo_n "checking whether we are cross compiling... " >&6; }
20454 if test "$cross_compiling" != yes; then
20455   { { ac_try="$ac_link"
20456 case "(($ac_try" in
20457   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20458   *) ac_try_echo=$ac_try;;
20459 esac
20460 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20461 $as_echo "$ac_try_echo"; } >&5
20462   (eval "$ac_link") 2>&5
20463   ac_status=$?
20464   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20465   test $ac_status = 0; }
20466   if { ac_try='./conftest$ac_cv_exeext'
20467   { { case "(($ac_try" in
20468   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20469   *) ac_try_echo=$ac_try;;
20470 esac
20471 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20472 $as_echo "$ac_try_echo"; } >&5
20473   (eval "$ac_try") 2>&5
20474   ac_status=$?
20475   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20476   test $ac_status = 0; }; }; then
20477     cross_compiling=no
20478   else
20479     if test "$cross_compiling" = maybe; then
20480         cross_compiling=yes
20481     else
20482         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20483 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20484 as_fn_error $? "cannot run C compiled programs.
20485 If you meant to cross compile, use \`--host'.
20486 See \`config.log' for more details" "$LINENO" 5; }
20487     fi
20488   fi
20489 fi
20490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20491 $as_echo "$cross_compiling" >&6; }
20492 
20493 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20494 ac_clean_files=$ac_clean_files_save
20495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20496 $as_echo_n "checking for suffix of object files... " >&6; }
20497 if ${ac_cv_objext+:} false; then :
20498   $as_echo_n "(cached) " >&6
20499 else
20500   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20501 /* end confdefs.h.  */
20502 
20503 int
20504 main ()
20505 {
20506 
20507   ;
20508   return 0;
20509 }
20510 _ACEOF
20511 rm -f conftest.o conftest.obj
20512 if { { ac_try="$ac_compile"
20513 case "(($ac_try" in
20514   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20515   *) ac_try_echo=$ac_try;;
20516 esac
20517 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20518 $as_echo "$ac_try_echo"; } >&5
20519   (eval "$ac_compile") 2>&5
20520   ac_status=$?
20521   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20522   test $ac_status = 0; }; then :
20523   for ac_file in conftest.o conftest.obj conftest.*; do
20524   test -f "$ac_file" || continue;
20525   case $ac_file in
20526     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20527     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20528        break;;
20529   esac
20530 done
20531 else
20532   $as_echo "$as_me: failed program was:" >&5
20533 sed 's/^/| /' conftest.$ac_ext >&5
20534 
20535 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20536 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20537 as_fn_error $? "cannot compute suffix of object files: cannot compile
20538 See \`config.log' for more details" "$LINENO" 5; }
20539 fi
20540 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20541 fi
20542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20543 $as_echo "$ac_cv_objext" >&6; }
20544 OBJEXT=$ac_cv_objext
20545 ac_objext=$OBJEXT
20546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20547 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20548 if ${ac_cv_c_compiler_gnu+:} false; then :
20549   $as_echo_n "(cached) " >&6
20550 else
20551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20552 /* end confdefs.h.  */
20553 
20554 int
20555 main ()
20556 {
20557 #ifndef __GNUC__
20558        choke me
20559 #endif
20560 
20561   ;
20562   return 0;
20563 }
20564 _ACEOF
20565 if ac_fn_c_try_compile "$LINENO"; then :
20566   ac_compiler_gnu=yes
20567 else
20568   ac_compiler_gnu=no
20569 fi
20570 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20571 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20572 
20573 fi
20574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20575 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20576 if test $ac_compiler_gnu = yes; then
20577   GCC=yes
20578 else
20579   GCC=
20580 fi
20581 ac_test_CFLAGS=${CFLAGS+set}
20582 ac_save_CFLAGS=$CFLAGS
20583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20584 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20585 if ${ac_cv_prog_cc_g+:} false; then :
20586   $as_echo_n "(cached) " >&6
20587 else
20588   ac_save_c_werror_flag=$ac_c_werror_flag
20589    ac_c_werror_flag=yes
20590    ac_cv_prog_cc_g=no
20591    CFLAGS="-g"
20592    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20593 /* end confdefs.h.  */
20594 
20595 int
20596 main ()
20597 {
20598 
20599   ;
20600   return 0;
20601 }
20602 _ACEOF
20603 if ac_fn_c_try_compile "$LINENO"; then :
20604   ac_cv_prog_cc_g=yes
20605 else
20606   CFLAGS=""
20607       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20608 /* end confdefs.h.  */
20609 
20610 int
20611 main ()
20612 {
20613 
20614   ;
20615   return 0;
20616 }
20617 _ACEOF
20618 if ac_fn_c_try_compile "$LINENO"; then :
20619 
20620 else
20621   ac_c_werror_flag=$ac_save_c_werror_flag
20622          CFLAGS="-g"
20623          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20624 /* end confdefs.h.  */
20625 
20626 int
20627 main ()
20628 {
20629 
20630   ;
20631   return 0;
20632 }
20633 _ACEOF
20634 if ac_fn_c_try_compile "$LINENO"; then :
20635   ac_cv_prog_cc_g=yes
20636 fi
20637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20638 fi
20639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20640 fi
20641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20642    ac_c_werror_flag=$ac_save_c_werror_flag
20643 fi
20644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20645 $as_echo "$ac_cv_prog_cc_g" >&6; }
20646 if test "$ac_test_CFLAGS" = set; then
20647   CFLAGS=$ac_save_CFLAGS
20648 elif test $ac_cv_prog_cc_g = yes; then
20649   if test "$GCC" = yes; then
20650     CFLAGS="-g -O2"
20651   else
20652     CFLAGS="-g"
20653   fi
20654 else
20655   if test "$GCC" = yes; then
20656     CFLAGS="-O2"
20657   else
20658     CFLAGS=
20659   fi
20660 fi
20661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20662 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20663 if ${ac_cv_prog_cc_c89+:} false; then :
20664   $as_echo_n "(cached) " >&6
20665 else
20666   ac_cv_prog_cc_c89=no
20667 ac_save_CC=$CC
20668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20669 /* end confdefs.h.  */
20670 #include <stdarg.h>
20671 #include <stdio.h>
20672 struct stat;
20673 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20674 struct buf { int x; };
20675 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20676 static char *e (p, i)
20677      char **p;
20678      int i;
20679 {
20680   return p[i];
20681 }
20682 static char *f (char * (*g) (char **, int), char **p, ...)
20683 {
20684   char *s;
20685   va_list v;
20686   va_start (v,p);
20687   s = g (p, va_arg (v,int));
20688   va_end (v);
20689   return s;
20690 }
20691 
20692 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20693    function prototypes and stuff, but not '\xHH' hex character constants.
20694    These don't provoke an error unfortunately, instead are silently treated
20695    as 'x'.  The following induces an error, until -std is added to get
20696    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20697    array size at least.  It's necessary to write '\x00'==0 to get something
20698    that's true only with -std.  */
20699 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20700 
20701 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20702    inside strings and character constants.  */
20703 #define FOO(x) 'x'
20704 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20705 
20706 int test (int i, double x);
20707 struct s1 {int (*f) (int a);};
20708 struct s2 {int (*f) (double a);};
20709 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20710 int argc;
20711 char **argv;
20712 int
20713 main ()
20714 {
20715 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20716   ;
20717   return 0;
20718 }
20719 _ACEOF
20720 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20721         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20722 do
20723   CC="$ac_save_CC $ac_arg"
20724   if ac_fn_c_try_compile "$LINENO"; then :
20725   ac_cv_prog_cc_c89=$ac_arg
20726 fi
20727 rm -f core conftest.err conftest.$ac_objext
20728   test "x$ac_cv_prog_cc_c89" != "xno" && break
20729 done
20730 rm -f conftest.$ac_ext
20731 CC=$ac_save_CC
20732 
20733 fi
20734 # AC_CACHE_VAL
20735 case "x$ac_cv_prog_cc_c89" in
20736   x)
20737     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20738 $as_echo "none needed" >&6; } ;;
20739   xno)
20740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20741 $as_echo "unsupported" >&6; } ;;
20742   *)
20743     CC="$CC $ac_cv_prog_cc_c89"
20744     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20745 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20746 esac
20747 if test "x$ac_cv_prog_cc_c89" != xno; then :
20748 
20749 fi
20750 
20751 ac_ext=cpp
20752 ac_cpp='$CXXCPP $CPPFLAGS'
20753 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20754 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20755 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20756 
20757 
20758   # Option used to tell the compiler whether to create 32- or 64-bit executables
20759   # Notice that CC contains the full compiler path at this point.
20760   case $CC in
20761     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20762     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20763   esac
20764 
20765 
20766   ### Locate C++ compiler (CXX)
20767 
20768   if test "x$CXX" != x; then
20769     COMPILER_CHECK_LIST="$CXX"
20770   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20771     COMPILER_CHECK_LIST="cl"
20772   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20773     COMPILER_CHECK_LIST="CC g++"
20774   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20775     # Do not probe for CC on AIX .
20776     COMPILER_CHECK_LIST="xlC_r"
20777   else
20778     COMPILER_CHECK_LIST="g++ CC"
20779   fi
20780 
20781 
20782   COMPILER_NAME=C++
20783 
20784   CXX=
20785   # If TOOLS_DIR is set, check for all compiler names in there first
20786   # before checking the rest of the PATH.
20787   if test -n "$TOOLS_DIR"; then
20788     PATH_save="$PATH"
20789     PATH="$TOOLS_DIR"
20790     for ac_prog in $COMPILER_CHECK_LIST
20791 do
20792   # Extract the first word of "$ac_prog", so it can be a program name with args.
20793 set dummy $ac_prog; ac_word=$2
20794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20795 $as_echo_n "checking for $ac_word... " >&6; }
20796 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20797   $as_echo_n "(cached) " >&6
20798 else
20799   case $TOOLS_DIR_CXX in
20800   [\\/]* | ?:[\\/]*)
20801   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20802   ;;
20803   *)
20804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20805 for as_dir in $PATH
20806 do
20807   IFS=$as_save_IFS
20808   test -z "$as_dir" && as_dir=.
20809     for ac_exec_ext in '' $ac_executable_extensions; do
20810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20811     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20813     break 2
20814   fi
20815 done
20816   done
20817 IFS=$as_save_IFS
20818 
20819   ;;
20820 esac
20821 fi
20822 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20823 if test -n "$TOOLS_DIR_CXX"; then
20824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20825 $as_echo "$TOOLS_DIR_CXX" >&6; }
20826 else
20827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20828 $as_echo "no" >&6; }
20829 fi
20830 
20831 
20832   test -n "$TOOLS_DIR_CXX" && break
20833 done
20834 
20835     CXX=$TOOLS_DIR_CXX
20836     PATH="$PATH_save"
20837   fi
20838 
20839   # AC_PATH_PROGS can't be run multiple times with the same variable,
20840   # so create a new name for this run.
20841   if test "x$CXX" = x; then
20842     for ac_prog in $COMPILER_CHECK_LIST
20843 do
20844   # Extract the first word of "$ac_prog", so it can be a program name with args.
20845 set dummy $ac_prog; ac_word=$2
20846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20847 $as_echo_n "checking for $ac_word... " >&6; }
20848 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20849   $as_echo_n "(cached) " >&6
20850 else
20851   case $POTENTIAL_CXX in
20852   [\\/]* | ?:[\\/]*)
20853   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20854   ;;
20855   *)
20856   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20857 for as_dir in $PATH
20858 do
20859   IFS=$as_save_IFS
20860   test -z "$as_dir" && as_dir=.
20861     for ac_exec_ext in '' $ac_executable_extensions; do
20862   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20863     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20864     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20865     break 2
20866   fi
20867 done
20868   done
20869 IFS=$as_save_IFS
20870 
20871   ;;
20872 esac
20873 fi
20874 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20875 if test -n "$POTENTIAL_CXX"; then
20876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20877 $as_echo "$POTENTIAL_CXX" >&6; }
20878 else
20879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20880 $as_echo "no" >&6; }
20881 fi
20882 
20883 
20884   test -n "$POTENTIAL_CXX" && break
20885 done
20886 
20887     CXX=$POTENTIAL_CXX
20888   fi
20889 
20890   if test "x$CXX" = x; then
20891 
20892   # Print a helpful message on how to acquire the necessary build dependency.
20893   # devkit is the help tag: freetype, cups, pulse, alsa etc
20894   MISSING_DEPENDENCY=devkit
20895 
20896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20897     cygwin_help $MISSING_DEPENDENCY
20898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20899     msys_help $MISSING_DEPENDENCY
20900   else
20901     PKGHANDLER_COMMAND=
20902 
20903     case $PKGHANDLER in
20904       apt-get)
20905         apt_help     $MISSING_DEPENDENCY ;;
20906       yum)
20907         yum_help     $MISSING_DEPENDENCY ;;
20908       port)
20909         port_help    $MISSING_DEPENDENCY ;;
20910       pkgutil)
20911         pkgutil_help $MISSING_DEPENDENCY ;;
20912       pkgadd)
20913         pkgadd_help  $MISSING_DEPENDENCY ;;
20914     esac
20915 
20916     if test "x$PKGHANDLER_COMMAND" != x; then
20917       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20918     fi
20919   fi
20920 
20921     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20922   fi
20923 
20924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20925 
20926   # First separate the path from the arguments. This will split at the first
20927   # space.
20928   complete="$CXX"
20929   path="${complete%% *}"
20930   tmp="$complete EOL"
20931   arguments="${tmp#* }"
20932 
20933   # Input might be given as Windows format, start by converting to
20934   # unix format.
20935   new_path=`$CYGPATH -u "$path"`
20936 
20937   # Now try to locate executable using which
20938   new_path=`$WHICH "$new_path" 2> /dev/null`
20939   # bat and cmd files are not always considered executable in cygwin causing which
20940   # to not find them
20941   if test "x$new_path" = x \
20942       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20943       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20944     new_path=`$CYGPATH -u "$path"`
20945   fi
20946   if test "x$new_path" = x; then
20947     # Oops. Which didn't find the executable.
20948     # The splitting of arguments from the executable at a space might have been incorrect,
20949     # since paths with space are more likely in Windows. Give it another try with the whole
20950     # argument.
20951     path="$complete"
20952     arguments="EOL"
20953     new_path=`$CYGPATH -u "$path"`
20954     new_path=`$WHICH "$new_path" 2> /dev/null`
20955     # bat and cmd files are not always considered executable in cygwin causing which
20956     # to not find them
20957     if test "x$new_path" = x \
20958         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20959         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20960       new_path=`$CYGPATH -u "$path"`
20961     fi
20962     if test "x$new_path" = x; then
20963       # It's still not found. Now this is an unrecoverable error.
20964       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20965 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20966       has_space=`$ECHO "$complete" | $GREP " "`
20967       if test "x$has_space" != x; then
20968         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20969 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20970       fi
20971       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20972     fi
20973   fi
20974 
20975   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20976   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20977   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20978   # "foo.exe" is OK but "foo" is an error.
20979   #
20980   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20981   # It is also a way to make sure we got the proper file name for the real test later on.
20982   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20983   if test "x$test_shortpath" = x; then
20984     # Short path failed, file does not exist as specified.
20985     # Try adding .exe or .cmd
20986     if test -f "${new_path}.exe"; then
20987       input_to_shortpath="${new_path}.exe"
20988     elif test -f "${new_path}.cmd"; then
20989       input_to_shortpath="${new_path}.cmd"
20990     else
20991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20992 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20993       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20994 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20995       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20996     fi
20997   else
20998     input_to_shortpath="$new_path"
20999   fi
21000 
21001   # Call helper function which possibly converts this using DOS-style short mode.
21002   # If so, the updated path is stored in $new_path.
21003   new_path="$input_to_shortpath"
21004 
21005   input_path="$input_to_shortpath"
21006   # Check if we need to convert this using DOS-style short mode. If the path
21007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21008   # take no chances and rewrite it.
21009   # Note: m4 eats our [], so we need to use [ and ] instead.
21010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21011   if test "x$has_forbidden_chars" != x; then
21012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21013     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21014     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21015     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21016       # Going to short mode and back again did indeed matter. Since short mode is
21017       # case insensitive, let's make it lowercase to improve readability.
21018       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21019       # Now convert it back to Unix-stile (cygpath)
21020       input_path=`$CYGPATH -u "$shortmode_path"`
21021       new_path="$input_path"
21022     fi
21023   fi
21024 
21025   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21026   if test "x$test_cygdrive_prefix" = x; then
21027     # As a simple fix, exclude /usr/bin since it's not a real path.
21028     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21029       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21030       # a path prefixed by /cygdrive for fixpath to work.
21031       new_path="$CYGWIN_ROOT_PATH$input_path"
21032     fi
21033   fi
21034 
21035   # remove trailing .exe if any
21036   new_path="${new_path/%.exe/}"
21037 
21038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21039 
21040   # First separate the path from the arguments. This will split at the first
21041   # space.
21042   complete="$CXX"
21043   path="${complete%% *}"
21044   tmp="$complete EOL"
21045   arguments="${tmp#* }"
21046 
21047   # Input might be given as Windows format, start by converting to
21048   # unix format.
21049   new_path="$path"
21050 
21051   windows_path="$new_path"
21052   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21053     unix_path=`$CYGPATH -u "$windows_path"`
21054     new_path="$unix_path"
21055   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21056     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21057     new_path="$unix_path"
21058   fi
21059 
21060 
21061   # Now try to locate executable using which
21062   new_path=`$WHICH "$new_path" 2> /dev/null`
21063 
21064   if test "x$new_path" = x; then
21065     # Oops. Which didn't find the executable.
21066     # The splitting of arguments from the executable at a space might have been incorrect,
21067     # since paths with space are more likely in Windows. Give it another try with the whole
21068     # argument.
21069     path="$complete"
21070     arguments="EOL"
21071     new_path="$path"
21072 
21073   windows_path="$new_path"
21074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21075     unix_path=`$CYGPATH -u "$windows_path"`
21076     new_path="$unix_path"
21077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21079     new_path="$unix_path"
21080   fi
21081 
21082 
21083     new_path=`$WHICH "$new_path" 2> /dev/null`
21084 
21085     if test "x$new_path" = x; then
21086       # It's still not found. Now this is an unrecoverable error.
21087       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21088 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21089       has_space=`$ECHO "$complete" | $GREP " "`
21090       if test "x$has_space" != x; then
21091         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21092 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21093       fi
21094       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21095     fi
21096   fi
21097 
21098   # Now new_path has a complete unix path to the binary
21099   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21100     # Keep paths in /bin as-is, but remove trailing .exe if any
21101     new_path="${new_path/%.exe/}"
21102     # Do not save /bin paths to all_fixpath_prefixes!
21103   else
21104     # Not in mixed or Windows style, start by that.
21105     new_path=`cmd //c echo $new_path`
21106 
21107   input_path="$new_path"
21108   # Check if we need to convert this using DOS-style short mode. If the path
21109   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21110   # take no chances and rewrite it.
21111   # Note: m4 eats our [], so we need to use [ and ] instead.
21112   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21113   if test "x$has_forbidden_chars" != x; then
21114     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21115     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21116   fi
21117 
21118     # Output is in $new_path
21119 
21120   windows_path="$new_path"
21121   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21122     unix_path=`$CYGPATH -u "$windows_path"`
21123     new_path="$unix_path"
21124   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21125     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21126     new_path="$unix_path"
21127   fi
21128 
21129     # remove trailing .exe if any
21130     new_path="${new_path/%.exe/}"
21131 
21132     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21133     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21134   fi
21135 
21136   else
21137     # We're on a posix platform. Hooray! :)
21138     # First separate the path from the arguments. This will split at the first
21139     # space.
21140     complete="$CXX"
21141     path="${complete%% *}"
21142     tmp="$complete EOL"
21143     arguments="${tmp#* }"
21144 
21145     # Cannot rely on the command "which" here since it doesn't always work.
21146     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21147     if test -z "$is_absolute_path"; then
21148       # Path to executable is not absolute. Find it.
21149       IFS_save="$IFS"
21150       IFS=:
21151       for p in $PATH; do
21152         if test -f "$p/$path" && test -x "$p/$path"; then
21153           new_path="$p/$path"
21154           break
21155         fi
21156       done
21157       IFS="$IFS_save"
21158     else
21159       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21160 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21161       new_path="$path"
21162     fi
21163 
21164     if test "x$new_path" = x; then
21165       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21166 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21167       has_space=`$ECHO "$complete" | $GREP " "`
21168       if test "x$has_space" != x; then
21169         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21170 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21171       fi
21172       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21173     fi
21174   fi
21175 
21176   # Now join together the path and the arguments once again
21177   if test "x$arguments" != xEOL; then
21178     new_complete="$new_path ${arguments% *}"
21179   else
21180     new_complete="$new_path"
21181   fi
21182 
21183   if test "x$complete" != "x$new_complete"; then
21184     CXX="$new_complete"
21185     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21186 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21187   fi
21188 
21189   TEST_COMPILER="$CXX"
21190   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21191   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21192   if test "x$OPENJDK_BUILD_OS" != xaix; then
21193     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21194 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21195 
21196   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21197     # Follow a chain of symbolic links. Use readlink
21198     # where it exists, else fall back to horribly
21199     # complicated shell code.
21200     if test "x$READLINK_TESTED" != yes; then
21201       # On MacOSX there is a readlink tool with a different
21202       # purpose than the GNU readlink tool. Check the found readlink.
21203       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21204       if test "x$ISGNU" = x; then
21205         # A readlink that we do not know how to use.
21206         # Are there other non-GNU readlinks out there?
21207         READLINK_TESTED=yes
21208         READLINK=
21209       fi
21210     fi
21211 
21212     if test "x$READLINK" != x; then
21213       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21214     else
21215       # Save the current directory for restoring afterwards
21216       STARTDIR=$PWD
21217       COUNTER=0
21218       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21219       sym_link_file=`$BASENAME $TEST_COMPILER`
21220       cd $sym_link_dir
21221       # Use -P flag to resolve symlinks in directories.
21222       cd `$THEPWDCMD -P`
21223       sym_link_dir=`$THEPWDCMD -P`
21224       # Resolve file symlinks
21225       while test $COUNTER -lt 20; do
21226         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21227         if test "x$ISLINK" == x; then
21228           # This is not a symbolic link! We are done!
21229           break
21230         fi
21231         # Again resolve directory symlinks since the target of the just found
21232         # link could be in a different directory
21233         cd `$DIRNAME $ISLINK`
21234         sym_link_dir=`$THEPWDCMD -P`
21235         sym_link_file=`$BASENAME $ISLINK`
21236         let COUNTER=COUNTER+1
21237       done
21238       cd $STARTDIR
21239       TEST_COMPILER=$sym_link_dir/$sym_link_file
21240     fi
21241   fi
21242 
21243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21244 $as_echo "$TEST_COMPILER" >&6; }
21245   fi
21246   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21247 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21248 
21249   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21250   if test "x$COMPILER_BASENAME" = "xccache"; then
21251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21252 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21253     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21254     # We want to control ccache invocation ourselves, so ignore this cc and try
21255     # searching again.
21256 
21257     # Remove the path to the fake ccache cc from the PATH
21258     RETRY_COMPILER_SAVED_PATH="$PATH"
21259     COMPILER_DIRNAME=`$DIRNAME $CXX`
21260     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21261 
21262     # Try again looking for our compiler
21263     if test -n "$ac_tool_prefix"; then
21264   for ac_prog in $COMPILER_CHECK_LIST
21265   do
21266     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21267 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21269 $as_echo_n "checking for $ac_word... " >&6; }
21270 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21271   $as_echo_n "(cached) " >&6
21272 else
21273   if test -n "$PROPER_COMPILER_CXX"; then
21274   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21275 else
21276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21277 for as_dir in $PATH
21278 do
21279   IFS=$as_save_IFS
21280   test -z "$as_dir" && as_dir=.
21281     for ac_exec_ext in '' $ac_executable_extensions; do
21282   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21283     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21284     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21285     break 2
21286   fi
21287 done
21288   done
21289 IFS=$as_save_IFS
21290 
21291 fi
21292 fi
21293 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21294 if test -n "$PROPER_COMPILER_CXX"; then
21295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21296 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21297 else
21298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21299 $as_echo "no" >&6; }
21300 fi
21301 
21302 
21303     test -n "$PROPER_COMPILER_CXX" && break
21304   done
21305 fi
21306 if test -z "$PROPER_COMPILER_CXX"; then
21307   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21308   for ac_prog in $COMPILER_CHECK_LIST
21309 do
21310   # Extract the first word of "$ac_prog", so it can be a program name with args.
21311 set dummy $ac_prog; ac_word=$2
21312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21313 $as_echo_n "checking for $ac_word... " >&6; }
21314 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21315   $as_echo_n "(cached) " >&6
21316 else
21317   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21318   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21319 else
21320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21321 for as_dir in $PATH
21322 do
21323   IFS=$as_save_IFS
21324   test -z "$as_dir" && as_dir=.
21325     for ac_exec_ext in '' $ac_executable_extensions; do
21326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21327     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21329     break 2
21330   fi
21331 done
21332   done
21333 IFS=$as_save_IFS
21334 
21335 fi
21336 fi
21337 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21338 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21340 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21341 else
21342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343 $as_echo "no" >&6; }
21344 fi
21345 
21346 
21347   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21348 done
21349 
21350   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21351     PROPER_COMPILER_CXX=""
21352   else
21353     case $cross_compiling:$ac_tool_warned in
21354 yes:)
21355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21356 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21357 ac_tool_warned=yes ;;
21358 esac
21359     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21360   fi
21361 fi
21362 
21363 
21364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21365 
21366   # First separate the path from the arguments. This will split at the first
21367   # space.
21368   complete="$PROPER_COMPILER_CXX"
21369   path="${complete%% *}"
21370   tmp="$complete EOL"
21371   arguments="${tmp#* }"
21372 
21373   # Input might be given as Windows format, start by converting to
21374   # unix format.
21375   new_path=`$CYGPATH -u "$path"`
21376 
21377   # Now try to locate executable using which
21378   new_path=`$WHICH "$new_path" 2> /dev/null`
21379   # bat and cmd files are not always considered executable in cygwin causing which
21380   # to not find them
21381   if test "x$new_path" = x \
21382       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21383       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21384     new_path=`$CYGPATH -u "$path"`
21385   fi
21386   if test "x$new_path" = x; then
21387     # Oops. Which didn't find the executable.
21388     # The splitting of arguments from the executable at a space might have been incorrect,
21389     # since paths with space are more likely in Windows. Give it another try with the whole
21390     # argument.
21391     path="$complete"
21392     arguments="EOL"
21393     new_path=`$CYGPATH -u "$path"`
21394     new_path=`$WHICH "$new_path" 2> /dev/null`
21395     # bat and cmd files are not always considered executable in cygwin causing which
21396     # to not find them
21397     if test "x$new_path" = x \
21398         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21399         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21400       new_path=`$CYGPATH -u "$path"`
21401     fi
21402     if test "x$new_path" = x; then
21403       # It's still not found. Now this is an unrecoverable error.
21404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21405 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21406       has_space=`$ECHO "$complete" | $GREP " "`
21407       if test "x$has_space" != x; then
21408         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21409 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21410       fi
21411       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21412     fi
21413   fi
21414 
21415   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21416   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21417   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21418   # "foo.exe" is OK but "foo" is an error.
21419   #
21420   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21421   # It is also a way to make sure we got the proper file name for the real test later on.
21422   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21423   if test "x$test_shortpath" = x; then
21424     # Short path failed, file does not exist as specified.
21425     # Try adding .exe or .cmd
21426     if test -f "${new_path}.exe"; then
21427       input_to_shortpath="${new_path}.exe"
21428     elif test -f "${new_path}.cmd"; then
21429       input_to_shortpath="${new_path}.cmd"
21430     else
21431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21432 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21433       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21434 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21435       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21436     fi
21437   else
21438     input_to_shortpath="$new_path"
21439   fi
21440 
21441   # Call helper function which possibly converts this using DOS-style short mode.
21442   # If so, the updated path is stored in $new_path.
21443   new_path="$input_to_shortpath"
21444 
21445   input_path="$input_to_shortpath"
21446   # Check if we need to convert this using DOS-style short mode. If the path
21447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21448   # take no chances and rewrite it.
21449   # Note: m4 eats our [], so we need to use [ and ] instead.
21450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21451   if test "x$has_forbidden_chars" != x; then
21452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21456       # Going to short mode and back again did indeed matter. Since short mode is
21457       # case insensitive, let's make it lowercase to improve readability.
21458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21459       # Now convert it back to Unix-stile (cygpath)
21460       input_path=`$CYGPATH -u "$shortmode_path"`
21461       new_path="$input_path"
21462     fi
21463   fi
21464 
21465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21466   if test "x$test_cygdrive_prefix" = x; then
21467     # As a simple fix, exclude /usr/bin since it's not a real path.
21468     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21470       # a path prefixed by /cygdrive for fixpath to work.
21471       new_path="$CYGWIN_ROOT_PATH$input_path"
21472     fi
21473   fi
21474 
21475   # remove trailing .exe if any
21476   new_path="${new_path/%.exe/}"
21477 
21478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21479 
21480   # First separate the path from the arguments. This will split at the first
21481   # space.
21482   complete="$PROPER_COMPILER_CXX"
21483   path="${complete%% *}"
21484   tmp="$complete EOL"
21485   arguments="${tmp#* }"
21486 
21487   # Input might be given as Windows format, start by converting to
21488   # unix format.
21489   new_path="$path"
21490 
21491   windows_path="$new_path"
21492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21493     unix_path=`$CYGPATH -u "$windows_path"`
21494     new_path="$unix_path"
21495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21497     new_path="$unix_path"
21498   fi
21499 
21500 
21501   # Now try to locate executable using which
21502   new_path=`$WHICH "$new_path" 2> /dev/null`
21503 
21504   if test "x$new_path" = x; then
21505     # Oops. Which didn't find the executable.
21506     # The splitting of arguments from the executable at a space might have been incorrect,
21507     # since paths with space are more likely in Windows. Give it another try with the whole
21508     # argument.
21509     path="$complete"
21510     arguments="EOL"
21511     new_path="$path"
21512 
21513   windows_path="$new_path"
21514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21515     unix_path=`$CYGPATH -u "$windows_path"`
21516     new_path="$unix_path"
21517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21519     new_path="$unix_path"
21520   fi
21521 
21522 
21523     new_path=`$WHICH "$new_path" 2> /dev/null`
21524 
21525     if test "x$new_path" = x; then
21526       # It's still not found. Now this is an unrecoverable error.
21527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21528 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21529       has_space=`$ECHO "$complete" | $GREP " "`
21530       if test "x$has_space" != x; then
21531         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21533       fi
21534       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21535     fi
21536   fi
21537 
21538   # Now new_path has a complete unix path to the binary
21539   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21540     # Keep paths in /bin as-is, but remove trailing .exe if any
21541     new_path="${new_path/%.exe/}"
21542     # Do not save /bin paths to all_fixpath_prefixes!
21543   else
21544     # Not in mixed or Windows style, start by that.
21545     new_path=`cmd //c echo $new_path`
21546 
21547   input_path="$new_path"
21548   # Check if we need to convert this using DOS-style short mode. If the path
21549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21550   # take no chances and rewrite it.
21551   # Note: m4 eats our [], so we need to use [ and ] instead.
21552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21553   if test "x$has_forbidden_chars" != x; then
21554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21555     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21556   fi
21557 
21558     # Output is in $new_path
21559 
21560   windows_path="$new_path"
21561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21562     unix_path=`$CYGPATH -u "$windows_path"`
21563     new_path="$unix_path"
21564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21566     new_path="$unix_path"
21567   fi
21568 
21569     # remove trailing .exe if any
21570     new_path="${new_path/%.exe/}"
21571 
21572     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21573     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21574   fi
21575 
21576   else
21577     # We're on a posix platform. Hooray! :)
21578     # First separate the path from the arguments. This will split at the first
21579     # space.
21580     complete="$PROPER_COMPILER_CXX"
21581     path="${complete%% *}"
21582     tmp="$complete EOL"
21583     arguments="${tmp#* }"
21584 
21585     # Cannot rely on the command "which" here since it doesn't always work.
21586     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21587     if test -z "$is_absolute_path"; then
21588       # Path to executable is not absolute. Find it.
21589       IFS_save="$IFS"
21590       IFS=:
21591       for p in $PATH; do
21592         if test -f "$p/$path" && test -x "$p/$path"; then
21593           new_path="$p/$path"
21594           break
21595         fi
21596       done
21597       IFS="$IFS_save"
21598     else
21599       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21600 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21601       new_path="$path"
21602     fi
21603 
21604     if test "x$new_path" = x; then
21605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21606 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21607       has_space=`$ECHO "$complete" | $GREP " "`
21608       if test "x$has_space" != x; then
21609         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21610 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21611       fi
21612       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21613     fi
21614   fi
21615 
21616   # Now join together the path and the arguments once again
21617   if test "x$arguments" != xEOL; then
21618     new_complete="$new_path ${arguments% *}"
21619   else
21620     new_complete="$new_path"
21621   fi
21622 
21623   if test "x$complete" != "x$new_complete"; then
21624     PROPER_COMPILER_CXX="$new_complete"
21625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21626 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21627   fi
21628 
21629     PATH="$RETRY_COMPILER_SAVED_PATH"
21630 
21631     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21632 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21633 
21634   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21635     # Follow a chain of symbolic links. Use readlink
21636     # where it exists, else fall back to horribly
21637     # complicated shell code.
21638     if test "x$READLINK_TESTED" != yes; then
21639       # On MacOSX there is a readlink tool with a different
21640       # purpose than the GNU readlink tool. Check the found readlink.
21641       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21642       if test "x$ISGNU" = x; then
21643         # A readlink that we do not know how to use.
21644         # Are there other non-GNU readlinks out there?
21645         READLINK_TESTED=yes
21646         READLINK=
21647       fi
21648     fi
21649 
21650     if test "x$READLINK" != x; then
21651       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21652     else
21653       # Save the current directory for restoring afterwards
21654       STARTDIR=$PWD
21655       COUNTER=0
21656       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21657       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21658       cd $sym_link_dir
21659       # Use -P flag to resolve symlinks in directories.
21660       cd `$THEPWDCMD -P`
21661       sym_link_dir=`$THEPWDCMD -P`
21662       # Resolve file symlinks
21663       while test $COUNTER -lt 20; do
21664         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21665         if test "x$ISLINK" == x; then
21666           # This is not a symbolic link! We are done!
21667           break
21668         fi
21669         # Again resolve directory symlinks since the target of the just found
21670         # link could be in a different directory
21671         cd `$DIRNAME $ISLINK`
21672         sym_link_dir=`$THEPWDCMD -P`
21673         sym_link_file=`$BASENAME $ISLINK`
21674         let COUNTER=COUNTER+1
21675       done
21676       cd $STARTDIR
21677       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21678     fi
21679   fi
21680 
21681     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21682 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21683     CXX="$PROPER_COMPILER_CXX"
21684   else
21685     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21686 $as_echo "no, keeping CXX" >&6; }
21687     CXX="$TEST_COMPILER"
21688   fi
21689 
21690   COMPILER=$CXX
21691   COMPILER_NAME=$COMPILER_NAME
21692 
21693   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21694     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21695     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21696     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21697     if test $? -ne 0; then
21698       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21699 
21700       { $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
21701 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21702       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21703 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21704       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21705     else
21706       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21707       COMPILER_VENDOR="Sun Studio"
21708     fi
21709   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21710       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21711       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21712       if test $? -ne 0; then
21713         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21714       else
21715         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21716         COMPILER_VENDOR='IBM'
21717       fi
21718   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21719     # First line typically looks something like:
21720     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21721     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21722     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21723     COMPILER_VENDOR="Microsoft CL.EXE"
21724     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21725     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21726       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21727         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21728       fi
21729     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21730       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21731         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21732       fi
21733     fi
21734   else
21735     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21736     # Check that this is likely to be GCC.
21737     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21738     if test $? -ne 0; then
21739       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21740 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21741       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21742 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21743       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21744     fi
21745 
21746     # First line typically looks something like:
21747     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21748     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21749     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21750   fi
21751   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21752   CXX_VERSION="$COMPILER_VERSION"
21753   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21754   CXX_VENDOR="$COMPILER_VENDOR"
21755 
21756   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21757 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21758 
21759 
21760   # Now that we have resolved CXX ourself, let autoconf have its go at it
21761   ac_ext=cpp
21762 ac_cpp='$CXXCPP $CPPFLAGS'
21763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21766 if test -z "$CXX"; then
21767   if test -n "$CCC"; then
21768     CXX=$CCC
21769   else
21770     if test -n "$ac_tool_prefix"; then
21771   for ac_prog in $CXX
21772   do
21773     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21774 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21776 $as_echo_n "checking for $ac_word... " >&6; }
21777 if ${ac_cv_prog_CXX+:} false; then :
21778   $as_echo_n "(cached) " >&6
21779 else
21780   if test -n "$CXX"; then
21781   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21782 else
21783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21784 for as_dir in $PATH
21785 do
21786   IFS=$as_save_IFS
21787   test -z "$as_dir" && as_dir=.
21788     for ac_exec_ext in '' $ac_executable_extensions; do
21789   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21790     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21791     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21792     break 2
21793   fi
21794 done
21795   done
21796 IFS=$as_save_IFS
21797 
21798 fi
21799 fi
21800 CXX=$ac_cv_prog_CXX
21801 if test -n "$CXX"; then
21802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21803 $as_echo "$CXX" >&6; }
21804 else
21805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21806 $as_echo "no" >&6; }
21807 fi
21808 
21809 
21810     test -n "$CXX" && break
21811   done
21812 fi
21813 if test -z "$CXX"; then
21814   ac_ct_CXX=$CXX
21815   for ac_prog in $CXX
21816 do
21817   # Extract the first word of "$ac_prog", so it can be a program name with args.
21818 set dummy $ac_prog; ac_word=$2
21819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820 $as_echo_n "checking for $ac_word... " >&6; }
21821 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21822   $as_echo_n "(cached) " >&6
21823 else
21824   if test -n "$ac_ct_CXX"; then
21825   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21826 else
21827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21828 for as_dir in $PATH
21829 do
21830   IFS=$as_save_IFS
21831   test -z "$as_dir" && as_dir=.
21832     for ac_exec_ext in '' $ac_executable_extensions; do
21833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21834     ac_cv_prog_ac_ct_CXX="$ac_prog"
21835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21836     break 2
21837   fi
21838 done
21839   done
21840 IFS=$as_save_IFS
21841 
21842 fi
21843 fi
21844 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21845 if test -n "$ac_ct_CXX"; then
21846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21847 $as_echo "$ac_ct_CXX" >&6; }
21848 else
21849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21850 $as_echo "no" >&6; }
21851 fi
21852 
21853 
21854   test -n "$ac_ct_CXX" && break
21855 done
21856 
21857   if test "x$ac_ct_CXX" = x; then
21858     CXX="g++"
21859   else
21860     case $cross_compiling:$ac_tool_warned in
21861 yes:)
21862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21863 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21864 ac_tool_warned=yes ;;
21865 esac
21866     CXX=$ac_ct_CXX
21867   fi
21868 fi
21869 
21870   fi
21871 fi
21872 # Provide some information about the compiler.
21873 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21874 set X $ac_compile
21875 ac_compiler=$2
21876 for ac_option in --version -v -V -qversion; do
21877   { { ac_try="$ac_compiler $ac_option >&5"
21878 case "(($ac_try" in
21879   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21880   *) ac_try_echo=$ac_try;;
21881 esac
21882 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21883 $as_echo "$ac_try_echo"; } >&5
21884   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21885   ac_status=$?
21886   if test -s conftest.err; then
21887     sed '10a\
21888 ... rest of stderr output deleted ...
21889          10q' conftest.err >conftest.er1
21890     cat conftest.er1 >&5
21891   fi
21892   rm -f conftest.er1 conftest.err
21893   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21894   test $ac_status = 0; }
21895 done
21896 
21897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21898 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21899 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21900   $as_echo_n "(cached) " >&6
21901 else
21902   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21903 /* end confdefs.h.  */
21904 
21905 int
21906 main ()
21907 {
21908 #ifndef __GNUC__
21909        choke me
21910 #endif
21911 
21912   ;
21913   return 0;
21914 }
21915 _ACEOF
21916 if ac_fn_cxx_try_compile "$LINENO"; then :
21917   ac_compiler_gnu=yes
21918 else
21919   ac_compiler_gnu=no
21920 fi
21921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21922 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21923 
21924 fi
21925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21926 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21927 if test $ac_compiler_gnu = yes; then
21928   GXX=yes
21929 else
21930   GXX=
21931 fi
21932 ac_test_CXXFLAGS=${CXXFLAGS+set}
21933 ac_save_CXXFLAGS=$CXXFLAGS
21934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21935 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21936 if ${ac_cv_prog_cxx_g+:} false; then :
21937   $as_echo_n "(cached) " >&6
21938 else
21939   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21940    ac_cxx_werror_flag=yes
21941    ac_cv_prog_cxx_g=no
21942    CXXFLAGS="-g"
21943    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21944 /* end confdefs.h.  */
21945 
21946 int
21947 main ()
21948 {
21949 
21950   ;
21951   return 0;
21952 }
21953 _ACEOF
21954 if ac_fn_cxx_try_compile "$LINENO"; then :
21955   ac_cv_prog_cxx_g=yes
21956 else
21957   CXXFLAGS=""
21958       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21959 /* end confdefs.h.  */
21960 
21961 int
21962 main ()
21963 {
21964 
21965   ;
21966   return 0;
21967 }
21968 _ACEOF
21969 if ac_fn_cxx_try_compile "$LINENO"; then :
21970 
21971 else
21972   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21973          CXXFLAGS="-g"
21974          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21975 /* end confdefs.h.  */
21976 
21977 int
21978 main ()
21979 {
21980 
21981   ;
21982   return 0;
21983 }
21984 _ACEOF
21985 if ac_fn_cxx_try_compile "$LINENO"; then :
21986   ac_cv_prog_cxx_g=yes
21987 fi
21988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21989 fi
21990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21991 fi
21992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21993    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21994 fi
21995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21996 $as_echo "$ac_cv_prog_cxx_g" >&6; }
21997 if test "$ac_test_CXXFLAGS" = set; then
21998   CXXFLAGS=$ac_save_CXXFLAGS
21999 elif test $ac_cv_prog_cxx_g = yes; then
22000   if test "$GXX" = yes; then
22001     CXXFLAGS="-g -O2"
22002   else
22003     CXXFLAGS="-g"
22004   fi
22005 else
22006   if test "$GXX" = yes; then
22007     CXXFLAGS="-O2"
22008   else
22009     CXXFLAGS=
22010   fi
22011 fi
22012 ac_ext=cpp
22013 ac_cpp='$CXXCPP $CPPFLAGS'
22014 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22015 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22016 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22017 
22018 
22019   ### Locate other tools
22020 
22021   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22022     ac_ext=m
22023 ac_cpp='$OBJCPP $CPPFLAGS'
22024 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22025 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22026 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22027 if test -n "$ac_tool_prefix"; then
22028   for ac_prog in gcc objcc objc cc CC
22029   do
22030     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22031 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22033 $as_echo_n "checking for $ac_word... " >&6; }
22034 if ${ac_cv_prog_OBJC+:} false; then :
22035   $as_echo_n "(cached) " >&6
22036 else
22037   if test -n "$OBJC"; then
22038   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22039 else
22040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22041 for as_dir in $PATH
22042 do
22043   IFS=$as_save_IFS
22044   test -z "$as_dir" && as_dir=.
22045     for ac_exec_ext in '' $ac_executable_extensions; do
22046   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22047     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22048     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22049     break 2
22050   fi
22051 done
22052   done
22053 IFS=$as_save_IFS
22054 
22055 fi
22056 fi
22057 OBJC=$ac_cv_prog_OBJC
22058 if test -n "$OBJC"; then
22059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22060 $as_echo "$OBJC" >&6; }
22061 else
22062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22063 $as_echo "no" >&6; }
22064 fi
22065 
22066 
22067     test -n "$OBJC" && break
22068   done
22069 fi
22070 if test -z "$OBJC"; then
22071   ac_ct_OBJC=$OBJC
22072   for ac_prog in gcc objcc objc cc CC
22073 do
22074   # Extract the first word of "$ac_prog", so it can be a program name with args.
22075 set dummy $ac_prog; ac_word=$2
22076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22077 $as_echo_n "checking for $ac_word... " >&6; }
22078 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22079   $as_echo_n "(cached) " >&6
22080 else
22081   if test -n "$ac_ct_OBJC"; then
22082   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22083 else
22084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22085 for as_dir in $PATH
22086 do
22087   IFS=$as_save_IFS
22088   test -z "$as_dir" && as_dir=.
22089     for ac_exec_ext in '' $ac_executable_extensions; do
22090   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22091     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22093     break 2
22094   fi
22095 done
22096   done
22097 IFS=$as_save_IFS
22098 
22099 fi
22100 fi
22101 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22102 if test -n "$ac_ct_OBJC"; then
22103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22104 $as_echo "$ac_ct_OBJC" >&6; }
22105 else
22106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22107 $as_echo "no" >&6; }
22108 fi
22109 
22110 
22111   test -n "$ac_ct_OBJC" && break
22112 done
22113 
22114   if test "x$ac_ct_OBJC" = x; then
22115     OBJC="gcc"
22116   else
22117     case $cross_compiling:$ac_tool_warned in
22118 yes:)
22119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22120 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22121 ac_tool_warned=yes ;;
22122 esac
22123     OBJC=$ac_ct_OBJC
22124   fi
22125 fi
22126 
22127 # Provide some information about the compiler.
22128 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22129 set X $ac_compile
22130 ac_compiler=$2
22131 for ac_option in --version -v -V -qversion; do
22132   { { ac_try="$ac_compiler $ac_option >&5"
22133 case "(($ac_try" in
22134   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22135   *) ac_try_echo=$ac_try;;
22136 esac
22137 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22138 $as_echo "$ac_try_echo"; } >&5
22139   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22140   ac_status=$?
22141   if test -s conftest.err; then
22142     sed '10a\
22143 ... rest of stderr output deleted ...
22144          10q' conftest.err >conftest.er1
22145     cat conftest.er1 >&5
22146   fi
22147   rm -f conftest.er1 conftest.err
22148   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22149   test $ac_status = 0; }
22150 done
22151 
22152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22153 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22154 if ${ac_cv_objc_compiler_gnu+:} false; then :
22155   $as_echo_n "(cached) " >&6
22156 else
22157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22158 /* end confdefs.h.  */
22159 
22160 int
22161 main ()
22162 {
22163 #ifndef __GNUC__
22164        choke me
22165 #endif
22166 
22167   ;
22168   return 0;
22169 }
22170 _ACEOF
22171 if ac_fn_objc_try_compile "$LINENO"; then :
22172   ac_compiler_gnu=yes
22173 else
22174   ac_compiler_gnu=no
22175 fi
22176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22177 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22178 
22179 fi
22180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22181 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22182 if test $ac_compiler_gnu = yes; then
22183   GOBJC=yes
22184 else
22185   GOBJC=
22186 fi
22187 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22188 ac_save_OBJCFLAGS=$OBJCFLAGS
22189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22190 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22191 if ${ac_cv_prog_objc_g+:} false; then :
22192   $as_echo_n "(cached) " >&6
22193 else
22194   ac_save_objc_werror_flag=$ac_objc_werror_flag
22195    ac_objc_werror_flag=yes
22196    ac_cv_prog_objc_g=no
22197    OBJCFLAGS="-g"
22198    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22199 /* end confdefs.h.  */
22200 
22201 int
22202 main ()
22203 {
22204 
22205   ;
22206   return 0;
22207 }
22208 _ACEOF
22209 if ac_fn_objc_try_compile "$LINENO"; then :
22210   ac_cv_prog_objc_g=yes
22211 else
22212   OBJCFLAGS=""
22213       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22214 /* end confdefs.h.  */
22215 
22216 int
22217 main ()
22218 {
22219 
22220   ;
22221   return 0;
22222 }
22223 _ACEOF
22224 if ac_fn_objc_try_compile "$LINENO"; then :
22225 
22226 else
22227   ac_objc_werror_flag=$ac_save_objc_werror_flag
22228          OBJCFLAGS="-g"
22229          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22230 /* end confdefs.h.  */
22231 
22232 int
22233 main ()
22234 {
22235 
22236   ;
22237   return 0;
22238 }
22239 _ACEOF
22240 if ac_fn_objc_try_compile "$LINENO"; then :
22241   ac_cv_prog_objc_g=yes
22242 fi
22243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22244 fi
22245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22246 fi
22247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22248    ac_objc_werror_flag=$ac_save_objc_werror_flag
22249 fi
22250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22251 $as_echo "$ac_cv_prog_objc_g" >&6; }
22252 if test "$ac_test_OBJCFLAGS" = set; then
22253   OBJCFLAGS=$ac_save_OBJCFLAGS
22254 elif test $ac_cv_prog_objc_g = yes; then
22255   if test "$GOBJC" = yes; then
22256     OBJCFLAGS="-g -O2"
22257   else
22258     OBJCFLAGS="-g"
22259   fi
22260 else
22261   if test "$GOBJC" = yes; then
22262     OBJCFLAGS="-O2"
22263   else
22264     OBJCFLAGS=
22265   fi
22266 fi
22267 ac_ext=cpp
22268 ac_cpp='$CXXCPP $CPPFLAGS'
22269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22272 
22273 
22274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22275 
22276   # First separate the path from the arguments. This will split at the first
22277   # space.
22278   complete="$OBJC"
22279   path="${complete%% *}"
22280   tmp="$complete EOL"
22281   arguments="${tmp#* }"
22282 
22283   # Input might be given as Windows format, start by converting to
22284   # unix format.
22285   new_path=`$CYGPATH -u "$path"`
22286 
22287   # Now try to locate executable using which
22288   new_path=`$WHICH "$new_path" 2> /dev/null`
22289   # bat and cmd files are not always considered executable in cygwin causing which
22290   # to not find them
22291   if test "x$new_path" = x \
22292       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22293       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22294     new_path=`$CYGPATH -u "$path"`
22295   fi
22296   if test "x$new_path" = x; then
22297     # Oops. Which didn't find the executable.
22298     # The splitting of arguments from the executable at a space might have been incorrect,
22299     # since paths with space are more likely in Windows. Give it another try with the whole
22300     # argument.
22301     path="$complete"
22302     arguments="EOL"
22303     new_path=`$CYGPATH -u "$path"`
22304     new_path=`$WHICH "$new_path" 2> /dev/null`
22305     # bat and cmd files are not always considered executable in cygwin causing which
22306     # to not find them
22307     if test "x$new_path" = x \
22308         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22309         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22310       new_path=`$CYGPATH -u "$path"`
22311     fi
22312     if test "x$new_path" = x; then
22313       # It's still not found. Now this is an unrecoverable error.
22314       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22315 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22316       has_space=`$ECHO "$complete" | $GREP " "`
22317       if test "x$has_space" != x; then
22318         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22319 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22320       fi
22321       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22322     fi
22323   fi
22324 
22325   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22326   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22327   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22328   # "foo.exe" is OK but "foo" is an error.
22329   #
22330   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22331   # It is also a way to make sure we got the proper file name for the real test later on.
22332   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22333   if test "x$test_shortpath" = x; then
22334     # Short path failed, file does not exist as specified.
22335     # Try adding .exe or .cmd
22336     if test -f "${new_path}.exe"; then
22337       input_to_shortpath="${new_path}.exe"
22338     elif test -f "${new_path}.cmd"; then
22339       input_to_shortpath="${new_path}.cmd"
22340     else
22341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22342 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22343       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22344 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22345       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22346     fi
22347   else
22348     input_to_shortpath="$new_path"
22349   fi
22350 
22351   # Call helper function which possibly converts this using DOS-style short mode.
22352   # If so, the updated path is stored in $new_path.
22353   new_path="$input_to_shortpath"
22354 
22355   input_path="$input_to_shortpath"
22356   # Check if we need to convert this using DOS-style short mode. If the path
22357   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22358   # take no chances and rewrite it.
22359   # Note: m4 eats our [], so we need to use [ and ] instead.
22360   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22361   if test "x$has_forbidden_chars" != x; then
22362     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22363     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22364     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22365     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22366       # Going to short mode and back again did indeed matter. Since short mode is
22367       # case insensitive, let's make it lowercase to improve readability.
22368       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22369       # Now convert it back to Unix-stile (cygpath)
22370       input_path=`$CYGPATH -u "$shortmode_path"`
22371       new_path="$input_path"
22372     fi
22373   fi
22374 
22375   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22376   if test "x$test_cygdrive_prefix" = x; then
22377     # As a simple fix, exclude /usr/bin since it's not a real path.
22378     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22379       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22380       # a path prefixed by /cygdrive for fixpath to work.
22381       new_path="$CYGWIN_ROOT_PATH$input_path"
22382     fi
22383   fi
22384 
22385   # remove trailing .exe if any
22386   new_path="${new_path/%.exe/}"
22387 
22388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22389 
22390   # First separate the path from the arguments. This will split at the first
22391   # space.
22392   complete="$OBJC"
22393   path="${complete%% *}"
22394   tmp="$complete EOL"
22395   arguments="${tmp#* }"
22396 
22397   # Input might be given as Windows format, start by converting to
22398   # unix format.
22399   new_path="$path"
22400 
22401   windows_path="$new_path"
22402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22403     unix_path=`$CYGPATH -u "$windows_path"`
22404     new_path="$unix_path"
22405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22407     new_path="$unix_path"
22408   fi
22409 
22410 
22411   # Now try to locate executable using which
22412   new_path=`$WHICH "$new_path" 2> /dev/null`
22413 
22414   if test "x$new_path" = x; then
22415     # Oops. Which didn't find the executable.
22416     # The splitting of arguments from the executable at a space might have been incorrect,
22417     # since paths with space are more likely in Windows. Give it another try with the whole
22418     # argument.
22419     path="$complete"
22420     arguments="EOL"
22421     new_path="$path"
22422 
22423   windows_path="$new_path"
22424   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22425     unix_path=`$CYGPATH -u "$windows_path"`
22426     new_path="$unix_path"
22427   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22428     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22429     new_path="$unix_path"
22430   fi
22431 
22432 
22433     new_path=`$WHICH "$new_path" 2> /dev/null`
22434 
22435     if test "x$new_path" = x; then
22436       # It's still not found. Now this is an unrecoverable error.
22437       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22438 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22439       has_space=`$ECHO "$complete" | $GREP " "`
22440       if test "x$has_space" != x; then
22441         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22442 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22443       fi
22444       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22445     fi
22446   fi
22447 
22448   # Now new_path has a complete unix path to the binary
22449   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22450     # Keep paths in /bin as-is, but remove trailing .exe if any
22451     new_path="${new_path/%.exe/}"
22452     # Do not save /bin paths to all_fixpath_prefixes!
22453   else
22454     # Not in mixed or Windows style, start by that.
22455     new_path=`cmd //c echo $new_path`
22456 
22457   input_path="$new_path"
22458   # Check if we need to convert this using DOS-style short mode. If the path
22459   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22460   # take no chances and rewrite it.
22461   # Note: m4 eats our [], so we need to use [ and ] instead.
22462   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22463   if test "x$has_forbidden_chars" != x; then
22464     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22465     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22466   fi
22467 
22468     # Output is in $new_path
22469 
22470   windows_path="$new_path"
22471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22472     unix_path=`$CYGPATH -u "$windows_path"`
22473     new_path="$unix_path"
22474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22476     new_path="$unix_path"
22477   fi
22478 
22479     # remove trailing .exe if any
22480     new_path="${new_path/%.exe/}"
22481 
22482     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22483     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22484   fi
22485 
22486   else
22487     # We're on a posix platform. Hooray! :)
22488     # First separate the path from the arguments. This will split at the first
22489     # space.
22490     complete="$OBJC"
22491     path="${complete%% *}"
22492     tmp="$complete EOL"
22493     arguments="${tmp#* }"
22494 
22495     # Cannot rely on the command "which" here since it doesn't always work.
22496     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22497     if test -z "$is_absolute_path"; then
22498       # Path to executable is not absolute. Find it.
22499       IFS_save="$IFS"
22500       IFS=:
22501       for p in $PATH; do
22502         if test -f "$p/$path" && test -x "$p/$path"; then
22503           new_path="$p/$path"
22504           break
22505         fi
22506       done
22507       IFS="$IFS_save"
22508     else
22509       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22510 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22511       new_path="$path"
22512     fi
22513 
22514     if test "x$new_path" = x; then
22515       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22516 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22517       has_space=`$ECHO "$complete" | $GREP " "`
22518       if test "x$has_space" != x; then
22519         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22520 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22521       fi
22522       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22523     fi
22524   fi
22525 
22526   # Now join together the path and the arguments once again
22527   if test "x$arguments" != xEOL; then
22528     new_complete="$new_path ${arguments% *}"
22529   else
22530     new_complete="$new_path"
22531   fi
22532 
22533   if test "x$complete" != "x$new_complete"; then
22534     OBJC="$new_complete"
22535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22536 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22537   fi
22538 
22539   else
22540     OBJC=
22541   fi
22542 
22543   # Restore the flags to the user specified values.
22544   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22545   CFLAGS="$ORG_CFLAGS"
22546   CXXFLAGS="$ORG_CXXFLAGS"
22547   OBJCFLAGS="$ORG_OBJCFLAGS"
22548 
22549   LD="$CC"
22550   LDEXE="$CC"
22551   LDCXX="$CXX"
22552   LDEXECXX="$CXX"
22553 
22554   # LDEXE is the linker to use, when creating executables.
22555 
22556   # Linking C++ libraries.
22557 
22558   # Linking C++ executables.
22559 
22560 
22561   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22562     if test -n "$ac_tool_prefix"; then
22563   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22564 set dummy ${ac_tool_prefix}ar; ac_word=$2
22565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22566 $as_echo_n "checking for $ac_word... " >&6; }
22567 if ${ac_cv_prog_AR+:} false; then :
22568   $as_echo_n "(cached) " >&6
22569 else
22570   if test -n "$AR"; then
22571   ac_cv_prog_AR="$AR" # Let the user override the test.
22572 else
22573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22574 for as_dir in $PATH
22575 do
22576   IFS=$as_save_IFS
22577   test -z "$as_dir" && as_dir=.
22578     for ac_exec_ext in '' $ac_executable_extensions; do
22579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22580     ac_cv_prog_AR="${ac_tool_prefix}ar"
22581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22582     break 2
22583   fi
22584 done
22585   done
22586 IFS=$as_save_IFS
22587 
22588 fi
22589 fi
22590 AR=$ac_cv_prog_AR
22591 if test -n "$AR"; then
22592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22593 $as_echo "$AR" >&6; }
22594 else
22595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22596 $as_echo "no" >&6; }
22597 fi
22598 
22599 
22600 fi
22601 if test -z "$ac_cv_prog_AR"; then
22602   ac_ct_AR=$AR
22603   # Extract the first word of "ar", so it can be a program name with args.
22604 set dummy ar; ac_word=$2
22605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22606 $as_echo_n "checking for $ac_word... " >&6; }
22607 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22608   $as_echo_n "(cached) " >&6
22609 else
22610   if test -n "$ac_ct_AR"; then
22611   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22612 else
22613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22614 for as_dir in $PATH
22615 do
22616   IFS=$as_save_IFS
22617   test -z "$as_dir" && as_dir=.
22618     for ac_exec_ext in '' $ac_executable_extensions; do
22619   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22620     ac_cv_prog_ac_ct_AR="ar"
22621     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22622     break 2
22623   fi
22624 done
22625   done
22626 IFS=$as_save_IFS
22627 
22628 fi
22629 fi
22630 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22631 if test -n "$ac_ct_AR"; then
22632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22633 $as_echo "$ac_ct_AR" >&6; }
22634 else
22635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22636 $as_echo "no" >&6; }
22637 fi
22638 
22639   if test "x$ac_ct_AR" = x; then
22640     AR=""
22641   else
22642     case $cross_compiling:$ac_tool_warned in
22643 yes:)
22644 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22645 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22646 ac_tool_warned=yes ;;
22647 esac
22648     AR=$ac_ct_AR
22649   fi
22650 else
22651   AR="$ac_cv_prog_AR"
22652 fi
22653 
22654 
22655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22656 
22657   # First separate the path from the arguments. This will split at the first
22658   # space.
22659   complete="$AR"
22660   path="${complete%% *}"
22661   tmp="$complete EOL"
22662   arguments="${tmp#* }"
22663 
22664   # Input might be given as Windows format, start by converting to
22665   # unix format.
22666   new_path=`$CYGPATH -u "$path"`
22667 
22668   # Now try to locate executable using which
22669   new_path=`$WHICH "$new_path" 2> /dev/null`
22670   # bat and cmd files are not always considered executable in cygwin causing which
22671   # to not find them
22672   if test "x$new_path" = x \
22673       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22674       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22675     new_path=`$CYGPATH -u "$path"`
22676   fi
22677   if test "x$new_path" = x; then
22678     # Oops. Which didn't find the executable.
22679     # The splitting of arguments from the executable at a space might have been incorrect,
22680     # since paths with space are more likely in Windows. Give it another try with the whole
22681     # argument.
22682     path="$complete"
22683     arguments="EOL"
22684     new_path=`$CYGPATH -u "$path"`
22685     new_path=`$WHICH "$new_path" 2> /dev/null`
22686     # bat and cmd files are not always considered executable in cygwin causing which
22687     # to not find them
22688     if test "x$new_path" = x \
22689         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22690         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22691       new_path=`$CYGPATH -u "$path"`
22692     fi
22693     if test "x$new_path" = x; then
22694       # It's still not found. Now this is an unrecoverable error.
22695       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22696 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22697       has_space=`$ECHO "$complete" | $GREP " "`
22698       if test "x$has_space" != x; then
22699         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22700 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22701       fi
22702       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22703     fi
22704   fi
22705 
22706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22709   # "foo.exe" is OK but "foo" is an error.
22710   #
22711   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22712   # It is also a way to make sure we got the proper file name for the real test later on.
22713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22714   if test "x$test_shortpath" = x; then
22715     # Short path failed, file does not exist as specified.
22716     # Try adding .exe or .cmd
22717     if test -f "${new_path}.exe"; then
22718       input_to_shortpath="${new_path}.exe"
22719     elif test -f "${new_path}.cmd"; then
22720       input_to_shortpath="${new_path}.cmd"
22721     else
22722       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22723 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22724       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22725 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22726       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22727     fi
22728   else
22729     input_to_shortpath="$new_path"
22730   fi
22731 
22732   # Call helper function which possibly converts this using DOS-style short mode.
22733   # If so, the updated path is stored in $new_path.
22734   new_path="$input_to_shortpath"
22735 
22736   input_path="$input_to_shortpath"
22737   # Check if we need to convert this using DOS-style short mode. If the path
22738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22739   # take no chances and rewrite it.
22740   # Note: m4 eats our [], so we need to use [ and ] instead.
22741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22742   if test "x$has_forbidden_chars" != x; then
22743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22747       # Going to short mode and back again did indeed matter. Since short mode is
22748       # case insensitive, let's make it lowercase to improve readability.
22749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22750       # Now convert it back to Unix-stile (cygpath)
22751       input_path=`$CYGPATH -u "$shortmode_path"`
22752       new_path="$input_path"
22753     fi
22754   fi
22755 
22756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22757   if test "x$test_cygdrive_prefix" = x; then
22758     # As a simple fix, exclude /usr/bin since it's not a real path.
22759     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22761       # a path prefixed by /cygdrive for fixpath to work.
22762       new_path="$CYGWIN_ROOT_PATH$input_path"
22763     fi
22764   fi
22765 
22766   # remove trailing .exe if any
22767   new_path="${new_path/%.exe/}"
22768 
22769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22770 
22771   # First separate the path from the arguments. This will split at the first
22772   # space.
22773   complete="$AR"
22774   path="${complete%% *}"
22775   tmp="$complete EOL"
22776   arguments="${tmp#* }"
22777 
22778   # Input might be given as Windows format, start by converting to
22779   # unix format.
22780   new_path="$path"
22781 
22782   windows_path="$new_path"
22783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22784     unix_path=`$CYGPATH -u "$windows_path"`
22785     new_path="$unix_path"
22786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22788     new_path="$unix_path"
22789   fi
22790 
22791 
22792   # Now try to locate executable using which
22793   new_path=`$WHICH "$new_path" 2> /dev/null`
22794 
22795   if test "x$new_path" = x; then
22796     # Oops. Which didn't find the executable.
22797     # The splitting of arguments from the executable at a space might have been incorrect,
22798     # since paths with space are more likely in Windows. Give it another try with the whole
22799     # argument.
22800     path="$complete"
22801     arguments="EOL"
22802     new_path="$path"
22803 
22804   windows_path="$new_path"
22805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22806     unix_path=`$CYGPATH -u "$windows_path"`
22807     new_path="$unix_path"
22808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22810     new_path="$unix_path"
22811   fi
22812 
22813 
22814     new_path=`$WHICH "$new_path" 2> /dev/null`
22815 
22816     if test "x$new_path" = x; then
22817       # It's still not found. Now this is an unrecoverable error.
22818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22819 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22820       has_space=`$ECHO "$complete" | $GREP " "`
22821       if test "x$has_space" != x; then
22822         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22823 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22824       fi
22825       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22826     fi
22827   fi
22828 
22829   # Now new_path has a complete unix path to the binary
22830   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22831     # Keep paths in /bin as-is, but remove trailing .exe if any
22832     new_path="${new_path/%.exe/}"
22833     # Do not save /bin paths to all_fixpath_prefixes!
22834   else
22835     # Not in mixed or Windows style, start by that.
22836     new_path=`cmd //c echo $new_path`
22837 
22838   input_path="$new_path"
22839   # Check if we need to convert this using DOS-style short mode. If the path
22840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22841   # take no chances and rewrite it.
22842   # Note: m4 eats our [], so we need to use [ and ] instead.
22843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22844   if test "x$has_forbidden_chars" != x; then
22845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22846     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22847   fi
22848 
22849     # Output is in $new_path
22850 
22851   windows_path="$new_path"
22852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22853     unix_path=`$CYGPATH -u "$windows_path"`
22854     new_path="$unix_path"
22855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22857     new_path="$unix_path"
22858   fi
22859 
22860     # remove trailing .exe if any
22861     new_path="${new_path/%.exe/}"
22862 
22863     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22864     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22865   fi
22866 
22867   else
22868     # We're on a posix platform. Hooray! :)
22869     # First separate the path from the arguments. This will split at the first
22870     # space.
22871     complete="$AR"
22872     path="${complete%% *}"
22873     tmp="$complete EOL"
22874     arguments="${tmp#* }"
22875 
22876     # Cannot rely on the command "which" here since it doesn't always work.
22877     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22878     if test -z "$is_absolute_path"; then
22879       # Path to executable is not absolute. Find it.
22880       IFS_save="$IFS"
22881       IFS=:
22882       for p in $PATH; do
22883         if test -f "$p/$path" && test -x "$p/$path"; then
22884           new_path="$p/$path"
22885           break
22886         fi
22887       done
22888       IFS="$IFS_save"
22889     else
22890       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22891 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22892       new_path="$path"
22893     fi
22894 
22895     if test "x$new_path" = x; then
22896       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22897 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22898       has_space=`$ECHO "$complete" | $GREP " "`
22899       if test "x$has_space" != x; then
22900         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22901 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22902       fi
22903       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22904     fi
22905   fi
22906 
22907   # Now join together the path and the arguments once again
22908   if test "x$arguments" != xEOL; then
22909     new_complete="$new_path ${arguments% *}"
22910   else
22911     new_complete="$new_path"
22912   fi
22913 
22914   if test "x$complete" != "x$new_complete"; then
22915     AR="$new_complete"
22916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22917 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22918   fi
22919 
22920   fi
22921   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22922     ARFLAGS="-r"
22923   elif test "x$OPENJDK_TARGET_OS" = xaix; then
22924     ARFLAGS="-X64"
22925   else
22926     ARFLAGS=""
22927   fi
22928 
22929 
22930   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22931   HOTSPOT_CXX="$CXX"
22932   HOTSPOT_LD="$LD"
22933 
22934 
22935 
22936   COMPILER_NAME=gcc
22937   COMPILER_TYPE=CC
22938   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22939 
22940     # For now, assume that we are always compiling using cl.exe.
22941     CC_OUT_OPTION=-Fo
22942     EXE_OUT_OPTION=-out:
22943     LD_OUT_OPTION=-out:
22944     AR_OUT_OPTION=-out:
22945     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22946     # program for something completely different.
22947     # Extract the first word of "link", so it can be a program name with args.
22948 set dummy link; ac_word=$2
22949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22950 $as_echo_n "checking for $ac_word... " >&6; }
22951 if ${ac_cv_prog_WINLD+:} false; then :
22952   $as_echo_n "(cached) " >&6
22953 else
22954   if test -n "$WINLD"; then
22955   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22956 else
22957   ac_prog_rejected=no
22958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22959 for as_dir in $PATH
22960 do
22961   IFS=$as_save_IFS
22962   test -z "$as_dir" && as_dir=.
22963     for ac_exec_ext in '' $ac_executable_extensions; do
22964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22965     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22966        ac_prog_rejected=yes
22967        continue
22968      fi
22969     ac_cv_prog_WINLD="link"
22970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22971     break 2
22972   fi
22973 done
22974   done
22975 IFS=$as_save_IFS
22976 
22977 if test $ac_prog_rejected = yes; then
22978   # We found a bogon in the path, so make sure we never use it.
22979   set dummy $ac_cv_prog_WINLD
22980   shift
22981   if test $# != 0; then
22982     # We chose a different compiler from the bogus one.
22983     # However, it has the same basename, so the bogon will be chosen
22984     # first if we set WINLD to just the basename; use the full file name.
22985     shift
22986     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22987   fi
22988 fi
22989 fi
22990 fi
22991 WINLD=$ac_cv_prog_WINLD
22992 if test -n "$WINLD"; then
22993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22994 $as_echo "$WINLD" >&6; }
22995 else
22996   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22997 $as_echo "no" >&6; }
22998 fi
22999 
23000 
23001     # Since we must ignore the first found link, WINLD will contain
23002     # the full path to the link.exe program.
23003 
23004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23005 
23006   # First separate the path from the arguments. This will split at the first
23007   # space.
23008   complete="$WINLD"
23009   path="${complete%% *}"
23010   tmp="$complete EOL"
23011   arguments="${tmp#* }"
23012 
23013   # Input might be given as Windows format, start by converting to
23014   # unix format.
23015   new_path=`$CYGPATH -u "$path"`
23016 
23017   # Now try to locate executable using which
23018   new_path=`$WHICH "$new_path" 2> /dev/null`
23019   # bat and cmd files are not always considered executable in cygwin causing which
23020   # to not find them
23021   if test "x$new_path" = x \
23022       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23023       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23024     new_path=`$CYGPATH -u "$path"`
23025   fi
23026   if test "x$new_path" = x; then
23027     # Oops. Which didn't find the executable.
23028     # The splitting of arguments from the executable at a space might have been incorrect,
23029     # since paths with space are more likely in Windows. Give it another try with the whole
23030     # argument.
23031     path="$complete"
23032     arguments="EOL"
23033     new_path=`$CYGPATH -u "$path"`
23034     new_path=`$WHICH "$new_path" 2> /dev/null`
23035     # bat and cmd files are not always considered executable in cygwin causing which
23036     # to not find them
23037     if test "x$new_path" = x \
23038         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23039         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23040       new_path=`$CYGPATH -u "$path"`
23041     fi
23042     if test "x$new_path" = x; then
23043       # It's still not found. Now this is an unrecoverable error.
23044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23045 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23046       has_space=`$ECHO "$complete" | $GREP " "`
23047       if test "x$has_space" != x; then
23048         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23049 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23050       fi
23051       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23052     fi
23053   fi
23054 
23055   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23056   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23057   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23058   # "foo.exe" is OK but "foo" is an error.
23059   #
23060   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23061   # It is also a way to make sure we got the proper file name for the real test later on.
23062   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23063   if test "x$test_shortpath" = x; then
23064     # Short path failed, file does not exist as specified.
23065     # Try adding .exe or .cmd
23066     if test -f "${new_path}.exe"; then
23067       input_to_shortpath="${new_path}.exe"
23068     elif test -f "${new_path}.cmd"; then
23069       input_to_shortpath="${new_path}.cmd"
23070     else
23071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23072 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23073       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23074 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23075       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23076     fi
23077   else
23078     input_to_shortpath="$new_path"
23079   fi
23080 
23081   # Call helper function which possibly converts this using DOS-style short mode.
23082   # If so, the updated path is stored in $new_path.
23083   new_path="$input_to_shortpath"
23084 
23085   input_path="$input_to_shortpath"
23086   # Check if we need to convert this using DOS-style short mode. If the path
23087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23088   # take no chances and rewrite it.
23089   # Note: m4 eats our [], so we need to use [ and ] instead.
23090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23091   if test "x$has_forbidden_chars" != x; then
23092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23096       # Going to short mode and back again did indeed matter. Since short mode is
23097       # case insensitive, let's make it lowercase to improve readability.
23098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23099       # Now convert it back to Unix-stile (cygpath)
23100       input_path=`$CYGPATH -u "$shortmode_path"`
23101       new_path="$input_path"
23102     fi
23103   fi
23104 
23105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23106   if test "x$test_cygdrive_prefix" = x; then
23107     # As a simple fix, exclude /usr/bin since it's not a real path.
23108     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23110       # a path prefixed by /cygdrive for fixpath to work.
23111       new_path="$CYGWIN_ROOT_PATH$input_path"
23112     fi
23113   fi
23114 
23115   # remove trailing .exe if any
23116   new_path="${new_path/%.exe/}"
23117 
23118   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23119 
23120   # First separate the path from the arguments. This will split at the first
23121   # space.
23122   complete="$WINLD"
23123   path="${complete%% *}"
23124   tmp="$complete EOL"
23125   arguments="${tmp#* }"
23126 
23127   # Input might be given as Windows format, start by converting to
23128   # unix format.
23129   new_path="$path"
23130 
23131   windows_path="$new_path"
23132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23133     unix_path=`$CYGPATH -u "$windows_path"`
23134     new_path="$unix_path"
23135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23137     new_path="$unix_path"
23138   fi
23139 
23140 
23141   # Now try to locate executable using which
23142   new_path=`$WHICH "$new_path" 2> /dev/null`
23143 
23144   if test "x$new_path" = x; then
23145     # Oops. Which didn't find the executable.
23146     # The splitting of arguments from the executable at a space might have been incorrect,
23147     # since paths with space are more likely in Windows. Give it another try with the whole
23148     # argument.
23149     path="$complete"
23150     arguments="EOL"
23151     new_path="$path"
23152 
23153   windows_path="$new_path"
23154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23155     unix_path=`$CYGPATH -u "$windows_path"`
23156     new_path="$unix_path"
23157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23159     new_path="$unix_path"
23160   fi
23161 
23162 
23163     new_path=`$WHICH "$new_path" 2> /dev/null`
23164 
23165     if test "x$new_path" = x; then
23166       # It's still not found. Now this is an unrecoverable error.
23167       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23168 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23169       has_space=`$ECHO "$complete" | $GREP " "`
23170       if test "x$has_space" != x; then
23171         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23172 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23173       fi
23174       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23175     fi
23176   fi
23177 
23178   # Now new_path has a complete unix path to the binary
23179   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23180     # Keep paths in /bin as-is, but remove trailing .exe if any
23181     new_path="${new_path/%.exe/}"
23182     # Do not save /bin paths to all_fixpath_prefixes!
23183   else
23184     # Not in mixed or Windows style, start by that.
23185     new_path=`cmd //c echo $new_path`
23186 
23187   input_path="$new_path"
23188   # Check if we need to convert this using DOS-style short mode. If the path
23189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23190   # take no chances and rewrite it.
23191   # Note: m4 eats our [], so we need to use [ and ] instead.
23192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23193   if test "x$has_forbidden_chars" != x; then
23194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23196   fi
23197 
23198     # Output is in $new_path
23199 
23200   windows_path="$new_path"
23201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23202     unix_path=`$CYGPATH -u "$windows_path"`
23203     new_path="$unix_path"
23204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23206     new_path="$unix_path"
23207   fi
23208 
23209     # remove trailing .exe if any
23210     new_path="${new_path/%.exe/}"
23211 
23212     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23213     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23214   fi
23215 
23216   else
23217     # We're on a posix platform. Hooray! :)
23218     # First separate the path from the arguments. This will split at the first
23219     # space.
23220     complete="$WINLD"
23221     path="${complete%% *}"
23222     tmp="$complete EOL"
23223     arguments="${tmp#* }"
23224 
23225     # Cannot rely on the command "which" here since it doesn't always work.
23226     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23227     if test -z "$is_absolute_path"; then
23228       # Path to executable is not absolute. Find it.
23229       IFS_save="$IFS"
23230       IFS=:
23231       for p in $PATH; do
23232         if test -f "$p/$path" && test -x "$p/$path"; then
23233           new_path="$p/$path"
23234           break
23235         fi
23236       done
23237       IFS="$IFS_save"
23238     else
23239       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23240 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23241       new_path="$path"
23242     fi
23243 
23244     if test "x$new_path" = x; then
23245       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23246 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23247       has_space=`$ECHO "$complete" | $GREP " "`
23248       if test "x$has_space" != x; then
23249         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23250 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23251       fi
23252       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23253     fi
23254   fi
23255 
23256   # Now join together the path and the arguments once again
23257   if test "x$arguments" != xEOL; then
23258     new_complete="$new_path ${arguments% *}"
23259   else
23260     new_complete="$new_path"
23261   fi
23262 
23263   if test "x$complete" != "x$new_complete"; then
23264     WINLD="$new_complete"
23265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23266 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23267   fi
23268 
23269     printf "Windows linker was found at $WINLD\n"
23270     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23271 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23272     "$WINLD" --version > /dev/null
23273     if test $? -eq 0 ; then
23274       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23275 $as_echo "no" >&6; }
23276       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23277     else
23278       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23279 $as_echo "yes" >&6; }
23280     fi
23281     LD="$WINLD"
23282     LDEXE="$WINLD"
23283     LDCXX="$WINLD"
23284     LDEXECXX="$WINLD"
23285 
23286     # Extract the first word of "mt", so it can be a program name with args.
23287 set dummy mt; ac_word=$2
23288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23289 $as_echo_n "checking for $ac_word... " >&6; }
23290 if ${ac_cv_prog_MT+:} false; then :
23291   $as_echo_n "(cached) " >&6
23292 else
23293   if test -n "$MT"; then
23294   ac_cv_prog_MT="$MT" # Let the user override the test.
23295 else
23296   ac_prog_rejected=no
23297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23298 for as_dir in $PATH
23299 do
23300   IFS=$as_save_IFS
23301   test -z "$as_dir" && as_dir=.
23302     for ac_exec_ext in '' $ac_executable_extensions; do
23303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23304     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23305        ac_prog_rejected=yes
23306        continue
23307      fi
23308     ac_cv_prog_MT="mt"
23309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23310     break 2
23311   fi
23312 done
23313   done
23314 IFS=$as_save_IFS
23315 
23316 if test $ac_prog_rejected = yes; then
23317   # We found a bogon in the path, so make sure we never use it.
23318   set dummy $ac_cv_prog_MT
23319   shift
23320   if test $# != 0; then
23321     # We chose a different compiler from the bogus one.
23322     # However, it has the same basename, so the bogon will be chosen
23323     # first if we set MT to just the basename; use the full file name.
23324     shift
23325     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23326   fi
23327 fi
23328 fi
23329 fi
23330 MT=$ac_cv_prog_MT
23331 if test -n "$MT"; then
23332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23333 $as_echo "$MT" >&6; }
23334 else
23335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23336 $as_echo "no" >&6; }
23337 fi
23338 
23339 
23340 
23341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23342 
23343   # First separate the path from the arguments. This will split at the first
23344   # space.
23345   complete="$MT"
23346   path="${complete%% *}"
23347   tmp="$complete EOL"
23348   arguments="${tmp#* }"
23349 
23350   # Input might be given as Windows format, start by converting to
23351   # unix format.
23352   new_path=`$CYGPATH -u "$path"`
23353 
23354   # Now try to locate executable using which
23355   new_path=`$WHICH "$new_path" 2> /dev/null`
23356   # bat and cmd files are not always considered executable in cygwin causing which
23357   # to not find them
23358   if test "x$new_path" = x \
23359       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23360       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23361     new_path=`$CYGPATH -u "$path"`
23362   fi
23363   if test "x$new_path" = x; then
23364     # Oops. Which didn't find the executable.
23365     # The splitting of arguments from the executable at a space might have been incorrect,
23366     # since paths with space are more likely in Windows. Give it another try with the whole
23367     # argument.
23368     path="$complete"
23369     arguments="EOL"
23370     new_path=`$CYGPATH -u "$path"`
23371     new_path=`$WHICH "$new_path" 2> /dev/null`
23372     # bat and cmd files are not always considered executable in cygwin causing which
23373     # to not find them
23374     if test "x$new_path" = x \
23375         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23376         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23377       new_path=`$CYGPATH -u "$path"`
23378     fi
23379     if test "x$new_path" = x; then
23380       # It's still not found. Now this is an unrecoverable error.
23381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23382 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23383       has_space=`$ECHO "$complete" | $GREP " "`
23384       if test "x$has_space" != x; then
23385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23387       fi
23388       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23389     fi
23390   fi
23391 
23392   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23393   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23394   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23395   # "foo.exe" is OK but "foo" is an error.
23396   #
23397   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23398   # It is also a way to make sure we got the proper file name for the real test later on.
23399   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23400   if test "x$test_shortpath" = x; then
23401     # Short path failed, file does not exist as specified.
23402     # Try adding .exe or .cmd
23403     if test -f "${new_path}.exe"; then
23404       input_to_shortpath="${new_path}.exe"
23405     elif test -f "${new_path}.cmd"; then
23406       input_to_shortpath="${new_path}.cmd"
23407     else
23408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23409 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23410       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23411 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23412       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23413     fi
23414   else
23415     input_to_shortpath="$new_path"
23416   fi
23417 
23418   # Call helper function which possibly converts this using DOS-style short mode.
23419   # If so, the updated path is stored in $new_path.
23420   new_path="$input_to_shortpath"
23421 
23422   input_path="$input_to_shortpath"
23423   # Check if we need to convert this using DOS-style short mode. If the path
23424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23425   # take no chances and rewrite it.
23426   # Note: m4 eats our [], so we need to use [ and ] instead.
23427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23428   if test "x$has_forbidden_chars" != x; then
23429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23430     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23431     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23432     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23433       # Going to short mode and back again did indeed matter. Since short mode is
23434       # case insensitive, let's make it lowercase to improve readability.
23435       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23436       # Now convert it back to Unix-stile (cygpath)
23437       input_path=`$CYGPATH -u "$shortmode_path"`
23438       new_path="$input_path"
23439     fi
23440   fi
23441 
23442   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23443   if test "x$test_cygdrive_prefix" = x; then
23444     # As a simple fix, exclude /usr/bin since it's not a real path.
23445     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23446       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23447       # a path prefixed by /cygdrive for fixpath to work.
23448       new_path="$CYGWIN_ROOT_PATH$input_path"
23449     fi
23450   fi
23451 
23452   # remove trailing .exe if any
23453   new_path="${new_path/%.exe/}"
23454 
23455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23456 
23457   # First separate the path from the arguments. This will split at the first
23458   # space.
23459   complete="$MT"
23460   path="${complete%% *}"
23461   tmp="$complete EOL"
23462   arguments="${tmp#* }"
23463 
23464   # Input might be given as Windows format, start by converting to
23465   # unix format.
23466   new_path="$path"
23467 
23468   windows_path="$new_path"
23469   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23470     unix_path=`$CYGPATH -u "$windows_path"`
23471     new_path="$unix_path"
23472   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23473     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23474     new_path="$unix_path"
23475   fi
23476 
23477 
23478   # Now try to locate executable using which
23479   new_path=`$WHICH "$new_path" 2> /dev/null`
23480 
23481   if test "x$new_path" = x; then
23482     # Oops. Which didn't find the executable.
23483     # The splitting of arguments from the executable at a space might have been incorrect,
23484     # since paths with space are more likely in Windows. Give it another try with the whole
23485     # argument.
23486     path="$complete"
23487     arguments="EOL"
23488     new_path="$path"
23489 
23490   windows_path="$new_path"
23491   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23492     unix_path=`$CYGPATH -u "$windows_path"`
23493     new_path="$unix_path"
23494   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23495     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23496     new_path="$unix_path"
23497   fi
23498 
23499 
23500     new_path=`$WHICH "$new_path" 2> /dev/null`
23501 
23502     if test "x$new_path" = x; then
23503       # It's still not found. Now this is an unrecoverable error.
23504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23505 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23506       has_space=`$ECHO "$complete" | $GREP " "`
23507       if test "x$has_space" != x; then
23508         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23509 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23510       fi
23511       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23512     fi
23513   fi
23514 
23515   # Now new_path has a complete unix path to the binary
23516   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23517     # Keep paths in /bin as-is, but remove trailing .exe if any
23518     new_path="${new_path/%.exe/}"
23519     # Do not save /bin paths to all_fixpath_prefixes!
23520   else
23521     # Not in mixed or Windows style, start by that.
23522     new_path=`cmd //c echo $new_path`
23523 
23524   input_path="$new_path"
23525   # Check if we need to convert this using DOS-style short mode. If the path
23526   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23527   # take no chances and rewrite it.
23528   # Note: m4 eats our [], so we need to use [ and ] instead.
23529   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23530   if test "x$has_forbidden_chars" != x; then
23531     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23532     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23533   fi
23534 
23535     # Output is in $new_path
23536 
23537   windows_path="$new_path"
23538   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23539     unix_path=`$CYGPATH -u "$windows_path"`
23540     new_path="$unix_path"
23541   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23542     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23543     new_path="$unix_path"
23544   fi
23545 
23546     # remove trailing .exe if any
23547     new_path="${new_path/%.exe/}"
23548 
23549     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23550     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23551   fi
23552 
23553   else
23554     # We're on a posix platform. Hooray! :)
23555     # First separate the path from the arguments. This will split at the first
23556     # space.
23557     complete="$MT"
23558     path="${complete%% *}"
23559     tmp="$complete EOL"
23560     arguments="${tmp#* }"
23561 
23562     # Cannot rely on the command "which" here since it doesn't always work.
23563     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23564     if test -z "$is_absolute_path"; then
23565       # Path to executable is not absolute. Find it.
23566       IFS_save="$IFS"
23567       IFS=:
23568       for p in $PATH; do
23569         if test -f "$p/$path" && test -x "$p/$path"; then
23570           new_path="$p/$path"
23571           break
23572         fi
23573       done
23574       IFS="$IFS_save"
23575     else
23576       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23577 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23578       new_path="$path"
23579     fi
23580 
23581     if test "x$new_path" = x; then
23582       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23583 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23584       has_space=`$ECHO "$complete" | $GREP " "`
23585       if test "x$has_space" != x; then
23586         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23587 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23588       fi
23589       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23590     fi
23591   fi
23592 
23593   # Now join together the path and the arguments once again
23594   if test "x$arguments" != xEOL; then
23595     new_complete="$new_path ${arguments% *}"
23596   else
23597     new_complete="$new_path"
23598   fi
23599 
23600   if test "x$complete" != "x$new_complete"; then
23601     MT="$new_complete"
23602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23603 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23604   fi
23605 
23606     # The resource compiler
23607     # Extract the first word of "rc", so it can be a program name with args.
23608 set dummy rc; ac_word=$2
23609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23610 $as_echo_n "checking for $ac_word... " >&6; }
23611 if ${ac_cv_prog_RC+:} false; then :
23612   $as_echo_n "(cached) " >&6
23613 else
23614   if test -n "$RC"; then
23615   ac_cv_prog_RC="$RC" # Let the user override the test.
23616 else
23617   ac_prog_rejected=no
23618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23619 for as_dir in $PATH
23620 do
23621   IFS=$as_save_IFS
23622   test -z "$as_dir" && as_dir=.
23623     for ac_exec_ext in '' $ac_executable_extensions; do
23624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23625     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23626        ac_prog_rejected=yes
23627        continue
23628      fi
23629     ac_cv_prog_RC="rc"
23630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23631     break 2
23632   fi
23633 done
23634   done
23635 IFS=$as_save_IFS
23636 
23637 if test $ac_prog_rejected = yes; then
23638   # We found a bogon in the path, so make sure we never use it.
23639   set dummy $ac_cv_prog_RC
23640   shift
23641   if test $# != 0; then
23642     # We chose a different compiler from the bogus one.
23643     # However, it has the same basename, so the bogon will be chosen
23644     # first if we set RC to just the basename; use the full file name.
23645     shift
23646     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23647   fi
23648 fi
23649 fi
23650 fi
23651 RC=$ac_cv_prog_RC
23652 if test -n "$RC"; then
23653   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23654 $as_echo "$RC" >&6; }
23655 else
23656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23657 $as_echo "no" >&6; }
23658 fi
23659 
23660 
23661 
23662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23663 
23664   # First separate the path from the arguments. This will split at the first
23665   # space.
23666   complete="$RC"
23667   path="${complete%% *}"
23668   tmp="$complete EOL"
23669   arguments="${tmp#* }"
23670 
23671   # Input might be given as Windows format, start by converting to
23672   # unix format.
23673   new_path=`$CYGPATH -u "$path"`
23674 
23675   # Now try to locate executable using which
23676   new_path=`$WHICH "$new_path" 2> /dev/null`
23677   # bat and cmd files are not always considered executable in cygwin causing which
23678   # to not find them
23679   if test "x$new_path" = x \
23680       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23681       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23682     new_path=`$CYGPATH -u "$path"`
23683   fi
23684   if test "x$new_path" = x; then
23685     # Oops. Which didn't find the executable.
23686     # The splitting of arguments from the executable at a space might have been incorrect,
23687     # since paths with space are more likely in Windows. Give it another try with the whole
23688     # argument.
23689     path="$complete"
23690     arguments="EOL"
23691     new_path=`$CYGPATH -u "$path"`
23692     new_path=`$WHICH "$new_path" 2> /dev/null`
23693     # bat and cmd files are not always considered executable in cygwin causing which
23694     # to not find them
23695     if test "x$new_path" = x \
23696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23698       new_path=`$CYGPATH -u "$path"`
23699     fi
23700     if test "x$new_path" = x; then
23701       # It's still not found. Now this is an unrecoverable error.
23702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23703 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23704       has_space=`$ECHO "$complete" | $GREP " "`
23705       if test "x$has_space" != x; then
23706         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23707 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23708       fi
23709       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23710     fi
23711   fi
23712 
23713   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23714   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23715   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23716   # "foo.exe" is OK but "foo" is an error.
23717   #
23718   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23719   # It is also a way to make sure we got the proper file name for the real test later on.
23720   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23721   if test "x$test_shortpath" = x; then
23722     # Short path failed, file does not exist as specified.
23723     # Try adding .exe or .cmd
23724     if test -f "${new_path}.exe"; then
23725       input_to_shortpath="${new_path}.exe"
23726     elif test -f "${new_path}.cmd"; then
23727       input_to_shortpath="${new_path}.cmd"
23728     else
23729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23730 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23731       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23732 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23733       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23734     fi
23735   else
23736     input_to_shortpath="$new_path"
23737   fi
23738 
23739   # Call helper function which possibly converts this using DOS-style short mode.
23740   # If so, the updated path is stored in $new_path.
23741   new_path="$input_to_shortpath"
23742 
23743   input_path="$input_to_shortpath"
23744   # Check if we need to convert this using DOS-style short mode. If the path
23745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23746   # take no chances and rewrite it.
23747   # Note: m4 eats our [], so we need to use [ and ] instead.
23748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23749   if test "x$has_forbidden_chars" != x; then
23750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23754       # Going to short mode and back again did indeed matter. Since short mode is
23755       # case insensitive, let's make it lowercase to improve readability.
23756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23757       # Now convert it back to Unix-stile (cygpath)
23758       input_path=`$CYGPATH -u "$shortmode_path"`
23759       new_path="$input_path"
23760     fi
23761   fi
23762 
23763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23764   if test "x$test_cygdrive_prefix" = x; then
23765     # As a simple fix, exclude /usr/bin since it's not a real path.
23766     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23768       # a path prefixed by /cygdrive for fixpath to work.
23769       new_path="$CYGWIN_ROOT_PATH$input_path"
23770     fi
23771   fi
23772 
23773   # remove trailing .exe if any
23774   new_path="${new_path/%.exe/}"
23775 
23776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23777 
23778   # First separate the path from the arguments. This will split at the first
23779   # space.
23780   complete="$RC"
23781   path="${complete%% *}"
23782   tmp="$complete EOL"
23783   arguments="${tmp#* }"
23784 
23785   # Input might be given as Windows format, start by converting to
23786   # unix format.
23787   new_path="$path"
23788 
23789   windows_path="$new_path"
23790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23791     unix_path=`$CYGPATH -u "$windows_path"`
23792     new_path="$unix_path"
23793   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23794     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23795     new_path="$unix_path"
23796   fi
23797 
23798 
23799   # Now try to locate executable using which
23800   new_path=`$WHICH "$new_path" 2> /dev/null`
23801 
23802   if test "x$new_path" = x; then
23803     # Oops. Which didn't find the executable.
23804     # The splitting of arguments from the executable at a space might have been incorrect,
23805     # since paths with space are more likely in Windows. Give it another try with the whole
23806     # argument.
23807     path="$complete"
23808     arguments="EOL"
23809     new_path="$path"
23810 
23811   windows_path="$new_path"
23812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23813     unix_path=`$CYGPATH -u "$windows_path"`
23814     new_path="$unix_path"
23815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23817     new_path="$unix_path"
23818   fi
23819 
23820 
23821     new_path=`$WHICH "$new_path" 2> /dev/null`
23822 
23823     if test "x$new_path" = x; then
23824       # It's still not found. Now this is an unrecoverable error.
23825       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23826 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23827       has_space=`$ECHO "$complete" | $GREP " "`
23828       if test "x$has_space" != x; then
23829         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23830 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23831       fi
23832       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23833     fi
23834   fi
23835 
23836   # Now new_path has a complete unix path to the binary
23837   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23838     # Keep paths in /bin as-is, but remove trailing .exe if any
23839     new_path="${new_path/%.exe/}"
23840     # Do not save /bin paths to all_fixpath_prefixes!
23841   else
23842     # Not in mixed or Windows style, start by that.
23843     new_path=`cmd //c echo $new_path`
23844 
23845   input_path="$new_path"
23846   # Check if we need to convert this using DOS-style short mode. If the path
23847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23848   # take no chances and rewrite it.
23849   # Note: m4 eats our [], so we need to use [ and ] instead.
23850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23851   if test "x$has_forbidden_chars" != x; then
23852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23853     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23854   fi
23855 
23856     # Output is in $new_path
23857 
23858   windows_path="$new_path"
23859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23860     unix_path=`$CYGPATH -u "$windows_path"`
23861     new_path="$unix_path"
23862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23864     new_path="$unix_path"
23865   fi
23866 
23867     # remove trailing .exe if any
23868     new_path="${new_path/%.exe/}"
23869 
23870     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23871     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23872   fi
23873 
23874   else
23875     # We're on a posix platform. Hooray! :)
23876     # First separate the path from the arguments. This will split at the first
23877     # space.
23878     complete="$RC"
23879     path="${complete%% *}"
23880     tmp="$complete EOL"
23881     arguments="${tmp#* }"
23882 
23883     # Cannot rely on the command "which" here since it doesn't always work.
23884     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23885     if test -z "$is_absolute_path"; then
23886       # Path to executable is not absolute. Find it.
23887       IFS_save="$IFS"
23888       IFS=:
23889       for p in $PATH; do
23890         if test -f "$p/$path" && test -x "$p/$path"; then
23891           new_path="$p/$path"
23892           break
23893         fi
23894       done
23895       IFS="$IFS_save"
23896     else
23897       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23898 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23899       new_path="$path"
23900     fi
23901 
23902     if test "x$new_path" = x; then
23903       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23904 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23905       has_space=`$ECHO "$complete" | $GREP " "`
23906       if test "x$has_space" != x; then
23907         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23908 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23909       fi
23910       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23911     fi
23912   fi
23913 
23914   # Now join together the path and the arguments once again
23915   if test "x$arguments" != xEOL; then
23916     new_complete="$new_path ${arguments% *}"
23917   else
23918     new_complete="$new_path"
23919   fi
23920 
23921   if test "x$complete" != "x$new_complete"; then
23922     RC="$new_complete"
23923     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23924 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23925   fi
23926 
23927 
23928     # For hotspot, we need these in Windows mixed path,
23929     # so rewrite them all. Need added .exe suffix.
23930     HOTSPOT_CXX="$CXX.exe"
23931     HOTSPOT_LD="$LD.exe"
23932     HOTSPOT_MT="$MT.exe"
23933     HOTSPOT_RC="$RC.exe"
23934 
23935   unix_path="$HOTSPOT_CXX"
23936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23937     windows_path=`$CYGPATH -m "$unix_path"`
23938     HOTSPOT_CXX="$windows_path"
23939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23940     windows_path=`cmd //c echo $unix_path`
23941     HOTSPOT_CXX="$windows_path"
23942   fi
23943 
23944 
23945   unix_path="$HOTSPOT_LD"
23946   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23947     windows_path=`$CYGPATH -m "$unix_path"`
23948     HOTSPOT_LD="$windows_path"
23949   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23950     windows_path=`cmd //c echo $unix_path`
23951     HOTSPOT_LD="$windows_path"
23952   fi
23953 
23954 
23955   unix_path="$HOTSPOT_MT"
23956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23957     windows_path=`$CYGPATH -m "$unix_path"`
23958     HOTSPOT_MT="$windows_path"
23959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23960     windows_path=`cmd //c echo $unix_path`
23961     HOTSPOT_MT="$windows_path"
23962   fi
23963 
23964 
23965   unix_path="$HOTSPOT_RC"
23966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23967     windows_path=`$CYGPATH -m "$unix_path"`
23968     HOTSPOT_RC="$windows_path"
23969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23970     windows_path=`cmd //c echo $unix_path`
23971     HOTSPOT_RC="$windows_path"
23972   fi
23973 
23974 
23975 
23976 
23977     RC_FLAGS="-nologo -l 0x409 -r"
23978     if test "x$VARIANT" = xOPT; then :
23979 
23980     RC_FLAGS="$RC_FLAGS -d NDEBUG"
23981 
23982 fi
23983 
23984   # The version variables used to create RC_FLAGS may be overridden
23985   # in a custom configure script, or possibly the command line.
23986   # Let those variables be expanded at make time in spec.gmk.
23987   # The \$ are escaped to the shell, and the $(...) variables
23988   # are evaluated by make.
23989   RC_FLAGS="$RC_FLAGS \
23990       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
23991       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
23992       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
23993       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
23994       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
23995       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
23996       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
23997 
23998   # lib.exe is used to create static libraries.
23999   # Extract the first word of "lib", so it can be a program name with args.
24000 set dummy lib; ac_word=$2
24001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24002 $as_echo_n "checking for $ac_word... " >&6; }
24003 if ${ac_cv_prog_WINAR+:} false; then :
24004   $as_echo_n "(cached) " >&6
24005 else
24006   if test -n "$WINAR"; then
24007   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24008 else
24009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24010 for as_dir in $PATH
24011 do
24012   IFS=$as_save_IFS
24013   test -z "$as_dir" && as_dir=.
24014     for ac_exec_ext in '' $ac_executable_extensions; do
24015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24016     ac_cv_prog_WINAR="lib"
24017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24018     break 2
24019   fi
24020 done
24021   done
24022 IFS=$as_save_IFS
24023 
24024 fi
24025 fi
24026 WINAR=$ac_cv_prog_WINAR
24027 if test -n "$WINAR"; then
24028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24029 $as_echo "$WINAR" >&6; }
24030 else
24031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24032 $as_echo "no" >&6; }
24033 fi
24034 
24035 
24036 
24037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24038 
24039   # First separate the path from the arguments. This will split at the first
24040   # space.
24041   complete="$WINAR"
24042   path="${complete%% *}"
24043   tmp="$complete EOL"
24044   arguments="${tmp#* }"
24045 
24046   # Input might be given as Windows format, start by converting to
24047   # unix format.
24048   new_path=`$CYGPATH -u "$path"`
24049 
24050   # Now try to locate executable using which
24051   new_path=`$WHICH "$new_path" 2> /dev/null`
24052   # bat and cmd files are not always considered executable in cygwin causing which
24053   # to not find them
24054   if test "x$new_path" = x \
24055       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24056       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24057     new_path=`$CYGPATH -u "$path"`
24058   fi
24059   if test "x$new_path" = x; then
24060     # Oops. Which didn't find the executable.
24061     # The splitting of arguments from the executable at a space might have been incorrect,
24062     # since paths with space are more likely in Windows. Give it another try with the whole
24063     # argument.
24064     path="$complete"
24065     arguments="EOL"
24066     new_path=`$CYGPATH -u "$path"`
24067     new_path=`$WHICH "$new_path" 2> /dev/null`
24068     # bat and cmd files are not always considered executable in cygwin causing which
24069     # to not find them
24070     if test "x$new_path" = x \
24071         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24072         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24073       new_path=`$CYGPATH -u "$path"`
24074     fi
24075     if test "x$new_path" = x; then
24076       # It's still not found. Now this is an unrecoverable error.
24077       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24078 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24079       has_space=`$ECHO "$complete" | $GREP " "`
24080       if test "x$has_space" != x; then
24081         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24082 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24083       fi
24084       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24085     fi
24086   fi
24087 
24088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24091   # "foo.exe" is OK but "foo" is an error.
24092   #
24093   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24094   # It is also a way to make sure we got the proper file name for the real test later on.
24095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24096   if test "x$test_shortpath" = x; then
24097     # Short path failed, file does not exist as specified.
24098     # Try adding .exe or .cmd
24099     if test -f "${new_path}.exe"; then
24100       input_to_shortpath="${new_path}.exe"
24101     elif test -f "${new_path}.cmd"; then
24102       input_to_shortpath="${new_path}.cmd"
24103     else
24104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24105 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24106       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24107 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24108       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24109     fi
24110   else
24111     input_to_shortpath="$new_path"
24112   fi
24113 
24114   # Call helper function which possibly converts this using DOS-style short mode.
24115   # If so, the updated path is stored in $new_path.
24116   new_path="$input_to_shortpath"
24117 
24118   input_path="$input_to_shortpath"
24119   # Check if we need to convert this using DOS-style short mode. If the path
24120   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24121   # take no chances and rewrite it.
24122   # Note: m4 eats our [], so we need to use [ and ] instead.
24123   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24124   if test "x$has_forbidden_chars" != x; then
24125     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24126     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24127     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24128     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24129       # Going to short mode and back again did indeed matter. Since short mode is
24130       # case insensitive, let's make it lowercase to improve readability.
24131       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24132       # Now convert it back to Unix-stile (cygpath)
24133       input_path=`$CYGPATH -u "$shortmode_path"`
24134       new_path="$input_path"
24135     fi
24136   fi
24137 
24138   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24139   if test "x$test_cygdrive_prefix" = x; then
24140     # As a simple fix, exclude /usr/bin since it's not a real path.
24141     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24142       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24143       # a path prefixed by /cygdrive for fixpath to work.
24144       new_path="$CYGWIN_ROOT_PATH$input_path"
24145     fi
24146   fi
24147 
24148   # remove trailing .exe if any
24149   new_path="${new_path/%.exe/}"
24150 
24151   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24152 
24153   # First separate the path from the arguments. This will split at the first
24154   # space.
24155   complete="$WINAR"
24156   path="${complete%% *}"
24157   tmp="$complete EOL"
24158   arguments="${tmp#* }"
24159 
24160   # Input might be given as Windows format, start by converting to
24161   # unix format.
24162   new_path="$path"
24163 
24164   windows_path="$new_path"
24165   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24166     unix_path=`$CYGPATH -u "$windows_path"`
24167     new_path="$unix_path"
24168   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24169     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24170     new_path="$unix_path"
24171   fi
24172 
24173 
24174   # Now try to locate executable using which
24175   new_path=`$WHICH "$new_path" 2> /dev/null`
24176 
24177   if test "x$new_path" = x; then
24178     # Oops. Which didn't find the executable.
24179     # The splitting of arguments from the executable at a space might have been incorrect,
24180     # since paths with space are more likely in Windows. Give it another try with the whole
24181     # argument.
24182     path="$complete"
24183     arguments="EOL"
24184     new_path="$path"
24185 
24186   windows_path="$new_path"
24187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24188     unix_path=`$CYGPATH -u "$windows_path"`
24189     new_path="$unix_path"
24190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24192     new_path="$unix_path"
24193   fi
24194 
24195 
24196     new_path=`$WHICH "$new_path" 2> /dev/null`
24197 
24198     if test "x$new_path" = x; then
24199       # It's still not found. Now this is an unrecoverable error.
24200       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24201 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24202       has_space=`$ECHO "$complete" | $GREP " "`
24203       if test "x$has_space" != x; then
24204         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24205 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24206       fi
24207       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24208     fi
24209   fi
24210 
24211   # Now new_path has a complete unix path to the binary
24212   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24213     # Keep paths in /bin as-is, but remove trailing .exe if any
24214     new_path="${new_path/%.exe/}"
24215     # Do not save /bin paths to all_fixpath_prefixes!
24216   else
24217     # Not in mixed or Windows style, start by that.
24218     new_path=`cmd //c echo $new_path`
24219 
24220   input_path="$new_path"
24221   # Check if we need to convert this using DOS-style short mode. If the path
24222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24223   # take no chances and rewrite it.
24224   # Note: m4 eats our [], so we need to use [ and ] instead.
24225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24226   if test "x$has_forbidden_chars" != x; then
24227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24229   fi
24230 
24231     # Output is in $new_path
24232 
24233   windows_path="$new_path"
24234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24235     unix_path=`$CYGPATH -u "$windows_path"`
24236     new_path="$unix_path"
24237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24239     new_path="$unix_path"
24240   fi
24241 
24242     # remove trailing .exe if any
24243     new_path="${new_path/%.exe/}"
24244 
24245     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24246     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24247   fi
24248 
24249   else
24250     # We're on a posix platform. Hooray! :)
24251     # First separate the path from the arguments. This will split at the first
24252     # space.
24253     complete="$WINAR"
24254     path="${complete%% *}"
24255     tmp="$complete EOL"
24256     arguments="${tmp#* }"
24257 
24258     # Cannot rely on the command "which" here since it doesn't always work.
24259     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24260     if test -z "$is_absolute_path"; then
24261       # Path to executable is not absolute. Find it.
24262       IFS_save="$IFS"
24263       IFS=:
24264       for p in $PATH; do
24265         if test -f "$p/$path" && test -x "$p/$path"; then
24266           new_path="$p/$path"
24267           break
24268         fi
24269       done
24270       IFS="$IFS_save"
24271     else
24272       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24273 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24274       new_path="$path"
24275     fi
24276 
24277     if test "x$new_path" = x; then
24278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24279 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24280       has_space=`$ECHO "$complete" | $GREP " "`
24281       if test "x$has_space" != x; then
24282         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24283 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24284       fi
24285       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24286     fi
24287   fi
24288 
24289   # Now join together the path and the arguments once again
24290   if test "x$arguments" != xEOL; then
24291     new_complete="$new_path ${arguments% *}"
24292   else
24293     new_complete="$new_path"
24294   fi
24295 
24296   if test "x$complete" != "x$new_complete"; then
24297     WINAR="$new_complete"
24298     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24299 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24300   fi
24301 
24302   AR="$WINAR"
24303   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24304 
24305   # Extract the first word of "dumpbin", so it can be a program name with args.
24306 set dummy dumpbin; ac_word=$2
24307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24308 $as_echo_n "checking for $ac_word... " >&6; }
24309 if ${ac_cv_prog_DUMPBIN+:} false; then :
24310   $as_echo_n "(cached) " >&6
24311 else
24312   if test -n "$DUMPBIN"; then
24313   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24314 else
24315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24316 for as_dir in $PATH
24317 do
24318   IFS=$as_save_IFS
24319   test -z "$as_dir" && as_dir=.
24320     for ac_exec_ext in '' $ac_executable_extensions; do
24321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24322     ac_cv_prog_DUMPBIN="dumpbin"
24323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24324     break 2
24325   fi
24326 done
24327   done
24328 IFS=$as_save_IFS
24329 
24330 fi
24331 fi
24332 DUMPBIN=$ac_cv_prog_DUMPBIN
24333 if test -n "$DUMPBIN"; then
24334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24335 $as_echo "$DUMPBIN" >&6; }
24336 else
24337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24338 $as_echo "no" >&6; }
24339 fi
24340 
24341 
24342 
24343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24344 
24345   # First separate the path from the arguments. This will split at the first
24346   # space.
24347   complete="$DUMPBIN"
24348   path="${complete%% *}"
24349   tmp="$complete EOL"
24350   arguments="${tmp#* }"
24351 
24352   # Input might be given as Windows format, start by converting to
24353   # unix format.
24354   new_path=`$CYGPATH -u "$path"`
24355 
24356   # Now try to locate executable using which
24357   new_path=`$WHICH "$new_path" 2> /dev/null`
24358   # bat and cmd files are not always considered executable in cygwin causing which
24359   # to not find them
24360   if test "x$new_path" = x \
24361       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24362       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24363     new_path=`$CYGPATH -u "$path"`
24364   fi
24365   if test "x$new_path" = x; then
24366     # Oops. Which didn't find the executable.
24367     # The splitting of arguments from the executable at a space might have been incorrect,
24368     # since paths with space are more likely in Windows. Give it another try with the whole
24369     # argument.
24370     path="$complete"
24371     arguments="EOL"
24372     new_path=`$CYGPATH -u "$path"`
24373     new_path=`$WHICH "$new_path" 2> /dev/null`
24374     # bat and cmd files are not always considered executable in cygwin causing which
24375     # to not find them
24376     if test "x$new_path" = x \
24377         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24378         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24379       new_path=`$CYGPATH -u "$path"`
24380     fi
24381     if test "x$new_path" = x; then
24382       # It's still not found. Now this is an unrecoverable error.
24383       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24384 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24385       has_space=`$ECHO "$complete" | $GREP " "`
24386       if test "x$has_space" != x; then
24387         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24388 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24389       fi
24390       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24391     fi
24392   fi
24393 
24394   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24395   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24396   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24397   # "foo.exe" is OK but "foo" is an error.
24398   #
24399   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24400   # It is also a way to make sure we got the proper file name for the real test later on.
24401   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24402   if test "x$test_shortpath" = x; then
24403     # Short path failed, file does not exist as specified.
24404     # Try adding .exe or .cmd
24405     if test -f "${new_path}.exe"; then
24406       input_to_shortpath="${new_path}.exe"
24407     elif test -f "${new_path}.cmd"; then
24408       input_to_shortpath="${new_path}.cmd"
24409     else
24410       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24411 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24412       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24413 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24414       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24415     fi
24416   else
24417     input_to_shortpath="$new_path"
24418   fi
24419 
24420   # Call helper function which possibly converts this using DOS-style short mode.
24421   # If so, the updated path is stored in $new_path.
24422   new_path="$input_to_shortpath"
24423 
24424   input_path="$input_to_shortpath"
24425   # Check if we need to convert this using DOS-style short mode. If the path
24426   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24427   # take no chances and rewrite it.
24428   # Note: m4 eats our [], so we need to use [ and ] instead.
24429   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24430   if test "x$has_forbidden_chars" != x; then
24431     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24432     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24433     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24434     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24435       # Going to short mode and back again did indeed matter. Since short mode is
24436       # case insensitive, let's make it lowercase to improve readability.
24437       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24438       # Now convert it back to Unix-stile (cygpath)
24439       input_path=`$CYGPATH -u "$shortmode_path"`
24440       new_path="$input_path"
24441     fi
24442   fi
24443 
24444   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24445   if test "x$test_cygdrive_prefix" = x; then
24446     # As a simple fix, exclude /usr/bin since it's not a real path.
24447     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24448       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24449       # a path prefixed by /cygdrive for fixpath to work.
24450       new_path="$CYGWIN_ROOT_PATH$input_path"
24451     fi
24452   fi
24453 
24454   # remove trailing .exe if any
24455   new_path="${new_path/%.exe/}"
24456 
24457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24458 
24459   # First separate the path from the arguments. This will split at the first
24460   # space.
24461   complete="$DUMPBIN"
24462   path="${complete%% *}"
24463   tmp="$complete EOL"
24464   arguments="${tmp#* }"
24465 
24466   # Input might be given as Windows format, start by converting to
24467   # unix format.
24468   new_path="$path"
24469 
24470   windows_path="$new_path"
24471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24472     unix_path=`$CYGPATH -u "$windows_path"`
24473     new_path="$unix_path"
24474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24476     new_path="$unix_path"
24477   fi
24478 
24479 
24480   # Now try to locate executable using which
24481   new_path=`$WHICH "$new_path" 2> /dev/null`
24482 
24483   if test "x$new_path" = x; then
24484     # Oops. Which didn't find the executable.
24485     # The splitting of arguments from the executable at a space might have been incorrect,
24486     # since paths with space are more likely in Windows. Give it another try with the whole
24487     # argument.
24488     path="$complete"
24489     arguments="EOL"
24490     new_path="$path"
24491 
24492   windows_path="$new_path"
24493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24494     unix_path=`$CYGPATH -u "$windows_path"`
24495     new_path="$unix_path"
24496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24497     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24498     new_path="$unix_path"
24499   fi
24500 
24501 
24502     new_path=`$WHICH "$new_path" 2> /dev/null`
24503 
24504     if test "x$new_path" = x; then
24505       # It's still not found. Now this is an unrecoverable error.
24506       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24507 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24508       has_space=`$ECHO "$complete" | $GREP " "`
24509       if test "x$has_space" != x; then
24510         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24511 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24512       fi
24513       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24514     fi
24515   fi
24516 
24517   # Now new_path has a complete unix path to the binary
24518   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24519     # Keep paths in /bin as-is, but remove trailing .exe if any
24520     new_path="${new_path/%.exe/}"
24521     # Do not save /bin paths to all_fixpath_prefixes!
24522   else
24523     # Not in mixed or Windows style, start by that.
24524     new_path=`cmd //c echo $new_path`
24525 
24526   input_path="$new_path"
24527   # Check if we need to convert this using DOS-style short mode. If the path
24528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24529   # take no chances and rewrite it.
24530   # Note: m4 eats our [], so we need to use [ and ] instead.
24531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24532   if test "x$has_forbidden_chars" != x; then
24533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24534     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24535   fi
24536 
24537     # Output is in $new_path
24538 
24539   windows_path="$new_path"
24540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24541     unix_path=`$CYGPATH -u "$windows_path"`
24542     new_path="$unix_path"
24543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24545     new_path="$unix_path"
24546   fi
24547 
24548     # remove trailing .exe if any
24549     new_path="${new_path/%.exe/}"
24550 
24551     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24552     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24553   fi
24554 
24555   else
24556     # We're on a posix platform. Hooray! :)
24557     # First separate the path from the arguments. This will split at the first
24558     # space.
24559     complete="$DUMPBIN"
24560     path="${complete%% *}"
24561     tmp="$complete EOL"
24562     arguments="${tmp#* }"
24563 
24564     # Cannot rely on the command "which" here since it doesn't always work.
24565     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24566     if test -z "$is_absolute_path"; then
24567       # Path to executable is not absolute. Find it.
24568       IFS_save="$IFS"
24569       IFS=:
24570       for p in $PATH; do
24571         if test -f "$p/$path" && test -x "$p/$path"; then
24572           new_path="$p/$path"
24573           break
24574         fi
24575       done
24576       IFS="$IFS_save"
24577     else
24578       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24579 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24580       new_path="$path"
24581     fi
24582 
24583     if test "x$new_path" = x; then
24584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24585 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24586       has_space=`$ECHO "$complete" | $GREP " "`
24587       if test "x$has_space" != x; then
24588         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24589 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24590       fi
24591       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24592     fi
24593   fi
24594 
24595   # Now join together the path and the arguments once again
24596   if test "x$arguments" != xEOL; then
24597     new_complete="$new_path ${arguments% *}"
24598   else
24599     new_complete="$new_path"
24600   fi
24601 
24602   if test "x$complete" != "x$new_complete"; then
24603     DUMPBIN="$new_complete"
24604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24605 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24606   fi
24607 
24608 
24609       COMPILER_TYPE=CL
24610       CCXXFLAGS="$CCXXFLAGS -nologo"
24611 
24612 fi
24613 
24614 
24615 
24616   ac_ext=c
24617 ac_cpp='$CPP $CPPFLAGS'
24618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24622 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24623 # On Suns, sometimes $CPP names a directory.
24624 if test -n "$CPP" && test -d "$CPP"; then
24625   CPP=
24626 fi
24627 if test -z "$CPP"; then
24628   if ${ac_cv_prog_CPP+:} false; then :
24629   $as_echo_n "(cached) " >&6
24630 else
24631       # Double quotes because CPP needs to be expanded
24632     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24633     do
24634       ac_preproc_ok=false
24635 for ac_c_preproc_warn_flag in '' yes
24636 do
24637   # Use a header file that comes with gcc, so configuring glibc
24638   # with a fresh cross-compiler works.
24639   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24640   # <limits.h> exists even on freestanding compilers.
24641   # On the NeXT, cc -E runs the code through the compiler's parser,
24642   # not just through cpp. "Syntax error" is here to catch this case.
24643   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24644 /* end confdefs.h.  */
24645 #ifdef __STDC__
24646 # include <limits.h>
24647 #else
24648 # include <assert.h>
24649 #endif
24650                      Syntax error
24651 _ACEOF
24652 if ac_fn_c_try_cpp "$LINENO"; then :
24653 
24654 else
24655   # Broken: fails on valid input.
24656 continue
24657 fi
24658 rm -f conftest.err conftest.i conftest.$ac_ext
24659 
24660   # OK, works on sane cases.  Now check whether nonexistent headers
24661   # can be detected and how.
24662   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24663 /* end confdefs.h.  */
24664 #include <ac_nonexistent.h>
24665 _ACEOF
24666 if ac_fn_c_try_cpp "$LINENO"; then :
24667   # Broken: success on invalid input.
24668 continue
24669 else
24670   # Passes both tests.
24671 ac_preproc_ok=:
24672 break
24673 fi
24674 rm -f conftest.err conftest.i conftest.$ac_ext
24675 
24676 done
24677 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24678 rm -f conftest.i conftest.err conftest.$ac_ext
24679 if $ac_preproc_ok; then :
24680   break
24681 fi
24682 
24683     done
24684     ac_cv_prog_CPP=$CPP
24685 
24686 fi
24687   CPP=$ac_cv_prog_CPP
24688 else
24689   ac_cv_prog_CPP=$CPP
24690 fi
24691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24692 $as_echo "$CPP" >&6; }
24693 ac_preproc_ok=false
24694 for ac_c_preproc_warn_flag in '' yes
24695 do
24696   # Use a header file that comes with gcc, so configuring glibc
24697   # with a fresh cross-compiler works.
24698   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24699   # <limits.h> exists even on freestanding compilers.
24700   # On the NeXT, cc -E runs the code through the compiler's parser,
24701   # not just through cpp. "Syntax error" is here to catch this case.
24702   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24703 /* end confdefs.h.  */
24704 #ifdef __STDC__
24705 # include <limits.h>
24706 #else
24707 # include <assert.h>
24708 #endif
24709                      Syntax error
24710 _ACEOF
24711 if ac_fn_c_try_cpp "$LINENO"; then :
24712 
24713 else
24714   # Broken: fails on valid input.
24715 continue
24716 fi
24717 rm -f conftest.err conftest.i conftest.$ac_ext
24718 
24719   # OK, works on sane cases.  Now check whether nonexistent headers
24720   # can be detected and how.
24721   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24722 /* end confdefs.h.  */
24723 #include <ac_nonexistent.h>
24724 _ACEOF
24725 if ac_fn_c_try_cpp "$LINENO"; then :
24726   # Broken: success on invalid input.
24727 continue
24728 else
24729   # Passes both tests.
24730 ac_preproc_ok=:
24731 break
24732 fi
24733 rm -f conftest.err conftest.i conftest.$ac_ext
24734 
24735 done
24736 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24737 rm -f conftest.i conftest.err conftest.$ac_ext
24738 if $ac_preproc_ok; then :
24739 
24740 else
24741   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24742 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24743 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24744 See \`config.log' for more details" "$LINENO" 5; }
24745 fi
24746 
24747 ac_ext=cpp
24748 ac_cpp='$CXXCPP $CPPFLAGS'
24749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24752 
24753 
24754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24755 
24756   # First separate the path from the arguments. This will split at the first
24757   # space.
24758   complete="$CPP"
24759   path="${complete%% *}"
24760   tmp="$complete EOL"
24761   arguments="${tmp#* }"
24762 
24763   # Input might be given as Windows format, start by converting to
24764   # unix format.
24765   new_path=`$CYGPATH -u "$path"`
24766 
24767   # Now try to locate executable using which
24768   new_path=`$WHICH "$new_path" 2> /dev/null`
24769   # bat and cmd files are not always considered executable in cygwin causing which
24770   # to not find them
24771   if test "x$new_path" = x \
24772       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24773       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24774     new_path=`$CYGPATH -u "$path"`
24775   fi
24776   if test "x$new_path" = x; then
24777     # Oops. Which didn't find the executable.
24778     # The splitting of arguments from the executable at a space might have been incorrect,
24779     # since paths with space are more likely in Windows. Give it another try with the whole
24780     # argument.
24781     path="$complete"
24782     arguments="EOL"
24783     new_path=`$CYGPATH -u "$path"`
24784     new_path=`$WHICH "$new_path" 2> /dev/null`
24785     # bat and cmd files are not always considered executable in cygwin causing which
24786     # to not find them
24787     if test "x$new_path" = x \
24788         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24789         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24790       new_path=`$CYGPATH -u "$path"`
24791     fi
24792     if test "x$new_path" = x; then
24793       # It's still not found. Now this is an unrecoverable error.
24794       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24795 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24796       has_space=`$ECHO "$complete" | $GREP " "`
24797       if test "x$has_space" != x; then
24798         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24799 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24800       fi
24801       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24802     fi
24803   fi
24804 
24805   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24806   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24807   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24808   # "foo.exe" is OK but "foo" is an error.
24809   #
24810   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24811   # It is also a way to make sure we got the proper file name for the real test later on.
24812   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24813   if test "x$test_shortpath" = x; then
24814     # Short path failed, file does not exist as specified.
24815     # Try adding .exe or .cmd
24816     if test -f "${new_path}.exe"; then
24817       input_to_shortpath="${new_path}.exe"
24818     elif test -f "${new_path}.cmd"; then
24819       input_to_shortpath="${new_path}.cmd"
24820     else
24821       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24822 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24823       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24824 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24825       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24826     fi
24827   else
24828     input_to_shortpath="$new_path"
24829   fi
24830 
24831   # Call helper function which possibly converts this using DOS-style short mode.
24832   # If so, the updated path is stored in $new_path.
24833   new_path="$input_to_shortpath"
24834 
24835   input_path="$input_to_shortpath"
24836   # Check if we need to convert this using DOS-style short mode. If the path
24837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24838   # take no chances and rewrite it.
24839   # Note: m4 eats our [], so we need to use [ and ] instead.
24840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24841   if test "x$has_forbidden_chars" != x; then
24842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24843     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24844     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24845     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24846       # Going to short mode and back again did indeed matter. Since short mode is
24847       # case insensitive, let's make it lowercase to improve readability.
24848       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24849       # Now convert it back to Unix-stile (cygpath)
24850       input_path=`$CYGPATH -u "$shortmode_path"`
24851       new_path="$input_path"
24852     fi
24853   fi
24854 
24855   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24856   if test "x$test_cygdrive_prefix" = x; then
24857     # As a simple fix, exclude /usr/bin since it's not a real path.
24858     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24859       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24860       # a path prefixed by /cygdrive for fixpath to work.
24861       new_path="$CYGWIN_ROOT_PATH$input_path"
24862     fi
24863   fi
24864 
24865   # remove trailing .exe if any
24866   new_path="${new_path/%.exe/}"
24867 
24868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24869 
24870   # First separate the path from the arguments. This will split at the first
24871   # space.
24872   complete="$CPP"
24873   path="${complete%% *}"
24874   tmp="$complete EOL"
24875   arguments="${tmp#* }"
24876 
24877   # Input might be given as Windows format, start by converting to
24878   # unix format.
24879   new_path="$path"
24880 
24881   windows_path="$new_path"
24882   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24883     unix_path=`$CYGPATH -u "$windows_path"`
24884     new_path="$unix_path"
24885   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24886     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24887     new_path="$unix_path"
24888   fi
24889 
24890 
24891   # Now try to locate executable using which
24892   new_path=`$WHICH "$new_path" 2> /dev/null`
24893 
24894   if test "x$new_path" = x; then
24895     # Oops. Which didn't find the executable.
24896     # The splitting of arguments from the executable at a space might have been incorrect,
24897     # since paths with space are more likely in Windows. Give it another try with the whole
24898     # argument.
24899     path="$complete"
24900     arguments="EOL"
24901     new_path="$path"
24902 
24903   windows_path="$new_path"
24904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24905     unix_path=`$CYGPATH -u "$windows_path"`
24906     new_path="$unix_path"
24907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24909     new_path="$unix_path"
24910   fi
24911 
24912 
24913     new_path=`$WHICH "$new_path" 2> /dev/null`
24914 
24915     if test "x$new_path" = x; then
24916       # It's still not found. Now this is an unrecoverable error.
24917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24918 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24919       has_space=`$ECHO "$complete" | $GREP " "`
24920       if test "x$has_space" != x; then
24921         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24922 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24923       fi
24924       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24925     fi
24926   fi
24927 
24928   # Now new_path has a complete unix path to the binary
24929   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24930     # Keep paths in /bin as-is, but remove trailing .exe if any
24931     new_path="${new_path/%.exe/}"
24932     # Do not save /bin paths to all_fixpath_prefixes!
24933   else
24934     # Not in mixed or Windows style, start by that.
24935     new_path=`cmd //c echo $new_path`
24936 
24937   input_path="$new_path"
24938   # Check if we need to convert this using DOS-style short mode. If the path
24939   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24940   # take no chances and rewrite it.
24941   # Note: m4 eats our [], so we need to use [ and ] instead.
24942   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24943   if test "x$has_forbidden_chars" != x; then
24944     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24945     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24946   fi
24947 
24948     # Output is in $new_path
24949 
24950   windows_path="$new_path"
24951   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24952     unix_path=`$CYGPATH -u "$windows_path"`
24953     new_path="$unix_path"
24954   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24955     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24956     new_path="$unix_path"
24957   fi
24958 
24959     # remove trailing .exe if any
24960     new_path="${new_path/%.exe/}"
24961 
24962     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24963     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24964   fi
24965 
24966   else
24967     # We're on a posix platform. Hooray! :)
24968     # First separate the path from the arguments. This will split at the first
24969     # space.
24970     complete="$CPP"
24971     path="${complete%% *}"
24972     tmp="$complete EOL"
24973     arguments="${tmp#* }"
24974 
24975     # Cannot rely on the command "which" here since it doesn't always work.
24976     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24977     if test -z "$is_absolute_path"; then
24978       # Path to executable is not absolute. Find it.
24979       IFS_save="$IFS"
24980       IFS=:
24981       for p in $PATH; do
24982         if test -f "$p/$path" && test -x "$p/$path"; then
24983           new_path="$p/$path"
24984           break
24985         fi
24986       done
24987       IFS="$IFS_save"
24988     else
24989       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24990 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24991       new_path="$path"
24992     fi
24993 
24994     if test "x$new_path" = x; then
24995       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24996 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24997       has_space=`$ECHO "$complete" | $GREP " "`
24998       if test "x$has_space" != x; then
24999         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25000 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25001       fi
25002       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25003     fi
25004   fi
25005 
25006   # Now join together the path and the arguments once again
25007   if test "x$arguments" != xEOL; then
25008     new_complete="$new_path ${arguments% *}"
25009   else
25010     new_complete="$new_path"
25011   fi
25012 
25013   if test "x$complete" != "x$new_complete"; then
25014     CPP="$new_complete"
25015     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25016 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25017   fi
25018 
25019 
25020   ac_ext=cpp
25021 ac_cpp='$CXXCPP $CPPFLAGS'
25022 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25023 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25024 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25026 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25027 if test -z "$CXXCPP"; then
25028   if ${ac_cv_prog_CXXCPP+:} false; then :
25029   $as_echo_n "(cached) " >&6
25030 else
25031       # Double quotes because CXXCPP needs to be expanded
25032     for CXXCPP in "$CXX -E" "/lib/cpp"
25033     do
25034       ac_preproc_ok=false
25035 for ac_cxx_preproc_warn_flag in '' yes
25036 do
25037   # Use a header file that comes with gcc, so configuring glibc
25038   # with a fresh cross-compiler works.
25039   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25040   # <limits.h> exists even on freestanding compilers.
25041   # On the NeXT, cc -E runs the code through the compiler's parser,
25042   # not just through cpp. "Syntax error" is here to catch this case.
25043   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25044 /* end confdefs.h.  */
25045 #ifdef __STDC__
25046 # include <limits.h>
25047 #else
25048 # include <assert.h>
25049 #endif
25050                      Syntax error
25051 _ACEOF
25052 if ac_fn_cxx_try_cpp "$LINENO"; then :
25053 
25054 else
25055   # Broken: fails on valid input.
25056 continue
25057 fi
25058 rm -f conftest.err conftest.i conftest.$ac_ext
25059 
25060   # OK, works on sane cases.  Now check whether nonexistent headers
25061   # can be detected and how.
25062   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25063 /* end confdefs.h.  */
25064 #include <ac_nonexistent.h>
25065 _ACEOF
25066 if ac_fn_cxx_try_cpp "$LINENO"; then :
25067   # Broken: success on invalid input.
25068 continue
25069 else
25070   # Passes both tests.
25071 ac_preproc_ok=:
25072 break
25073 fi
25074 rm -f conftest.err conftest.i conftest.$ac_ext
25075 
25076 done
25077 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25078 rm -f conftest.i conftest.err conftest.$ac_ext
25079 if $ac_preproc_ok; then :
25080   break
25081 fi
25082 
25083     done
25084     ac_cv_prog_CXXCPP=$CXXCPP
25085 
25086 fi
25087   CXXCPP=$ac_cv_prog_CXXCPP
25088 else
25089   ac_cv_prog_CXXCPP=$CXXCPP
25090 fi
25091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25092 $as_echo "$CXXCPP" >&6; }
25093 ac_preproc_ok=false
25094 for ac_cxx_preproc_warn_flag in '' yes
25095 do
25096   # Use a header file that comes with gcc, so configuring glibc
25097   # with a fresh cross-compiler works.
25098   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25099   # <limits.h> exists even on freestanding compilers.
25100   # On the NeXT, cc -E runs the code through the compiler's parser,
25101   # not just through cpp. "Syntax error" is here to catch this case.
25102   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25103 /* end confdefs.h.  */
25104 #ifdef __STDC__
25105 # include <limits.h>
25106 #else
25107 # include <assert.h>
25108 #endif
25109                      Syntax error
25110 _ACEOF
25111 if ac_fn_cxx_try_cpp "$LINENO"; then :
25112 
25113 else
25114   # Broken: fails on valid input.
25115 continue
25116 fi
25117 rm -f conftest.err conftest.i conftest.$ac_ext
25118 
25119   # OK, works on sane cases.  Now check whether nonexistent headers
25120   # can be detected and how.
25121   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25122 /* end confdefs.h.  */
25123 #include <ac_nonexistent.h>
25124 _ACEOF
25125 if ac_fn_cxx_try_cpp "$LINENO"; then :
25126   # Broken: success on invalid input.
25127 continue
25128 else
25129   # Passes both tests.
25130 ac_preproc_ok=:
25131 break
25132 fi
25133 rm -f conftest.err conftest.i conftest.$ac_ext
25134 
25135 done
25136 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25137 rm -f conftest.i conftest.err conftest.$ac_ext
25138 if $ac_preproc_ok; then :
25139 
25140 else
25141   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25142 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25143 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25144 See \`config.log' for more details" "$LINENO" 5; }
25145 fi
25146 
25147 ac_ext=cpp
25148 ac_cpp='$CXXCPP $CPPFLAGS'
25149 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25150 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25151 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25152 
25153 
25154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25155 
25156   # First separate the path from the arguments. This will split at the first
25157   # space.
25158   complete="$CXXCPP"
25159   path="${complete%% *}"
25160   tmp="$complete EOL"
25161   arguments="${tmp#* }"
25162 
25163   # Input might be given as Windows format, start by converting to
25164   # unix format.
25165   new_path=`$CYGPATH -u "$path"`
25166 
25167   # Now try to locate executable using which
25168   new_path=`$WHICH "$new_path" 2> /dev/null`
25169   # bat and cmd files are not always considered executable in cygwin causing which
25170   # to not find them
25171   if test "x$new_path" = x \
25172       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25173       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25174     new_path=`$CYGPATH -u "$path"`
25175   fi
25176   if test "x$new_path" = x; then
25177     # Oops. Which didn't find the executable.
25178     # The splitting of arguments from the executable at a space might have been incorrect,
25179     # since paths with space are more likely in Windows. Give it another try with the whole
25180     # argument.
25181     path="$complete"
25182     arguments="EOL"
25183     new_path=`$CYGPATH -u "$path"`
25184     new_path=`$WHICH "$new_path" 2> /dev/null`
25185     # bat and cmd files are not always considered executable in cygwin causing which
25186     # to not find them
25187     if test "x$new_path" = x \
25188         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25189         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25190       new_path=`$CYGPATH -u "$path"`
25191     fi
25192     if test "x$new_path" = x; then
25193       # It's still not found. Now this is an unrecoverable error.
25194       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25195 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25196       has_space=`$ECHO "$complete" | $GREP " "`
25197       if test "x$has_space" != x; then
25198         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25199 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25200       fi
25201       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25202     fi
25203   fi
25204 
25205   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25206   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25207   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25208   # "foo.exe" is OK but "foo" is an error.
25209   #
25210   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25211   # It is also a way to make sure we got the proper file name for the real test later on.
25212   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25213   if test "x$test_shortpath" = x; then
25214     # Short path failed, file does not exist as specified.
25215     # Try adding .exe or .cmd
25216     if test -f "${new_path}.exe"; then
25217       input_to_shortpath="${new_path}.exe"
25218     elif test -f "${new_path}.cmd"; then
25219       input_to_shortpath="${new_path}.cmd"
25220     else
25221       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25222 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25223       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25224 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25225       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25226     fi
25227   else
25228     input_to_shortpath="$new_path"
25229   fi
25230 
25231   # Call helper function which possibly converts this using DOS-style short mode.
25232   # If so, the updated path is stored in $new_path.
25233   new_path="$input_to_shortpath"
25234 
25235   input_path="$input_to_shortpath"
25236   # Check if we need to convert this using DOS-style short mode. If the path
25237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25238   # take no chances and rewrite it.
25239   # Note: m4 eats our [], so we need to use [ and ] instead.
25240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25241   if test "x$has_forbidden_chars" != x; then
25242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25246       # Going to short mode and back again did indeed matter. Since short mode is
25247       # case insensitive, let's make it lowercase to improve readability.
25248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25249       # Now convert it back to Unix-stile (cygpath)
25250       input_path=`$CYGPATH -u "$shortmode_path"`
25251       new_path="$input_path"
25252     fi
25253   fi
25254 
25255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25256   if test "x$test_cygdrive_prefix" = x; then
25257     # As a simple fix, exclude /usr/bin since it's not a real path.
25258     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25260       # a path prefixed by /cygdrive for fixpath to work.
25261       new_path="$CYGWIN_ROOT_PATH$input_path"
25262     fi
25263   fi
25264 
25265   # remove trailing .exe if any
25266   new_path="${new_path/%.exe/}"
25267 
25268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25269 
25270   # First separate the path from the arguments. This will split at the first
25271   # space.
25272   complete="$CXXCPP"
25273   path="${complete%% *}"
25274   tmp="$complete EOL"
25275   arguments="${tmp#* }"
25276 
25277   # Input might be given as Windows format, start by converting to
25278   # unix format.
25279   new_path="$path"
25280 
25281   windows_path="$new_path"
25282   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25283     unix_path=`$CYGPATH -u "$windows_path"`
25284     new_path="$unix_path"
25285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25286     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25287     new_path="$unix_path"
25288   fi
25289 
25290 
25291   # Now try to locate executable using which
25292   new_path=`$WHICH "$new_path" 2> /dev/null`
25293 
25294   if test "x$new_path" = x; then
25295     # Oops. Which didn't find the executable.
25296     # The splitting of arguments from the executable at a space might have been incorrect,
25297     # since paths with space are more likely in Windows. Give it another try with the whole
25298     # argument.
25299     path="$complete"
25300     arguments="EOL"
25301     new_path="$path"
25302 
25303   windows_path="$new_path"
25304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25305     unix_path=`$CYGPATH -u "$windows_path"`
25306     new_path="$unix_path"
25307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25309     new_path="$unix_path"
25310   fi
25311 
25312 
25313     new_path=`$WHICH "$new_path" 2> /dev/null`
25314 
25315     if test "x$new_path" = x; then
25316       # It's still not found. Now this is an unrecoverable error.
25317       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25318 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25319       has_space=`$ECHO "$complete" | $GREP " "`
25320       if test "x$has_space" != x; then
25321         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25322 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25323       fi
25324       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25325     fi
25326   fi
25327 
25328   # Now new_path has a complete unix path to the binary
25329   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25330     # Keep paths in /bin as-is, but remove trailing .exe if any
25331     new_path="${new_path/%.exe/}"
25332     # Do not save /bin paths to all_fixpath_prefixes!
25333   else
25334     # Not in mixed or Windows style, start by that.
25335     new_path=`cmd //c echo $new_path`
25336 
25337   input_path="$new_path"
25338   # Check if we need to convert this using DOS-style short mode. If the path
25339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25340   # take no chances and rewrite it.
25341   # Note: m4 eats our [], so we need to use [ and ] instead.
25342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25343   if test "x$has_forbidden_chars" != x; then
25344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25346   fi
25347 
25348     # Output is in $new_path
25349 
25350   windows_path="$new_path"
25351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25352     unix_path=`$CYGPATH -u "$windows_path"`
25353     new_path="$unix_path"
25354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25356     new_path="$unix_path"
25357   fi
25358 
25359     # remove trailing .exe if any
25360     new_path="${new_path/%.exe/}"
25361 
25362     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25363     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25364   fi
25365 
25366   else
25367     # We're on a posix platform. Hooray! :)
25368     # First separate the path from the arguments. This will split at the first
25369     # space.
25370     complete="$CXXCPP"
25371     path="${complete%% *}"
25372     tmp="$complete EOL"
25373     arguments="${tmp#* }"
25374 
25375     # Cannot rely on the command "which" here since it doesn't always work.
25376     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25377     if test -z "$is_absolute_path"; then
25378       # Path to executable is not absolute. Find it.
25379       IFS_save="$IFS"
25380       IFS=:
25381       for p in $PATH; do
25382         if test -f "$p/$path" && test -x "$p/$path"; then
25383           new_path="$p/$path"
25384           break
25385         fi
25386       done
25387       IFS="$IFS_save"
25388     else
25389       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25390 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25391       new_path="$path"
25392     fi
25393 
25394     if test "x$new_path" = x; then
25395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25396 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25397       has_space=`$ECHO "$complete" | $GREP " "`
25398       if test "x$has_space" != x; then
25399         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25400 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25401       fi
25402       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25403     fi
25404   fi
25405 
25406   # Now join together the path and the arguments once again
25407   if test "x$arguments" != xEOL; then
25408     new_complete="$new_path ${arguments% *}"
25409   else
25410     new_complete="$new_path"
25411   fi
25412 
25413   if test "x$complete" != "x$new_complete"; then
25414     CXXCPP="$new_complete"
25415     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25416 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25417   fi
25418 
25419 
25420   if test "x$COMPILE_TYPE" != "xcross"; then
25421     # If we are not cross compiling, use the same compilers for
25422     # building the build platform executables. The cross-compilation
25423     # case needed to be done earlier, but this can only be done after
25424     # the native tools have been localized.
25425     BUILD_CC="$CC"
25426     BUILD_CXX="$CXX"
25427     BUILD_LD="$LD"
25428   fi
25429 
25430   # for solaris we really need solaris tools, and not gnu equivalent
25431   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25432   #   starting to probe
25433   #
25434   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25435   #         so that it can be overriden --with-tools-dir
25436   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25437     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25438   fi
25439 
25440   # Find the right assembler.
25441   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25442     # Extract the first word of "as", so it can be a program name with args.
25443 set dummy as; ac_word=$2
25444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25445 $as_echo_n "checking for $ac_word... " >&6; }
25446 if ${ac_cv_path_AS+:} false; then :
25447   $as_echo_n "(cached) " >&6
25448 else
25449   case $AS in
25450   [\\/]* | ?:[\\/]*)
25451   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25452   ;;
25453   *)
25454   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25455 for as_dir in $PATH
25456 do
25457   IFS=$as_save_IFS
25458   test -z "$as_dir" && as_dir=.
25459     for ac_exec_ext in '' $ac_executable_extensions; do
25460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25461     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25463     break 2
25464   fi
25465 done
25466   done
25467 IFS=$as_save_IFS
25468 
25469   ;;
25470 esac
25471 fi
25472 AS=$ac_cv_path_AS
25473 if test -n "$AS"; then
25474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25475 $as_echo "$AS" >&6; }
25476 else
25477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25478 $as_echo "no" >&6; }
25479 fi
25480 
25481 
25482 
25483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25484 
25485   # First separate the path from the arguments. This will split at the first
25486   # space.
25487   complete="$AS"
25488   path="${complete%% *}"
25489   tmp="$complete EOL"
25490   arguments="${tmp#* }"
25491 
25492   # Input might be given as Windows format, start by converting to
25493   # unix format.
25494   new_path=`$CYGPATH -u "$path"`
25495 
25496   # Now try to locate executable using which
25497   new_path=`$WHICH "$new_path" 2> /dev/null`
25498   # bat and cmd files are not always considered executable in cygwin causing which
25499   # to not find them
25500   if test "x$new_path" = x \
25501       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25502       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25503     new_path=`$CYGPATH -u "$path"`
25504   fi
25505   if test "x$new_path" = x; then
25506     # Oops. Which didn't find the executable.
25507     # The splitting of arguments from the executable at a space might have been incorrect,
25508     # since paths with space are more likely in Windows. Give it another try with the whole
25509     # argument.
25510     path="$complete"
25511     arguments="EOL"
25512     new_path=`$CYGPATH -u "$path"`
25513     new_path=`$WHICH "$new_path" 2> /dev/null`
25514     # bat and cmd files are not always considered executable in cygwin causing which
25515     # to not find them
25516     if test "x$new_path" = x \
25517         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25518         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25519       new_path=`$CYGPATH -u "$path"`
25520     fi
25521     if test "x$new_path" = x; then
25522       # It's still not found. Now this is an unrecoverable error.
25523       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25524 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25525       has_space=`$ECHO "$complete" | $GREP " "`
25526       if test "x$has_space" != x; then
25527         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25528 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25529       fi
25530       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25531     fi
25532   fi
25533 
25534   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25535   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25536   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25537   # "foo.exe" is OK but "foo" is an error.
25538   #
25539   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25540   # It is also a way to make sure we got the proper file name for the real test later on.
25541   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25542   if test "x$test_shortpath" = x; then
25543     # Short path failed, file does not exist as specified.
25544     # Try adding .exe or .cmd
25545     if test -f "${new_path}.exe"; then
25546       input_to_shortpath="${new_path}.exe"
25547     elif test -f "${new_path}.cmd"; then
25548       input_to_shortpath="${new_path}.cmd"
25549     else
25550       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25551 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25552       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25553 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25554       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25555     fi
25556   else
25557     input_to_shortpath="$new_path"
25558   fi
25559 
25560   # Call helper function which possibly converts this using DOS-style short mode.
25561   # If so, the updated path is stored in $new_path.
25562   new_path="$input_to_shortpath"
25563 
25564   input_path="$input_to_shortpath"
25565   # Check if we need to convert this using DOS-style short mode. If the path
25566   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25567   # take no chances and rewrite it.
25568   # Note: m4 eats our [], so we need to use [ and ] instead.
25569   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25570   if test "x$has_forbidden_chars" != x; then
25571     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25572     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25573     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25574     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25575       # Going to short mode and back again did indeed matter. Since short mode is
25576       # case insensitive, let's make it lowercase to improve readability.
25577       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25578       # Now convert it back to Unix-stile (cygpath)
25579       input_path=`$CYGPATH -u "$shortmode_path"`
25580       new_path="$input_path"
25581     fi
25582   fi
25583 
25584   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25585   if test "x$test_cygdrive_prefix" = x; then
25586     # As a simple fix, exclude /usr/bin since it's not a real path.
25587     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25588       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25589       # a path prefixed by /cygdrive for fixpath to work.
25590       new_path="$CYGWIN_ROOT_PATH$input_path"
25591     fi
25592   fi
25593 
25594   # remove trailing .exe if any
25595   new_path="${new_path/%.exe/}"
25596 
25597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25598 
25599   # First separate the path from the arguments. This will split at the first
25600   # space.
25601   complete="$AS"
25602   path="${complete%% *}"
25603   tmp="$complete EOL"
25604   arguments="${tmp#* }"
25605 
25606   # Input might be given as Windows format, start by converting to
25607   # unix format.
25608   new_path="$path"
25609 
25610   windows_path="$new_path"
25611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25612     unix_path=`$CYGPATH -u "$windows_path"`
25613     new_path="$unix_path"
25614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25615     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25616     new_path="$unix_path"
25617   fi
25618 
25619 
25620   # Now try to locate executable using which
25621   new_path=`$WHICH "$new_path" 2> /dev/null`
25622 
25623   if test "x$new_path" = x; then
25624     # Oops. Which didn't find the executable.
25625     # The splitting of arguments from the executable at a space might have been incorrect,
25626     # since paths with space are more likely in Windows. Give it another try with the whole
25627     # argument.
25628     path="$complete"
25629     arguments="EOL"
25630     new_path="$path"
25631 
25632   windows_path="$new_path"
25633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25634     unix_path=`$CYGPATH -u "$windows_path"`
25635     new_path="$unix_path"
25636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25638     new_path="$unix_path"
25639   fi
25640 
25641 
25642     new_path=`$WHICH "$new_path" 2> /dev/null`
25643 
25644     if test "x$new_path" = x; then
25645       # It's still not found. Now this is an unrecoverable error.
25646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25647 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25648       has_space=`$ECHO "$complete" | $GREP " "`
25649       if test "x$has_space" != x; then
25650         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25651 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25652       fi
25653       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25654     fi
25655   fi
25656 
25657   # Now new_path has a complete unix path to the binary
25658   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25659     # Keep paths in /bin as-is, but remove trailing .exe if any
25660     new_path="${new_path/%.exe/}"
25661     # Do not save /bin paths to all_fixpath_prefixes!
25662   else
25663     # Not in mixed or Windows style, start by that.
25664     new_path=`cmd //c echo $new_path`
25665 
25666   input_path="$new_path"
25667   # Check if we need to convert this using DOS-style short mode. If the path
25668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25669   # take no chances and rewrite it.
25670   # Note: m4 eats our [], so we need to use [ and ] instead.
25671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25672   if test "x$has_forbidden_chars" != x; then
25673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25674     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25675   fi
25676 
25677     # Output is in $new_path
25678 
25679   windows_path="$new_path"
25680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25681     unix_path=`$CYGPATH -u "$windows_path"`
25682     new_path="$unix_path"
25683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25685     new_path="$unix_path"
25686   fi
25687 
25688     # remove trailing .exe if any
25689     new_path="${new_path/%.exe/}"
25690 
25691     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25692     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25693   fi
25694 
25695   else
25696     # We're on a posix platform. Hooray! :)
25697     # First separate the path from the arguments. This will split at the first
25698     # space.
25699     complete="$AS"
25700     path="${complete%% *}"
25701     tmp="$complete EOL"
25702     arguments="${tmp#* }"
25703 
25704     # Cannot rely on the command "which" here since it doesn't always work.
25705     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25706     if test -z "$is_absolute_path"; then
25707       # Path to executable is not absolute. Find it.
25708       IFS_save="$IFS"
25709       IFS=:
25710       for p in $PATH; do
25711         if test -f "$p/$path" && test -x "$p/$path"; then
25712           new_path="$p/$path"
25713           break
25714         fi
25715       done
25716       IFS="$IFS_save"
25717     else
25718       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25719 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25720       new_path="$path"
25721     fi
25722 
25723     if test "x$new_path" = x; then
25724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25725 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25726       has_space=`$ECHO "$complete" | $GREP " "`
25727       if test "x$has_space" != x; then
25728         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25729 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25730       fi
25731       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25732     fi
25733   fi
25734 
25735   # Now join together the path and the arguments once again
25736   if test "x$arguments" != xEOL; then
25737     new_complete="$new_path ${arguments% *}"
25738   else
25739     new_complete="$new_path"
25740   fi
25741 
25742   if test "x$complete" != "x$new_complete"; then
25743     AS="$new_complete"
25744     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25745 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25746   fi
25747 
25748   else
25749     AS="$CC -c"
25750   fi
25751 
25752 
25753   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25754     # Extract the first word of "nm", so it can be a program name with args.
25755 set dummy nm; ac_word=$2
25756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25757 $as_echo_n "checking for $ac_word... " >&6; }
25758 if ${ac_cv_path_NM+:} false; then :
25759   $as_echo_n "(cached) " >&6
25760 else
25761   case $NM in
25762   [\\/]* | ?:[\\/]*)
25763   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25764   ;;
25765   *)
25766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25767 for as_dir in $PATH
25768 do
25769   IFS=$as_save_IFS
25770   test -z "$as_dir" && as_dir=.
25771     for ac_exec_ext in '' $ac_executable_extensions; do
25772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25773     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25775     break 2
25776   fi
25777 done
25778   done
25779 IFS=$as_save_IFS
25780 
25781   ;;
25782 esac
25783 fi
25784 NM=$ac_cv_path_NM
25785 if test -n "$NM"; then
25786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25787 $as_echo "$NM" >&6; }
25788 else
25789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25790 $as_echo "no" >&6; }
25791 fi
25792 
25793 
25794 
25795   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25796 
25797   # First separate the path from the arguments. This will split at the first
25798   # space.
25799   complete="$NM"
25800   path="${complete%% *}"
25801   tmp="$complete EOL"
25802   arguments="${tmp#* }"
25803 
25804   # Input might be given as Windows format, start by converting to
25805   # unix format.
25806   new_path=`$CYGPATH -u "$path"`
25807 
25808   # Now try to locate executable using which
25809   new_path=`$WHICH "$new_path" 2> /dev/null`
25810   # bat and cmd files are not always considered executable in cygwin causing which
25811   # to not find them
25812   if test "x$new_path" = x \
25813       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25814       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25815     new_path=`$CYGPATH -u "$path"`
25816   fi
25817   if test "x$new_path" = x; then
25818     # Oops. Which didn't find the executable.
25819     # The splitting of arguments from the executable at a space might have been incorrect,
25820     # since paths with space are more likely in Windows. Give it another try with the whole
25821     # argument.
25822     path="$complete"
25823     arguments="EOL"
25824     new_path=`$CYGPATH -u "$path"`
25825     new_path=`$WHICH "$new_path" 2> /dev/null`
25826     # bat and cmd files are not always considered executable in cygwin causing which
25827     # to not find them
25828     if test "x$new_path" = x \
25829         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25830         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25831       new_path=`$CYGPATH -u "$path"`
25832     fi
25833     if test "x$new_path" = x; then
25834       # It's still not found. Now this is an unrecoverable error.
25835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25836 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25837       has_space=`$ECHO "$complete" | $GREP " "`
25838       if test "x$has_space" != x; then
25839         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25840 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25841       fi
25842       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25843     fi
25844   fi
25845 
25846   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25847   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25848   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25849   # "foo.exe" is OK but "foo" is an error.
25850   #
25851   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25852   # It is also a way to make sure we got the proper file name for the real test later on.
25853   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25854   if test "x$test_shortpath" = x; then
25855     # Short path failed, file does not exist as specified.
25856     # Try adding .exe or .cmd
25857     if test -f "${new_path}.exe"; then
25858       input_to_shortpath="${new_path}.exe"
25859     elif test -f "${new_path}.cmd"; then
25860       input_to_shortpath="${new_path}.cmd"
25861     else
25862       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25863 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25864       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25865 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25866       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25867     fi
25868   else
25869     input_to_shortpath="$new_path"
25870   fi
25871 
25872   # Call helper function which possibly converts this using DOS-style short mode.
25873   # If so, the updated path is stored in $new_path.
25874   new_path="$input_to_shortpath"
25875 
25876   input_path="$input_to_shortpath"
25877   # Check if we need to convert this using DOS-style short mode. If the path
25878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25879   # take no chances and rewrite it.
25880   # Note: m4 eats our [], so we need to use [ and ] instead.
25881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25882   if test "x$has_forbidden_chars" != x; then
25883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25884     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25885     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25886     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25887       # Going to short mode and back again did indeed matter. Since short mode is
25888       # case insensitive, let's make it lowercase to improve readability.
25889       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25890       # Now convert it back to Unix-stile (cygpath)
25891       input_path=`$CYGPATH -u "$shortmode_path"`
25892       new_path="$input_path"
25893     fi
25894   fi
25895 
25896   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25897   if test "x$test_cygdrive_prefix" = x; then
25898     # As a simple fix, exclude /usr/bin since it's not a real path.
25899     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25900       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25901       # a path prefixed by /cygdrive for fixpath to work.
25902       new_path="$CYGWIN_ROOT_PATH$input_path"
25903     fi
25904   fi
25905 
25906   # remove trailing .exe if any
25907   new_path="${new_path/%.exe/}"
25908 
25909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25910 
25911   # First separate the path from the arguments. This will split at the first
25912   # space.
25913   complete="$NM"
25914   path="${complete%% *}"
25915   tmp="$complete EOL"
25916   arguments="${tmp#* }"
25917 
25918   # Input might be given as Windows format, start by converting to
25919   # unix format.
25920   new_path="$path"
25921 
25922   windows_path="$new_path"
25923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25924     unix_path=`$CYGPATH -u "$windows_path"`
25925     new_path="$unix_path"
25926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25928     new_path="$unix_path"
25929   fi
25930 
25931 
25932   # Now try to locate executable using which
25933   new_path=`$WHICH "$new_path" 2> /dev/null`
25934 
25935   if test "x$new_path" = x; then
25936     # Oops. Which didn't find the executable.
25937     # The splitting of arguments from the executable at a space might have been incorrect,
25938     # since paths with space are more likely in Windows. Give it another try with the whole
25939     # argument.
25940     path="$complete"
25941     arguments="EOL"
25942     new_path="$path"
25943 
25944   windows_path="$new_path"
25945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25946     unix_path=`$CYGPATH -u "$windows_path"`
25947     new_path="$unix_path"
25948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25950     new_path="$unix_path"
25951   fi
25952 
25953 
25954     new_path=`$WHICH "$new_path" 2> /dev/null`
25955 
25956     if test "x$new_path" = x; then
25957       # It's still not found. Now this is an unrecoverable error.
25958       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25959 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25960       has_space=`$ECHO "$complete" | $GREP " "`
25961       if test "x$has_space" != x; then
25962         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25963 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25964       fi
25965       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25966     fi
25967   fi
25968 
25969   # Now new_path has a complete unix path to the binary
25970   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25971     # Keep paths in /bin as-is, but remove trailing .exe if any
25972     new_path="${new_path/%.exe/}"
25973     # Do not save /bin paths to all_fixpath_prefixes!
25974   else
25975     # Not in mixed or Windows style, start by that.
25976     new_path=`cmd //c echo $new_path`
25977 
25978   input_path="$new_path"
25979   # Check if we need to convert this using DOS-style short mode. If the path
25980   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25981   # take no chances and rewrite it.
25982   # Note: m4 eats our [], so we need to use [ and ] instead.
25983   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25984   if test "x$has_forbidden_chars" != x; then
25985     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25986     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25987   fi
25988 
25989     # Output is in $new_path
25990 
25991   windows_path="$new_path"
25992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25993     unix_path=`$CYGPATH -u "$windows_path"`
25994     new_path="$unix_path"
25995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25997     new_path="$unix_path"
25998   fi
25999 
26000     # remove trailing .exe if any
26001     new_path="${new_path/%.exe/}"
26002 
26003     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26004     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26005   fi
26006 
26007   else
26008     # We're on a posix platform. Hooray! :)
26009     # First separate the path from the arguments. This will split at the first
26010     # space.
26011     complete="$NM"
26012     path="${complete%% *}"
26013     tmp="$complete EOL"
26014     arguments="${tmp#* }"
26015 
26016     # Cannot rely on the command "which" here since it doesn't always work.
26017     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26018     if test -z "$is_absolute_path"; then
26019       # Path to executable is not absolute. Find it.
26020       IFS_save="$IFS"
26021       IFS=:
26022       for p in $PATH; do
26023         if test -f "$p/$path" && test -x "$p/$path"; then
26024           new_path="$p/$path"
26025           break
26026         fi
26027       done
26028       IFS="$IFS_save"
26029     else
26030       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26031 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26032       new_path="$path"
26033     fi
26034 
26035     if test "x$new_path" = x; then
26036       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26037 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26038       has_space=`$ECHO "$complete" | $GREP " "`
26039       if test "x$has_space" != x; then
26040         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26041 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26042       fi
26043       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26044     fi
26045   fi
26046 
26047   # Now join together the path and the arguments once again
26048   if test "x$arguments" != xEOL; then
26049     new_complete="$new_path ${arguments% *}"
26050   else
26051     new_complete="$new_path"
26052   fi
26053 
26054   if test "x$complete" != "x$new_complete"; then
26055     NM="$new_complete"
26056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26057 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26058   fi
26059 
26060     # Extract the first word of "gnm", so it can be a program name with args.
26061 set dummy gnm; ac_word=$2
26062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26063 $as_echo_n "checking for $ac_word... " >&6; }
26064 if ${ac_cv_path_GNM+:} false; then :
26065   $as_echo_n "(cached) " >&6
26066 else
26067   case $GNM in
26068   [\\/]* | ?:[\\/]*)
26069   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26070   ;;
26071   *)
26072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26073 for as_dir in $PATH
26074 do
26075   IFS=$as_save_IFS
26076   test -z "$as_dir" && as_dir=.
26077     for ac_exec_ext in '' $ac_executable_extensions; do
26078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26079     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26081     break 2
26082   fi
26083 done
26084   done
26085 IFS=$as_save_IFS
26086 
26087   ;;
26088 esac
26089 fi
26090 GNM=$ac_cv_path_GNM
26091 if test -n "$GNM"; then
26092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26093 $as_echo "$GNM" >&6; }
26094 else
26095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26096 $as_echo "no" >&6; }
26097 fi
26098 
26099 
26100 
26101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26102 
26103   # First separate the path from the arguments. This will split at the first
26104   # space.
26105   complete="$GNM"
26106   path="${complete%% *}"
26107   tmp="$complete EOL"
26108   arguments="${tmp#* }"
26109 
26110   # Input might be given as Windows format, start by converting to
26111   # unix format.
26112   new_path=`$CYGPATH -u "$path"`
26113 
26114   # Now try to locate executable using which
26115   new_path=`$WHICH "$new_path" 2> /dev/null`
26116   # bat and cmd files are not always considered executable in cygwin causing which
26117   # to not find them
26118   if test "x$new_path" = x \
26119       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26120       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26121     new_path=`$CYGPATH -u "$path"`
26122   fi
26123   if test "x$new_path" = x; then
26124     # Oops. Which didn't find the executable.
26125     # The splitting of arguments from the executable at a space might have been incorrect,
26126     # since paths with space are more likely in Windows. Give it another try with the whole
26127     # argument.
26128     path="$complete"
26129     arguments="EOL"
26130     new_path=`$CYGPATH -u "$path"`
26131     new_path=`$WHICH "$new_path" 2> /dev/null`
26132     # bat and cmd files are not always considered executable in cygwin causing which
26133     # to not find them
26134     if test "x$new_path" = x \
26135         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26136         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26137       new_path=`$CYGPATH -u "$path"`
26138     fi
26139     if test "x$new_path" = x; then
26140       # It's still not found. Now this is an unrecoverable error.
26141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26142 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26143       has_space=`$ECHO "$complete" | $GREP " "`
26144       if test "x$has_space" != x; then
26145         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26146 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26147       fi
26148       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26149     fi
26150   fi
26151 
26152   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26153   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26154   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26155   # "foo.exe" is OK but "foo" is an error.
26156   #
26157   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26158   # It is also a way to make sure we got the proper file name for the real test later on.
26159   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26160   if test "x$test_shortpath" = x; then
26161     # Short path failed, file does not exist as specified.
26162     # Try adding .exe or .cmd
26163     if test -f "${new_path}.exe"; then
26164       input_to_shortpath="${new_path}.exe"
26165     elif test -f "${new_path}.cmd"; then
26166       input_to_shortpath="${new_path}.cmd"
26167     else
26168       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26169 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26170       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26171 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26172       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26173     fi
26174   else
26175     input_to_shortpath="$new_path"
26176   fi
26177 
26178   # Call helper function which possibly converts this using DOS-style short mode.
26179   # If so, the updated path is stored in $new_path.
26180   new_path="$input_to_shortpath"
26181 
26182   input_path="$input_to_shortpath"
26183   # Check if we need to convert this using DOS-style short mode. If the path
26184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26185   # take no chances and rewrite it.
26186   # Note: m4 eats our [], so we need to use [ and ] instead.
26187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26188   if test "x$has_forbidden_chars" != x; then
26189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26193       # Going to short mode and back again did indeed matter. Since short mode is
26194       # case insensitive, let's make it lowercase to improve readability.
26195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26196       # Now convert it back to Unix-stile (cygpath)
26197       input_path=`$CYGPATH -u "$shortmode_path"`
26198       new_path="$input_path"
26199     fi
26200   fi
26201 
26202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26203   if test "x$test_cygdrive_prefix" = x; then
26204     # As a simple fix, exclude /usr/bin since it's not a real path.
26205     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26207       # a path prefixed by /cygdrive for fixpath to work.
26208       new_path="$CYGWIN_ROOT_PATH$input_path"
26209     fi
26210   fi
26211 
26212   # remove trailing .exe if any
26213   new_path="${new_path/%.exe/}"
26214 
26215   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26216 
26217   # First separate the path from the arguments. This will split at the first
26218   # space.
26219   complete="$GNM"
26220   path="${complete%% *}"
26221   tmp="$complete EOL"
26222   arguments="${tmp#* }"
26223 
26224   # Input might be given as Windows format, start by converting to
26225   # unix format.
26226   new_path="$path"
26227 
26228   windows_path="$new_path"
26229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26230     unix_path=`$CYGPATH -u "$windows_path"`
26231     new_path="$unix_path"
26232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26234     new_path="$unix_path"
26235   fi
26236 
26237 
26238   # Now try to locate executable using which
26239   new_path=`$WHICH "$new_path" 2> /dev/null`
26240 
26241   if test "x$new_path" = x; then
26242     # Oops. Which didn't find the executable.
26243     # The splitting of arguments from the executable at a space might have been incorrect,
26244     # since paths with space are more likely in Windows. Give it another try with the whole
26245     # argument.
26246     path="$complete"
26247     arguments="EOL"
26248     new_path="$path"
26249 
26250   windows_path="$new_path"
26251   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26252     unix_path=`$CYGPATH -u "$windows_path"`
26253     new_path="$unix_path"
26254   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26255     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26256     new_path="$unix_path"
26257   fi
26258 
26259 
26260     new_path=`$WHICH "$new_path" 2> /dev/null`
26261 
26262     if test "x$new_path" = x; then
26263       # It's still not found. Now this is an unrecoverable error.
26264       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26265 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26266       has_space=`$ECHO "$complete" | $GREP " "`
26267       if test "x$has_space" != x; then
26268         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26269 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26270       fi
26271       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26272     fi
26273   fi
26274 
26275   # Now new_path has a complete unix path to the binary
26276   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26277     # Keep paths in /bin as-is, but remove trailing .exe if any
26278     new_path="${new_path/%.exe/}"
26279     # Do not save /bin paths to all_fixpath_prefixes!
26280   else
26281     # Not in mixed or Windows style, start by that.
26282     new_path=`cmd //c echo $new_path`
26283 
26284   input_path="$new_path"
26285   # Check if we need to convert this using DOS-style short mode. If the path
26286   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26287   # take no chances and rewrite it.
26288   # Note: m4 eats our [], so we need to use [ and ] instead.
26289   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26290   if test "x$has_forbidden_chars" != x; then
26291     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26292     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26293   fi
26294 
26295     # Output is in $new_path
26296 
26297   windows_path="$new_path"
26298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26299     unix_path=`$CYGPATH -u "$windows_path"`
26300     new_path="$unix_path"
26301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26303     new_path="$unix_path"
26304   fi
26305 
26306     # remove trailing .exe if any
26307     new_path="${new_path/%.exe/}"
26308 
26309     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26310     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26311   fi
26312 
26313   else
26314     # We're on a posix platform. Hooray! :)
26315     # First separate the path from the arguments. This will split at the first
26316     # space.
26317     complete="$GNM"
26318     path="${complete%% *}"
26319     tmp="$complete EOL"
26320     arguments="${tmp#* }"
26321 
26322     # Cannot rely on the command "which" here since it doesn't always work.
26323     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26324     if test -z "$is_absolute_path"; then
26325       # Path to executable is not absolute. Find it.
26326       IFS_save="$IFS"
26327       IFS=:
26328       for p in $PATH; do
26329         if test -f "$p/$path" && test -x "$p/$path"; then
26330           new_path="$p/$path"
26331           break
26332         fi
26333       done
26334       IFS="$IFS_save"
26335     else
26336       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26337 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26338       new_path="$path"
26339     fi
26340 
26341     if test "x$new_path" = x; then
26342       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26343 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26344       has_space=`$ECHO "$complete" | $GREP " "`
26345       if test "x$has_space" != x; then
26346         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26347 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26348       fi
26349       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26350     fi
26351   fi
26352 
26353   # Now join together the path and the arguments once again
26354   if test "x$arguments" != xEOL; then
26355     new_complete="$new_path ${arguments% *}"
26356   else
26357     new_complete="$new_path"
26358   fi
26359 
26360   if test "x$complete" != "x$new_complete"; then
26361     GNM="$new_complete"
26362     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26363 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26364   fi
26365 
26366     # Extract the first word of "strip", so it can be a program name with args.
26367 set dummy strip; ac_word=$2
26368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26369 $as_echo_n "checking for $ac_word... " >&6; }
26370 if ${ac_cv_path_STRIP+:} false; then :
26371   $as_echo_n "(cached) " >&6
26372 else
26373   case $STRIP in
26374   [\\/]* | ?:[\\/]*)
26375   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26376   ;;
26377   *)
26378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26379 for as_dir in $PATH
26380 do
26381   IFS=$as_save_IFS
26382   test -z "$as_dir" && as_dir=.
26383     for ac_exec_ext in '' $ac_executable_extensions; do
26384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26385     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26387     break 2
26388   fi
26389 done
26390   done
26391 IFS=$as_save_IFS
26392 
26393   ;;
26394 esac
26395 fi
26396 STRIP=$ac_cv_path_STRIP
26397 if test -n "$STRIP"; then
26398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26399 $as_echo "$STRIP" >&6; }
26400 else
26401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26402 $as_echo "no" >&6; }
26403 fi
26404 
26405 
26406 
26407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26408 
26409   # First separate the path from the arguments. This will split at the first
26410   # space.
26411   complete="$STRIP"
26412   path="${complete%% *}"
26413   tmp="$complete EOL"
26414   arguments="${tmp#* }"
26415 
26416   # Input might be given as Windows format, start by converting to
26417   # unix format.
26418   new_path=`$CYGPATH -u "$path"`
26419 
26420   # Now try to locate executable using which
26421   new_path=`$WHICH "$new_path" 2> /dev/null`
26422   # bat and cmd files are not always considered executable in cygwin causing which
26423   # to not find them
26424   if test "x$new_path" = x \
26425       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26426       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26427     new_path=`$CYGPATH -u "$path"`
26428   fi
26429   if test "x$new_path" = x; then
26430     # Oops. Which didn't find the executable.
26431     # The splitting of arguments from the executable at a space might have been incorrect,
26432     # since paths with space are more likely in Windows. Give it another try with the whole
26433     # argument.
26434     path="$complete"
26435     arguments="EOL"
26436     new_path=`$CYGPATH -u "$path"`
26437     new_path=`$WHICH "$new_path" 2> /dev/null`
26438     # bat and cmd files are not always considered executable in cygwin causing which
26439     # to not find them
26440     if test "x$new_path" = x \
26441         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26442         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26443       new_path=`$CYGPATH -u "$path"`
26444     fi
26445     if test "x$new_path" = x; then
26446       # It's still not found. Now this is an unrecoverable error.
26447       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26448 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26449       has_space=`$ECHO "$complete" | $GREP " "`
26450       if test "x$has_space" != x; then
26451         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26452 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26453       fi
26454       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26455     fi
26456   fi
26457 
26458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26461   # "foo.exe" is OK but "foo" is an error.
26462   #
26463   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26464   # It is also a way to make sure we got the proper file name for the real test later on.
26465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26466   if test "x$test_shortpath" = x; then
26467     # Short path failed, file does not exist as specified.
26468     # Try adding .exe or .cmd
26469     if test -f "${new_path}.exe"; then
26470       input_to_shortpath="${new_path}.exe"
26471     elif test -f "${new_path}.cmd"; then
26472       input_to_shortpath="${new_path}.cmd"
26473     else
26474       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26475 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26476       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26477 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26478       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26479     fi
26480   else
26481     input_to_shortpath="$new_path"
26482   fi
26483 
26484   # Call helper function which possibly converts this using DOS-style short mode.
26485   # If so, the updated path is stored in $new_path.
26486   new_path="$input_to_shortpath"
26487 
26488   input_path="$input_to_shortpath"
26489   # Check if we need to convert this using DOS-style short mode. If the path
26490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26491   # take no chances and rewrite it.
26492   # Note: m4 eats our [], so we need to use [ and ] instead.
26493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26494   if test "x$has_forbidden_chars" != x; then
26495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26496     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26497     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26498     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26499       # Going to short mode and back again did indeed matter. Since short mode is
26500       # case insensitive, let's make it lowercase to improve readability.
26501       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26502       # Now convert it back to Unix-stile (cygpath)
26503       input_path=`$CYGPATH -u "$shortmode_path"`
26504       new_path="$input_path"
26505     fi
26506   fi
26507 
26508   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26509   if test "x$test_cygdrive_prefix" = x; then
26510     # As a simple fix, exclude /usr/bin since it's not a real path.
26511     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26512       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26513       # a path prefixed by /cygdrive for fixpath to work.
26514       new_path="$CYGWIN_ROOT_PATH$input_path"
26515     fi
26516   fi
26517 
26518   # remove trailing .exe if any
26519   new_path="${new_path/%.exe/}"
26520 
26521   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522 
26523   # First separate the path from the arguments. This will split at the first
26524   # space.
26525   complete="$STRIP"
26526   path="${complete%% *}"
26527   tmp="$complete EOL"
26528   arguments="${tmp#* }"
26529 
26530   # Input might be given as Windows format, start by converting to
26531   # unix format.
26532   new_path="$path"
26533 
26534   windows_path="$new_path"
26535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26536     unix_path=`$CYGPATH -u "$windows_path"`
26537     new_path="$unix_path"
26538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26540     new_path="$unix_path"
26541   fi
26542 
26543 
26544   # Now try to locate executable using which
26545   new_path=`$WHICH "$new_path" 2> /dev/null`
26546 
26547   if test "x$new_path" = x; then
26548     # Oops. Which didn't find the executable.
26549     # The splitting of arguments from the executable at a space might have been incorrect,
26550     # since paths with space are more likely in Windows. Give it another try with the whole
26551     # argument.
26552     path="$complete"
26553     arguments="EOL"
26554     new_path="$path"
26555 
26556   windows_path="$new_path"
26557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26558     unix_path=`$CYGPATH -u "$windows_path"`
26559     new_path="$unix_path"
26560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26562     new_path="$unix_path"
26563   fi
26564 
26565 
26566     new_path=`$WHICH "$new_path" 2> /dev/null`
26567 
26568     if test "x$new_path" = x; then
26569       # It's still not found. Now this is an unrecoverable error.
26570       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26571 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26572       has_space=`$ECHO "$complete" | $GREP " "`
26573       if test "x$has_space" != x; then
26574         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26575 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26576       fi
26577       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26578     fi
26579   fi
26580 
26581   # Now new_path has a complete unix path to the binary
26582   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26583     # Keep paths in /bin as-is, but remove trailing .exe if any
26584     new_path="${new_path/%.exe/}"
26585     # Do not save /bin paths to all_fixpath_prefixes!
26586   else
26587     # Not in mixed or Windows style, start by that.
26588     new_path=`cmd //c echo $new_path`
26589 
26590   input_path="$new_path"
26591   # Check if we need to convert this using DOS-style short mode. If the path
26592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26593   # take no chances and rewrite it.
26594   # Note: m4 eats our [], so we need to use [ and ] instead.
26595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26596   if test "x$has_forbidden_chars" != x; then
26597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26598     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26599   fi
26600 
26601     # Output is in $new_path
26602 
26603   windows_path="$new_path"
26604   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26605     unix_path=`$CYGPATH -u "$windows_path"`
26606     new_path="$unix_path"
26607   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26608     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26609     new_path="$unix_path"
26610   fi
26611 
26612     # remove trailing .exe if any
26613     new_path="${new_path/%.exe/}"
26614 
26615     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26616     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26617   fi
26618 
26619   else
26620     # We're on a posix platform. Hooray! :)
26621     # First separate the path from the arguments. This will split at the first
26622     # space.
26623     complete="$STRIP"
26624     path="${complete%% *}"
26625     tmp="$complete EOL"
26626     arguments="${tmp#* }"
26627 
26628     # Cannot rely on the command "which" here since it doesn't always work.
26629     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26630     if test -z "$is_absolute_path"; then
26631       # Path to executable is not absolute. Find it.
26632       IFS_save="$IFS"
26633       IFS=:
26634       for p in $PATH; do
26635         if test -f "$p/$path" && test -x "$p/$path"; then
26636           new_path="$p/$path"
26637           break
26638         fi
26639       done
26640       IFS="$IFS_save"
26641     else
26642       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26643 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26644       new_path="$path"
26645     fi
26646 
26647     if test "x$new_path" = x; then
26648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26649 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26650       has_space=`$ECHO "$complete" | $GREP " "`
26651       if test "x$has_space" != x; then
26652         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26653 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26654       fi
26655       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26656     fi
26657   fi
26658 
26659   # Now join together the path and the arguments once again
26660   if test "x$arguments" != xEOL; then
26661     new_complete="$new_path ${arguments% *}"
26662   else
26663     new_complete="$new_path"
26664   fi
26665 
26666   if test "x$complete" != "x$new_complete"; then
26667     STRIP="$new_complete"
26668     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26669 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26670   fi
26671 
26672     # Extract the first word of "mcs", so it can be a program name with args.
26673 set dummy mcs; ac_word=$2
26674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26675 $as_echo_n "checking for $ac_word... " >&6; }
26676 if ${ac_cv_path_MCS+:} false; then :
26677   $as_echo_n "(cached) " >&6
26678 else
26679   case $MCS in
26680   [\\/]* | ?:[\\/]*)
26681   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26682   ;;
26683   *)
26684   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26685 for as_dir in $PATH
26686 do
26687   IFS=$as_save_IFS
26688   test -z "$as_dir" && as_dir=.
26689     for ac_exec_ext in '' $ac_executable_extensions; do
26690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26691     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26693     break 2
26694   fi
26695 done
26696   done
26697 IFS=$as_save_IFS
26698 
26699   ;;
26700 esac
26701 fi
26702 MCS=$ac_cv_path_MCS
26703 if test -n "$MCS"; then
26704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26705 $as_echo "$MCS" >&6; }
26706 else
26707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26708 $as_echo "no" >&6; }
26709 fi
26710 
26711 
26712 
26713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26714 
26715   # First separate the path from the arguments. This will split at the first
26716   # space.
26717   complete="$MCS"
26718   path="${complete%% *}"
26719   tmp="$complete EOL"
26720   arguments="${tmp#* }"
26721 
26722   # Input might be given as Windows format, start by converting to
26723   # unix format.
26724   new_path=`$CYGPATH -u "$path"`
26725 
26726   # Now try to locate executable using which
26727   new_path=`$WHICH "$new_path" 2> /dev/null`
26728   # bat and cmd files are not always considered executable in cygwin causing which
26729   # to not find them
26730   if test "x$new_path" = x \
26731       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26732       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26733     new_path=`$CYGPATH -u "$path"`
26734   fi
26735   if test "x$new_path" = x; then
26736     # Oops. Which didn't find the executable.
26737     # The splitting of arguments from the executable at a space might have been incorrect,
26738     # since paths with space are more likely in Windows. Give it another try with the whole
26739     # argument.
26740     path="$complete"
26741     arguments="EOL"
26742     new_path=`$CYGPATH -u "$path"`
26743     new_path=`$WHICH "$new_path" 2> /dev/null`
26744     # bat and cmd files are not always considered executable in cygwin causing which
26745     # to not find them
26746     if test "x$new_path" = x \
26747         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26748         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26749       new_path=`$CYGPATH -u "$path"`
26750     fi
26751     if test "x$new_path" = x; then
26752       # It's still not found. Now this is an unrecoverable error.
26753       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26754 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26755       has_space=`$ECHO "$complete" | $GREP " "`
26756       if test "x$has_space" != x; then
26757         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26758 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26759       fi
26760       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26761     fi
26762   fi
26763 
26764   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26765   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26766   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26767   # "foo.exe" is OK but "foo" is an error.
26768   #
26769   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26770   # It is also a way to make sure we got the proper file name for the real test later on.
26771   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26772   if test "x$test_shortpath" = x; then
26773     # Short path failed, file does not exist as specified.
26774     # Try adding .exe or .cmd
26775     if test -f "${new_path}.exe"; then
26776       input_to_shortpath="${new_path}.exe"
26777     elif test -f "${new_path}.cmd"; then
26778       input_to_shortpath="${new_path}.cmd"
26779     else
26780       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26781 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26782       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26783 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26784       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26785     fi
26786   else
26787     input_to_shortpath="$new_path"
26788   fi
26789 
26790   # Call helper function which possibly converts this using DOS-style short mode.
26791   # If so, the updated path is stored in $new_path.
26792   new_path="$input_to_shortpath"
26793 
26794   input_path="$input_to_shortpath"
26795   # Check if we need to convert this using DOS-style short mode. If the path
26796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26797   # take no chances and rewrite it.
26798   # Note: m4 eats our [], so we need to use [ and ] instead.
26799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26800   if test "x$has_forbidden_chars" != x; then
26801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26802     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26803     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26804     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26805       # Going to short mode and back again did indeed matter. Since short mode is
26806       # case insensitive, let's make it lowercase to improve readability.
26807       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26808       # Now convert it back to Unix-stile (cygpath)
26809       input_path=`$CYGPATH -u "$shortmode_path"`
26810       new_path="$input_path"
26811     fi
26812   fi
26813 
26814   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26815   if test "x$test_cygdrive_prefix" = x; then
26816     # As a simple fix, exclude /usr/bin since it's not a real path.
26817     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26818       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26819       # a path prefixed by /cygdrive for fixpath to work.
26820       new_path="$CYGWIN_ROOT_PATH$input_path"
26821     fi
26822   fi
26823 
26824   # remove trailing .exe if any
26825   new_path="${new_path/%.exe/}"
26826 
26827   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26828 
26829   # First separate the path from the arguments. This will split at the first
26830   # space.
26831   complete="$MCS"
26832   path="${complete%% *}"
26833   tmp="$complete EOL"
26834   arguments="${tmp#* }"
26835 
26836   # Input might be given as Windows format, start by converting to
26837   # unix format.
26838   new_path="$path"
26839 
26840   windows_path="$new_path"
26841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26842     unix_path=`$CYGPATH -u "$windows_path"`
26843     new_path="$unix_path"
26844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26846     new_path="$unix_path"
26847   fi
26848 
26849 
26850   # Now try to locate executable using which
26851   new_path=`$WHICH "$new_path" 2> /dev/null`
26852 
26853   if test "x$new_path" = x; then
26854     # Oops. Which didn't find the executable.
26855     # The splitting of arguments from the executable at a space might have been incorrect,
26856     # since paths with space are more likely in Windows. Give it another try with the whole
26857     # argument.
26858     path="$complete"
26859     arguments="EOL"
26860     new_path="$path"
26861 
26862   windows_path="$new_path"
26863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26864     unix_path=`$CYGPATH -u "$windows_path"`
26865     new_path="$unix_path"
26866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26868     new_path="$unix_path"
26869   fi
26870 
26871 
26872     new_path=`$WHICH "$new_path" 2> /dev/null`
26873 
26874     if test "x$new_path" = x; then
26875       # It's still not found. Now this is an unrecoverable error.
26876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26877 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26878       has_space=`$ECHO "$complete" | $GREP " "`
26879       if test "x$has_space" != x; then
26880         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26881 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26882       fi
26883       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26884     fi
26885   fi
26886 
26887   # Now new_path has a complete unix path to the binary
26888   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26889     # Keep paths in /bin as-is, but remove trailing .exe if any
26890     new_path="${new_path/%.exe/}"
26891     # Do not save /bin paths to all_fixpath_prefixes!
26892   else
26893     # Not in mixed or Windows style, start by that.
26894     new_path=`cmd //c echo $new_path`
26895 
26896   input_path="$new_path"
26897   # Check if we need to convert this using DOS-style short mode. If the path
26898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26899   # take no chances and rewrite it.
26900   # Note: m4 eats our [], so we need to use [ and ] instead.
26901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26902   if test "x$has_forbidden_chars" != x; then
26903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26904     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26905   fi
26906 
26907     # Output is in $new_path
26908 
26909   windows_path="$new_path"
26910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26911     unix_path=`$CYGPATH -u "$windows_path"`
26912     new_path="$unix_path"
26913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26915     new_path="$unix_path"
26916   fi
26917 
26918     # remove trailing .exe if any
26919     new_path="${new_path/%.exe/}"
26920 
26921     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26922     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26923   fi
26924 
26925   else
26926     # We're on a posix platform. Hooray! :)
26927     # First separate the path from the arguments. This will split at the first
26928     # space.
26929     complete="$MCS"
26930     path="${complete%% *}"
26931     tmp="$complete EOL"
26932     arguments="${tmp#* }"
26933 
26934     # Cannot rely on the command "which" here since it doesn't always work.
26935     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26936     if test -z "$is_absolute_path"; then
26937       # Path to executable is not absolute. Find it.
26938       IFS_save="$IFS"
26939       IFS=:
26940       for p in $PATH; do
26941         if test -f "$p/$path" && test -x "$p/$path"; then
26942           new_path="$p/$path"
26943           break
26944         fi
26945       done
26946       IFS="$IFS_save"
26947     else
26948       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26949 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26950       new_path="$path"
26951     fi
26952 
26953     if test "x$new_path" = x; then
26954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26955 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26956       has_space=`$ECHO "$complete" | $GREP " "`
26957       if test "x$has_space" != x; then
26958         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26959 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26960       fi
26961       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26962     fi
26963   fi
26964 
26965   # Now join together the path and the arguments once again
26966   if test "x$arguments" != xEOL; then
26967     new_complete="$new_path ${arguments% *}"
26968   else
26969     new_complete="$new_path"
26970   fi
26971 
26972   if test "x$complete" != "x$new_complete"; then
26973     MCS="$new_complete"
26974     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26975 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26976   fi
26977 
26978   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26979     if test -n "$ac_tool_prefix"; then
26980   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26981 set dummy ${ac_tool_prefix}nm; ac_word=$2
26982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26983 $as_echo_n "checking for $ac_word... " >&6; }
26984 if ${ac_cv_prog_NM+:} false; then :
26985   $as_echo_n "(cached) " >&6
26986 else
26987   if test -n "$NM"; then
26988   ac_cv_prog_NM="$NM" # Let the user override the test.
26989 else
26990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26991 for as_dir in $PATH
26992 do
26993   IFS=$as_save_IFS
26994   test -z "$as_dir" && as_dir=.
26995     for ac_exec_ext in '' $ac_executable_extensions; do
26996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26997     ac_cv_prog_NM="${ac_tool_prefix}nm"
26998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26999     break 2
27000   fi
27001 done
27002   done
27003 IFS=$as_save_IFS
27004 
27005 fi
27006 fi
27007 NM=$ac_cv_prog_NM
27008 if test -n "$NM"; then
27009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27010 $as_echo "$NM" >&6; }
27011 else
27012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27013 $as_echo "no" >&6; }
27014 fi
27015 
27016 
27017 fi
27018 if test -z "$ac_cv_prog_NM"; then
27019   ac_ct_NM=$NM
27020   # Extract the first word of "nm", so it can be a program name with args.
27021 set dummy nm; ac_word=$2
27022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27023 $as_echo_n "checking for $ac_word... " >&6; }
27024 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27025   $as_echo_n "(cached) " >&6
27026 else
27027   if test -n "$ac_ct_NM"; then
27028   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27029 else
27030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27031 for as_dir in $PATH
27032 do
27033   IFS=$as_save_IFS
27034   test -z "$as_dir" && as_dir=.
27035     for ac_exec_ext in '' $ac_executable_extensions; do
27036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27037     ac_cv_prog_ac_ct_NM="nm"
27038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27039     break 2
27040   fi
27041 done
27042   done
27043 IFS=$as_save_IFS
27044 
27045 fi
27046 fi
27047 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27048 if test -n "$ac_ct_NM"; then
27049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27050 $as_echo "$ac_ct_NM" >&6; }
27051 else
27052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27053 $as_echo "no" >&6; }
27054 fi
27055 
27056   if test "x$ac_ct_NM" = x; then
27057     NM=""
27058   else
27059     case $cross_compiling:$ac_tool_warned in
27060 yes:)
27061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27062 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27063 ac_tool_warned=yes ;;
27064 esac
27065     NM=$ac_ct_NM
27066   fi
27067 else
27068   NM="$ac_cv_prog_NM"
27069 fi
27070 
27071 
27072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27073 
27074   # First separate the path from the arguments. This will split at the first
27075   # space.
27076   complete="$NM"
27077   path="${complete%% *}"
27078   tmp="$complete EOL"
27079   arguments="${tmp#* }"
27080 
27081   # Input might be given as Windows format, start by converting to
27082   # unix format.
27083   new_path=`$CYGPATH -u "$path"`
27084 
27085   # Now try to locate executable using which
27086   new_path=`$WHICH "$new_path" 2> /dev/null`
27087   # bat and cmd files are not always considered executable in cygwin causing which
27088   # to not find them
27089   if test "x$new_path" = x \
27090       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27091       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27092     new_path=`$CYGPATH -u "$path"`
27093   fi
27094   if test "x$new_path" = x; then
27095     # Oops. Which didn't find the executable.
27096     # The splitting of arguments from the executable at a space might have been incorrect,
27097     # since paths with space are more likely in Windows. Give it another try with the whole
27098     # argument.
27099     path="$complete"
27100     arguments="EOL"
27101     new_path=`$CYGPATH -u "$path"`
27102     new_path=`$WHICH "$new_path" 2> /dev/null`
27103     # bat and cmd files are not always considered executable in cygwin causing which
27104     # to not find them
27105     if test "x$new_path" = x \
27106         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27107         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27108       new_path=`$CYGPATH -u "$path"`
27109     fi
27110     if test "x$new_path" = x; then
27111       # It's still not found. Now this is an unrecoverable error.
27112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27113 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27114       has_space=`$ECHO "$complete" | $GREP " "`
27115       if test "x$has_space" != x; then
27116         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27117 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27118       fi
27119       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27120     fi
27121   fi
27122 
27123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27126   # "foo.exe" is OK but "foo" is an error.
27127   #
27128   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27129   # It is also a way to make sure we got the proper file name for the real test later on.
27130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27131   if test "x$test_shortpath" = x; then
27132     # Short path failed, file does not exist as specified.
27133     # Try adding .exe or .cmd
27134     if test -f "${new_path}.exe"; then
27135       input_to_shortpath="${new_path}.exe"
27136     elif test -f "${new_path}.cmd"; then
27137       input_to_shortpath="${new_path}.cmd"
27138     else
27139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27140 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27141       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27142 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27143       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27144     fi
27145   else
27146     input_to_shortpath="$new_path"
27147   fi
27148 
27149   # Call helper function which possibly converts this using DOS-style short mode.
27150   # If so, the updated path is stored in $new_path.
27151   new_path="$input_to_shortpath"
27152 
27153   input_path="$input_to_shortpath"
27154   # Check if we need to convert this using DOS-style short mode. If the path
27155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27156   # take no chances and rewrite it.
27157   # Note: m4 eats our [], so we need to use [ and ] instead.
27158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27159   if test "x$has_forbidden_chars" != x; then
27160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27161     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27162     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27163     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27164       # Going to short mode and back again did indeed matter. Since short mode is
27165       # case insensitive, let's make it lowercase to improve readability.
27166       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27167       # Now convert it back to Unix-stile (cygpath)
27168       input_path=`$CYGPATH -u "$shortmode_path"`
27169       new_path="$input_path"
27170     fi
27171   fi
27172 
27173   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27174   if test "x$test_cygdrive_prefix" = x; then
27175     # As a simple fix, exclude /usr/bin since it's not a real path.
27176     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27177       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27178       # a path prefixed by /cygdrive for fixpath to work.
27179       new_path="$CYGWIN_ROOT_PATH$input_path"
27180     fi
27181   fi
27182 
27183   # remove trailing .exe if any
27184   new_path="${new_path/%.exe/}"
27185 
27186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27187 
27188   # First separate the path from the arguments. This will split at the first
27189   # space.
27190   complete="$NM"
27191   path="${complete%% *}"
27192   tmp="$complete EOL"
27193   arguments="${tmp#* }"
27194 
27195   # Input might be given as Windows format, start by converting to
27196   # unix format.
27197   new_path="$path"
27198 
27199   windows_path="$new_path"
27200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27201     unix_path=`$CYGPATH -u "$windows_path"`
27202     new_path="$unix_path"
27203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27205     new_path="$unix_path"
27206   fi
27207 
27208 
27209   # Now try to locate executable using which
27210   new_path=`$WHICH "$new_path" 2> /dev/null`
27211 
27212   if test "x$new_path" = x; then
27213     # Oops. Which didn't find the executable.
27214     # The splitting of arguments from the executable at a space might have been incorrect,
27215     # since paths with space are more likely in Windows. Give it another try with the whole
27216     # argument.
27217     path="$complete"
27218     arguments="EOL"
27219     new_path="$path"
27220 
27221   windows_path="$new_path"
27222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27223     unix_path=`$CYGPATH -u "$windows_path"`
27224     new_path="$unix_path"
27225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27227     new_path="$unix_path"
27228   fi
27229 
27230 
27231     new_path=`$WHICH "$new_path" 2> /dev/null`
27232 
27233     if test "x$new_path" = x; then
27234       # It's still not found. Now this is an unrecoverable error.
27235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27236 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27237       has_space=`$ECHO "$complete" | $GREP " "`
27238       if test "x$has_space" != x; then
27239         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27240 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27241       fi
27242       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27243     fi
27244   fi
27245 
27246   # Now new_path has a complete unix path to the binary
27247   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27248     # Keep paths in /bin as-is, but remove trailing .exe if any
27249     new_path="${new_path/%.exe/}"
27250     # Do not save /bin paths to all_fixpath_prefixes!
27251   else
27252     # Not in mixed or Windows style, start by that.
27253     new_path=`cmd //c echo $new_path`
27254 
27255   input_path="$new_path"
27256   # Check if we need to convert this using DOS-style short mode. If the path
27257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27258   # take no chances and rewrite it.
27259   # Note: m4 eats our [], so we need to use [ and ] instead.
27260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27261   if test "x$has_forbidden_chars" != x; then
27262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27264   fi
27265 
27266     # Output is in $new_path
27267 
27268   windows_path="$new_path"
27269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27270     unix_path=`$CYGPATH -u "$windows_path"`
27271     new_path="$unix_path"
27272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27274     new_path="$unix_path"
27275   fi
27276 
27277     # remove trailing .exe if any
27278     new_path="${new_path/%.exe/}"
27279 
27280     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27281     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27282   fi
27283 
27284   else
27285     # We're on a posix platform. Hooray! :)
27286     # First separate the path from the arguments. This will split at the first
27287     # space.
27288     complete="$NM"
27289     path="${complete%% *}"
27290     tmp="$complete EOL"
27291     arguments="${tmp#* }"
27292 
27293     # Cannot rely on the command "which" here since it doesn't always work.
27294     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27295     if test -z "$is_absolute_path"; then
27296       # Path to executable is not absolute. Find it.
27297       IFS_save="$IFS"
27298       IFS=:
27299       for p in $PATH; do
27300         if test -f "$p/$path" && test -x "$p/$path"; then
27301           new_path="$p/$path"
27302           break
27303         fi
27304       done
27305       IFS="$IFS_save"
27306     else
27307       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27308 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27309       new_path="$path"
27310     fi
27311 
27312     if test "x$new_path" = x; then
27313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27314 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27315       has_space=`$ECHO "$complete" | $GREP " "`
27316       if test "x$has_space" != x; then
27317         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27318 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27319       fi
27320       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27321     fi
27322   fi
27323 
27324   # Now join together the path and the arguments once again
27325   if test "x$arguments" != xEOL; then
27326     new_complete="$new_path ${arguments% *}"
27327   else
27328     new_complete="$new_path"
27329   fi
27330 
27331   if test "x$complete" != "x$new_complete"; then
27332     NM="$new_complete"
27333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27334 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27335   fi
27336 
27337     GNM="$NM"
27338 
27339     if test -n "$ac_tool_prefix"; then
27340   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27341 set dummy ${ac_tool_prefix}strip; ac_word=$2
27342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27343 $as_echo_n "checking for $ac_word... " >&6; }
27344 if ${ac_cv_prog_STRIP+:} false; then :
27345   $as_echo_n "(cached) " >&6
27346 else
27347   if test -n "$STRIP"; then
27348   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27349 else
27350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27351 for as_dir in $PATH
27352 do
27353   IFS=$as_save_IFS
27354   test -z "$as_dir" && as_dir=.
27355     for ac_exec_ext in '' $ac_executable_extensions; do
27356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27357     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27359     break 2
27360   fi
27361 done
27362   done
27363 IFS=$as_save_IFS
27364 
27365 fi
27366 fi
27367 STRIP=$ac_cv_prog_STRIP
27368 if test -n "$STRIP"; then
27369   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27370 $as_echo "$STRIP" >&6; }
27371 else
27372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27373 $as_echo "no" >&6; }
27374 fi
27375 
27376 
27377 fi
27378 if test -z "$ac_cv_prog_STRIP"; then
27379   ac_ct_STRIP=$STRIP
27380   # Extract the first word of "strip", so it can be a program name with args.
27381 set dummy strip; ac_word=$2
27382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27383 $as_echo_n "checking for $ac_word... " >&6; }
27384 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27385   $as_echo_n "(cached) " >&6
27386 else
27387   if test -n "$ac_ct_STRIP"; then
27388   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27389 else
27390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27391 for as_dir in $PATH
27392 do
27393   IFS=$as_save_IFS
27394   test -z "$as_dir" && as_dir=.
27395     for ac_exec_ext in '' $ac_executable_extensions; do
27396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27397     ac_cv_prog_ac_ct_STRIP="strip"
27398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27399     break 2
27400   fi
27401 done
27402   done
27403 IFS=$as_save_IFS
27404 
27405 fi
27406 fi
27407 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27408 if test -n "$ac_ct_STRIP"; then
27409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27410 $as_echo "$ac_ct_STRIP" >&6; }
27411 else
27412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27413 $as_echo "no" >&6; }
27414 fi
27415 
27416   if test "x$ac_ct_STRIP" = x; then
27417     STRIP=""
27418   else
27419     case $cross_compiling:$ac_tool_warned in
27420 yes:)
27421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27422 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27423 ac_tool_warned=yes ;;
27424 esac
27425     STRIP=$ac_ct_STRIP
27426   fi
27427 else
27428   STRIP="$ac_cv_prog_STRIP"
27429 fi
27430 
27431 
27432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27433 
27434   # First separate the path from the arguments. This will split at the first
27435   # space.
27436   complete="$STRIP"
27437   path="${complete%% *}"
27438   tmp="$complete EOL"
27439   arguments="${tmp#* }"
27440 
27441   # Input might be given as Windows format, start by converting to
27442   # unix format.
27443   new_path=`$CYGPATH -u "$path"`
27444 
27445   # Now try to locate executable using which
27446   new_path=`$WHICH "$new_path" 2> /dev/null`
27447   # bat and cmd files are not always considered executable in cygwin causing which
27448   # to not find them
27449   if test "x$new_path" = x \
27450       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27451       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27452     new_path=`$CYGPATH -u "$path"`
27453   fi
27454   if test "x$new_path" = x; then
27455     # Oops. Which didn't find the executable.
27456     # The splitting of arguments from the executable at a space might have been incorrect,
27457     # since paths with space are more likely in Windows. Give it another try with the whole
27458     # argument.
27459     path="$complete"
27460     arguments="EOL"
27461     new_path=`$CYGPATH -u "$path"`
27462     new_path=`$WHICH "$new_path" 2> /dev/null`
27463     # bat and cmd files are not always considered executable in cygwin causing which
27464     # to not find them
27465     if test "x$new_path" = x \
27466         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27467         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27468       new_path=`$CYGPATH -u "$path"`
27469     fi
27470     if test "x$new_path" = x; then
27471       # It's still not found. Now this is an unrecoverable error.
27472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27473 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27474       has_space=`$ECHO "$complete" | $GREP " "`
27475       if test "x$has_space" != x; then
27476         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27477 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27478       fi
27479       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27480     fi
27481   fi
27482 
27483   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27484   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27485   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27486   # "foo.exe" is OK but "foo" is an error.
27487   #
27488   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27489   # It is also a way to make sure we got the proper file name for the real test later on.
27490   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27491   if test "x$test_shortpath" = x; then
27492     # Short path failed, file does not exist as specified.
27493     # Try adding .exe or .cmd
27494     if test -f "${new_path}.exe"; then
27495       input_to_shortpath="${new_path}.exe"
27496     elif test -f "${new_path}.cmd"; then
27497       input_to_shortpath="${new_path}.cmd"
27498     else
27499       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27500 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27501       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27502 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27503       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27504     fi
27505   else
27506     input_to_shortpath="$new_path"
27507   fi
27508 
27509   # Call helper function which possibly converts this using DOS-style short mode.
27510   # If so, the updated path is stored in $new_path.
27511   new_path="$input_to_shortpath"
27512 
27513   input_path="$input_to_shortpath"
27514   # Check if we need to convert this using DOS-style short mode. If the path
27515   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27516   # take no chances and rewrite it.
27517   # Note: m4 eats our [], so we need to use [ and ] instead.
27518   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27519   if test "x$has_forbidden_chars" != x; then
27520     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27521     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27522     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27523     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27524       # Going to short mode and back again did indeed matter. Since short mode is
27525       # case insensitive, let's make it lowercase to improve readability.
27526       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27527       # Now convert it back to Unix-stile (cygpath)
27528       input_path=`$CYGPATH -u "$shortmode_path"`
27529       new_path="$input_path"
27530     fi
27531   fi
27532 
27533   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27534   if test "x$test_cygdrive_prefix" = x; then
27535     # As a simple fix, exclude /usr/bin since it's not a real path.
27536     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27537       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27538       # a path prefixed by /cygdrive for fixpath to work.
27539       new_path="$CYGWIN_ROOT_PATH$input_path"
27540     fi
27541   fi
27542 
27543   # remove trailing .exe if any
27544   new_path="${new_path/%.exe/}"
27545 
27546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27547 
27548   # First separate the path from the arguments. This will split at the first
27549   # space.
27550   complete="$STRIP"
27551   path="${complete%% *}"
27552   tmp="$complete EOL"
27553   arguments="${tmp#* }"
27554 
27555   # Input might be given as Windows format, start by converting to
27556   # unix format.
27557   new_path="$path"
27558 
27559   windows_path="$new_path"
27560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27561     unix_path=`$CYGPATH -u "$windows_path"`
27562     new_path="$unix_path"
27563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27565     new_path="$unix_path"
27566   fi
27567 
27568 
27569   # Now try to locate executable using which
27570   new_path=`$WHICH "$new_path" 2> /dev/null`
27571 
27572   if test "x$new_path" = x; then
27573     # Oops. Which didn't find the executable.
27574     # The splitting of arguments from the executable at a space might have been incorrect,
27575     # since paths with space are more likely in Windows. Give it another try with the whole
27576     # argument.
27577     path="$complete"
27578     arguments="EOL"
27579     new_path="$path"
27580 
27581   windows_path="$new_path"
27582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27583     unix_path=`$CYGPATH -u "$windows_path"`
27584     new_path="$unix_path"
27585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27587     new_path="$unix_path"
27588   fi
27589 
27590 
27591     new_path=`$WHICH "$new_path" 2> /dev/null`
27592 
27593     if test "x$new_path" = x; then
27594       # It's still not found. Now this is an unrecoverable error.
27595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27596 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27597       has_space=`$ECHO "$complete" | $GREP " "`
27598       if test "x$has_space" != x; then
27599         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27600 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27601       fi
27602       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27603     fi
27604   fi
27605 
27606   # Now new_path has a complete unix path to the binary
27607   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27608     # Keep paths in /bin as-is, but remove trailing .exe if any
27609     new_path="${new_path/%.exe/}"
27610     # Do not save /bin paths to all_fixpath_prefixes!
27611   else
27612     # Not in mixed or Windows style, start by that.
27613     new_path=`cmd //c echo $new_path`
27614 
27615   input_path="$new_path"
27616   # Check if we need to convert this using DOS-style short mode. If the path
27617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27618   # take no chances and rewrite it.
27619   # Note: m4 eats our [], so we need to use [ and ] instead.
27620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27621   if test "x$has_forbidden_chars" != x; then
27622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27623     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27624   fi
27625 
27626     # Output is in $new_path
27627 
27628   windows_path="$new_path"
27629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27630     unix_path=`$CYGPATH -u "$windows_path"`
27631     new_path="$unix_path"
27632   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27633     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27634     new_path="$unix_path"
27635   fi
27636 
27637     # remove trailing .exe if any
27638     new_path="${new_path/%.exe/}"
27639 
27640     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27641     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27642   fi
27643 
27644   else
27645     # We're on a posix platform. Hooray! :)
27646     # First separate the path from the arguments. This will split at the first
27647     # space.
27648     complete="$STRIP"
27649     path="${complete%% *}"
27650     tmp="$complete EOL"
27651     arguments="${tmp#* }"
27652 
27653     # Cannot rely on the command "which" here since it doesn't always work.
27654     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27655     if test -z "$is_absolute_path"; then
27656       # Path to executable is not absolute. Find it.
27657       IFS_save="$IFS"
27658       IFS=:
27659       for p in $PATH; do
27660         if test -f "$p/$path" && test -x "$p/$path"; then
27661           new_path="$p/$path"
27662           break
27663         fi
27664       done
27665       IFS="$IFS_save"
27666     else
27667       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27668 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27669       new_path="$path"
27670     fi
27671 
27672     if test "x$new_path" = x; then
27673       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27674 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27675       has_space=`$ECHO "$complete" | $GREP " "`
27676       if test "x$has_space" != x; then
27677         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27678 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27679       fi
27680       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27681     fi
27682   fi
27683 
27684   # Now join together the path and the arguments once again
27685   if test "x$arguments" != xEOL; then
27686     new_complete="$new_path ${arguments% *}"
27687   else
27688     new_complete="$new_path"
27689   fi
27690 
27691   if test "x$complete" != "x$new_complete"; then
27692     STRIP="$new_complete"
27693     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27694 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27695   fi
27696 
27697   fi
27698 
27699   # objcopy is used for moving debug symbols to separate files when
27700   # full debug symbols are enabled.
27701   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27702     if test -n "$ac_tool_prefix"; then
27703   for ac_prog in gobjcopy objcopy
27704   do
27705     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27706 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27708 $as_echo_n "checking for $ac_word... " >&6; }
27709 if ${ac_cv_prog_OBJCOPY+:} false; then :
27710   $as_echo_n "(cached) " >&6
27711 else
27712   if test -n "$OBJCOPY"; then
27713   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27714 else
27715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27716 for as_dir in $PATH
27717 do
27718   IFS=$as_save_IFS
27719   test -z "$as_dir" && as_dir=.
27720     for ac_exec_ext in '' $ac_executable_extensions; do
27721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27722     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27724     break 2
27725   fi
27726 done
27727   done
27728 IFS=$as_save_IFS
27729 
27730 fi
27731 fi
27732 OBJCOPY=$ac_cv_prog_OBJCOPY
27733 if test -n "$OBJCOPY"; then
27734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27735 $as_echo "$OBJCOPY" >&6; }
27736 else
27737   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27738 $as_echo "no" >&6; }
27739 fi
27740 
27741 
27742     test -n "$OBJCOPY" && break
27743   done
27744 fi
27745 if test -z "$OBJCOPY"; then
27746   ac_ct_OBJCOPY=$OBJCOPY
27747   for ac_prog in gobjcopy objcopy
27748 do
27749   # Extract the first word of "$ac_prog", so it can be a program name with args.
27750 set dummy $ac_prog; ac_word=$2
27751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27752 $as_echo_n "checking for $ac_word... " >&6; }
27753 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27754   $as_echo_n "(cached) " >&6
27755 else
27756   if test -n "$ac_ct_OBJCOPY"; then
27757   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27758 else
27759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27760 for as_dir in $PATH
27761 do
27762   IFS=$as_save_IFS
27763   test -z "$as_dir" && as_dir=.
27764     for ac_exec_ext in '' $ac_executable_extensions; do
27765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27766     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27768     break 2
27769   fi
27770 done
27771   done
27772 IFS=$as_save_IFS
27773 
27774 fi
27775 fi
27776 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27777 if test -n "$ac_ct_OBJCOPY"; then
27778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27779 $as_echo "$ac_ct_OBJCOPY" >&6; }
27780 else
27781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27782 $as_echo "no" >&6; }
27783 fi
27784 
27785 
27786   test -n "$ac_ct_OBJCOPY" && break
27787 done
27788 
27789   if test "x$ac_ct_OBJCOPY" = x; then
27790     OBJCOPY=""
27791   else
27792     case $cross_compiling:$ac_tool_warned in
27793 yes:)
27794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27795 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27796 ac_tool_warned=yes ;;
27797 esac
27798     OBJCOPY=$ac_ct_OBJCOPY
27799   fi
27800 fi
27801 
27802     # Only call fixup if objcopy was found.
27803     if test -n "$OBJCOPY"; then
27804 
27805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27806 
27807   # First separate the path from the arguments. This will split at the first
27808   # space.
27809   complete="$OBJCOPY"
27810   path="${complete%% *}"
27811   tmp="$complete EOL"
27812   arguments="${tmp#* }"
27813 
27814   # Input might be given as Windows format, start by converting to
27815   # unix format.
27816   new_path=`$CYGPATH -u "$path"`
27817 
27818   # Now try to locate executable using which
27819   new_path=`$WHICH "$new_path" 2> /dev/null`
27820   # bat and cmd files are not always considered executable in cygwin causing which
27821   # to not find them
27822   if test "x$new_path" = x \
27823       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27824       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27825     new_path=`$CYGPATH -u "$path"`
27826   fi
27827   if test "x$new_path" = x; then
27828     # Oops. Which didn't find the executable.
27829     # The splitting of arguments from the executable at a space might have been incorrect,
27830     # since paths with space are more likely in Windows. Give it another try with the whole
27831     # argument.
27832     path="$complete"
27833     arguments="EOL"
27834     new_path=`$CYGPATH -u "$path"`
27835     new_path=`$WHICH "$new_path" 2> /dev/null`
27836     # bat and cmd files are not always considered executable in cygwin causing which
27837     # to not find them
27838     if test "x$new_path" = x \
27839         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27840         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27841       new_path=`$CYGPATH -u "$path"`
27842     fi
27843     if test "x$new_path" = x; then
27844       # It's still not found. Now this is an unrecoverable error.
27845       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27846 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27847       has_space=`$ECHO "$complete" | $GREP " "`
27848       if test "x$has_space" != x; then
27849         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27850 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27851       fi
27852       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27853     fi
27854   fi
27855 
27856   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27857   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27858   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27859   # "foo.exe" is OK but "foo" is an error.
27860   #
27861   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27862   # It is also a way to make sure we got the proper file name for the real test later on.
27863   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27864   if test "x$test_shortpath" = x; then
27865     # Short path failed, file does not exist as specified.
27866     # Try adding .exe or .cmd
27867     if test -f "${new_path}.exe"; then
27868       input_to_shortpath="${new_path}.exe"
27869     elif test -f "${new_path}.cmd"; then
27870       input_to_shortpath="${new_path}.cmd"
27871     else
27872       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27873 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27874       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27875 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27876       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27877     fi
27878   else
27879     input_to_shortpath="$new_path"
27880   fi
27881 
27882   # Call helper function which possibly converts this using DOS-style short mode.
27883   # If so, the updated path is stored in $new_path.
27884   new_path="$input_to_shortpath"
27885 
27886   input_path="$input_to_shortpath"
27887   # Check if we need to convert this using DOS-style short mode. If the path
27888   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27889   # take no chances and rewrite it.
27890   # Note: m4 eats our [], so we need to use [ and ] instead.
27891   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27892   if test "x$has_forbidden_chars" != x; then
27893     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27894     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27895     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27896     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27897       # Going to short mode and back again did indeed matter. Since short mode is
27898       # case insensitive, let's make it lowercase to improve readability.
27899       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27900       # Now convert it back to Unix-stile (cygpath)
27901       input_path=`$CYGPATH -u "$shortmode_path"`
27902       new_path="$input_path"
27903     fi
27904   fi
27905 
27906   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27907   if test "x$test_cygdrive_prefix" = x; then
27908     # As a simple fix, exclude /usr/bin since it's not a real path.
27909     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27910       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27911       # a path prefixed by /cygdrive for fixpath to work.
27912       new_path="$CYGWIN_ROOT_PATH$input_path"
27913     fi
27914   fi
27915 
27916   # remove trailing .exe if any
27917   new_path="${new_path/%.exe/}"
27918 
27919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27920 
27921   # First separate the path from the arguments. This will split at the first
27922   # space.
27923   complete="$OBJCOPY"
27924   path="${complete%% *}"
27925   tmp="$complete EOL"
27926   arguments="${tmp#* }"
27927 
27928   # Input might be given as Windows format, start by converting to
27929   # unix format.
27930   new_path="$path"
27931 
27932   windows_path="$new_path"
27933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27934     unix_path=`$CYGPATH -u "$windows_path"`
27935     new_path="$unix_path"
27936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27938     new_path="$unix_path"
27939   fi
27940 
27941 
27942   # Now try to locate executable using which
27943   new_path=`$WHICH "$new_path" 2> /dev/null`
27944 
27945   if test "x$new_path" = x; then
27946     # Oops. Which didn't find the executable.
27947     # The splitting of arguments from the executable at a space might have been incorrect,
27948     # since paths with space are more likely in Windows. Give it another try with the whole
27949     # argument.
27950     path="$complete"
27951     arguments="EOL"
27952     new_path="$path"
27953 
27954   windows_path="$new_path"
27955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27956     unix_path=`$CYGPATH -u "$windows_path"`
27957     new_path="$unix_path"
27958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27960     new_path="$unix_path"
27961   fi
27962 
27963 
27964     new_path=`$WHICH "$new_path" 2> /dev/null`
27965 
27966     if test "x$new_path" = x; then
27967       # It's still not found. Now this is an unrecoverable error.
27968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27969 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27970       has_space=`$ECHO "$complete" | $GREP " "`
27971       if test "x$has_space" != x; then
27972         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27974       fi
27975       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27976     fi
27977   fi
27978 
27979   # Now new_path has a complete unix path to the binary
27980   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27981     # Keep paths in /bin as-is, but remove trailing .exe if any
27982     new_path="${new_path/%.exe/}"
27983     # Do not save /bin paths to all_fixpath_prefixes!
27984   else
27985     # Not in mixed or Windows style, start by that.
27986     new_path=`cmd //c echo $new_path`
27987 
27988   input_path="$new_path"
27989   # Check if we need to convert this using DOS-style short mode. If the path
27990   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27991   # take no chances and rewrite it.
27992   # Note: m4 eats our [], so we need to use [ and ] instead.
27993   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27994   if test "x$has_forbidden_chars" != x; then
27995     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27996     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27997   fi
27998 
27999     # Output is in $new_path
28000 
28001   windows_path="$new_path"
28002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28003     unix_path=`$CYGPATH -u "$windows_path"`
28004     new_path="$unix_path"
28005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28007     new_path="$unix_path"
28008   fi
28009 
28010     # remove trailing .exe if any
28011     new_path="${new_path/%.exe/}"
28012 
28013     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28014     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28015   fi
28016 
28017   else
28018     # We're on a posix platform. Hooray! :)
28019     # First separate the path from the arguments. This will split at the first
28020     # space.
28021     complete="$OBJCOPY"
28022     path="${complete%% *}"
28023     tmp="$complete EOL"
28024     arguments="${tmp#* }"
28025 
28026     # Cannot rely on the command "which" here since it doesn't always work.
28027     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28028     if test -z "$is_absolute_path"; then
28029       # Path to executable is not absolute. Find it.
28030       IFS_save="$IFS"
28031       IFS=:
28032       for p in $PATH; do
28033         if test -f "$p/$path" && test -x "$p/$path"; then
28034           new_path="$p/$path"
28035           break
28036         fi
28037       done
28038       IFS="$IFS_save"
28039     else
28040       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28041 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28042       new_path="$path"
28043     fi
28044 
28045     if test "x$new_path" = x; then
28046       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28047 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28048       has_space=`$ECHO "$complete" | $GREP " "`
28049       if test "x$has_space" != x; then
28050         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28051 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28052       fi
28053       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28054     fi
28055   fi
28056 
28057   # Now join together the path and the arguments once again
28058   if test "x$arguments" != xEOL; then
28059     new_complete="$new_path ${arguments% *}"
28060   else
28061     new_complete="$new_path"
28062   fi
28063 
28064   if test "x$complete" != "x$new_complete"; then
28065     OBJCOPY="$new_complete"
28066     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28067 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28068   fi
28069 
28070     fi
28071   fi
28072 
28073   if test -n "$ac_tool_prefix"; then
28074   for ac_prog in gobjdump objdump
28075   do
28076     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28077 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28079 $as_echo_n "checking for $ac_word... " >&6; }
28080 if ${ac_cv_prog_OBJDUMP+:} false; then :
28081   $as_echo_n "(cached) " >&6
28082 else
28083   if test -n "$OBJDUMP"; then
28084   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28085 else
28086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28087 for as_dir in $PATH
28088 do
28089   IFS=$as_save_IFS
28090   test -z "$as_dir" && as_dir=.
28091     for ac_exec_ext in '' $ac_executable_extensions; do
28092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28093     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28095     break 2
28096   fi
28097 done
28098   done
28099 IFS=$as_save_IFS
28100 
28101 fi
28102 fi
28103 OBJDUMP=$ac_cv_prog_OBJDUMP
28104 if test -n "$OBJDUMP"; then
28105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28106 $as_echo "$OBJDUMP" >&6; }
28107 else
28108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28109 $as_echo "no" >&6; }
28110 fi
28111 
28112 
28113     test -n "$OBJDUMP" && break
28114   done
28115 fi
28116 if test -z "$OBJDUMP"; then
28117   ac_ct_OBJDUMP=$OBJDUMP
28118   for ac_prog in gobjdump objdump
28119 do
28120   # Extract the first word of "$ac_prog", so it can be a program name with args.
28121 set dummy $ac_prog; ac_word=$2
28122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28123 $as_echo_n "checking for $ac_word... " >&6; }
28124 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28125   $as_echo_n "(cached) " >&6
28126 else
28127   if test -n "$ac_ct_OBJDUMP"; then
28128   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28129 else
28130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28131 for as_dir in $PATH
28132 do
28133   IFS=$as_save_IFS
28134   test -z "$as_dir" && as_dir=.
28135     for ac_exec_ext in '' $ac_executable_extensions; do
28136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28137     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28139     break 2
28140   fi
28141 done
28142   done
28143 IFS=$as_save_IFS
28144 
28145 fi
28146 fi
28147 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28148 if test -n "$ac_ct_OBJDUMP"; then
28149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28150 $as_echo "$ac_ct_OBJDUMP" >&6; }
28151 else
28152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28153 $as_echo "no" >&6; }
28154 fi
28155 
28156 
28157   test -n "$ac_ct_OBJDUMP" && break
28158 done
28159 
28160   if test "x$ac_ct_OBJDUMP" = x; then
28161     OBJDUMP=""
28162   else
28163     case $cross_compiling:$ac_tool_warned in
28164 yes:)
28165 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28166 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28167 ac_tool_warned=yes ;;
28168 esac
28169     OBJDUMP=$ac_ct_OBJDUMP
28170   fi
28171 fi
28172 
28173   if test "x$OBJDUMP" != x; then
28174     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28175 
28176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28177 
28178   # First separate the path from the arguments. This will split at the first
28179   # space.
28180   complete="$OBJDUMP"
28181   path="${complete%% *}"
28182   tmp="$complete EOL"
28183   arguments="${tmp#* }"
28184 
28185   # Input might be given as Windows format, start by converting to
28186   # unix format.
28187   new_path=`$CYGPATH -u "$path"`
28188 
28189   # Now try to locate executable using which
28190   new_path=`$WHICH "$new_path" 2> /dev/null`
28191   # bat and cmd files are not always considered executable in cygwin causing which
28192   # to not find them
28193   if test "x$new_path" = x \
28194       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28195       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28196     new_path=`$CYGPATH -u "$path"`
28197   fi
28198   if test "x$new_path" = x; then
28199     # Oops. Which didn't find the executable.
28200     # The splitting of arguments from the executable at a space might have been incorrect,
28201     # since paths with space are more likely in Windows. Give it another try with the whole
28202     # argument.
28203     path="$complete"
28204     arguments="EOL"
28205     new_path=`$CYGPATH -u "$path"`
28206     new_path=`$WHICH "$new_path" 2> /dev/null`
28207     # bat and cmd files are not always considered executable in cygwin causing which
28208     # to not find them
28209     if test "x$new_path" = x \
28210         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28211         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28212       new_path=`$CYGPATH -u "$path"`
28213     fi
28214     if test "x$new_path" = x; then
28215       # It's still not found. Now this is an unrecoverable error.
28216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28217 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28218       has_space=`$ECHO "$complete" | $GREP " "`
28219       if test "x$has_space" != x; then
28220         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28221 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28222       fi
28223       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28224     fi
28225   fi
28226 
28227   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28228   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28229   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28230   # "foo.exe" is OK but "foo" is an error.
28231   #
28232   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28233   # It is also a way to make sure we got the proper file name for the real test later on.
28234   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28235   if test "x$test_shortpath" = x; then
28236     # Short path failed, file does not exist as specified.
28237     # Try adding .exe or .cmd
28238     if test -f "${new_path}.exe"; then
28239       input_to_shortpath="${new_path}.exe"
28240     elif test -f "${new_path}.cmd"; then
28241       input_to_shortpath="${new_path}.cmd"
28242     else
28243       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28244 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28245       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28246 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28247       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28248     fi
28249   else
28250     input_to_shortpath="$new_path"
28251   fi
28252 
28253   # Call helper function which possibly converts this using DOS-style short mode.
28254   # If so, the updated path is stored in $new_path.
28255   new_path="$input_to_shortpath"
28256 
28257   input_path="$input_to_shortpath"
28258   # Check if we need to convert this using DOS-style short mode. If the path
28259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28260   # take no chances and rewrite it.
28261   # Note: m4 eats our [], so we need to use [ and ] instead.
28262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28263   if test "x$has_forbidden_chars" != x; then
28264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28265     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28266     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28267     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28268       # Going to short mode and back again did indeed matter. Since short mode is
28269       # case insensitive, let's make it lowercase to improve readability.
28270       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28271       # Now convert it back to Unix-stile (cygpath)
28272       input_path=`$CYGPATH -u "$shortmode_path"`
28273       new_path="$input_path"
28274     fi
28275   fi
28276 
28277   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28278   if test "x$test_cygdrive_prefix" = x; then
28279     # As a simple fix, exclude /usr/bin since it's not a real path.
28280     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28281       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28282       # a path prefixed by /cygdrive for fixpath to work.
28283       new_path="$CYGWIN_ROOT_PATH$input_path"
28284     fi
28285   fi
28286 
28287   # remove trailing .exe if any
28288   new_path="${new_path/%.exe/}"
28289 
28290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28291 
28292   # First separate the path from the arguments. This will split at the first
28293   # space.
28294   complete="$OBJDUMP"
28295   path="${complete%% *}"
28296   tmp="$complete EOL"
28297   arguments="${tmp#* }"
28298 
28299   # Input might be given as Windows format, start by converting to
28300   # unix format.
28301   new_path="$path"
28302 
28303   windows_path="$new_path"
28304   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28305     unix_path=`$CYGPATH -u "$windows_path"`
28306     new_path="$unix_path"
28307   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28309     new_path="$unix_path"
28310   fi
28311 
28312 
28313   # Now try to locate executable using which
28314   new_path=`$WHICH "$new_path" 2> /dev/null`
28315 
28316   if test "x$new_path" = x; then
28317     # Oops. Which didn't find the executable.
28318     # The splitting of arguments from the executable at a space might have been incorrect,
28319     # since paths with space are more likely in Windows. Give it another try with the whole
28320     # argument.
28321     path="$complete"
28322     arguments="EOL"
28323     new_path="$path"
28324 
28325   windows_path="$new_path"
28326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28327     unix_path=`$CYGPATH -u "$windows_path"`
28328     new_path="$unix_path"
28329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28331     new_path="$unix_path"
28332   fi
28333 
28334 
28335     new_path=`$WHICH "$new_path" 2> /dev/null`
28336 
28337     if test "x$new_path" = x; then
28338       # It's still not found. Now this is an unrecoverable error.
28339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28340 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28341       has_space=`$ECHO "$complete" | $GREP " "`
28342       if test "x$has_space" != x; then
28343         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28344 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28345       fi
28346       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28347     fi
28348   fi
28349 
28350   # Now new_path has a complete unix path to the binary
28351   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28352     # Keep paths in /bin as-is, but remove trailing .exe if any
28353     new_path="${new_path/%.exe/}"
28354     # Do not save /bin paths to all_fixpath_prefixes!
28355   else
28356     # Not in mixed or Windows style, start by that.
28357     new_path=`cmd //c echo $new_path`
28358 
28359   input_path="$new_path"
28360   # Check if we need to convert this using DOS-style short mode. If the path
28361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28362   # take no chances and rewrite it.
28363   # Note: m4 eats our [], so we need to use [ and ] instead.
28364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28365   if test "x$has_forbidden_chars" != x; then
28366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28368   fi
28369 
28370     # Output is in $new_path
28371 
28372   windows_path="$new_path"
28373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28374     unix_path=`$CYGPATH -u "$windows_path"`
28375     new_path="$unix_path"
28376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28378     new_path="$unix_path"
28379   fi
28380 
28381     # remove trailing .exe if any
28382     new_path="${new_path/%.exe/}"
28383 
28384     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28385     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28386   fi
28387 
28388   else
28389     # We're on a posix platform. Hooray! :)
28390     # First separate the path from the arguments. This will split at the first
28391     # space.
28392     complete="$OBJDUMP"
28393     path="${complete%% *}"
28394     tmp="$complete EOL"
28395     arguments="${tmp#* }"
28396 
28397     # Cannot rely on the command "which" here since it doesn't always work.
28398     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28399     if test -z "$is_absolute_path"; then
28400       # Path to executable is not absolute. Find it.
28401       IFS_save="$IFS"
28402       IFS=:
28403       for p in $PATH; do
28404         if test -f "$p/$path" && test -x "$p/$path"; then
28405           new_path="$p/$path"
28406           break
28407         fi
28408       done
28409       IFS="$IFS_save"
28410     else
28411       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28412 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28413       new_path="$path"
28414     fi
28415 
28416     if test "x$new_path" = x; then
28417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28418 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28419       has_space=`$ECHO "$complete" | $GREP " "`
28420       if test "x$has_space" != x; then
28421         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28422 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28423       fi
28424       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28425     fi
28426   fi
28427 
28428   # Now join together the path and the arguments once again
28429   if test "x$arguments" != xEOL; then
28430     new_complete="$new_path ${arguments% *}"
28431   else
28432     new_complete="$new_path"
28433   fi
28434 
28435   if test "x$complete" != "x$new_complete"; then
28436     OBJDUMP="$new_complete"
28437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28438 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28439   fi
28440 
28441   fi
28442 
28443   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28444     # Extract the first word of "lipo", so it can be a program name with args.
28445 set dummy lipo; ac_word=$2
28446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28447 $as_echo_n "checking for $ac_word... " >&6; }
28448 if ${ac_cv_path_LIPO+:} false; then :
28449   $as_echo_n "(cached) " >&6
28450 else
28451   case $LIPO in
28452   [\\/]* | ?:[\\/]*)
28453   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28454   ;;
28455   *)
28456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28457 for as_dir in $PATH
28458 do
28459   IFS=$as_save_IFS
28460   test -z "$as_dir" && as_dir=.
28461     for ac_exec_ext in '' $ac_executable_extensions; do
28462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28463     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28465     break 2
28466   fi
28467 done
28468   done
28469 IFS=$as_save_IFS
28470 
28471   ;;
28472 esac
28473 fi
28474 LIPO=$ac_cv_path_LIPO
28475 if test -n "$LIPO"; then
28476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28477 $as_echo "$LIPO" >&6; }
28478 else
28479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28480 $as_echo "no" >&6; }
28481 fi
28482 
28483 
28484 
28485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28486 
28487   # First separate the path from the arguments. This will split at the first
28488   # space.
28489   complete="$LIPO"
28490   path="${complete%% *}"
28491   tmp="$complete EOL"
28492   arguments="${tmp#* }"
28493 
28494   # Input might be given as Windows format, start by converting to
28495   # unix format.
28496   new_path=`$CYGPATH -u "$path"`
28497 
28498   # Now try to locate executable using which
28499   new_path=`$WHICH "$new_path" 2> /dev/null`
28500   # bat and cmd files are not always considered executable in cygwin causing which
28501   # to not find them
28502   if test "x$new_path" = x \
28503       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28504       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28505     new_path=`$CYGPATH -u "$path"`
28506   fi
28507   if test "x$new_path" = x; then
28508     # Oops. Which didn't find the executable.
28509     # The splitting of arguments from the executable at a space might have been incorrect,
28510     # since paths with space are more likely in Windows. Give it another try with the whole
28511     # argument.
28512     path="$complete"
28513     arguments="EOL"
28514     new_path=`$CYGPATH -u "$path"`
28515     new_path=`$WHICH "$new_path" 2> /dev/null`
28516     # bat and cmd files are not always considered executable in cygwin causing which
28517     # to not find them
28518     if test "x$new_path" = x \
28519         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28520         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28521       new_path=`$CYGPATH -u "$path"`
28522     fi
28523     if test "x$new_path" = x; then
28524       # It's still not found. Now this is an unrecoverable error.
28525       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28526 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28527       has_space=`$ECHO "$complete" | $GREP " "`
28528       if test "x$has_space" != x; then
28529         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28530 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28531       fi
28532       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28533     fi
28534   fi
28535 
28536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28539   # "foo.exe" is OK but "foo" is an error.
28540   #
28541   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28542   # It is also a way to make sure we got the proper file name for the real test later on.
28543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28544   if test "x$test_shortpath" = x; then
28545     # Short path failed, file does not exist as specified.
28546     # Try adding .exe or .cmd
28547     if test -f "${new_path}.exe"; then
28548       input_to_shortpath="${new_path}.exe"
28549     elif test -f "${new_path}.cmd"; then
28550       input_to_shortpath="${new_path}.cmd"
28551     else
28552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28553 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28554       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28555 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28556       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28557     fi
28558   else
28559     input_to_shortpath="$new_path"
28560   fi
28561 
28562   # Call helper function which possibly converts this using DOS-style short mode.
28563   # If so, the updated path is stored in $new_path.
28564   new_path="$input_to_shortpath"
28565 
28566   input_path="$input_to_shortpath"
28567   # Check if we need to convert this using DOS-style short mode. If the path
28568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28569   # take no chances and rewrite it.
28570   # Note: m4 eats our [], so we need to use [ and ] instead.
28571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28572   if test "x$has_forbidden_chars" != x; then
28573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28577       # Going to short mode and back again did indeed matter. Since short mode is
28578       # case insensitive, let's make it lowercase to improve readability.
28579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28580       # Now convert it back to Unix-stile (cygpath)
28581       input_path=`$CYGPATH -u "$shortmode_path"`
28582       new_path="$input_path"
28583     fi
28584   fi
28585 
28586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28587   if test "x$test_cygdrive_prefix" = x; then
28588     # As a simple fix, exclude /usr/bin since it's not a real path.
28589     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28591       # a path prefixed by /cygdrive for fixpath to work.
28592       new_path="$CYGWIN_ROOT_PATH$input_path"
28593     fi
28594   fi
28595 
28596   # remove trailing .exe if any
28597   new_path="${new_path/%.exe/}"
28598 
28599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28600 
28601   # First separate the path from the arguments. This will split at the first
28602   # space.
28603   complete="$LIPO"
28604   path="${complete%% *}"
28605   tmp="$complete EOL"
28606   arguments="${tmp#* }"
28607 
28608   # Input might be given as Windows format, start by converting to
28609   # unix format.
28610   new_path="$path"
28611 
28612   windows_path="$new_path"
28613   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28614     unix_path=`$CYGPATH -u "$windows_path"`
28615     new_path="$unix_path"
28616   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28617     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28618     new_path="$unix_path"
28619   fi
28620 
28621 
28622   # Now try to locate executable using which
28623   new_path=`$WHICH "$new_path" 2> /dev/null`
28624 
28625   if test "x$new_path" = x; then
28626     # Oops. Which didn't find the executable.
28627     # The splitting of arguments from the executable at a space might have been incorrect,
28628     # since paths with space are more likely in Windows. Give it another try with the whole
28629     # argument.
28630     path="$complete"
28631     arguments="EOL"
28632     new_path="$path"
28633 
28634   windows_path="$new_path"
28635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28636     unix_path=`$CYGPATH -u "$windows_path"`
28637     new_path="$unix_path"
28638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28639     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28640     new_path="$unix_path"
28641   fi
28642 
28643 
28644     new_path=`$WHICH "$new_path" 2> /dev/null`
28645 
28646     if test "x$new_path" = x; then
28647       # It's still not found. Now this is an unrecoverable error.
28648       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28649 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28650       has_space=`$ECHO "$complete" | $GREP " "`
28651       if test "x$has_space" != x; then
28652         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28653 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28654       fi
28655       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28656     fi
28657   fi
28658 
28659   # Now new_path has a complete unix path to the binary
28660   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28661     # Keep paths in /bin as-is, but remove trailing .exe if any
28662     new_path="${new_path/%.exe/}"
28663     # Do not save /bin paths to all_fixpath_prefixes!
28664   else
28665     # Not in mixed or Windows style, start by that.
28666     new_path=`cmd //c echo $new_path`
28667 
28668   input_path="$new_path"
28669   # Check if we need to convert this using DOS-style short mode. If the path
28670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28671   # take no chances and rewrite it.
28672   # Note: m4 eats our [], so we need to use [ and ] instead.
28673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28674   if test "x$has_forbidden_chars" != x; then
28675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28676     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28677   fi
28678 
28679     # Output is in $new_path
28680 
28681   windows_path="$new_path"
28682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28683     unix_path=`$CYGPATH -u "$windows_path"`
28684     new_path="$unix_path"
28685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28687     new_path="$unix_path"
28688   fi
28689 
28690     # remove trailing .exe if any
28691     new_path="${new_path/%.exe/}"
28692 
28693     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28694     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28695   fi
28696 
28697   else
28698     # We're on a posix platform. Hooray! :)
28699     # First separate the path from the arguments. This will split at the first
28700     # space.
28701     complete="$LIPO"
28702     path="${complete%% *}"
28703     tmp="$complete EOL"
28704     arguments="${tmp#* }"
28705 
28706     # Cannot rely on the command "which" here since it doesn't always work.
28707     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28708     if test -z "$is_absolute_path"; then
28709       # Path to executable is not absolute. Find it.
28710       IFS_save="$IFS"
28711       IFS=:
28712       for p in $PATH; do
28713         if test -f "$p/$path" && test -x "$p/$path"; then
28714           new_path="$p/$path"
28715           break
28716         fi
28717       done
28718       IFS="$IFS_save"
28719     else
28720       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28721 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28722       new_path="$path"
28723     fi
28724 
28725     if test "x$new_path" = x; then
28726       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28727 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28728       has_space=`$ECHO "$complete" | $GREP " "`
28729       if test "x$has_space" != x; then
28730         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28732       fi
28733       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28734     fi
28735   fi
28736 
28737   # Now join together the path and the arguments once again
28738   if test "x$arguments" != xEOL; then
28739     new_complete="$new_path ${arguments% *}"
28740   else
28741     new_complete="$new_path"
28742   fi
28743 
28744   if test "x$complete" != "x$new_complete"; then
28745     LIPO="$new_complete"
28746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28747 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28748   fi
28749 
28750   fi
28751 
28752 
28753 
28754   # Restore old path without tools dir
28755   PATH="$OLD_PATH"
28756 
28757 
28758 # FIXME: Currently we must test this after paths but before flags. Fix!
28759 
28760 # And we can test some aspects on the target using configure macros.
28761 
28762 
28763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28764 $as_echo_n "checking for ANSI C header files... " >&6; }
28765 if ${ac_cv_header_stdc+:} false; then :
28766   $as_echo_n "(cached) " >&6
28767 else
28768   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28769 /* end confdefs.h.  */
28770 #include <stdlib.h>
28771 #include <stdarg.h>
28772 #include <string.h>
28773 #include <float.h>
28774 
28775 int
28776 main ()
28777 {
28778 
28779   ;
28780   return 0;
28781 }
28782 _ACEOF
28783 if ac_fn_cxx_try_compile "$LINENO"; then :
28784   ac_cv_header_stdc=yes
28785 else
28786   ac_cv_header_stdc=no
28787 fi
28788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28789 
28790 if test $ac_cv_header_stdc = yes; then
28791   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28792   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28793 /* end confdefs.h.  */
28794 #include <string.h>
28795 
28796 _ACEOF
28797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28798   $EGREP "memchr" >/dev/null 2>&1; then :
28799 
28800 else
28801   ac_cv_header_stdc=no
28802 fi
28803 rm -f conftest*
28804 
28805 fi
28806 
28807 if test $ac_cv_header_stdc = yes; then
28808   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28810 /* end confdefs.h.  */
28811 #include <stdlib.h>
28812 
28813 _ACEOF
28814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28815   $EGREP "free" >/dev/null 2>&1; then :
28816 
28817 else
28818   ac_cv_header_stdc=no
28819 fi
28820 rm -f conftest*
28821 
28822 fi
28823 
28824 if test $ac_cv_header_stdc = yes; then
28825   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28826   if test "$cross_compiling" = yes; then :
28827   :
28828 else
28829   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28830 /* end confdefs.h.  */
28831 #include <ctype.h>
28832 #include <stdlib.h>
28833 #if ((' ' & 0x0FF) == 0x020)
28834 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28835 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28836 #else
28837 # define ISLOWER(c) \
28838                    (('a' <= (c) && (c) <= 'i') \
28839                      || ('j' <= (c) && (c) <= 'r') \
28840                      || ('s' <= (c) && (c) <= 'z'))
28841 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28842 #endif
28843 
28844 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28845 int
28846 main ()
28847 {
28848   int i;
28849   for (i = 0; i < 256; i++)
28850     if (XOR (islower (i), ISLOWER (i))
28851         || toupper (i) != TOUPPER (i))
28852       return 2;
28853   return 0;
28854 }
28855 _ACEOF
28856 if ac_fn_cxx_try_run "$LINENO"; then :
28857 
28858 else
28859   ac_cv_header_stdc=no
28860 fi
28861 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28862   conftest.$ac_objext conftest.beam conftest.$ac_ext
28863 fi
28864 
28865 fi
28866 fi
28867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28868 $as_echo "$ac_cv_header_stdc" >&6; }
28869 if test $ac_cv_header_stdc = yes; then
28870 
28871 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28872 
28873 fi
28874 
28875 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28876 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28877                   inttypes.h stdint.h unistd.h
28878 do :
28879   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28880 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28881 "
28882 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28883   cat >>confdefs.h <<_ACEOF
28884 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28885 _ACEOF
28886 
28887 fi
28888 
28889 done
28890 
28891 
28892 
28893   ###############################################################################
28894   #
28895   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28896   # (The JVM can use 32 or 64 bit Java pointers but that decision
28897   # is made at runtime.)
28898   #
28899 
28900   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28901     # Always specify -m flag on Solaris
28902     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28903 
28904   # When we add flags to the "official" CFLAGS etc, we need to
28905   # keep track of these additions in ADDED_CFLAGS etc. These
28906   # will later be checked to make sure only controlled additions
28907   # have been made to CFLAGS etc.
28908   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28909   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28910   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28911 
28912   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28913   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28914   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28915 
28916   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28917   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28918   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28919 
28920   elif test "x$COMPILE_TYPE" = xreduced; then
28921     if test "x$OPENJDK_TARGET_OS" != xwindows; then
28922       # Specify -m if running reduced on other Posix platforms
28923 
28924   # When we add flags to the "official" CFLAGS etc, we need to
28925   # keep track of these additions in ADDED_CFLAGS etc. These
28926   # will later be checked to make sure only controlled additions
28927   # have been made to CFLAGS etc.
28928   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28929   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28930   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28931 
28932   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28933   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28934   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28935 
28936   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28937   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28938   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28939 
28940     fi
28941   fi
28942 
28943   # Make compilation sanity check
28944   for ac_header in stdio.h
28945 do :
28946   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28947 if test "x$ac_cv_header_stdio_h" = xyes; then :
28948   cat >>confdefs.h <<_ACEOF
28949 #define HAVE_STDIO_H 1
28950 _ACEOF
28951 
28952 else
28953 
28954     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28955 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28956     if test "x$COMPILE_TYPE" = xreduced; then
28957       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28958 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28959     elif test "x$COMPILE_TYPE" = xcross; then
28960       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28961 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28962     fi
28963     as_fn_error $? "Cannot continue." "$LINENO" 5
28964 
28965 fi
28966 
28967 done
28968 
28969 
28970   # The cast to long int works around a bug in the HP C Compiler
28971 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28972 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28973 # This bug is HP SR number 8606223364.
28974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28975 $as_echo_n "checking size of int *... " >&6; }
28976 if ${ac_cv_sizeof_int_p+:} false; then :
28977   $as_echo_n "(cached) " >&6
28978 else
28979   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28980 
28981 else
28982   if test "$ac_cv_type_int_p" = yes; then
28983      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28984 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28985 as_fn_error 77 "cannot compute sizeof (int *)
28986 See \`config.log' for more details" "$LINENO" 5; }
28987    else
28988      ac_cv_sizeof_int_p=0
28989    fi
28990 fi
28991 
28992 fi
28993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28994 $as_echo "$ac_cv_sizeof_int_p" >&6; }
28995 
28996 
28997 
28998 cat >>confdefs.h <<_ACEOF
28999 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29000 _ACEOF
29001 
29002 
29003 
29004   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
29005   if test "x$ac_cv_sizeof_int_p" = x; then
29006     # The test failed, lets stick to the assumed value.
29007     { $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
29008 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29009   else
29010     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29011 
29012     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29013       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
29014       # Let's try to implicitely set the compilers target architecture and retry the test
29015       { $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
29016 $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;}
29017       { $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
29018 $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;}
29019 
29020   # When we add flags to the "official" CFLAGS etc, we need to
29021   # keep track of these additions in ADDED_CFLAGS etc. These
29022   # will later be checked to make sure only controlled additions
29023   # have been made to CFLAGS etc.
29024   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29025   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29026   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29027 
29028   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29029   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29030   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29031 
29032   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29033   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29034   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29035 
29036 
29037       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29038       unset ac_cv_sizeof_int_p
29039       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29040       cat >>confdefs.h <<_ACEOF
29041 #undef SIZEOF_INT_P
29042 _ACEOF
29043 
29044       # The cast to long int works around a bug in the HP C Compiler
29045 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29046 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29047 # This bug is HP SR number 8606223364.
29048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29049 $as_echo_n "checking size of int *... " >&6; }
29050 if ${ac_cv_sizeof_int_p+:} false; then :
29051   $as_echo_n "(cached) " >&6
29052 else
29053   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29054 
29055 else
29056   if test "$ac_cv_type_int_p" = yes; then
29057      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29058 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29059 as_fn_error 77 "cannot compute sizeof (int *)
29060 See \`config.log' for more details" "$LINENO" 5; }
29061    else
29062      ac_cv_sizeof_int_p=0
29063    fi
29064 fi
29065 
29066 fi
29067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29068 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29069 
29070 
29071 
29072 cat >>confdefs.h <<_ACEOF
29073 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29074 _ACEOF
29075 
29076 
29077 
29078       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29079 
29080       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29081         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
29082       fi
29083     fi
29084   fi
29085 
29086   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29087 $as_echo_n "checking for target address size... " >&6; }
29088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29089 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29090 
29091 
29092   ###############################################################################
29093   #
29094   # Is the target little of big endian?
29095   #
29096    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29097 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29098 if ${ac_cv_c_bigendian+:} false; then :
29099   $as_echo_n "(cached) " >&6
29100 else
29101   ac_cv_c_bigendian=unknown
29102     # See if we're dealing with a universal compiler.
29103     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29104 /* end confdefs.h.  */
29105 #ifndef __APPLE_CC__
29106                not a universal capable compiler
29107              #endif
29108              typedef int dummy;
29109 
29110 _ACEOF
29111 if ac_fn_cxx_try_compile "$LINENO"; then :
29112 
29113         # Check for potential -arch flags.  It is not universal unless
29114         # there are at least two -arch flags with different values.
29115         ac_arch=
29116         ac_prev=
29117         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29118          if test -n "$ac_prev"; then
29119            case $ac_word in
29120              i?86 | x86_64 | ppc | ppc64)
29121                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29122                  ac_arch=$ac_word
29123                else
29124                  ac_cv_c_bigendian=universal
29125                  break
29126                fi
29127                ;;
29128            esac
29129            ac_prev=
29130          elif test "x$ac_word" = "x-arch"; then
29131            ac_prev=arch
29132          fi
29133        done
29134 fi
29135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29136     if test $ac_cv_c_bigendian = unknown; then
29137       # See if sys/param.h defines the BYTE_ORDER macro.
29138       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29139 /* end confdefs.h.  */
29140 #include <sys/types.h>
29141              #include <sys/param.h>
29142 
29143 int
29144 main ()
29145 {
29146 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29147                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29148                      && LITTLE_ENDIAN)
29149               bogus endian macros
29150              #endif
29151 
29152   ;
29153   return 0;
29154 }
29155 _ACEOF
29156 if ac_fn_cxx_try_compile "$LINENO"; then :
29157   # It does; now see whether it defined to BIG_ENDIAN or not.
29158          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29159 /* end confdefs.h.  */
29160 #include <sys/types.h>
29161                 #include <sys/param.h>
29162 
29163 int
29164 main ()
29165 {
29166 #if BYTE_ORDER != BIG_ENDIAN
29167                  not big endian
29168                 #endif
29169 
29170   ;
29171   return 0;
29172 }
29173 _ACEOF
29174 if ac_fn_cxx_try_compile "$LINENO"; then :
29175   ac_cv_c_bigendian=yes
29176 else
29177   ac_cv_c_bigendian=no
29178 fi
29179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29180 fi
29181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29182     fi
29183     if test $ac_cv_c_bigendian = unknown; then
29184       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29185       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29186 /* end confdefs.h.  */
29187 #include <limits.h>
29188 
29189 int
29190 main ()
29191 {
29192 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29193               bogus endian macros
29194              #endif
29195 
29196   ;
29197   return 0;
29198 }
29199 _ACEOF
29200 if ac_fn_cxx_try_compile "$LINENO"; then :
29201   # It does; now see whether it defined to _BIG_ENDIAN or not.
29202          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29203 /* end confdefs.h.  */
29204 #include <limits.h>
29205 
29206 int
29207 main ()
29208 {
29209 #ifndef _BIG_ENDIAN
29210                  not big endian
29211                 #endif
29212 
29213   ;
29214   return 0;
29215 }
29216 _ACEOF
29217 if ac_fn_cxx_try_compile "$LINENO"; then :
29218   ac_cv_c_bigendian=yes
29219 else
29220   ac_cv_c_bigendian=no
29221 fi
29222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29223 fi
29224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29225     fi
29226     if test $ac_cv_c_bigendian = unknown; then
29227       # Compile a test program.
29228       if test "$cross_compiling" = yes; then :
29229   # Try to guess by grepping values from an object file.
29230          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29231 /* end confdefs.h.  */
29232 short int ascii_mm[] =
29233                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29234                 short int ascii_ii[] =
29235                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29236                 int use_ascii (int i) {
29237                   return ascii_mm[i] + ascii_ii[i];
29238                 }
29239                 short int ebcdic_ii[] =
29240                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29241                 short int ebcdic_mm[] =
29242                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29243                 int use_ebcdic (int i) {
29244                   return ebcdic_mm[i] + ebcdic_ii[i];
29245                 }
29246                 extern int foo;
29247 
29248 int
29249 main ()
29250 {
29251 return use_ascii (foo) == use_ebcdic (foo);
29252   ;
29253   return 0;
29254 }
29255 _ACEOF
29256 if ac_fn_cxx_try_compile "$LINENO"; then :
29257   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29258               ac_cv_c_bigendian=yes
29259             fi
29260             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29261               if test "$ac_cv_c_bigendian" = unknown; then
29262                 ac_cv_c_bigendian=no
29263               else
29264                 # finding both strings is unlikely to happen, but who knows?
29265                 ac_cv_c_bigendian=unknown
29266               fi
29267             fi
29268 fi
29269 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29270 else
29271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29272 /* end confdefs.h.  */
29273 $ac_includes_default
29274 int
29275 main ()
29276 {
29277 
29278              /* Are we little or big endian?  From Harbison&Steele.  */
29279              union
29280              {
29281                long int l;
29282                char c[sizeof (long int)];
29283              } u;
29284              u.l = 1;
29285              return u.c[sizeof (long int) - 1] == 1;
29286 
29287   ;
29288   return 0;
29289 }
29290 _ACEOF
29291 if ac_fn_cxx_try_run "$LINENO"; then :
29292   ac_cv_c_bigendian=no
29293 else
29294   ac_cv_c_bigendian=yes
29295 fi
29296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29297   conftest.$ac_objext conftest.beam conftest.$ac_ext
29298 fi
29299 
29300     fi
29301 fi
29302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29303 $as_echo "$ac_cv_c_bigendian" >&6; }
29304  case $ac_cv_c_bigendian in #(
29305    yes)
29306      ENDIAN="big";; #(
29307    no)
29308      ENDIAN="little" ;; #(
29309    universal)
29310      ENDIAN="universal_endianness"
29311      ;; #(
29312    *)
29313      ENDIAN="unknown" ;;
29314  esac
29315 
29316 
29317   if test "x$ENDIAN" = xuniversal_endianness; then
29318     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29319   fi
29320   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29321     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
29322   fi
29323 
29324 
29325 # Configure flags for the tools
29326 
29327 
29328   ###############################################################################
29329   #
29330   # How to compile shared libraries.
29331   #
29332 
29333   if test "x$GCC" = xyes; then
29334     COMPILER_NAME=gcc
29335     PICFLAG="-fPIC"
29336     LIBRARY_PREFIX=lib
29337     SHARED_LIBRARY='lib$1.so'
29338     STATIC_LIBRARY='lib$1.a'
29339     SHARED_LIBRARY_FLAGS="-shared"
29340     SHARED_LIBRARY_SUFFIX='.so'
29341     STATIC_LIBRARY_SUFFIX='.a'
29342     OBJ_SUFFIX='.o'
29343     EXE_SUFFIX=''
29344     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29345     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29346     C_FLAG_REORDER=''
29347     CXX_FLAG_REORDER=''
29348     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29349     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29350     LD="$CC"
29351     LDEXE="$CC"
29352     LDCXX="$CXX"
29353     LDEXECXX="$CXX"
29354     POST_STRIP_CMD="$STRIP -g"
29355 
29356     # Linking is different on MacOSX
29357     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29358       # Might change in the future to clang.
29359       COMPILER_NAME=gcc
29360       SHARED_LIBRARY='lib$1.dylib'
29361       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29362       SHARED_LIBRARY_SUFFIX='.dylib'
29363       EXE_SUFFIX=''
29364       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29365       SET_SHARED_LIBRARY_MAPFILE=''
29366       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29367       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29368       POST_STRIP_CMD="$STRIP -S"
29369     fi
29370   else
29371     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29372       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29373       COMPILER_NAME=ossc
29374       PICFLAG="-KPIC"
29375       LIBRARY_PREFIX=lib
29376       SHARED_LIBRARY='lib$1.so'
29377       STATIC_LIBRARY='lib$1.a'
29378       SHARED_LIBRARY_FLAGS="-G"
29379       SHARED_LIBRARY_SUFFIX='.so'
29380       STATIC_LIBRARY_SUFFIX='.a'
29381       OBJ_SUFFIX='.o'
29382       EXE_SUFFIX=''
29383       SET_SHARED_LIBRARY_NAME=''
29384       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29385       C_FLAG_REORDER='-xF'
29386       CXX_FLAG_REORDER='-xF'
29387       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29388       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29389       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29390       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29391       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29392       POST_STRIP_CMD="$STRIP -x"
29393       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29394     fi
29395     if test "x$OPENJDK_TARGET_OS" = xaix; then
29396         COMPILER_NAME=xlc
29397         PICFLAG="-qpic=large"
29398         LIBRARY_PREFIX=lib
29399         SHARED_LIBRARY='lib$1.so'
29400         STATIC_LIBRARY='lib$1.a'
29401         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29402         SHARED_LIBRARY_SUFFIX='.so'
29403         STATIC_LIBRARY_SUFFIX='.a'
29404         OBJ_SUFFIX='.o'
29405         EXE_SUFFIX=''
29406         SET_SHARED_LIBRARY_NAME=''
29407         SET_SHARED_LIBRARY_MAPFILE=''
29408         C_FLAG_REORDER=''
29409         CXX_FLAG_REORDER=''
29410         SET_SHARED_LIBRARY_ORIGIN=''
29411         SET_EXECUTABLE_ORIGIN=""
29412         CFLAGS_JDK=""
29413         CXXFLAGS_JDK=""
29414         CFLAGS_JDKLIB_EXTRA=''
29415         POST_STRIP_CMD="$STRIP -X32_64"
29416         POST_MCS_CMD=""
29417     fi
29418     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29419       # If it is not gcc, then assume it is the MS Visual Studio compiler
29420       COMPILER_NAME=cl
29421       PICFLAG=""
29422       LIBRARY_PREFIX=
29423       SHARED_LIBRARY='$1.dll'
29424       STATIC_LIBRARY='$1.lib'
29425       SHARED_LIBRARY_FLAGS="-LD"
29426       SHARED_LIBRARY_SUFFIX='.dll'
29427       STATIC_LIBRARY_SUFFIX='.lib'
29428       OBJ_SUFFIX='.obj'
29429       EXE_SUFFIX='.exe'
29430       SET_SHARED_LIBRARY_NAME=''
29431       SET_SHARED_LIBRARY_MAPFILE=''
29432       SET_SHARED_LIBRARY_ORIGIN=''
29433       SET_EXECUTABLE_ORIGIN=''
29434     fi
29435   fi
29436 
29437 
29438 
29439 
29440 
29441 
29442 
29443 
29444 
29445 
29446 
29447 
29448 
29449 
29450 
29451 
29452 
29453 
29454 
29455   # The (cross) compiler is now configured, we can now test capabilities
29456   # of the target platform.
29457 
29458 
29459 
29460   ###############################################################################
29461   #
29462   # Setup the opt flags for different compilers
29463   # and different operating systems.
29464   #
29465 
29466   #
29467   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29468   #
29469   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29470     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29471     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29472     CFLAGS="$CFLAGS -mstackrealign"
29473     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29474 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29475     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29476 /* end confdefs.h.  */
29477 int main() { return 0; }
29478 _ACEOF
29479 if ac_fn_cxx_try_link "$LINENO"; then :
29480 
29481           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29482 $as_echo "yes" >&6; }
29483 
29484 else
29485 
29486           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29487 $as_echo "no" >&6; }
29488           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29489 
29490 
29491 fi
29492 rm -f core conftest.err conftest.$ac_objext \
29493     conftest$ac_exeext conftest.$ac_ext
29494   fi
29495 
29496   C_FLAG_DEPS="-MMD -MF"
29497   CXX_FLAG_DEPS="-MMD -MF"
29498 
29499   case $COMPILER_TYPE in
29500     CC )
29501       case $COMPILER_NAME in
29502         gcc )
29503           case $OPENJDK_TARGET_OS in
29504             macosx )
29505               # On MacOSX we optimize for size, something
29506               # we should do for all platforms?
29507               C_O_FLAG_HI="-Os"
29508               C_O_FLAG_NORM="-Os"
29509               C_O_FLAG_NONE=""
29510               ;;
29511             *)
29512               C_O_FLAG_HI="-O3"
29513               C_O_FLAG_NORM="-O2"
29514               C_O_FLAG_NONE="-O0"
29515               ;;
29516           esac
29517           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29518           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29519           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29520           CFLAGS_DEBUG_SYMBOLS="-g"
29521           CXXFLAGS_DEBUG_SYMBOLS="-g"
29522           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29523             CFLAGS_DEBUG_SYMBOLS="-g1"
29524             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29525           fi
29526           ;;
29527         ossc )
29528           #
29529           # Forte has different names for this with their C++ compiler...
29530           #
29531           C_FLAG_DEPS="-xMMD -xMF"
29532           CXX_FLAG_DEPS="-xMMD -xMF"
29533 
29534           # Extra options used with HIGHEST
29535           #
29536           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29537           #          done with care, there are some assumptions below that need to
29538           #          be understood about the use of pointers, and IEEE behavior.
29539           #
29540           # Use non-standard floating point mode (not IEEE 754)
29541           CC_HIGHEST="$CC_HIGHEST -fns"
29542           # Do some simplification of floating point arithmetic (not IEEE 754)
29543           CC_HIGHEST="$CC_HIGHEST -fsimple"
29544           # Use single precision floating point with 'float'
29545           CC_HIGHEST="$CC_HIGHEST -fsingle"
29546           # Assume memory references via basic pointer types do not alias
29547           #   (Source with excessing pointer casting and data access with mixed
29548           #    pointer types are not recommended)
29549           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29550           # Use intrinsic or inline versions for math/std functions
29551           #   (If you expect perfect errno behavior, do not use this)
29552           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29553           # Loop data dependency optimizations (need -xO3 or higher)
29554           CC_HIGHEST="$CC_HIGHEST -xdepend"
29555           # Pointer parameters to functions do not overlap
29556           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29557           #    If you pass in multiple pointers to the same data, do not use this)
29558           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29559           # Inline some library routines
29560           #   (If you expect perfect errno behavior, do not use this)
29561           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29562           # Use optimized math routines
29563           #   (If you expect perfect errno behavior, do not use this)
29564           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29565           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29566 
29567           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29568             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29569             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29570           fi
29571 
29572           case $OPENJDK_TARGET_CPU_ARCH in
29573             x86)
29574               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29575               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29576               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29577               C_O_FLAG_NONE="-xregs=no%frameptr"
29578               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29579               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29580               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29581               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29582               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29583                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29584                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29585               fi
29586               ;;
29587             sparc)
29588               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29589               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29590               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29591               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29592               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29593               C_O_FLAG_NONE=""
29594               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29595               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29596               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29597               CXX_O_FLAG_NONE=""
29598               ;;
29599           esac
29600 
29601           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29602           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29603           ;;
29604         xlc )
29605           C_FLAG_DEPS="-qmakedep=gcc -MF"
29606           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29607           C_O_FLAG_HIGHEST="-O3"
29608           C_O_FLAG_HI="-O3 -qstrict"
29609           C_O_FLAG_NORM="-O2"
29610           C_O_FLAG_NONE=""
29611           CXX_O_FLAG_HIGHEST="-O3"
29612           CXX_O_FLAG_HI="-O3 -qstrict"
29613           CXX_O_FLAG_NORM="-O2"
29614           CXX_O_FLAG_NONE=""
29615           CFLAGS_DEBUG_SYMBOLS="-g"
29616           CXXFLAGS_DEBUG_SYMBOLS="-g"
29617           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29618           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29619           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29620           ;;
29621       esac
29622       ;;
29623     CL )
29624       C_O_FLAG_HIGHEST="-O2"
29625       C_O_FLAG_HI="-O1"
29626       C_O_FLAG_NORM="-O1"
29627       C_O_FLAG_NONE="-Od"
29628       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29629       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29630       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29631       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29632       ;;
29633   esac
29634 
29635   if test -z "$C_O_FLAG_HIGHEST"; then
29636     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29637   fi
29638 
29639   if test -z "$CXX_O_FLAG_HIGHEST"; then
29640     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29641   fi
29642 
29643 
29644 
29645 
29646 
29647 
29648 
29649 
29650 
29651 
29652 
29653 
29654 
29655 
29656   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29657     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29658 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29659   fi
29660 
29661   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29662     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29663 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29664   fi
29665 
29666   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29667     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29668 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29669   fi
29670 
29671 
29672 # Check whether --with-extra-cflags was given.
29673 if test "${with_extra_cflags+set}" = set; then :
29674   withval=$with_extra_cflags;
29675 fi
29676 
29677 
29678 
29679 # Check whether --with-extra-cxxflags was given.
29680 if test "${with_extra_cxxflags+set}" = set; then :
29681   withval=$with_extra_cxxflags;
29682 fi
29683 
29684 
29685 
29686 # Check whether --with-extra-ldflags was given.
29687 if test "${with_extra_ldflags+set}" = set; then :
29688   withval=$with_extra_ldflags;
29689 fi
29690 
29691 
29692   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29693   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29694   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29695 
29696   # Hotspot needs these set in their legacy form
29697   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29698   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29699   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29700 
29701 
29702 
29703 
29704 
29705   ###############################################################################
29706   #
29707   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29708   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29709   #
29710   case $COMPILER_NAME in
29711     gcc )
29712       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29713       -pipe \
29714       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29715       case $OPENJDK_TARGET_CPU_ARCH in
29716         arm )
29717           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29718           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29719           ;;
29720         ppc )
29721           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29722           ;;
29723         * )
29724           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29725           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29726           ;;
29727       esac
29728       ;;
29729     ossc )
29730       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29731       case $OPENJDK_TARGET_CPU_ARCH in
29732         x86 )
29733           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29734           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29735           ;;
29736       esac
29737 
29738       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29739       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29740 
29741       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29742       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29743       ;;
29744     xlc )
29745       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29746       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29747 
29748       LDFLAGS_JDK="$LDFLAGS_JDK"
29749       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29750       ;;
29751     cl )
29752       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29753       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29754       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29755       -DWIN32 -DIAL"
29756       case $OPENJDK_TARGET_CPU in
29757         x86 )
29758           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29759           ;;
29760         x86_64 )
29761           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29762           ;;
29763       esac
29764       ;;
29765   esac
29766 
29767   ###############################################################################
29768 
29769   # Adjust flags according to debug level.
29770   case $DEBUG_LEVEL in
29771     fastdebug )
29772       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29773       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29774       C_O_FLAG_HI="$C_O_FLAG_NORM"
29775       C_O_FLAG_NORM="$C_O_FLAG_NORM"
29776       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29777       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29778       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29779       ;;
29780     slowdebug )
29781       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29782       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29783       C_O_FLAG_HI="$C_O_FLAG_NONE"
29784       C_O_FLAG_NORM="$C_O_FLAG_NONE"
29785       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29786       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29787       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29788       ;;
29789   esac
29790 
29791   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29792 
29793   # The package path is used only on macosx?
29794   PACKAGE_PATH=/opt/local
29795 
29796 
29797   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29798     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29799     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29800     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29801     #   Note: -Dmacro         is the same as    #define macro 1
29802     #         -Dmacro=        is the same as    #define macro
29803     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29804       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29805     else
29806       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29807     fi
29808   else
29809     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29810   fi
29811   if test "x$OPENJDK_TARGET_OS" = xlinux; then
29812     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29813   fi
29814   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29815     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29816   fi
29817   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29818     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29819   fi
29820   if test "x$OPENJDK_TARGET_OS" = xaix; then
29821     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29822   fi
29823   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29824     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29825     # Setting these parameters makes it an error to link to macosx APIs that are
29826     # newer than the given OS version and makes the linked binaries compatible even
29827     # if built on a newer version of the OS.
29828     # The expected format is X.Y.Z
29829     MACOSX_VERSION_MIN=10.7.0
29830 
29831     # The macro takes the version with no dots, ex: 1070
29832     # Let the flags variables get resolved in make for easier override on make
29833     # command line.
29834     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29835     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29836   fi
29837   if test "x$OPENJDK_TARGET_OS" = xbsd; then
29838     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29839   fi
29840   if test "x$DEBUG_LEVEL" = xrelease; then
29841     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29842   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29843     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29844   fi
29845   else
29846     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29847   fi
29848 
29849   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29850   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29851 
29852   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29853       -I${JDK_OUTPUTDIR}/include \
29854       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29855       -I${JDK_TOPDIR}/src/share/javavm/export \
29856       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29857       -I${JDK_TOPDIR}/src/share/native/common \
29858       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29859 
29860   # The shared libraries are compiled using the picflag.
29861   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29862   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29863 
29864   # Executable flags
29865   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29866   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29867 
29868   # Now this is odd. The JDK native libraries have to link against libjvm.so
29869   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29870   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29871   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29872   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29873   # libraries will link to whatever is in memory. Yuck.
29874   #
29875   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29876   if test "x$COMPILER_NAME" = xcl; then
29877     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29878     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29879       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29880     fi
29881     # TODO: make -debug optional "--disable-full-debug-symbols"
29882     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29883     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29884     LDFLAGS_JDKLIB_SUFFIX=""
29885     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29886       LDFLAGS_STACK_SIZE=1048576
29887     else
29888       LDFLAGS_STACK_SIZE=327680
29889     fi
29890     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29891   else
29892     if test "x$COMPILER_NAME" = xgcc; then
29893       # If this is a --hash-style=gnu system, use --hash-style=both, why?
29894       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29895       if test -n "$HAS_GNU_HASH"; then
29896         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29897       fi
29898       if test "x$OPENJDK_TARGET_OS" = xlinux; then
29899         # And since we now know that the linker is gnu, then add -z defs, to forbid
29900         # undefined symbols in object files.
29901         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29902         if test "x$DEBUG_LEVEL" = "xrelease"; then
29903           # When building release libraries, tell the linker optimize them.
29904           # Should this be supplied to the OSS linker as well?
29905           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29906         fi
29907       fi
29908     fi
29909     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29910         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29911 
29912     # On some platforms (mac) the linker warns about non existing -L dirs.
29913     # Add server first if available. Linking aginst client does not always produce the same results.
29914     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29915     # Default to server for other variants.
29916     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29917       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29918     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29919       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29920     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29921       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29922     else
29923       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29924     fi
29925 
29926     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29927     if test "x$COMPILER_NAME" = xossc; then
29928       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29929     fi
29930 
29931     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29932     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29933       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29934     fi
29935   fi
29936 
29937 
29938 
29939 
29940 
29941 
29942 
29943 
29944 
29945 
29946 
29947 
29948 
29949 
29950 
29951   # Some Zero and Shark settings.
29952   # ZERO_ARCHFLAG tells the compiler which mode to build for
29953   case "${OPENJDK_TARGET_CPU}" in
29954     s390)
29955       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29956       ;;
29957     *)
29958       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29959   esac
29960 
29961   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29962 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29963   supports=yes
29964 
29965   saved_cflags="$CFLAGS"
29966   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29967   ac_ext=c
29968 ac_cpp='$CPP $CPPFLAGS'
29969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29972 
29973   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29974 /* end confdefs.h.  */
29975 int i;
29976 _ACEOF
29977 if ac_fn_c_try_compile "$LINENO"; then :
29978 
29979 else
29980   supports=no
29981 fi
29982 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29983   ac_ext=cpp
29984 ac_cpp='$CXXCPP $CPPFLAGS'
29985 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29986 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29987 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29988 
29989   CFLAGS="$saved_cflags"
29990 
29991   saved_cxxflags="$CXXFLAGS"
29992   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29993   ac_ext=cpp
29994 ac_cpp='$CXXCPP $CPPFLAGS'
29995 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29996 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29997 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29998 
29999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30000 /* end confdefs.h.  */
30001 int i;
30002 _ACEOF
30003 if ac_fn_cxx_try_compile "$LINENO"; then :
30004 
30005 else
30006   supports=no
30007 fi
30008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30009   ac_ext=cpp
30010 ac_cpp='$CXXCPP $CPPFLAGS'
30011 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30012 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30013 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30014 
30015   CXXFLAGS="$saved_cxxflags"
30016 
30017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30018 $as_echo "$supports" >&6; }
30019   if test "x$supports" = "xyes" ; then
30020     :
30021   else
30022     ZERO_ARCHFLAG=""
30023   fi
30024 
30025 
30026 
30027   # Check that the compiler supports -mX (or -qX on AIX) flags
30028   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30029 
30030   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30031 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30032   supports=yes
30033 
30034   saved_cflags="$CFLAGS"
30035   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30036   ac_ext=c
30037 ac_cpp='$CPP $CPPFLAGS'
30038 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30039 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30040 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30041 
30042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30043 /* end confdefs.h.  */
30044 int i;
30045 _ACEOF
30046 if ac_fn_c_try_compile "$LINENO"; then :
30047 
30048 else
30049   supports=no
30050 fi
30051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30052   ac_ext=cpp
30053 ac_cpp='$CXXCPP $CPPFLAGS'
30054 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30055 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30056 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30057 
30058   CFLAGS="$saved_cflags"
30059 
30060   saved_cxxflags="$CXXFLAGS"
30061   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30062   ac_ext=cpp
30063 ac_cpp='$CXXCPP $CPPFLAGS'
30064 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30065 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30066 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30067 
30068   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30069 /* end confdefs.h.  */
30070 int i;
30071 _ACEOF
30072 if ac_fn_cxx_try_compile "$LINENO"; then :
30073 
30074 else
30075   supports=no
30076 fi
30077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30078   ac_ext=cpp
30079 ac_cpp='$CXXCPP $CPPFLAGS'
30080 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30081 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30082 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30083 
30084   CXXFLAGS="$saved_cxxflags"
30085 
30086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30087 $as_echo "$supports" >&6; }
30088   if test "x$supports" = "xyes" ; then
30089     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30090   else
30091     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30092   fi
30093 
30094 
30095 
30096 
30097   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30098   USING_BROKEN_SUSE_LD=no
30099   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30100     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30101 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30102     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30103     echo "int main() { }" > main.c
30104     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30105       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30106 $as_echo "no" >&6; }
30107       USING_BROKEN_SUSE_LD=no
30108     else
30109       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30110 $as_echo "yes" >&6; }
30111       USING_BROKEN_SUSE_LD=yes
30112     fi
30113     rm -rf version-script.map main.c
30114   fi
30115 
30116 
30117 
30118 # Setup debug symbols (need objcopy from the toolchain for that)
30119 
30120   #
30121   # ENABLE_DEBUG_SYMBOLS
30122   # This must be done after the toolchain is setup, since we're looking at objcopy.
30123   #
30124   # Check whether --enable-debug-symbols was given.
30125 if test "${enable_debug_symbols+set}" = set; then :
30126   enableval=$enable_debug_symbols;
30127 fi
30128 
30129 
30130   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30131 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30132 
30133   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30134     # explicit enabling of enable-debug-symbols and can't find objcopy
30135     #   this is an error
30136     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30137   fi
30138 
30139   if test "x$enable_debug_symbols" = "xyes"; then
30140     ENABLE_DEBUG_SYMBOLS=true
30141   elif test "x$enable_debug_symbols" = "xno"; then
30142     ENABLE_DEBUG_SYMBOLS=false
30143   else
30144     # Default is on if objcopy is found
30145     if test "x$OBJCOPY" != x; then
30146       ENABLE_DEBUG_SYMBOLS=true
30147     # MacOS X and Windows don't use objcopy but default is on for those OSes
30148     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30149       ENABLE_DEBUG_SYMBOLS=true
30150     else
30151       ENABLE_DEBUG_SYMBOLS=false
30152     fi
30153   fi
30154 
30155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30156 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30157 
30158   #
30159   # ZIP_DEBUGINFO_FILES
30160   #
30161   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30162 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30163   # Check whether --enable-zip-debug-info was given.
30164 if test "${enable_zip_debug_info+set}" = set; then :
30165   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30166 else
30167   enable_zip_debug_info="yes"
30168 fi
30169 
30170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30171 $as_echo "${enable_zip_debug_info}" >&6; }
30172 
30173   if test "x${enable_zip_debug_info}" = "xno"; then
30174     ZIP_DEBUGINFO_FILES=false
30175   else
30176     ZIP_DEBUGINFO_FILES=true
30177   fi
30178 
30179 
30180 
30181 
30182 
30183 
30184 
30185 ###############################################################################
30186 #
30187 # Check dependencies for external and internal libraries.
30188 #
30189 ###############################################################################
30190 
30191 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30192 
30193   # When using cygwin or msys, we need a wrapper binary that renames
30194   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30195   # @files and rewrites these too! This wrapper binary is
30196   # called fixpath.
30197   FIXPATH=
30198   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30199     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30200 $as_echo_n "checking if fixpath can be created... " >&6; }
30201     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30202     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30203     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30204       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30205       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30206       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30207       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30208     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30209       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30210       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30211 
30212       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30213       # @ was chosen as separator to minimize risk of other tools messing around with it
30214       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30215       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30216 
30217       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30218     fi
30219     rm -f $OUTPUT_ROOT/fixpath*
30220     cd $OUTPUT_ROOT
30221     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30222     cd $CURDIR
30223 
30224     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30225       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30226 $as_echo "no" >&6; }
30227       cat $OUTPUT_ROOT/fixpath1.log
30228       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30229     fi
30230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30231 $as_echo "yes" >&6; }
30232     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30233 $as_echo_n "checking if fixpath.exe works... " >&6; }
30234     cd $OUTPUT_ROOT
30235     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30236     cd $CURDIR
30237     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30238       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30239 $as_echo "no" >&6; }
30240       cat $OUTPUT_ROOT/fixpath2.log
30241       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30242     fi
30243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30244 $as_echo "yes" >&6; }
30245     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30246   fi
30247 
30248 
30249 
30250 
30251 
30252 
30253   ###############################################################################
30254   #
30255   # OS specific settings that we never will need to probe.
30256   #
30257   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30258     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30259 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30260     PULSE_NOT_NEEDED=yes
30261     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30262 $as_echo "pulse" >&6; }
30263   fi
30264 
30265   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30266     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30267 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30268     ALSA_NOT_NEEDED=yes
30269     PULSE_NOT_NEEDED=yes
30270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30271 $as_echo "alsa pulse" >&6; }
30272   fi
30273 
30274   if test "x$OPENJDK_TARGET_OS" = xaix; then
30275     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30276 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30277     ALSA_NOT_NEEDED=yes
30278     PULSE_NOT_NEEDED=yes
30279     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30280 $as_echo "alsa pulse" >&6; }
30281   fi
30282 
30283 
30284   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30285     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30286 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30287     CUPS_NOT_NEEDED=yes
30288     ALSA_NOT_NEEDED=yes
30289     PULSE_NOT_NEEDED=yes
30290     X11_NOT_NEEDED=yes
30291     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30292 $as_echo "alsa cups pulse x11" >&6; }
30293   fi
30294 
30295   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30296     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30297 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30298     ALSA_NOT_NEEDED=yes
30299     PULSE_NOT_NEEDED=yes
30300     X11_NOT_NEEDED=yes
30301     # If the java runtime framework is disabled, then we need X11.
30302     # This will be adjusted below.
30303     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30304 $as_echo "alsa pulse x11" >&6; }
30305   fi
30306 
30307   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30308     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30309 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30310     ALSA_NOT_NEEDED=yes
30311     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30312 $as_echo "alsa" >&6; }
30313   fi
30314 
30315   if test "x$OPENJDK" = "xfalse"; then
30316     FREETYPE_NOT_NEEDED=yes
30317   fi
30318 
30319   if test "x$SUPPORT_HEADFUL" = xno; then
30320     X11_NOT_NEEDED=yes
30321   fi
30322 
30323   ###############################################################################
30324   #
30325   # Check for MacOSX support for OpenJDK.
30326   #
30327 
30328 
30329   # Check whether --enable-macosx-runtime-support was given.
30330 if test "${enable_macosx_runtime_support+set}" = set; then :
30331   enableval=$enable_macosx_runtime_support;
30332 fi
30333 
30334   if test "x$enable_macosx_runtime_support" != x; then
30335     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30336 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30337   fi
30338 
30339 
30340   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30341 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30342   if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30343     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30344 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30345   else
30346     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30347 $as_echo "no" >&6; }
30348   fi
30349 
30350 
30351 
30352   ###############################################################################
30353   #
30354   # Check for X Windows
30355   #
30356 
30357   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30358   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30359   # --x-libraries for the sysroot, if that seems to be correct.
30360   if test "x$SYS_ROOT" != "x/"; then
30361     if test "x$x_includes" = xNONE; then
30362       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30363         x_includes="$SYS_ROOT/usr/X11R6/include"
30364       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30365         x_includes="$SYS_ROOT/usr/include"
30366       fi
30367     fi
30368     if test "x$x_libraries" = xNONE; then
30369       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30370         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30371       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30372         x_libraries="$SYS_ROOT/usr/lib64"
30373       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30374         x_libraries="$SYS_ROOT/usr/lib"
30375       fi
30376     fi
30377   fi
30378 
30379   # Now let autoconf do it's magic
30380   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30381 $as_echo_n "checking for X... " >&6; }
30382 
30383 
30384 # Check whether --with-x was given.
30385 if test "${with_x+set}" = set; then :
30386   withval=$with_x;
30387 fi
30388 
30389 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30390 if test "x$with_x" = xno; then
30391   # The user explicitly disabled X.
30392   have_x=disabled
30393 else
30394   case $x_includes,$x_libraries in #(
30395     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30396     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30397   $as_echo_n "(cached) " >&6
30398 else
30399   # One or both of the vars are not set, and there is no cached value.
30400 ac_x_includes=no ac_x_libraries=no
30401 rm -f -r conftest.dir
30402 if mkdir conftest.dir; then
30403   cd conftest.dir
30404   cat >Imakefile <<'_ACEOF'
30405 incroot:
30406         @echo incroot='${INCROOT}'
30407 usrlibdir:
30408         @echo usrlibdir='${USRLIBDIR}'
30409 libdir:
30410         @echo libdir='${LIBDIR}'
30411 _ACEOF
30412   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30413     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30414     for ac_var in incroot usrlibdir libdir; do
30415       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30416     done
30417     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30418     for ac_extension in a so sl dylib la dll; do
30419       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30420          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30421         ac_im_usrlibdir=$ac_im_libdir; break
30422       fi
30423     done
30424     # Screen out bogus values from the imake configuration.  They are
30425     # bogus both because they are the default anyway, and because
30426     # using them would break gcc on systems where it needs fixed includes.
30427     case $ac_im_incroot in
30428         /usr/include) ac_x_includes= ;;
30429         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30430     esac
30431     case $ac_im_usrlibdir in
30432         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30433         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30434     esac
30435   fi
30436   cd ..
30437   rm -f -r conftest.dir
30438 fi
30439 
30440 # Standard set of common directories for X headers.
30441 # Check X11 before X11Rn because it is often a symlink to the current release.
30442 ac_x_header_dirs='
30443 /usr/X11/include
30444 /usr/X11R7/include
30445 /usr/X11R6/include
30446 /usr/X11R5/include
30447 /usr/X11R4/include
30448 
30449 /usr/include/X11
30450 /usr/include/X11R7
30451 /usr/include/X11R6
30452 /usr/include/X11R5
30453 /usr/include/X11R4
30454 
30455 /usr/local/X11/include
30456 /usr/local/X11R7/include
30457 /usr/local/X11R6/include
30458 /usr/local/X11R5/include
30459 /usr/local/X11R4/include
30460 
30461 /usr/local/include/X11
30462 /usr/local/include/X11R7
30463 /usr/local/include/X11R6
30464 /usr/local/include/X11R5
30465 /usr/local/include/X11R4
30466 
30467 /usr/X386/include
30468 /usr/x386/include
30469 /usr/XFree86/include/X11
30470 
30471 /usr/include
30472 /usr/local/include
30473 /usr/unsupported/include
30474 /usr/athena/include
30475 /usr/local/x11r5/include
30476 /usr/lpp/Xamples/include
30477 
30478 /usr/openwin/include
30479 /usr/openwin/share/include'
30480 
30481 if test "$ac_x_includes" = no; then
30482   # Guess where to find include files, by looking for Xlib.h.
30483   # First, try using that file with no special directory specified.
30484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30485 /* end confdefs.h.  */
30486 #include <X11/Xlib.h>
30487 _ACEOF
30488 if ac_fn_cxx_try_cpp "$LINENO"; then :
30489   # We can compile using X headers with no special include directory.
30490 ac_x_includes=
30491 else
30492   for ac_dir in $ac_x_header_dirs; do
30493   if test -r "$ac_dir/X11/Xlib.h"; then
30494     ac_x_includes=$ac_dir
30495     break
30496   fi
30497 done
30498 fi
30499 rm -f conftest.err conftest.i conftest.$ac_ext
30500 fi # $ac_x_includes = no
30501 
30502 if test "$ac_x_libraries" = no; then
30503   # Check for the libraries.
30504   # See if we find them without any special options.
30505   # Don't add to $LIBS permanently.
30506   ac_save_LIBS=$LIBS
30507   LIBS="-lX11 $LIBS"
30508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30509 /* end confdefs.h.  */
30510 #include <X11/Xlib.h>
30511 int
30512 main ()
30513 {
30514 XrmInitialize ()
30515   ;
30516   return 0;
30517 }
30518 _ACEOF
30519 if ac_fn_cxx_try_link "$LINENO"; then :
30520   LIBS=$ac_save_LIBS
30521 # We can link X programs with no special library path.
30522 ac_x_libraries=
30523 else
30524   LIBS=$ac_save_LIBS
30525 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30526 do
30527   # Don't even attempt the hair of trying to link an X program!
30528   for ac_extension in a so sl dylib la dll; do
30529     if test -r "$ac_dir/libX11.$ac_extension"; then
30530       ac_x_libraries=$ac_dir
30531       break 2
30532     fi
30533   done
30534 done
30535 fi
30536 rm -f core conftest.err conftest.$ac_objext \
30537     conftest$ac_exeext conftest.$ac_ext
30538 fi # $ac_x_libraries = no
30539 
30540 case $ac_x_includes,$ac_x_libraries in #(
30541   no,* | *,no | *\'*)
30542     # Didn't find X, or a directory has "'" in its name.
30543     ac_cv_have_x="have_x=no";; #(
30544   *)
30545     # Record where we found X for the cache.
30546     ac_cv_have_x="have_x=yes\
30547         ac_x_includes='$ac_x_includes'\
30548         ac_x_libraries='$ac_x_libraries'"
30549 esac
30550 fi
30551 ;; #(
30552     *) have_x=yes;;
30553   esac
30554   eval "$ac_cv_have_x"
30555 fi # $with_x != no
30556 
30557 if test "$have_x" != yes; then
30558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30559 $as_echo "$have_x" >&6; }
30560   no_x=yes
30561 else
30562   # If each of the values was on the command line, it overrides each guess.
30563   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30564   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30565   # Update the cache value to reflect the command line values.
30566   ac_cv_have_x="have_x=yes\
30567         ac_x_includes='$x_includes'\
30568         ac_x_libraries='$x_libraries'"
30569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30570 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30571 fi
30572 
30573   if test "$no_x" = yes; then
30574   # Not all programs may use this symbol, but it does not hurt to define it.
30575 
30576 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30577 
30578   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30579 else
30580   if test -n "$x_includes"; then
30581     X_CFLAGS="$X_CFLAGS -I$x_includes"
30582   fi
30583 
30584   # It would also be nice to do this for all -L options, not just this one.
30585   if test -n "$x_libraries"; then
30586     X_LIBS="$X_LIBS -L$x_libraries"
30587     # For Solaris; some versions of Sun CC require a space after -R and
30588     # others require no space.  Words are not sufficient . . . .
30589     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30590 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30591     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30592     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30593     ac_cxx_werror_flag=yes
30594     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30595 /* end confdefs.h.  */
30596 
30597 int
30598 main ()
30599 {
30600 
30601   ;
30602   return 0;
30603 }
30604 _ACEOF
30605 if ac_fn_cxx_try_link "$LINENO"; then :
30606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30607 $as_echo "no" >&6; }
30608        X_LIBS="$X_LIBS -R$x_libraries"
30609 else
30610   LIBS="$ac_xsave_LIBS -R $x_libraries"
30611        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30612 /* end confdefs.h.  */
30613 
30614 int
30615 main ()
30616 {
30617 
30618   ;
30619   return 0;
30620 }
30621 _ACEOF
30622 if ac_fn_cxx_try_link "$LINENO"; then :
30623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30624 $as_echo "yes" >&6; }
30625           X_LIBS="$X_LIBS -R $x_libraries"
30626 else
30627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30628 $as_echo "neither works" >&6; }
30629 fi
30630 rm -f core conftest.err conftest.$ac_objext \
30631     conftest$ac_exeext conftest.$ac_ext
30632 fi
30633 rm -f core conftest.err conftest.$ac_objext \
30634     conftest$ac_exeext conftest.$ac_ext
30635     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30636     LIBS=$ac_xsave_LIBS
30637   fi
30638 
30639   # Check for system-dependent libraries X programs must link with.
30640   # Do this before checking for the system-independent R6 libraries
30641   # (-lICE), since we may need -lsocket or whatever for X linking.
30642 
30643   if test "$ISC" = yes; then
30644     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30645   else
30646     # Martyn Johnson says this is needed for Ultrix, if the X
30647     # libraries were built with DECnet support.  And Karl Berry says
30648     # the Alpha needs dnet_stub (dnet does not exist).
30649     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30650     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30651 /* end confdefs.h.  */
30652 
30653 /* Override any GCC internal prototype to avoid an error.
30654    Use char because int might match the return type of a GCC
30655    builtin and then its argument prototype would still apply.  */
30656 #ifdef __cplusplus
30657 extern "C"
30658 #endif
30659 char XOpenDisplay ();
30660 int
30661 main ()
30662 {
30663 return XOpenDisplay ();
30664   ;
30665   return 0;
30666 }
30667 _ACEOF
30668 if ac_fn_cxx_try_link "$LINENO"; then :
30669 
30670 else
30671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30672 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30673 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30674   $as_echo_n "(cached) " >&6
30675 else
30676   ac_check_lib_save_LIBS=$LIBS
30677 LIBS="-ldnet  $LIBS"
30678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30679 /* end confdefs.h.  */
30680 
30681 /* Override any GCC internal prototype to avoid an error.
30682    Use char because int might match the return type of a GCC
30683    builtin and then its argument prototype would still apply.  */
30684 #ifdef __cplusplus
30685 extern "C"
30686 #endif
30687 char dnet_ntoa ();
30688 int
30689 main ()
30690 {
30691 return dnet_ntoa ();
30692   ;
30693   return 0;
30694 }
30695 _ACEOF
30696 if ac_fn_cxx_try_link "$LINENO"; then :
30697   ac_cv_lib_dnet_dnet_ntoa=yes
30698 else
30699   ac_cv_lib_dnet_dnet_ntoa=no
30700 fi
30701 rm -f core conftest.err conftest.$ac_objext \
30702     conftest$ac_exeext conftest.$ac_ext
30703 LIBS=$ac_check_lib_save_LIBS
30704 fi
30705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30706 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30707 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30708   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30709 fi
30710 
30711     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30712       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30713 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30714 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30715   $as_echo_n "(cached) " >&6
30716 else
30717   ac_check_lib_save_LIBS=$LIBS
30718 LIBS="-ldnet_stub  $LIBS"
30719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30720 /* end confdefs.h.  */
30721 
30722 /* Override any GCC internal prototype to avoid an error.
30723    Use char because int might match the return type of a GCC
30724    builtin and then its argument prototype would still apply.  */
30725 #ifdef __cplusplus
30726 extern "C"
30727 #endif
30728 char dnet_ntoa ();
30729 int
30730 main ()
30731 {
30732 return dnet_ntoa ();
30733   ;
30734   return 0;
30735 }
30736 _ACEOF
30737 if ac_fn_cxx_try_link "$LINENO"; then :
30738   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30739 else
30740   ac_cv_lib_dnet_stub_dnet_ntoa=no
30741 fi
30742 rm -f core conftest.err conftest.$ac_objext \
30743     conftest$ac_exeext conftest.$ac_ext
30744 LIBS=$ac_check_lib_save_LIBS
30745 fi
30746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30747 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30748 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30749   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30750 fi
30751 
30752     fi
30753 fi
30754 rm -f core conftest.err conftest.$ac_objext \
30755     conftest$ac_exeext conftest.$ac_ext
30756     LIBS="$ac_xsave_LIBS"
30757 
30758     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30759     # to get the SysV transport functions.
30760     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30761     # needs -lnsl.
30762     # The nsl library prevents programs from opening the X display
30763     # on Irix 5.2, according to T.E. Dickey.
30764     # The functions gethostbyname, getservbyname, and inet_addr are
30765     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30766     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30767 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30768 
30769 fi
30770 
30771     if test $ac_cv_func_gethostbyname = no; then
30772       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30773 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30774 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30775   $as_echo_n "(cached) " >&6
30776 else
30777   ac_check_lib_save_LIBS=$LIBS
30778 LIBS="-lnsl  $LIBS"
30779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30780 /* end confdefs.h.  */
30781 
30782 /* Override any GCC internal prototype to avoid an error.
30783    Use char because int might match the return type of a GCC
30784    builtin and then its argument prototype would still apply.  */
30785 #ifdef __cplusplus
30786 extern "C"
30787 #endif
30788 char gethostbyname ();
30789 int
30790 main ()
30791 {
30792 return gethostbyname ();
30793   ;
30794   return 0;
30795 }
30796 _ACEOF
30797 if ac_fn_cxx_try_link "$LINENO"; then :
30798   ac_cv_lib_nsl_gethostbyname=yes
30799 else
30800   ac_cv_lib_nsl_gethostbyname=no
30801 fi
30802 rm -f core conftest.err conftest.$ac_objext \
30803     conftest$ac_exeext conftest.$ac_ext
30804 LIBS=$ac_check_lib_save_LIBS
30805 fi
30806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30807 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30808 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30809   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30810 fi
30811 
30812       if test $ac_cv_lib_nsl_gethostbyname = no; then
30813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30814 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30815 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30816   $as_echo_n "(cached) " >&6
30817 else
30818   ac_check_lib_save_LIBS=$LIBS
30819 LIBS="-lbsd  $LIBS"
30820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30821 /* end confdefs.h.  */
30822 
30823 /* Override any GCC internal prototype to avoid an error.
30824    Use char because int might match the return type of a GCC
30825    builtin and then its argument prototype would still apply.  */
30826 #ifdef __cplusplus
30827 extern "C"
30828 #endif
30829 char gethostbyname ();
30830 int
30831 main ()
30832 {
30833 return gethostbyname ();
30834   ;
30835   return 0;
30836 }
30837 _ACEOF
30838 if ac_fn_cxx_try_link "$LINENO"; then :
30839   ac_cv_lib_bsd_gethostbyname=yes
30840 else
30841   ac_cv_lib_bsd_gethostbyname=no
30842 fi
30843 rm -f core conftest.err conftest.$ac_objext \
30844     conftest$ac_exeext conftest.$ac_ext
30845 LIBS=$ac_check_lib_save_LIBS
30846 fi
30847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30848 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30849 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30850   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30851 fi
30852 
30853       fi
30854     fi
30855 
30856     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30857     # socket/setsockopt and other routines are undefined under SCO ODT
30858     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30859     # on later versions), says Simon Leinen: it contains gethostby*
30860     # variants that don't use the name server (or something).  -lsocket
30861     # must be given before -lnsl if both are needed.  We assume that
30862     # if connect needs -lnsl, so does gethostbyname.
30863     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30864 if test "x$ac_cv_func_connect" = xyes; then :
30865 
30866 fi
30867 
30868     if test $ac_cv_func_connect = no; then
30869       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30870 $as_echo_n "checking for connect in -lsocket... " >&6; }
30871 if ${ac_cv_lib_socket_connect+:} false; then :
30872   $as_echo_n "(cached) " >&6
30873 else
30874   ac_check_lib_save_LIBS=$LIBS
30875 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30877 /* end confdefs.h.  */
30878 
30879 /* Override any GCC internal prototype to avoid an error.
30880    Use char because int might match the return type of a GCC
30881    builtin and then its argument prototype would still apply.  */
30882 #ifdef __cplusplus
30883 extern "C"
30884 #endif
30885 char connect ();
30886 int
30887 main ()
30888 {
30889 return connect ();
30890   ;
30891   return 0;
30892 }
30893 _ACEOF
30894 if ac_fn_cxx_try_link "$LINENO"; then :
30895   ac_cv_lib_socket_connect=yes
30896 else
30897   ac_cv_lib_socket_connect=no
30898 fi
30899 rm -f core conftest.err conftest.$ac_objext \
30900     conftest$ac_exeext conftest.$ac_ext
30901 LIBS=$ac_check_lib_save_LIBS
30902 fi
30903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30904 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30905 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30906   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30907 fi
30908 
30909     fi
30910 
30911     # Guillermo Gomez says -lposix is necessary on A/UX.
30912     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30913 if test "x$ac_cv_func_remove" = xyes; then :
30914 
30915 fi
30916 
30917     if test $ac_cv_func_remove = no; then
30918       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30919 $as_echo_n "checking for remove in -lposix... " >&6; }
30920 if ${ac_cv_lib_posix_remove+:} false; then :
30921   $as_echo_n "(cached) " >&6
30922 else
30923   ac_check_lib_save_LIBS=$LIBS
30924 LIBS="-lposix  $LIBS"
30925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30926 /* end confdefs.h.  */
30927 
30928 /* Override any GCC internal prototype to avoid an error.
30929    Use char because int might match the return type of a GCC
30930    builtin and then its argument prototype would still apply.  */
30931 #ifdef __cplusplus
30932 extern "C"
30933 #endif
30934 char remove ();
30935 int
30936 main ()
30937 {
30938 return remove ();
30939   ;
30940   return 0;
30941 }
30942 _ACEOF
30943 if ac_fn_cxx_try_link "$LINENO"; then :
30944   ac_cv_lib_posix_remove=yes
30945 else
30946   ac_cv_lib_posix_remove=no
30947 fi
30948 rm -f core conftest.err conftest.$ac_objext \
30949     conftest$ac_exeext conftest.$ac_ext
30950 LIBS=$ac_check_lib_save_LIBS
30951 fi
30952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30953 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30954 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30955   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30956 fi
30957 
30958     fi
30959 
30960     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30961     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30962 if test "x$ac_cv_func_shmat" = xyes; then :
30963 
30964 fi
30965 
30966     if test $ac_cv_func_shmat = no; then
30967       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30968 $as_echo_n "checking for shmat in -lipc... " >&6; }
30969 if ${ac_cv_lib_ipc_shmat+:} false; then :
30970   $as_echo_n "(cached) " >&6
30971 else
30972   ac_check_lib_save_LIBS=$LIBS
30973 LIBS="-lipc  $LIBS"
30974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30975 /* end confdefs.h.  */
30976 
30977 /* Override any GCC internal prototype to avoid an error.
30978    Use char because int might match the return type of a GCC
30979    builtin and then its argument prototype would still apply.  */
30980 #ifdef __cplusplus
30981 extern "C"
30982 #endif
30983 char shmat ();
30984 int
30985 main ()
30986 {
30987 return shmat ();
30988   ;
30989   return 0;
30990 }
30991 _ACEOF
30992 if ac_fn_cxx_try_link "$LINENO"; then :
30993   ac_cv_lib_ipc_shmat=yes
30994 else
30995   ac_cv_lib_ipc_shmat=no
30996 fi
30997 rm -f core conftest.err conftest.$ac_objext \
30998     conftest$ac_exeext conftest.$ac_ext
30999 LIBS=$ac_check_lib_save_LIBS
31000 fi
31001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
31002 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
31003 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
31004   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
31005 fi
31006 
31007     fi
31008   fi
31009 
31010   # Check for libraries that X11R6 Xt/Xaw programs need.
31011   ac_save_LDFLAGS=$LDFLAGS
31012   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
31013   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
31014   # check for ICE first), but we must link in the order -lSM -lICE or
31015   # we get undefined symbols.  So assume we have SM if we have ICE.
31016   # These have to be linked with before -lX11, unlike the other
31017   # libraries we check for below, so use a different variable.
31018   # John Interrante, Karl Berry
31019   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31020 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31021 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31022   $as_echo_n "(cached) " >&6
31023 else
31024   ac_check_lib_save_LIBS=$LIBS
31025 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31027 /* end confdefs.h.  */
31028 
31029 /* Override any GCC internal prototype to avoid an error.
31030    Use char because int might match the return type of a GCC
31031    builtin and then its argument prototype would still apply.  */
31032 #ifdef __cplusplus
31033 extern "C"
31034 #endif
31035 char IceConnectionNumber ();
31036 int
31037 main ()
31038 {
31039 return IceConnectionNumber ();
31040   ;
31041   return 0;
31042 }
31043 _ACEOF
31044 if ac_fn_cxx_try_link "$LINENO"; then :
31045   ac_cv_lib_ICE_IceConnectionNumber=yes
31046 else
31047   ac_cv_lib_ICE_IceConnectionNumber=no
31048 fi
31049 rm -f core conftest.err conftest.$ac_objext \
31050     conftest$ac_exeext conftest.$ac_ext
31051 LIBS=$ac_check_lib_save_LIBS
31052 fi
31053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31054 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31055 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31056   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31057 fi
31058 
31059   LDFLAGS=$ac_save_LDFLAGS
31060 
31061 fi
31062 
31063 
31064   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31065   # this doesn't make sense so we remove it.
31066   if test "x$COMPILE_TYPE" = xcross; then
31067     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31068   fi
31069 
31070   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31071 
31072   # Print a helpful message on how to acquire the necessary build dependency.
31073   # x11 is the help tag: freetype, cups, pulse, alsa etc
31074   MISSING_DEPENDENCY=x11
31075 
31076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31077     cygwin_help $MISSING_DEPENDENCY
31078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31079     msys_help $MISSING_DEPENDENCY
31080   else
31081     PKGHANDLER_COMMAND=
31082 
31083     case $PKGHANDLER in
31084       apt-get)
31085         apt_help     $MISSING_DEPENDENCY ;;
31086       yum)
31087         yum_help     $MISSING_DEPENDENCY ;;
31088       port)
31089         port_help    $MISSING_DEPENDENCY ;;
31090       pkgutil)
31091         pkgutil_help $MISSING_DEPENDENCY ;;
31092       pkgadd)
31093         pkgadd_help  $MISSING_DEPENDENCY ;;
31094     esac
31095 
31096     if test "x$PKGHANDLER_COMMAND" != x; then
31097       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31098     fi
31099   fi
31100 
31101     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31102   fi
31103 
31104   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31105     OPENWIN_HOME="/usr/openwin"
31106   fi
31107 
31108 
31109 
31110   #
31111   # Weird Sol10 something check...TODO change to try compile
31112   #
31113   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31114     if test "`uname -r`" = "5.10"; then
31115       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31116         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31117       fi
31118     fi
31119   fi
31120 
31121   ac_ext=c
31122 ac_cpp='$CPP $CPPFLAGS'
31123 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31124 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31125 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31126 
31127   OLD_CFLAGS="$CFLAGS"
31128   CFLAGS="$CFLAGS $X_CFLAGS"
31129 
31130   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31131   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31132 do :
31133   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31134 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31135         # include <X11/Xlib.h>
31136         # include <X11/Xutil.h>
31137 
31138 
31139 "
31140 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31141   cat >>confdefs.h <<_ACEOF
31142 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31143 _ACEOF
31144  X11_A_OK=yes
31145 else
31146   X11_A_OK=no; break
31147 fi
31148 
31149 done
31150 
31151 
31152   CFLAGS="$OLD_CFLAGS"
31153   ac_ext=cpp
31154 ac_cpp='$CXXCPP $CPPFLAGS'
31155 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31156 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31157 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31158 
31159 
31160   if test "x$X11_A_OK" = xno && 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 all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31192   fi
31193 
31194 
31195 
31196 
31197 
31198 
31199   ###############################################################################
31200   #
31201   # The common unix printing system cups is used to print from java.
31202   #
31203 
31204 # Check whether --with-cups was given.
31205 if test "${with_cups+set}" = set; then :
31206   withval=$with_cups;
31207 fi
31208 
31209 
31210 # Check whether --with-cups-include was given.
31211 if test "${with_cups_include+set}" = set; then :
31212   withval=$with_cups_include;
31213 fi
31214 
31215 
31216   if test "x$CUPS_NOT_NEEDED" = xyes; then
31217     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31218       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31219 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31220     fi
31221     CUPS_CFLAGS=
31222   else
31223     CUPS_FOUND=no
31224 
31225     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31226       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31227     fi
31228 
31229     if test "x${with_cups}" != x; then
31230       CUPS_CFLAGS="-I${with_cups}/include"
31231       CUPS_FOUND=yes
31232     fi
31233     if test "x${with_cups_include}" != x; then
31234       CUPS_CFLAGS="-I${with_cups_include}"
31235       CUPS_FOUND=yes
31236     fi
31237     if test "x$CUPS_FOUND" = xno; then
31238 
31239 
31240   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31241     # Source the builddeps file again, to make sure it uses the latest variables!
31242     . $builddepsfile
31243     # Look for a target and build machine specific resource!
31244     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31245     if test "x$resource" = x; then
31246       # Ok, lets instead look for a target specific resource
31247       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31248     fi
31249     if test "x$resource" = x; then
31250       # Ok, lets instead look for a build specific resource
31251       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31252     fi
31253     if test "x$resource" = x; then
31254       # Ok, lets instead look for a generic resource
31255       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31256       resource=${builddep_cups}
31257     fi
31258     if test "x$resource" != x; then
31259       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31260 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31261       # If the resource in the builddeps.conf file is an existing directory,
31262       # for example /java/linux/cups
31263       if test -d ${resource}; then
31264         depdir=${resource}
31265       else
31266 
31267   # cups is for example mymodule
31268   # $resource is for example libs/general/libmymod_1_2_3.zip
31269   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31270   # $with_builddeps_dir is for example /localhome/builddeps
31271   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31272   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31273   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31274   filename=`basename $resource`
31275   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31276   filebase=${filename%%.*}
31277   extension=${filename#*.}
31278   installdir=$with_builddeps_dir/$filebase
31279   if test ! -f $installdir/$filename.unpacked; then
31280     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31281 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31282     if test ! -d $installdir; then
31283       mkdir -p $installdir
31284     fi
31285     if test ! -d $installdir; then
31286       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31287     fi
31288     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31289     touch $tmpfile
31290     if test ! -f $tmpfile; then
31291       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31292     fi
31293 
31294   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31295   # $tmpfile is the local file name for the downloaded file.
31296   VALID_TOOL=no
31297   if test "x$BDEPS_FTP" = xwget; then
31298     VALID_TOOL=yes
31299     wget -O $tmpfile $with_builddeps_server/$resource
31300   fi
31301   if test "x$BDEPS_FTP" = xlftp; then
31302     VALID_TOOL=yes
31303     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31304   fi
31305   if test "x$BDEPS_FTP" = xftp; then
31306     VALID_TOOL=yes
31307     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31308     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31309     FTPUSERPWD=${FTPSERVER%%@*}
31310     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31311       FTPUSER=${userpwd%%:*}
31312       FTPPWD=${userpwd#*@}
31313       FTPSERVER=${FTPSERVER#*@}
31314     else
31315       FTPUSER=ftp
31316       FTPPWD=ftp
31317     fi
31318     # the "pass" command does not work on some
31319     # ftp clients (read ftp.exe) but if it works,
31320     # passive mode is better!
31321     ( \
31322         echo "user $FTPUSER $FTPPWD"        ; \
31323         echo "pass"                         ; \
31324         echo "bin"                          ; \
31325         echo "get $FTPPATH $tmpfile"              ; \
31326     ) | ftp -in $FTPSERVER
31327   fi
31328   if test "x$VALID_TOOL" != xyes; then
31329     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31330   fi
31331 
31332     mv $tmpfile $installdir/$filename
31333     if test ! -s $installdir/$filename; then
31334       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31335     fi
31336     case "$extension" in
31337       zip)  echo "Unzipping $installdir/$filename..."
31338         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31339         ;;
31340       tar.gz) echo "Untaring $installdir/$filename..."
31341         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31342         ;;
31343       tgz) echo "Untaring $installdir/$filename..."
31344         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31345         ;;
31346       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31347         ;;
31348     esac
31349   fi
31350   if test -f $installdir/$filename.unpacked; then
31351     depdir=$installdir
31352   fi
31353 
31354       fi
31355       # Source the builddeps file again, because in the previous command, the depdir
31356       # was updated to point at the current build dependency install directory.
31357       . $builddepsfile
31358       # Now extract variables from the builddeps.conf files.
31359       theroot=${builddep_cups_ROOT}
31360       thecflags=${builddep_cups_CFLAGS}
31361       thelibs=${builddep_cups_LIBS}
31362       if test "x$depdir" = x; then
31363         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31364       fi
31365       CUPS=$depdir
31366       if test "x$theroot" != x; then
31367         CUPS="$theroot"
31368       fi
31369       if test "x$thecflags" != x; then
31370         CUPS_CFLAGS="$thecflags"
31371       fi
31372       if test "x$thelibs" != x; then
31373         CUPS_LIBS="$thelibs"
31374       fi
31375       CUPS_FOUND=yes
31376 
31377     fi
31378 
31379   fi
31380 
31381     fi
31382     if test "x$CUPS_FOUND" = xno; then
31383       # Are the cups headers installed in the default /usr/include location?
31384       for ac_header in cups/cups.h cups/ppd.h
31385 do :
31386   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31387 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31388 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31389   cat >>confdefs.h <<_ACEOF
31390 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31391 _ACEOF
31392 
31393             CUPS_FOUND=yes
31394             CUPS_CFLAGS=
31395             DEFAULT_CUPS=yes
31396 
31397 
31398 fi
31399 
31400 done
31401 
31402     fi
31403     if test "x$CUPS_FOUND" = xno; then
31404       # Getting nervous now? Lets poke around for standard Solaris third-party
31405       # package installation locations.
31406       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31407 $as_echo_n "checking for cups headers... " >&6; }
31408       if test -s /opt/sfw/cups/include/cups/cups.h; then
31409         # An SFW package seems to be installed!
31410         CUPS_FOUND=yes
31411         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31412       elif test -s /opt/csw/include/cups/cups.h; then
31413         # A CSW package seems to be installed!
31414         CUPS_FOUND=yes
31415         CUPS_CFLAGS="-I/opt/csw/include"
31416       fi
31417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31418 $as_echo "$CUPS_FOUND" >&6; }
31419     fi
31420     if test "x$CUPS_FOUND" = xno; then
31421 
31422   # Print a helpful message on how to acquire the necessary build dependency.
31423   # cups is the help tag: freetype, cups, pulse, alsa etc
31424   MISSING_DEPENDENCY=cups
31425 
31426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31427     cygwin_help $MISSING_DEPENDENCY
31428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31429     msys_help $MISSING_DEPENDENCY
31430   else
31431     PKGHANDLER_COMMAND=
31432 
31433     case $PKGHANDLER in
31434       apt-get)
31435         apt_help     $MISSING_DEPENDENCY ;;
31436       yum)
31437         yum_help     $MISSING_DEPENDENCY ;;
31438       port)
31439         port_help    $MISSING_DEPENDENCY ;;
31440       pkgutil)
31441         pkgutil_help $MISSING_DEPENDENCY ;;
31442       pkgadd)
31443         pkgadd_help  $MISSING_DEPENDENCY ;;
31444     esac
31445 
31446     if test "x$PKGHANDLER_COMMAND" != x; then
31447       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31448     fi
31449   fi
31450 
31451       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31452     fi
31453   fi
31454 
31455 
31456 
31457 
31458 
31459 
31460   ###############################################################################
31461   #
31462   # The ubiquitous freetype library is used to render fonts.
31463   #
31464 
31465 # Check whether --with-freetype was given.
31466 if test "${with_freetype+set}" = set; then :
31467   withval=$with_freetype;
31468 fi
31469 
31470 
31471 # Check whether --with-freetype-include was given.
31472 if test "${with_freetype_include+set}" = set; then :
31473   withval=$with_freetype_include;
31474 fi
31475 
31476 
31477 # Check whether --with-freetype-lib was given.
31478 if test "${with_freetype_lib+set}" = set; then :
31479   withval=$with_freetype_lib;
31480 fi
31481 
31482   # Check whether --enable-freetype-bundling was given.
31483 if test "${enable_freetype_bundling+set}" = set; then :
31484   enableval=$enable_freetype_bundling;
31485 fi
31486 
31487 
31488   FREETYPE_CFLAGS=
31489   FREETYPE_LIBS=
31490   FREETYPE_BUNDLE_LIB_PATH=
31491 
31492   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31493     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31494       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31495 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31496     fi
31497     if test "x$enable_freetype_bundling" != x; then
31498       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31499 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31500     fi
31501   else
31502     # freetype is needed to build; go get it!
31503 
31504     BUNDLE_FREETYPE="$enable_freetype_bundling"
31505 
31506     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31507       # User has specified settings
31508 
31509       if test "x$BUNDLE_FREETYPE" = x; then
31510         # If not specified, default is to bundle freetype
31511         BUNDLE_FREETYPE=yes
31512       fi
31513 
31514       if test "x$with_freetype" != x; then
31515         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31516         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31517       fi
31518 
31519       # Allow --with-freetype-lib and --with-freetype-include to override
31520       if test "x$with_freetype_include" != x; then
31521         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31522       fi
31523       if test "x$with_freetype_lib" != x; then
31524         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31525       fi
31526 
31527       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31528         # Okay, we got it. Check that it works.
31529 
31530   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31531   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31532   METHOD="--with-freetype"
31533 
31534   # First check if the files exists.
31535   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31536     # We found an arbitrary include file. That's a good sign.
31537     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31538 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31539     FOUND_FREETYPE=yes
31540 
31541     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31542     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31543       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31544 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31545       FOUND_FREETYPE=no
31546     else
31547       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31548         # On Windows, we will need both .lib and .dll file.
31549         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31550           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31551 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31552           FOUND_FREETYPE=no
31553         fi
31554       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
31555         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31556         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31557       fi
31558     fi
31559   fi
31560 
31561   if test "x$FOUND_FREETYPE" = xyes; then
31562 
31563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31564 
31565   # Input might be given as Windows format, start by converting to
31566   # unix format.
31567   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31568   new_path=`$CYGPATH -u "$path"`
31569 
31570   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31571   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31572   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31573   # "foo.exe" is OK but "foo" is an error.
31574   #
31575   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31576   # It is also a way to make sure we got the proper file name for the real test later on.
31577   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31578   if test "x$test_shortpath" = x; then
31579     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31580 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31581     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31582   fi
31583 
31584   # Call helper function which possibly converts this using DOS-style short mode.
31585   # If so, the updated path is stored in $new_path.
31586 
31587   input_path="$new_path"
31588   # Check if we need to convert this using DOS-style short mode. If the path
31589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31590   # take no chances and rewrite it.
31591   # Note: m4 eats our [], so we need to use [ and ] instead.
31592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31593   if test "x$has_forbidden_chars" != x; then
31594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31598       # Going to short mode and back again did indeed matter. Since short mode is
31599       # case insensitive, let's make it lowercase to improve readability.
31600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31601       # Now convert it back to Unix-stile (cygpath)
31602       input_path=`$CYGPATH -u "$shortmode_path"`
31603       new_path="$input_path"
31604     fi
31605   fi
31606 
31607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31608   if test "x$test_cygdrive_prefix" = x; then
31609     # As a simple fix, exclude /usr/bin since it's not a real path.
31610     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31612       # a path prefixed by /cygdrive for fixpath to work.
31613       new_path="$CYGWIN_ROOT_PATH$input_path"
31614     fi
31615   fi
31616 
31617 
31618   if test "x$path" != "x$new_path"; then
31619     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31620     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31621 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31622   fi
31623 
31624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31625 
31626   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31627   has_colon=`$ECHO $path | $GREP ^.:`
31628   new_path="$path"
31629   if test "x$has_colon" = x; then
31630     # Not in mixed or Windows style, start by that.
31631     new_path=`cmd //c echo $path`
31632   fi
31633 
31634 
31635   input_path="$new_path"
31636   # Check if we need to convert this using DOS-style short mode. If the path
31637   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31638   # take no chances and rewrite it.
31639   # Note: m4 eats our [], so we need to use [ and ] instead.
31640   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31641   if test "x$has_forbidden_chars" != x; then
31642     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31643     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31644   fi
31645 
31646 
31647   windows_path="$new_path"
31648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31649     unix_path=`$CYGPATH -u "$windows_path"`
31650     new_path="$unix_path"
31651   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31652     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31653     new_path="$unix_path"
31654   fi
31655 
31656   if test "x$path" != "x$new_path"; then
31657     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31659 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31660   fi
31661 
31662   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31663   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31664 
31665   else
31666     # We're on a posix platform. Hooray! :)
31667     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31668     has_space=`$ECHO "$path" | $GREP " "`
31669     if test "x$has_space" != x; then
31670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31671 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31672       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31673     fi
31674 
31675     # Use eval to expand a potential ~
31676     eval path="$path"
31677     if test ! -f "$path" && test ! -d "$path"; then
31678       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31679     fi
31680 
31681     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31682   fi
31683 
31684 
31685   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31686 
31687   # Input might be given as Windows format, start by converting to
31688   # unix format.
31689   path="$POTENTIAL_FREETYPE_LIB_PATH"
31690   new_path=`$CYGPATH -u "$path"`
31691 
31692   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31693   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31694   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31695   # "foo.exe" is OK but "foo" is an error.
31696   #
31697   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31698   # It is also a way to make sure we got the proper file name for the real test later on.
31699   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31700   if test "x$test_shortpath" = x; then
31701     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31702 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31703     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31704   fi
31705 
31706   # Call helper function which possibly converts this using DOS-style short mode.
31707   # If so, the updated path is stored in $new_path.
31708 
31709   input_path="$new_path"
31710   # Check if we need to convert this using DOS-style short mode. If the path
31711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31712   # take no chances and rewrite it.
31713   # Note: m4 eats our [], so we need to use [ and ] instead.
31714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31715   if test "x$has_forbidden_chars" != x; then
31716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31717     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31718     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31719     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31720       # Going to short mode and back again did indeed matter. Since short mode is
31721       # case insensitive, let's make it lowercase to improve readability.
31722       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31723       # Now convert it back to Unix-stile (cygpath)
31724       input_path=`$CYGPATH -u "$shortmode_path"`
31725       new_path="$input_path"
31726     fi
31727   fi
31728 
31729   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31730   if test "x$test_cygdrive_prefix" = x; then
31731     # As a simple fix, exclude /usr/bin since it's not a real path.
31732     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31733       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31734       # a path prefixed by /cygdrive for fixpath to work.
31735       new_path="$CYGWIN_ROOT_PATH$input_path"
31736     fi
31737   fi
31738 
31739 
31740   if test "x$path" != "x$new_path"; then
31741     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31742     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31743 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31744   fi
31745 
31746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31747 
31748   path="$POTENTIAL_FREETYPE_LIB_PATH"
31749   has_colon=`$ECHO $path | $GREP ^.:`
31750   new_path="$path"
31751   if test "x$has_colon" = x; then
31752     # Not in mixed or Windows style, start by that.
31753     new_path=`cmd //c echo $path`
31754   fi
31755 
31756 
31757   input_path="$new_path"
31758   # Check if we need to convert this using DOS-style short mode. If the path
31759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31760   # take no chances and rewrite it.
31761   # Note: m4 eats our [], so we need to use [ and ] instead.
31762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31763   if test "x$has_forbidden_chars" != x; then
31764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31765     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31766   fi
31767 
31768 
31769   windows_path="$new_path"
31770   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31771     unix_path=`$CYGPATH -u "$windows_path"`
31772     new_path="$unix_path"
31773   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31774     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31775     new_path="$unix_path"
31776   fi
31777 
31778   if test "x$path" != "x$new_path"; then
31779     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31781 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31782   fi
31783 
31784   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31785   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31786 
31787   else
31788     # We're on a posix platform. Hooray! :)
31789     path="$POTENTIAL_FREETYPE_LIB_PATH"
31790     has_space=`$ECHO "$path" | $GREP " "`
31791     if test "x$has_space" != x; then
31792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31793 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31794       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31795     fi
31796 
31797     # Use eval to expand a potential ~
31798     eval path="$path"
31799     if test ! -f "$path" && test ! -d "$path"; then
31800       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31801     fi
31802 
31803     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31804   fi
31805 
31806 
31807     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31808     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31809 $as_echo_n "checking for freetype includes... " >&6; }
31810     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31811 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31812     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31813     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31814 $as_echo_n "checking for freetype libraries... " >&6; }
31815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31816 $as_echo "$FREETYPE_LIB_PATH" >&6; }
31817   fi
31818 
31819         if test "x$FOUND_FREETYPE" != xyes; then
31820           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31821         fi
31822       else
31823         # User specified only one of lib or include. This is an error.
31824         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31825           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31826 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31827           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31828         else
31829           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31830 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31831           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31832         fi
31833       fi
31834     else
31835       # User did not specify settings, but we need freetype. Try to locate it.
31836 
31837       if test "x$BUNDLE_FREETYPE" = x; then
31838         # If not specified, default is to bundle freetype only on windows
31839         if test "x$OPENJDK_TARGET_OS" = xwindows; then
31840           BUNDLE_FREETYPE=yes
31841         else
31842           BUNDLE_FREETYPE=no
31843         fi
31844       fi
31845 
31846       if test "x$FOUND_FREETYPE" != xyes; then
31847         # Check builddeps
31848 
31849 
31850   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31851     # Source the builddeps file again, to make sure it uses the latest variables!
31852     . $builddepsfile
31853     # Look for a target and build machine specific resource!
31854     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31855     if test "x$resource" = x; then
31856       # Ok, lets instead look for a target specific resource
31857       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31858     fi
31859     if test "x$resource" = x; then
31860       # Ok, lets instead look for a build specific resource
31861       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31862     fi
31863     if test "x$resource" = x; then
31864       # Ok, lets instead look for a generic resource
31865       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31866       resource=${builddep_freetype2}
31867     fi
31868     if test "x$resource" != x; then
31869       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31870 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31871       # If the resource in the builddeps.conf file is an existing directory,
31872       # for example /java/linux/cups
31873       if test -d ${resource}; then
31874         depdir=${resource}
31875       else
31876 
31877   # freetype2 is for example mymodule
31878   # $resource is for example libs/general/libmymod_1_2_3.zip
31879   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31880   # $with_builddeps_dir is for example /localhome/builddeps
31881   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31882   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31883   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31884   filename=`basename $resource`
31885   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31886   filebase=${filename%%.*}
31887   extension=${filename#*.}
31888   installdir=$with_builddeps_dir/$filebase
31889   if test ! -f $installdir/$filename.unpacked; then
31890     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31891 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31892     if test ! -d $installdir; then
31893       mkdir -p $installdir
31894     fi
31895     if test ! -d $installdir; then
31896       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31897     fi
31898     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31899     touch $tmpfile
31900     if test ! -f $tmpfile; then
31901       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31902     fi
31903 
31904   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31905   # $tmpfile is the local file name for the downloaded file.
31906   VALID_TOOL=no
31907   if test "x$BDEPS_FTP" = xwget; then
31908     VALID_TOOL=yes
31909     wget -O $tmpfile $with_builddeps_server/$resource
31910   fi
31911   if test "x$BDEPS_FTP" = xlftp; then
31912     VALID_TOOL=yes
31913     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31914   fi
31915   if test "x$BDEPS_FTP" = xftp; then
31916     VALID_TOOL=yes
31917     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31918     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31919     FTPUSERPWD=${FTPSERVER%%@*}
31920     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31921       FTPUSER=${userpwd%%:*}
31922       FTPPWD=${userpwd#*@}
31923       FTPSERVER=${FTPSERVER#*@}
31924     else
31925       FTPUSER=ftp
31926       FTPPWD=ftp
31927     fi
31928     # the "pass" command does not work on some
31929     # ftp clients (read ftp.exe) but if it works,
31930     # passive mode is better!
31931     ( \
31932         echo "user $FTPUSER $FTPPWD"        ; \
31933         echo "pass"                         ; \
31934         echo "bin"                          ; \
31935         echo "get $FTPPATH $tmpfile"              ; \
31936     ) | ftp -in $FTPSERVER
31937   fi
31938   if test "x$VALID_TOOL" != xyes; then
31939     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31940   fi
31941 
31942     mv $tmpfile $installdir/$filename
31943     if test ! -s $installdir/$filename; then
31944       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31945     fi
31946     case "$extension" in
31947       zip)  echo "Unzipping $installdir/$filename..."
31948         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31949         ;;
31950       tar.gz) echo "Untaring $installdir/$filename..."
31951         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31952         ;;
31953       tgz) echo "Untaring $installdir/$filename..."
31954         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31955         ;;
31956       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31957         ;;
31958     esac
31959   fi
31960   if test -f $installdir/$filename.unpacked; then
31961     depdir=$installdir
31962   fi
31963 
31964       fi
31965       # Source the builddeps file again, because in the previous command, the depdir
31966       # was updated to point at the current build dependency install directory.
31967       . $builddepsfile
31968       # Now extract variables from the builddeps.conf files.
31969       theroot=${builddep_freetype2_ROOT}
31970       thecflags=${builddep_freetype2_CFLAGS}
31971       thelibs=${builddep_freetype2_LIBS}
31972       if test "x$depdir" = x; then
31973         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31974       fi
31975       FREETYPE=$depdir
31976       if test "x$theroot" != x; then
31977         FREETYPE="$theroot"
31978       fi
31979       if test "x$thecflags" != x; then
31980         FREETYPE_CFLAGS="$thecflags"
31981       fi
31982       if test "x$thelibs" != x; then
31983         FREETYPE_LIBS="$thelibs"
31984       fi
31985       FOUND_FREETYPE=yes
31986       else FOUND_FREETYPE=no
31987 
31988     fi
31989     else FOUND_FREETYPE=no
31990 
31991   fi
31992 
31993         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
31994         if test "x$FOUND_FREETYPE" = xyes; then
31995           if test "x$BUNDLE_FREETYPE" = xyes; then
31996             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
31997 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
31998             FOUND_FREETYPE=no
31999           else
32000             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32001 $as_echo_n "checking for freetype... " >&6; }
32002             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
32003 $as_echo "yes (using builddeps)" >&6; }
32004           fi
32005         fi
32006       fi
32007 
32008       if test "x$FOUND_FREETYPE" != xyes; then
32009         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
32010         if test "x$PKG_CONFIG" != x; then
32011 
32012 pkg_failed=no
32013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
32014 $as_echo_n "checking for FREETYPE... " >&6; }
32015 
32016 if test -n "$FREETYPE_CFLAGS"; then
32017     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
32018  elif test -n "$PKG_CONFIG"; then
32019     if test -n "$PKG_CONFIG" && \
32020     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32021   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32022   ac_status=$?
32023   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32024   test $ac_status = 0; }; then
32025   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
32026 else
32027   pkg_failed=yes
32028 fi
32029  else
32030     pkg_failed=untried
32031 fi
32032 if test -n "$FREETYPE_LIBS"; then
32033     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
32034  elif test -n "$PKG_CONFIG"; then
32035     if test -n "$PKG_CONFIG" && \
32036     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32037   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32038   ac_status=$?
32039   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32040   test $ac_status = 0; }; then
32041   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
32042 else
32043   pkg_failed=yes
32044 fi
32045  else
32046     pkg_failed=untried
32047 fi
32048 
32049 
32050 
32051 if test $pkg_failed = yes; then
32052 
32053 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32054         _pkg_short_errors_supported=yes
32055 else
32056         _pkg_short_errors_supported=no
32057 fi
32058         if test $_pkg_short_errors_supported = yes; then
32059                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32060         else
32061                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32062         fi
32063         # Put the nasty error message in config.log where it belongs
32064         echo "$FREETYPE_PKG_ERRORS" >&5
32065 
32066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32067 $as_echo "no" >&6; }
32068                 FOUND_FREETYPE=no
32069 elif test $pkg_failed = untried; then
32070         FOUND_FREETYPE=no
32071 else
32072         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32073         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32074         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32075 $as_echo "yes" >&6; }
32076         FOUND_FREETYPE=yes
32077 fi
32078           if test "x$FOUND_FREETYPE" = xyes; then
32079             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32080             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32081             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32082             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32083               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32084             fi
32085             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32086             if test "x$BUNDLE_FREETYPE" = xyes; then
32087               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32088 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32089               FOUND_FREETYPE=no
32090             else
32091               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32092 $as_echo_n "checking for freetype... " >&6; }
32093               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32094 $as_echo "yes (using pkg-config)" >&6; }
32095             fi
32096           fi
32097         fi
32098       fi
32099 
32100       if test "x$FOUND_FREETYPE" != xyes; then
32101         # Check in well-known locations
32102         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32103           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32104 
32105   windows_path="$FREETYPE_BASE_DIR"
32106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32107     unix_path=`$CYGPATH -u "$windows_path"`
32108     FREETYPE_BASE_DIR="$unix_path"
32109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32111     FREETYPE_BASE_DIR="$unix_path"
32112   fi
32113 
32114 
32115   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32116   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32117   METHOD="well-known location"
32118 
32119   # First check if the files exists.
32120   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32121     # We found an arbitrary include file. That's a good sign.
32122     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32123 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32124     FOUND_FREETYPE=yes
32125 
32126     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32127     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32128       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32129 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32130       FOUND_FREETYPE=no
32131     else
32132       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32133         # On Windows, we will need both .lib and .dll file.
32134         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32135           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32136 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32137           FOUND_FREETYPE=no
32138         fi
32139       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
32140         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32141         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32142       fi
32143     fi
32144   fi
32145 
32146   if test "x$FOUND_FREETYPE" = xyes; then
32147 
32148   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32149 
32150   # Input might be given as Windows format, start by converting to
32151   # unix format.
32152   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32153   new_path=`$CYGPATH -u "$path"`
32154 
32155   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32156   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32157   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32158   # "foo.exe" is OK but "foo" is an error.
32159   #
32160   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32161   # It is also a way to make sure we got the proper file name for the real test later on.
32162   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32163   if test "x$test_shortpath" = x; then
32164     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32165 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32166     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32167   fi
32168 
32169   # Call helper function which possibly converts this using DOS-style short mode.
32170   # If so, the updated path is stored in $new_path.
32171 
32172   input_path="$new_path"
32173   # Check if we need to convert this using DOS-style short mode. If the path
32174   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32175   # take no chances and rewrite it.
32176   # Note: m4 eats our [], so we need to use [ and ] instead.
32177   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32178   if test "x$has_forbidden_chars" != x; then
32179     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32180     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32181     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32182     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32183       # Going to short mode and back again did indeed matter. Since short mode is
32184       # case insensitive, let's make it lowercase to improve readability.
32185       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32186       # Now convert it back to Unix-stile (cygpath)
32187       input_path=`$CYGPATH -u "$shortmode_path"`
32188       new_path="$input_path"
32189     fi
32190   fi
32191 
32192   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32193   if test "x$test_cygdrive_prefix" = x; then
32194     # As a simple fix, exclude /usr/bin since it's not a real path.
32195     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32196       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32197       # a path prefixed by /cygdrive for fixpath to work.
32198       new_path="$CYGWIN_ROOT_PATH$input_path"
32199     fi
32200   fi
32201 
32202 
32203   if test "x$path" != "x$new_path"; then
32204     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32206 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32207   fi
32208 
32209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32210 
32211   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32212   has_colon=`$ECHO $path | $GREP ^.:`
32213   new_path="$path"
32214   if test "x$has_colon" = x; then
32215     # Not in mixed or Windows style, start by that.
32216     new_path=`cmd //c echo $path`
32217   fi
32218 
32219 
32220   input_path="$new_path"
32221   # Check if we need to convert this using DOS-style short mode. If the path
32222   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32223   # take no chances and rewrite it.
32224   # Note: m4 eats our [], so we need to use [ and ] instead.
32225   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32226   if test "x$has_forbidden_chars" != x; then
32227     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32228     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32229   fi
32230 
32231 
32232   windows_path="$new_path"
32233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32234     unix_path=`$CYGPATH -u "$windows_path"`
32235     new_path="$unix_path"
32236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32238     new_path="$unix_path"
32239   fi
32240 
32241   if test "x$path" != "x$new_path"; then
32242     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32243     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32244 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32245   fi
32246 
32247   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32248   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32249 
32250   else
32251     # We're on a posix platform. Hooray! :)
32252     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32253     has_space=`$ECHO "$path" | $GREP " "`
32254     if test "x$has_space" != x; then
32255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32256 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32257       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32258     fi
32259 
32260     # Use eval to expand a potential ~
32261     eval path="$path"
32262     if test ! -f "$path" && test ! -d "$path"; then
32263       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32264     fi
32265 
32266     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32267   fi
32268 
32269 
32270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32271 
32272   # Input might be given as Windows format, start by converting to
32273   # unix format.
32274   path="$POTENTIAL_FREETYPE_LIB_PATH"
32275   new_path=`$CYGPATH -u "$path"`
32276 
32277   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32278   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32279   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32280   # "foo.exe" is OK but "foo" is an error.
32281   #
32282   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32283   # It is also a way to make sure we got the proper file name for the real test later on.
32284   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32285   if test "x$test_shortpath" = x; then
32286     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32287 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32288     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32289   fi
32290 
32291   # Call helper function which possibly converts this using DOS-style short mode.
32292   # If so, the updated path is stored in $new_path.
32293 
32294   input_path="$new_path"
32295   # Check if we need to convert this using DOS-style short mode. If the path
32296   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32297   # take no chances and rewrite it.
32298   # Note: m4 eats our [], so we need to use [ and ] instead.
32299   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32300   if test "x$has_forbidden_chars" != x; then
32301     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32302     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32303     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32304     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32305       # Going to short mode and back again did indeed matter. Since short mode is
32306       # case insensitive, let's make it lowercase to improve readability.
32307       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32308       # Now convert it back to Unix-stile (cygpath)
32309       input_path=`$CYGPATH -u "$shortmode_path"`
32310       new_path="$input_path"
32311     fi
32312   fi
32313 
32314   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32315   if test "x$test_cygdrive_prefix" = x; then
32316     # As a simple fix, exclude /usr/bin since it's not a real path.
32317     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32318       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32319       # a path prefixed by /cygdrive for fixpath to work.
32320       new_path="$CYGWIN_ROOT_PATH$input_path"
32321     fi
32322   fi
32323 
32324 
32325   if test "x$path" != "x$new_path"; then
32326     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32328 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32329   fi
32330 
32331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32332 
32333   path="$POTENTIAL_FREETYPE_LIB_PATH"
32334   has_colon=`$ECHO $path | $GREP ^.:`
32335   new_path="$path"
32336   if test "x$has_colon" = x; then
32337     # Not in mixed or Windows style, start by that.
32338     new_path=`cmd //c echo $path`
32339   fi
32340 
32341 
32342   input_path="$new_path"
32343   # Check if we need to convert this using DOS-style short mode. If the path
32344   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32345   # take no chances and rewrite it.
32346   # Note: m4 eats our [], so we need to use [ and ] instead.
32347   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32348   if test "x$has_forbidden_chars" != x; then
32349     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32350     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32351   fi
32352 
32353 
32354   windows_path="$new_path"
32355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32356     unix_path=`$CYGPATH -u "$windows_path"`
32357     new_path="$unix_path"
32358   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32359     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32360     new_path="$unix_path"
32361   fi
32362 
32363   if test "x$path" != "x$new_path"; then
32364     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32365     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32366 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32367   fi
32368 
32369   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32370   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32371 
32372   else
32373     # We're on a posix platform. Hooray! :)
32374     path="$POTENTIAL_FREETYPE_LIB_PATH"
32375     has_space=`$ECHO "$path" | $GREP " "`
32376     if test "x$has_space" != x; then
32377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32378 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32379       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32380     fi
32381 
32382     # Use eval to expand a potential ~
32383     eval path="$path"
32384     if test ! -f "$path" && test ! -d "$path"; then
32385       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32386     fi
32387 
32388     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32389   fi
32390 
32391 
32392     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32393     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32394 $as_echo_n "checking for freetype includes... " >&6; }
32395     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32396 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32397     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32399 $as_echo_n "checking for freetype libraries... " >&6; }
32400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32401 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32402   fi
32403 
32404           if test "x$FOUND_FREETYPE" != xyes; then
32405             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32406 
32407   windows_path="$FREETYPE_BASE_DIR"
32408   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32409     unix_path=`$CYGPATH -u "$windows_path"`
32410     FREETYPE_BASE_DIR="$unix_path"
32411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32412     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32413     FREETYPE_BASE_DIR="$unix_path"
32414   fi
32415 
32416 
32417   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32418   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32419   METHOD="well-known location"
32420 
32421   # First check if the files exists.
32422   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32423     # We found an arbitrary include file. That's a good sign.
32424     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32425 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32426     FOUND_FREETYPE=yes
32427 
32428     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32429     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32430       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32431 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32432       FOUND_FREETYPE=no
32433     else
32434       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32435         # On Windows, we will need both .lib and .dll file.
32436         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32437           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32438 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32439           FOUND_FREETYPE=no
32440         fi
32441       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
32442         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32443         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32444       fi
32445     fi
32446   fi
32447 
32448   if test "x$FOUND_FREETYPE" = xyes; then
32449 
32450   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32451 
32452   # Input might be given as Windows format, start by converting to
32453   # unix format.
32454   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32455   new_path=`$CYGPATH -u "$path"`
32456 
32457   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32458   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32459   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32460   # "foo.exe" is OK but "foo" is an error.
32461   #
32462   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32463   # It is also a way to make sure we got the proper file name for the real test later on.
32464   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32465   if test "x$test_shortpath" = x; then
32466     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32467 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32468     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32469   fi
32470 
32471   # Call helper function which possibly converts this using DOS-style short mode.
32472   # If so, the updated path is stored in $new_path.
32473 
32474   input_path="$new_path"
32475   # Check if we need to convert this using DOS-style short mode. If the path
32476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32477   # take no chances and rewrite it.
32478   # Note: m4 eats our [], so we need to use [ and ] instead.
32479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32480   if test "x$has_forbidden_chars" != x; then
32481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32482     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32483     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32484     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32485       # Going to short mode and back again did indeed matter. Since short mode is
32486       # case insensitive, let's make it lowercase to improve readability.
32487       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32488       # Now convert it back to Unix-stile (cygpath)
32489       input_path=`$CYGPATH -u "$shortmode_path"`
32490       new_path="$input_path"
32491     fi
32492   fi
32493 
32494   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32495   if test "x$test_cygdrive_prefix" = x; then
32496     # As a simple fix, exclude /usr/bin since it's not a real path.
32497     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32498       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32499       # a path prefixed by /cygdrive for fixpath to work.
32500       new_path="$CYGWIN_ROOT_PATH$input_path"
32501     fi
32502   fi
32503 
32504 
32505   if test "x$path" != "x$new_path"; then
32506     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32507     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32508 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32509   fi
32510 
32511   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32512 
32513   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32514   has_colon=`$ECHO $path | $GREP ^.:`
32515   new_path="$path"
32516   if test "x$has_colon" = x; then
32517     # Not in mixed or Windows style, start by that.
32518     new_path=`cmd //c echo $path`
32519   fi
32520 
32521 
32522   input_path="$new_path"
32523   # Check if we need to convert this using DOS-style short mode. If the path
32524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32525   # take no chances and rewrite it.
32526   # Note: m4 eats our [], so we need to use [ and ] instead.
32527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32528   if test "x$has_forbidden_chars" != x; then
32529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32530     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32531   fi
32532 
32533 
32534   windows_path="$new_path"
32535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536     unix_path=`$CYGPATH -u "$windows_path"`
32537     new_path="$unix_path"
32538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32540     new_path="$unix_path"
32541   fi
32542 
32543   if test "x$path" != "x$new_path"; then
32544     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32545     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32546 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32547   fi
32548 
32549   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32550   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32551 
32552   else
32553     # We're on a posix platform. Hooray! :)
32554     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32555     has_space=`$ECHO "$path" | $GREP " "`
32556     if test "x$has_space" != x; then
32557       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32558 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32559       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32560     fi
32561 
32562     # Use eval to expand a potential ~
32563     eval path="$path"
32564     if test ! -f "$path" && test ! -d "$path"; then
32565       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32566     fi
32567 
32568     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32569   fi
32570 
32571 
32572   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32573 
32574   # Input might be given as Windows format, start by converting to
32575   # unix format.
32576   path="$POTENTIAL_FREETYPE_LIB_PATH"
32577   new_path=`$CYGPATH -u "$path"`
32578 
32579   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32580   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32581   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32582   # "foo.exe" is OK but "foo" is an error.
32583   #
32584   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32585   # It is also a way to make sure we got the proper file name for the real test later on.
32586   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32587   if test "x$test_shortpath" = x; then
32588     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32589 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32590     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32591   fi
32592 
32593   # Call helper function which possibly converts this using DOS-style short mode.
32594   # If so, the updated path is stored in $new_path.
32595 
32596   input_path="$new_path"
32597   # Check if we need to convert this using DOS-style short mode. If the path
32598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32599   # take no chances and rewrite it.
32600   # Note: m4 eats our [], so we need to use [ and ] instead.
32601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32602   if test "x$has_forbidden_chars" != x; then
32603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32604     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32605     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32606     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32607       # Going to short mode and back again did indeed matter. Since short mode is
32608       # case insensitive, let's make it lowercase to improve readability.
32609       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32610       # Now convert it back to Unix-stile (cygpath)
32611       input_path=`$CYGPATH -u "$shortmode_path"`
32612       new_path="$input_path"
32613     fi
32614   fi
32615 
32616   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32617   if test "x$test_cygdrive_prefix" = x; then
32618     # As a simple fix, exclude /usr/bin since it's not a real path.
32619     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32620       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32621       # a path prefixed by /cygdrive for fixpath to work.
32622       new_path="$CYGWIN_ROOT_PATH$input_path"
32623     fi
32624   fi
32625 
32626 
32627   if test "x$path" != "x$new_path"; then
32628     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32629     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32630 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32631   fi
32632 
32633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32634 
32635   path="$POTENTIAL_FREETYPE_LIB_PATH"
32636   has_colon=`$ECHO $path | $GREP ^.:`
32637   new_path="$path"
32638   if test "x$has_colon" = x; then
32639     # Not in mixed or Windows style, start by that.
32640     new_path=`cmd //c echo $path`
32641   fi
32642 
32643 
32644   input_path="$new_path"
32645   # Check if we need to convert this using DOS-style short mode. If the path
32646   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32647   # take no chances and rewrite it.
32648   # Note: m4 eats our [], so we need to use [ and ] instead.
32649   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32650   if test "x$has_forbidden_chars" != x; then
32651     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32652     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32653   fi
32654 
32655 
32656   windows_path="$new_path"
32657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32658     unix_path=`$CYGPATH -u "$windows_path"`
32659     new_path="$unix_path"
32660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32662     new_path="$unix_path"
32663   fi
32664 
32665   if test "x$path" != "x$new_path"; then
32666     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32667     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32668 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32669   fi
32670 
32671   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32672   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32673 
32674   else
32675     # We're on a posix platform. Hooray! :)
32676     path="$POTENTIAL_FREETYPE_LIB_PATH"
32677     has_space=`$ECHO "$path" | $GREP " "`
32678     if test "x$has_space" != x; then
32679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32680 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32681       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32682     fi
32683 
32684     # Use eval to expand a potential ~
32685     eval path="$path"
32686     if test ! -f "$path" && test ! -d "$path"; then
32687       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32688     fi
32689 
32690     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32691   fi
32692 
32693 
32694     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32695     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32696 $as_echo_n "checking for freetype includes... " >&6; }
32697     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32698 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32699     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32700     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32701 $as_echo_n "checking for freetype libraries... " >&6; }
32702     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32703 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32704   fi
32705 
32706           fi
32707         else
32708           if test "x$SYS_ROOT" = "x/"; then
32709             FREETYPE_ROOT=
32710           else
32711             FREETYPE_ROOT="$SYS_ROOT"
32712           fi
32713           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32714 
32715   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32716   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32717   METHOD="well-known location"
32718 
32719   # First check if the files exists.
32720   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32721     # We found an arbitrary include file. That's a good sign.
32722     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32723 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32724     FOUND_FREETYPE=yes
32725 
32726     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32727     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32728       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32729 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32730       FOUND_FREETYPE=no
32731     else
32732       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32733         # On Windows, we will need both .lib and .dll file.
32734         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32735           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32736 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32737           FOUND_FREETYPE=no
32738         fi
32739       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
32740         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32741         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32742       fi
32743     fi
32744   fi
32745 
32746   if test "x$FOUND_FREETYPE" = xyes; then
32747 
32748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32749 
32750   # Input might be given as Windows format, start by converting to
32751   # unix format.
32752   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32753   new_path=`$CYGPATH -u "$path"`
32754 
32755   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32756   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32757   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32758   # "foo.exe" is OK but "foo" is an error.
32759   #
32760   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32761   # It is also a way to make sure we got the proper file name for the real test later on.
32762   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32763   if test "x$test_shortpath" = x; then
32764     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32765 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32766     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32767   fi
32768 
32769   # Call helper function which possibly converts this using DOS-style short mode.
32770   # If so, the updated path is stored in $new_path.
32771 
32772   input_path="$new_path"
32773   # Check if we need to convert this using DOS-style short mode. If the path
32774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32775   # take no chances and rewrite it.
32776   # Note: m4 eats our [], so we need to use [ and ] instead.
32777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32778   if test "x$has_forbidden_chars" != x; then
32779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32780     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32781     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32782     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32783       # Going to short mode and back again did indeed matter. Since short mode is
32784       # case insensitive, let's make it lowercase to improve readability.
32785       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32786       # Now convert it back to Unix-stile (cygpath)
32787       input_path=`$CYGPATH -u "$shortmode_path"`
32788       new_path="$input_path"
32789     fi
32790   fi
32791 
32792   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32793   if test "x$test_cygdrive_prefix" = x; then
32794     # As a simple fix, exclude /usr/bin since it's not a real path.
32795     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32796       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32797       # a path prefixed by /cygdrive for fixpath to work.
32798       new_path="$CYGWIN_ROOT_PATH$input_path"
32799     fi
32800   fi
32801 
32802 
32803   if test "x$path" != "x$new_path"; then
32804     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32805     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32806 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32807   fi
32808 
32809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32810 
32811   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32812   has_colon=`$ECHO $path | $GREP ^.:`
32813   new_path="$path"
32814   if test "x$has_colon" = x; then
32815     # Not in mixed or Windows style, start by that.
32816     new_path=`cmd //c echo $path`
32817   fi
32818 
32819 
32820   input_path="$new_path"
32821   # Check if we need to convert this using DOS-style short mode. If the path
32822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32823   # take no chances and rewrite it.
32824   # Note: m4 eats our [], so we need to use [ and ] instead.
32825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32826   if test "x$has_forbidden_chars" != x; then
32827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32828     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32829   fi
32830 
32831 
32832   windows_path="$new_path"
32833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32834     unix_path=`$CYGPATH -u "$windows_path"`
32835     new_path="$unix_path"
32836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32838     new_path="$unix_path"
32839   fi
32840 
32841   if test "x$path" != "x$new_path"; then
32842     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32843     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32844 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32845   fi
32846 
32847   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32848   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32849 
32850   else
32851     # We're on a posix platform. Hooray! :)
32852     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32853     has_space=`$ECHO "$path" | $GREP " "`
32854     if test "x$has_space" != x; then
32855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32856 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32857       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32858     fi
32859 
32860     # Use eval to expand a potential ~
32861     eval path="$path"
32862     if test ! -f "$path" && test ! -d "$path"; then
32863       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32864     fi
32865 
32866     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32867   fi
32868 
32869 
32870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32871 
32872   # Input might be given as Windows format, start by converting to
32873   # unix format.
32874   path="$POTENTIAL_FREETYPE_LIB_PATH"
32875   new_path=`$CYGPATH -u "$path"`
32876 
32877   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32878   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32879   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32880   # "foo.exe" is OK but "foo" is an error.
32881   #
32882   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32883   # It is also a way to make sure we got the proper file name for the real test later on.
32884   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32885   if test "x$test_shortpath" = x; then
32886     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32887 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32888     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32889   fi
32890 
32891   # Call helper function which possibly converts this using DOS-style short mode.
32892   # If so, the updated path is stored in $new_path.
32893 
32894   input_path="$new_path"
32895   # Check if we need to convert this using DOS-style short mode. If the path
32896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32897   # take no chances and rewrite it.
32898   # Note: m4 eats our [], so we need to use [ and ] instead.
32899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32900   if test "x$has_forbidden_chars" != x; then
32901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32902     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32903     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32904     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32905       # Going to short mode and back again did indeed matter. Since short mode is
32906       # case insensitive, let's make it lowercase to improve readability.
32907       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32908       # Now convert it back to Unix-stile (cygpath)
32909       input_path=`$CYGPATH -u "$shortmode_path"`
32910       new_path="$input_path"
32911     fi
32912   fi
32913 
32914   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32915   if test "x$test_cygdrive_prefix" = x; then
32916     # As a simple fix, exclude /usr/bin since it's not a real path.
32917     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32918       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32919       # a path prefixed by /cygdrive for fixpath to work.
32920       new_path="$CYGWIN_ROOT_PATH$input_path"
32921     fi
32922   fi
32923 
32924 
32925   if test "x$path" != "x$new_path"; then
32926     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32928 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32929   fi
32930 
32931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32932 
32933   path="$POTENTIAL_FREETYPE_LIB_PATH"
32934   has_colon=`$ECHO $path | $GREP ^.:`
32935   new_path="$path"
32936   if test "x$has_colon" = x; then
32937     # Not in mixed or Windows style, start by that.
32938     new_path=`cmd //c echo $path`
32939   fi
32940 
32941 
32942   input_path="$new_path"
32943   # Check if we need to convert this using DOS-style short mode. If the path
32944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32945   # take no chances and rewrite it.
32946   # Note: m4 eats our [], so we need to use [ and ] instead.
32947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32948   if test "x$has_forbidden_chars" != x; then
32949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32950     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32951   fi
32952 
32953 
32954   windows_path="$new_path"
32955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32956     unix_path=`$CYGPATH -u "$windows_path"`
32957     new_path="$unix_path"
32958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32960     new_path="$unix_path"
32961   fi
32962 
32963   if test "x$path" != "x$new_path"; then
32964     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32966 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32967   fi
32968 
32969   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32970   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32971 
32972   else
32973     # We're on a posix platform. Hooray! :)
32974     path="$POTENTIAL_FREETYPE_LIB_PATH"
32975     has_space=`$ECHO "$path" | $GREP " "`
32976     if test "x$has_space" != x; then
32977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32978 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32979       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32980     fi
32981 
32982     # Use eval to expand a potential ~
32983     eval path="$path"
32984     if test ! -f "$path" && test ! -d "$path"; then
32985       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32986     fi
32987 
32988     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32989   fi
32990 
32991 
32992     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32994 $as_echo_n "checking for freetype includes... " >&6; }
32995     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32996 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32997     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32999 $as_echo_n "checking for freetype libraries... " >&6; }
33000     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33001 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33002   fi
33003 
33004 
33005           if test "x$FOUND_FREETYPE" != xyes; then
33006             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
33007 
33008   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33009   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
33010   METHOD="well-known location"
33011 
33012   # First check if the files exists.
33013   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33014     # We found an arbitrary include file. That's a good sign.
33015     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33016 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33017     FOUND_FREETYPE=yes
33018 
33019     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33020     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33021       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33022 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33023       FOUND_FREETYPE=no
33024     else
33025       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33026         # On Windows, we will need both .lib and .dll file.
33027         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33028           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33029 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33030           FOUND_FREETYPE=no
33031         fi
33032       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
33033         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33034         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33035       fi
33036     fi
33037   fi
33038 
33039   if test "x$FOUND_FREETYPE" = xyes; then
33040 
33041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33042 
33043   # Input might be given as Windows format, start by converting to
33044   # unix format.
33045   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33046   new_path=`$CYGPATH -u "$path"`
33047 
33048   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33049   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33050   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33051   # "foo.exe" is OK but "foo" is an error.
33052   #
33053   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33054   # It is also a way to make sure we got the proper file name for the real test later on.
33055   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33056   if test "x$test_shortpath" = x; then
33057     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33058 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33059     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33060   fi
33061 
33062   # Call helper function which possibly converts this using DOS-style short mode.
33063   # If so, the updated path is stored in $new_path.
33064 
33065   input_path="$new_path"
33066   # Check if we need to convert this using DOS-style short mode. If the path
33067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33068   # take no chances and rewrite it.
33069   # Note: m4 eats our [], so we need to use [ and ] instead.
33070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33071   if test "x$has_forbidden_chars" != x; then
33072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33076       # Going to short mode and back again did indeed matter. Since short mode is
33077       # case insensitive, let's make it lowercase to improve readability.
33078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33079       # Now convert it back to Unix-stile (cygpath)
33080       input_path=`$CYGPATH -u "$shortmode_path"`
33081       new_path="$input_path"
33082     fi
33083   fi
33084 
33085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33086   if test "x$test_cygdrive_prefix" = x; then
33087     # As a simple fix, exclude /usr/bin since it's not a real path.
33088     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33090       # a path prefixed by /cygdrive for fixpath to work.
33091       new_path="$CYGWIN_ROOT_PATH$input_path"
33092     fi
33093   fi
33094 
33095 
33096   if test "x$path" != "x$new_path"; then
33097     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33099 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33100   fi
33101 
33102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33103 
33104   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33105   has_colon=`$ECHO $path | $GREP ^.:`
33106   new_path="$path"
33107   if test "x$has_colon" = x; then
33108     # Not in mixed or Windows style, start by that.
33109     new_path=`cmd //c echo $path`
33110   fi
33111 
33112 
33113   input_path="$new_path"
33114   # Check if we need to convert this using DOS-style short mode. If the path
33115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33116   # take no chances and rewrite it.
33117   # Note: m4 eats our [], so we need to use [ and ] instead.
33118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33119   if test "x$has_forbidden_chars" != x; then
33120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33121     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33122   fi
33123 
33124 
33125   windows_path="$new_path"
33126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33127     unix_path=`$CYGPATH -u "$windows_path"`
33128     new_path="$unix_path"
33129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33131     new_path="$unix_path"
33132   fi
33133 
33134   if test "x$path" != "x$new_path"; then
33135     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33137 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33138   fi
33139 
33140   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33141   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33142 
33143   else
33144     # We're on a posix platform. Hooray! :)
33145     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33146     has_space=`$ECHO "$path" | $GREP " "`
33147     if test "x$has_space" != x; then
33148       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33149 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33150       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33151     fi
33152 
33153     # Use eval to expand a potential ~
33154     eval path="$path"
33155     if test ! -f "$path" && test ! -d "$path"; then
33156       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33157     fi
33158 
33159     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33160   fi
33161 
33162 
33163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33164 
33165   # Input might be given as Windows format, start by converting to
33166   # unix format.
33167   path="$POTENTIAL_FREETYPE_LIB_PATH"
33168   new_path=`$CYGPATH -u "$path"`
33169 
33170   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33171   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33172   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33173   # "foo.exe" is OK but "foo" is an error.
33174   #
33175   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33176   # It is also a way to make sure we got the proper file name for the real test later on.
33177   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33178   if test "x$test_shortpath" = x; then
33179     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33180 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33181     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33182   fi
33183 
33184   # Call helper function which possibly converts this using DOS-style short mode.
33185   # If so, the updated path is stored in $new_path.
33186 
33187   input_path="$new_path"
33188   # Check if we need to convert this using DOS-style short mode. If the path
33189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33190   # take no chances and rewrite it.
33191   # Note: m4 eats our [], so we need to use [ and ] instead.
33192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33193   if test "x$has_forbidden_chars" != x; then
33194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33198       # Going to short mode and back again did indeed matter. Since short mode is
33199       # case insensitive, let's make it lowercase to improve readability.
33200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33201       # Now convert it back to Unix-stile (cygpath)
33202       input_path=`$CYGPATH -u "$shortmode_path"`
33203       new_path="$input_path"
33204     fi
33205   fi
33206 
33207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33208   if test "x$test_cygdrive_prefix" = x; then
33209     # As a simple fix, exclude /usr/bin since it's not a real path.
33210     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33212       # a path prefixed by /cygdrive for fixpath to work.
33213       new_path="$CYGWIN_ROOT_PATH$input_path"
33214     fi
33215   fi
33216 
33217 
33218   if test "x$path" != "x$new_path"; then
33219     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33221 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33222   fi
33223 
33224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33225 
33226   path="$POTENTIAL_FREETYPE_LIB_PATH"
33227   has_colon=`$ECHO $path | $GREP ^.:`
33228   new_path="$path"
33229   if test "x$has_colon" = x; then
33230     # Not in mixed or Windows style, start by that.
33231     new_path=`cmd //c echo $path`
33232   fi
33233 
33234 
33235   input_path="$new_path"
33236   # Check if we need to convert this using DOS-style short mode. If the path
33237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33238   # take no chances and rewrite it.
33239   # Note: m4 eats our [], so we need to use [ and ] instead.
33240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33241   if test "x$has_forbidden_chars" != x; then
33242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33243     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33244   fi
33245 
33246 
33247   windows_path="$new_path"
33248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33249     unix_path=`$CYGPATH -u "$windows_path"`
33250     new_path="$unix_path"
33251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33253     new_path="$unix_path"
33254   fi
33255 
33256   if test "x$path" != "x$new_path"; then
33257     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33259 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33260   fi
33261 
33262   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33263   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33264 
33265   else
33266     # We're on a posix platform. Hooray! :)
33267     path="$POTENTIAL_FREETYPE_LIB_PATH"
33268     has_space=`$ECHO "$path" | $GREP " "`
33269     if test "x$has_space" != x; then
33270       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33271 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33272       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33273     fi
33274 
33275     # Use eval to expand a potential ~
33276     eval path="$path"
33277     if test ! -f "$path" && test ! -d "$path"; then
33278       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33279     fi
33280 
33281     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33282   fi
33283 
33284 
33285     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33286     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33287 $as_echo_n "checking for freetype includes... " >&6; }
33288     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33289 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33290     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33292 $as_echo_n "checking for freetype libraries... " >&6; }
33293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33294 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33295   fi
33296 
33297           fi
33298 
33299           if test "x$FOUND_FREETYPE" != xyes; then
33300             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33301             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33302 
33303   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33304   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33305   METHOD="well-known location"
33306 
33307   # First check if the files exists.
33308   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33309     # We found an arbitrary include file. That's a good sign.
33310     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33311 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33312     FOUND_FREETYPE=yes
33313 
33314     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33315     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33316       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33317 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33318       FOUND_FREETYPE=no
33319     else
33320       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33321         # On Windows, we will need both .lib and .dll file.
33322         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33323           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33324 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33325           FOUND_FREETYPE=no
33326         fi
33327       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
33328         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33329         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33330       fi
33331     fi
33332   fi
33333 
33334   if test "x$FOUND_FREETYPE" = xyes; then
33335 
33336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33337 
33338   # Input might be given as Windows format, start by converting to
33339   # unix format.
33340   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33341   new_path=`$CYGPATH -u "$path"`
33342 
33343   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33344   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33345   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33346   # "foo.exe" is OK but "foo" is an error.
33347   #
33348   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33349   # It is also a way to make sure we got the proper file name for the real test later on.
33350   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33351   if test "x$test_shortpath" = x; then
33352     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33353 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33354     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33355   fi
33356 
33357   # Call helper function which possibly converts this using DOS-style short mode.
33358   # If so, the updated path is stored in $new_path.
33359 
33360   input_path="$new_path"
33361   # Check if we need to convert this using DOS-style short mode. If the path
33362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33363   # take no chances and rewrite it.
33364   # Note: m4 eats our [], so we need to use [ and ] instead.
33365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33366   if test "x$has_forbidden_chars" != x; then
33367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33368     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33369     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33370     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33371       # Going to short mode and back again did indeed matter. Since short mode is
33372       # case insensitive, let's make it lowercase to improve readability.
33373       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33374       # Now convert it back to Unix-stile (cygpath)
33375       input_path=`$CYGPATH -u "$shortmode_path"`
33376       new_path="$input_path"
33377     fi
33378   fi
33379 
33380   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33381   if test "x$test_cygdrive_prefix" = x; then
33382     # As a simple fix, exclude /usr/bin since it's not a real path.
33383     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33384       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33385       # a path prefixed by /cygdrive for fixpath to work.
33386       new_path="$CYGWIN_ROOT_PATH$input_path"
33387     fi
33388   fi
33389 
33390 
33391   if test "x$path" != "x$new_path"; then
33392     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33393     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33394 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33395   fi
33396 
33397   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33398 
33399   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33400   has_colon=`$ECHO $path | $GREP ^.:`
33401   new_path="$path"
33402   if test "x$has_colon" = x; then
33403     # Not in mixed or Windows style, start by that.
33404     new_path=`cmd //c echo $path`
33405   fi
33406 
33407 
33408   input_path="$new_path"
33409   # Check if we need to convert this using DOS-style short mode. If the path
33410   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33411   # take no chances and rewrite it.
33412   # Note: m4 eats our [], so we need to use [ and ] instead.
33413   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33414   if test "x$has_forbidden_chars" != x; then
33415     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33416     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33417   fi
33418 
33419 
33420   windows_path="$new_path"
33421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33422     unix_path=`$CYGPATH -u "$windows_path"`
33423     new_path="$unix_path"
33424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33426     new_path="$unix_path"
33427   fi
33428 
33429   if test "x$path" != "x$new_path"; then
33430     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33431     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33432 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33433   fi
33434 
33435   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33436   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33437 
33438   else
33439     # We're on a posix platform. Hooray! :)
33440     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33441     has_space=`$ECHO "$path" | $GREP " "`
33442     if test "x$has_space" != x; then
33443       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33444 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33445       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33446     fi
33447 
33448     # Use eval to expand a potential ~
33449     eval path="$path"
33450     if test ! -f "$path" && test ! -d "$path"; then
33451       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33452     fi
33453 
33454     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33455   fi
33456 
33457 
33458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33459 
33460   # Input might be given as Windows format, start by converting to
33461   # unix format.
33462   path="$POTENTIAL_FREETYPE_LIB_PATH"
33463   new_path=`$CYGPATH -u "$path"`
33464 
33465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33468   # "foo.exe" is OK but "foo" is an error.
33469   #
33470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33471   # It is also a way to make sure we got the proper file name for the real test later on.
33472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33473   if test "x$test_shortpath" = x; then
33474     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33475 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33476     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33477   fi
33478 
33479   # Call helper function which possibly converts this using DOS-style short mode.
33480   # If so, the updated path is stored in $new_path.
33481 
33482   input_path="$new_path"
33483   # Check if we need to convert this using DOS-style short mode. If the path
33484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33485   # take no chances and rewrite it.
33486   # Note: m4 eats our [], so we need to use [ and ] instead.
33487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33488   if test "x$has_forbidden_chars" != x; then
33489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33493       # Going to short mode and back again did indeed matter. Since short mode is
33494       # case insensitive, let's make it lowercase to improve readability.
33495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33496       # Now convert it back to Unix-stile (cygpath)
33497       input_path=`$CYGPATH -u "$shortmode_path"`
33498       new_path="$input_path"
33499     fi
33500   fi
33501 
33502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33503   if test "x$test_cygdrive_prefix" = x; then
33504     # As a simple fix, exclude /usr/bin since it's not a real path.
33505     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33507       # a path prefixed by /cygdrive for fixpath to work.
33508       new_path="$CYGWIN_ROOT_PATH$input_path"
33509     fi
33510   fi
33511 
33512 
33513   if test "x$path" != "x$new_path"; then
33514     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33516 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33517   fi
33518 
33519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33520 
33521   path="$POTENTIAL_FREETYPE_LIB_PATH"
33522   has_colon=`$ECHO $path | $GREP ^.:`
33523   new_path="$path"
33524   if test "x$has_colon" = x; then
33525     # Not in mixed or Windows style, start by that.
33526     new_path=`cmd //c echo $path`
33527   fi
33528 
33529 
33530   input_path="$new_path"
33531   # Check if we need to convert this using DOS-style short mode. If the path
33532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33533   # take no chances and rewrite it.
33534   # Note: m4 eats our [], so we need to use [ and ] instead.
33535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33536   if test "x$has_forbidden_chars" != x; then
33537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33538     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33539   fi
33540 
33541 
33542   windows_path="$new_path"
33543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33544     unix_path=`$CYGPATH -u "$windows_path"`
33545     new_path="$unix_path"
33546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33548     new_path="$unix_path"
33549   fi
33550 
33551   if test "x$path" != "x$new_path"; then
33552     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33554 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33555   fi
33556 
33557   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33558   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33559 
33560   else
33561     # We're on a posix platform. Hooray! :)
33562     path="$POTENTIAL_FREETYPE_LIB_PATH"
33563     has_space=`$ECHO "$path" | $GREP " "`
33564     if test "x$has_space" != x; then
33565       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33566 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33567       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33568     fi
33569 
33570     # Use eval to expand a potential ~
33571     eval path="$path"
33572     if test ! -f "$path" && test ! -d "$path"; then
33573       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33574     fi
33575 
33576     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33577   fi
33578 
33579 
33580     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33582 $as_echo_n "checking for freetype includes... " >&6; }
33583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33584 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33585     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33587 $as_echo_n "checking for freetype libraries... " >&6; }
33588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33589 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33590   fi
33591 
33592             else
33593 
33594   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33595   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33596   METHOD="well-known location"
33597 
33598   # First check if the files exists.
33599   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33600     # We found an arbitrary include file. That's a good sign.
33601     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33602 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33603     FOUND_FREETYPE=yes
33604 
33605     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33606     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33607       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33608 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33609       FOUND_FREETYPE=no
33610     else
33611       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33612         # On Windows, we will need both .lib and .dll file.
33613         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33614           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33615 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33616           FOUND_FREETYPE=no
33617         fi
33618       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
33619         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33620         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33621       fi
33622     fi
33623   fi
33624 
33625   if test "x$FOUND_FREETYPE" = xyes; then
33626 
33627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33628 
33629   # Input might be given as Windows format, start by converting to
33630   # unix format.
33631   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33632   new_path=`$CYGPATH -u "$path"`
33633 
33634   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33635   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33636   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33637   # "foo.exe" is OK but "foo" is an error.
33638   #
33639   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33640   # It is also a way to make sure we got the proper file name for the real test later on.
33641   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33642   if test "x$test_shortpath" = x; then
33643     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33644 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33645     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33646   fi
33647 
33648   # Call helper function which possibly converts this using DOS-style short mode.
33649   # If so, the updated path is stored in $new_path.
33650 
33651   input_path="$new_path"
33652   # Check if we need to convert this using DOS-style short mode. If the path
33653   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33654   # take no chances and rewrite it.
33655   # Note: m4 eats our [], so we need to use [ and ] instead.
33656   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33657   if test "x$has_forbidden_chars" != x; then
33658     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33659     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33660     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33661     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33662       # Going to short mode and back again did indeed matter. Since short mode is
33663       # case insensitive, let's make it lowercase to improve readability.
33664       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33665       # Now convert it back to Unix-stile (cygpath)
33666       input_path=`$CYGPATH -u "$shortmode_path"`
33667       new_path="$input_path"
33668     fi
33669   fi
33670 
33671   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33672   if test "x$test_cygdrive_prefix" = x; then
33673     # As a simple fix, exclude /usr/bin since it's not a real path.
33674     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33675       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33676       # a path prefixed by /cygdrive for fixpath to work.
33677       new_path="$CYGWIN_ROOT_PATH$input_path"
33678     fi
33679   fi
33680 
33681 
33682   if test "x$path" != "x$new_path"; then
33683     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33685 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33686   fi
33687 
33688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33689 
33690   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33691   has_colon=`$ECHO $path | $GREP ^.:`
33692   new_path="$path"
33693   if test "x$has_colon" = x; then
33694     # Not in mixed or Windows style, start by that.
33695     new_path=`cmd //c echo $path`
33696   fi
33697 
33698 
33699   input_path="$new_path"
33700   # Check if we need to convert this using DOS-style short mode. If the path
33701   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33702   # take no chances and rewrite it.
33703   # Note: m4 eats our [], so we need to use [ and ] instead.
33704   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33705   if test "x$has_forbidden_chars" != x; then
33706     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33707     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33708   fi
33709 
33710 
33711   windows_path="$new_path"
33712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33713     unix_path=`$CYGPATH -u "$windows_path"`
33714     new_path="$unix_path"
33715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33717     new_path="$unix_path"
33718   fi
33719 
33720   if test "x$path" != "x$new_path"; then
33721     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33722     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33723 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33724   fi
33725 
33726   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33727   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33728 
33729   else
33730     # We're on a posix platform. Hooray! :)
33731     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33732     has_space=`$ECHO "$path" | $GREP " "`
33733     if test "x$has_space" != x; then
33734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33735 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33736       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33737     fi
33738 
33739     # Use eval to expand a potential ~
33740     eval path="$path"
33741     if test ! -f "$path" && test ! -d "$path"; then
33742       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33743     fi
33744 
33745     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33746   fi
33747 
33748 
33749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33750 
33751   # Input might be given as Windows format, start by converting to
33752   # unix format.
33753   path="$POTENTIAL_FREETYPE_LIB_PATH"
33754   new_path=`$CYGPATH -u "$path"`
33755 
33756   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33757   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33758   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33759   # "foo.exe" is OK but "foo" is an error.
33760   #
33761   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33762   # It is also a way to make sure we got the proper file name for the real test later on.
33763   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33764   if test "x$test_shortpath" = x; then
33765     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33766 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33767     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33768   fi
33769 
33770   # Call helper function which possibly converts this using DOS-style short mode.
33771   # If so, the updated path is stored in $new_path.
33772 
33773   input_path="$new_path"
33774   # Check if we need to convert this using DOS-style short mode. If the path
33775   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33776   # take no chances and rewrite it.
33777   # Note: m4 eats our [], so we need to use [ and ] instead.
33778   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33779   if test "x$has_forbidden_chars" != x; then
33780     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33781     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33782     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33783     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33784       # Going to short mode and back again did indeed matter. Since short mode is
33785       # case insensitive, let's make it lowercase to improve readability.
33786       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33787       # Now convert it back to Unix-stile (cygpath)
33788       input_path=`$CYGPATH -u "$shortmode_path"`
33789       new_path="$input_path"
33790     fi
33791   fi
33792 
33793   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33794   if test "x$test_cygdrive_prefix" = x; then
33795     # As a simple fix, exclude /usr/bin since it's not a real path.
33796     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33797       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33798       # a path prefixed by /cygdrive for fixpath to work.
33799       new_path="$CYGWIN_ROOT_PATH$input_path"
33800     fi
33801   fi
33802 
33803 
33804   if test "x$path" != "x$new_path"; then
33805     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33806     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33807 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33808   fi
33809 
33810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33811 
33812   path="$POTENTIAL_FREETYPE_LIB_PATH"
33813   has_colon=`$ECHO $path | $GREP ^.:`
33814   new_path="$path"
33815   if test "x$has_colon" = x; then
33816     # Not in mixed or Windows style, start by that.
33817     new_path=`cmd //c echo $path`
33818   fi
33819 
33820 
33821   input_path="$new_path"
33822   # Check if we need to convert this using DOS-style short mode. If the path
33823   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33824   # take no chances and rewrite it.
33825   # Note: m4 eats our [], so we need to use [ and ] instead.
33826   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33827   if test "x$has_forbidden_chars" != x; then
33828     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33829     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33830   fi
33831 
33832 
33833   windows_path="$new_path"
33834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33835     unix_path=`$CYGPATH -u "$windows_path"`
33836     new_path="$unix_path"
33837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33838     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33839     new_path="$unix_path"
33840   fi
33841 
33842   if test "x$path" != "x$new_path"; then
33843     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33844     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33845 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33846   fi
33847 
33848   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33849   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33850 
33851   else
33852     # We're on a posix platform. Hooray! :)
33853     path="$POTENTIAL_FREETYPE_LIB_PATH"
33854     has_space=`$ECHO "$path" | $GREP " "`
33855     if test "x$has_space" != x; then
33856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33857 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33858       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33859     fi
33860 
33861     # Use eval to expand a potential ~
33862     eval path="$path"
33863     if test ! -f "$path" && test ! -d "$path"; then
33864       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33865     fi
33866 
33867     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33868   fi
33869 
33870 
33871     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33872     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33873 $as_echo_n "checking for freetype includes... " >&6; }
33874     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33875 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33876     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33877     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33878 $as_echo_n "checking for freetype libraries... " >&6; }
33879     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33880 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33881   fi
33882 
33883               if test "x$FOUND_FREETYPE" != xyes; then
33884 
33885   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33886   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33887   METHOD="well-known location"
33888 
33889   # First check if the files exists.
33890   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33891     # We found an arbitrary include file. That's a good sign.
33892     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33893 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33894     FOUND_FREETYPE=yes
33895 
33896     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33897     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33898       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33899 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33900       FOUND_FREETYPE=no
33901     else
33902       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33903         # On Windows, we will need both .lib and .dll file.
33904         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33905           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33906 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33907           FOUND_FREETYPE=no
33908         fi
33909       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
33910         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33911         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33912       fi
33913     fi
33914   fi
33915 
33916   if test "x$FOUND_FREETYPE" = xyes; then
33917 
33918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33919 
33920   # Input might be given as Windows format, start by converting to
33921   # unix format.
33922   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33923   new_path=`$CYGPATH -u "$path"`
33924 
33925   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33926   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33927   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33928   # "foo.exe" is OK but "foo" is an error.
33929   #
33930   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33931   # It is also a way to make sure we got the proper file name for the real test later on.
33932   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33933   if test "x$test_shortpath" = x; then
33934     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33935 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33936     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33937   fi
33938 
33939   # Call helper function which possibly converts this using DOS-style short mode.
33940   # If so, the updated path is stored in $new_path.
33941 
33942   input_path="$new_path"
33943   # Check if we need to convert this using DOS-style short mode. If the path
33944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33945   # take no chances and rewrite it.
33946   # Note: m4 eats our [], so we need to use [ and ] instead.
33947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33948   if test "x$has_forbidden_chars" != x; then
33949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33950     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33951     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33952     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33953       # Going to short mode and back again did indeed matter. Since short mode is
33954       # case insensitive, let's make it lowercase to improve readability.
33955       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33956       # Now convert it back to Unix-stile (cygpath)
33957       input_path=`$CYGPATH -u "$shortmode_path"`
33958       new_path="$input_path"
33959     fi
33960   fi
33961 
33962   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33963   if test "x$test_cygdrive_prefix" = x; then
33964     # As a simple fix, exclude /usr/bin since it's not a real path.
33965     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33966       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33967       # a path prefixed by /cygdrive for fixpath to work.
33968       new_path="$CYGWIN_ROOT_PATH$input_path"
33969     fi
33970   fi
33971 
33972 
33973   if test "x$path" != "x$new_path"; then
33974     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33975     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33976 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33977   fi
33978 
33979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33980 
33981   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33982   has_colon=`$ECHO $path | $GREP ^.:`
33983   new_path="$path"
33984   if test "x$has_colon" = x; then
33985     # Not in mixed or Windows style, start by that.
33986     new_path=`cmd //c echo $path`
33987   fi
33988 
33989 
33990   input_path="$new_path"
33991   # Check if we need to convert this using DOS-style short mode. If the path
33992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33993   # take no chances and rewrite it.
33994   # Note: m4 eats our [], so we need to use [ and ] instead.
33995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33996   if test "x$has_forbidden_chars" != x; then
33997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33998     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33999   fi
34000 
34001 
34002   windows_path="$new_path"
34003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34004     unix_path=`$CYGPATH -u "$windows_path"`
34005     new_path="$unix_path"
34006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34008     new_path="$unix_path"
34009   fi
34010 
34011   if test "x$path" != "x$new_path"; then
34012     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34013     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34014 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34015   fi
34016 
34017   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34018   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34019 
34020   else
34021     # We're on a posix platform. Hooray! :)
34022     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34023     has_space=`$ECHO "$path" | $GREP " "`
34024     if test "x$has_space" != x; then
34025       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34026 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34027       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34028     fi
34029 
34030     # Use eval to expand a potential ~
34031     eval path="$path"
34032     if test ! -f "$path" && test ! -d "$path"; then
34033       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34034     fi
34035 
34036     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34037   fi
34038 
34039 
34040   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34041 
34042   # Input might be given as Windows format, start by converting to
34043   # unix format.
34044   path="$POTENTIAL_FREETYPE_LIB_PATH"
34045   new_path=`$CYGPATH -u "$path"`
34046 
34047   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34048   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34049   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34050   # "foo.exe" is OK but "foo" is an error.
34051   #
34052   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34053   # It is also a way to make sure we got the proper file name for the real test later on.
34054   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34055   if test "x$test_shortpath" = x; then
34056     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34057 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34058     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34059   fi
34060 
34061   # Call helper function which possibly converts this using DOS-style short mode.
34062   # If so, the updated path is stored in $new_path.
34063 
34064   input_path="$new_path"
34065   # Check if we need to convert this using DOS-style short mode. If the path
34066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34067   # take no chances and rewrite it.
34068   # Note: m4 eats our [], so we need to use [ and ] instead.
34069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34070   if test "x$has_forbidden_chars" != x; then
34071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34072     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34073     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34074     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34075       # Going to short mode and back again did indeed matter. Since short mode is
34076       # case insensitive, let's make it lowercase to improve readability.
34077       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34078       # Now convert it back to Unix-stile (cygpath)
34079       input_path=`$CYGPATH -u "$shortmode_path"`
34080       new_path="$input_path"
34081     fi
34082   fi
34083 
34084   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34085   if test "x$test_cygdrive_prefix" = x; then
34086     # As a simple fix, exclude /usr/bin since it's not a real path.
34087     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34088       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34089       # a path prefixed by /cygdrive for fixpath to work.
34090       new_path="$CYGWIN_ROOT_PATH$input_path"
34091     fi
34092   fi
34093 
34094 
34095   if test "x$path" != "x$new_path"; then
34096     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34098 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34099   fi
34100 
34101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34102 
34103   path="$POTENTIAL_FREETYPE_LIB_PATH"
34104   has_colon=`$ECHO $path | $GREP ^.:`
34105   new_path="$path"
34106   if test "x$has_colon" = x; then
34107     # Not in mixed or Windows style, start by that.
34108     new_path=`cmd //c echo $path`
34109   fi
34110 
34111 
34112   input_path="$new_path"
34113   # Check if we need to convert this using DOS-style short mode. If the path
34114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34115   # take no chances and rewrite it.
34116   # Note: m4 eats our [], so we need to use [ and ] instead.
34117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34118   if test "x$has_forbidden_chars" != x; then
34119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34120     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34121   fi
34122 
34123 
34124   windows_path="$new_path"
34125   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34126     unix_path=`$CYGPATH -u "$windows_path"`
34127     new_path="$unix_path"
34128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34129     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34130     new_path="$unix_path"
34131   fi
34132 
34133   if test "x$path" != "x$new_path"; then
34134     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34135     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34136 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34137   fi
34138 
34139   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34140   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34141 
34142   else
34143     # We're on a posix platform. Hooray! :)
34144     path="$POTENTIAL_FREETYPE_LIB_PATH"
34145     has_space=`$ECHO "$path" | $GREP " "`
34146     if test "x$has_space" != x; then
34147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34148 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34149       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34150     fi
34151 
34152     # Use eval to expand a potential ~
34153     eval path="$path"
34154     if test ! -f "$path" && test ! -d "$path"; then
34155       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34156     fi
34157 
34158     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34159   fi
34160 
34161 
34162     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34163     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34164 $as_echo_n "checking for freetype includes... " >&6; }
34165     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34166 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34167     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34168     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34169 $as_echo_n "checking for freetype libraries... " >&6; }
34170     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34171 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34172   fi
34173 
34174               fi
34175             fi
34176           fi
34177         fi
34178       fi # end check in well-known locations
34179 
34180       if test "x$FOUND_FREETYPE" != xyes; then
34181 
34182   # Print a helpful message on how to acquire the necessary build dependency.
34183   # freetype is the help tag: freetype, cups, pulse, alsa etc
34184   MISSING_DEPENDENCY=freetype
34185 
34186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34187     cygwin_help $MISSING_DEPENDENCY
34188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34189     msys_help $MISSING_DEPENDENCY
34190   else
34191     PKGHANDLER_COMMAND=
34192 
34193     case $PKGHANDLER in
34194       apt-get)
34195         apt_help     $MISSING_DEPENDENCY ;;
34196       yum)
34197         yum_help     $MISSING_DEPENDENCY ;;
34198       port)
34199         port_help    $MISSING_DEPENDENCY ;;
34200       pkgutil)
34201         pkgutil_help $MISSING_DEPENDENCY ;;
34202       pkgadd)
34203         pkgadd_help  $MISSING_DEPENDENCY ;;
34204     esac
34205 
34206     if test "x$PKGHANDLER_COMMAND" != x; then
34207       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34208     fi
34209   fi
34210 
34211         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34212       fi
34213     fi # end user specified settings
34214 
34215     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34216     if test "x$FREETYPE_CFLAGS" = x; then
34217 
34218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34219 
34220   # Input might be given as Windows format, start by converting to
34221   # unix format.
34222   path="$FREETYPE_INCLUDE_PATH"
34223   new_path=`$CYGPATH -u "$path"`
34224 
34225   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34226   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34227   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34228   # "foo.exe" is OK but "foo" is an error.
34229   #
34230   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34231   # It is also a way to make sure we got the proper file name for the real test later on.
34232   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34233   if test "x$test_shortpath" = x; then
34234     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34235 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34236     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34237   fi
34238 
34239   # Call helper function which possibly converts this using DOS-style short mode.
34240   # If so, the updated path is stored in $new_path.
34241 
34242   input_path="$new_path"
34243   # Check if we need to convert this using DOS-style short mode. If the path
34244   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34245   # take no chances and rewrite it.
34246   # Note: m4 eats our [], so we need to use [ and ] instead.
34247   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34248   if test "x$has_forbidden_chars" != x; then
34249     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34250     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34251     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34252     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34253       # Going to short mode and back again did indeed matter. Since short mode is
34254       # case insensitive, let's make it lowercase to improve readability.
34255       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34256       # Now convert it back to Unix-stile (cygpath)
34257       input_path=`$CYGPATH -u "$shortmode_path"`
34258       new_path="$input_path"
34259     fi
34260   fi
34261 
34262   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34263   if test "x$test_cygdrive_prefix" = x; then
34264     # As a simple fix, exclude /usr/bin since it's not a real path.
34265     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34266       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34267       # a path prefixed by /cygdrive for fixpath to work.
34268       new_path="$CYGWIN_ROOT_PATH$input_path"
34269     fi
34270   fi
34271 
34272 
34273   if test "x$path" != "x$new_path"; then
34274     FREETYPE_INCLUDE_PATH="$new_path"
34275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34276 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34277   fi
34278 
34279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34280 
34281   path="$FREETYPE_INCLUDE_PATH"
34282   has_colon=`$ECHO $path | $GREP ^.:`
34283   new_path="$path"
34284   if test "x$has_colon" = x; then
34285     # Not in mixed or Windows style, start by that.
34286     new_path=`cmd //c echo $path`
34287   fi
34288 
34289 
34290   input_path="$new_path"
34291   # Check if we need to convert this using DOS-style short mode. If the path
34292   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34293   # take no chances and rewrite it.
34294   # Note: m4 eats our [], so we need to use [ and ] instead.
34295   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34296   if test "x$has_forbidden_chars" != x; then
34297     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34298     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34299   fi
34300 
34301 
34302   windows_path="$new_path"
34303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34304     unix_path=`$CYGPATH -u "$windows_path"`
34305     new_path="$unix_path"
34306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34308     new_path="$unix_path"
34309   fi
34310 
34311   if test "x$path" != "x$new_path"; then
34312     FREETYPE_INCLUDE_PATH="$new_path"
34313     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34314 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34315   fi
34316 
34317   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34318   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34319 
34320   else
34321     # We're on a posix platform. Hooray! :)
34322     path="$FREETYPE_INCLUDE_PATH"
34323     has_space=`$ECHO "$path" | $GREP " "`
34324     if test "x$has_space" != x; then
34325       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34326 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34327       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34328     fi
34329 
34330     # Use eval to expand a potential ~
34331     eval path="$path"
34332     if test ! -f "$path" && test ! -d "$path"; then
34333       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34334     fi
34335 
34336     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34337   fi
34338 
34339       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34340         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34341       else
34342         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34343       fi
34344     fi
34345 
34346     if test "x$FREETYPE_LIBS" = x; then
34347 
34348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34349 
34350   # Input might be given as Windows format, start by converting to
34351   # unix format.
34352   path="$FREETYPE_LIB_PATH"
34353   new_path=`$CYGPATH -u "$path"`
34354 
34355   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34356   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34357   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34358   # "foo.exe" is OK but "foo" is an error.
34359   #
34360   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34361   # It is also a way to make sure we got the proper file name for the real test later on.
34362   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34363   if test "x$test_shortpath" = x; then
34364     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34365 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34366     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34367   fi
34368 
34369   # Call helper function which possibly converts this using DOS-style short mode.
34370   # If so, the updated path is stored in $new_path.
34371 
34372   input_path="$new_path"
34373   # Check if we need to convert this using DOS-style short mode. If the path
34374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34375   # take no chances and rewrite it.
34376   # Note: m4 eats our [], so we need to use [ and ] instead.
34377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34378   if test "x$has_forbidden_chars" != x; then
34379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34380     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34381     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34382     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34383       # Going to short mode and back again did indeed matter. Since short mode is
34384       # case insensitive, let's make it lowercase to improve readability.
34385       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34386       # Now convert it back to Unix-stile (cygpath)
34387       input_path=`$CYGPATH -u "$shortmode_path"`
34388       new_path="$input_path"
34389     fi
34390   fi
34391 
34392   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34393   if test "x$test_cygdrive_prefix" = x; then
34394     # As a simple fix, exclude /usr/bin since it's not a real path.
34395     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34396       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34397       # a path prefixed by /cygdrive for fixpath to work.
34398       new_path="$CYGWIN_ROOT_PATH$input_path"
34399     fi
34400   fi
34401 
34402 
34403   if test "x$path" != "x$new_path"; then
34404     FREETYPE_LIB_PATH="$new_path"
34405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34406 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34407   fi
34408 
34409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34410 
34411   path="$FREETYPE_LIB_PATH"
34412   has_colon=`$ECHO $path | $GREP ^.:`
34413   new_path="$path"
34414   if test "x$has_colon" = x; then
34415     # Not in mixed or Windows style, start by that.
34416     new_path=`cmd //c echo $path`
34417   fi
34418 
34419 
34420   input_path="$new_path"
34421   # Check if we need to convert this using DOS-style short mode. If the path
34422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34423   # take no chances and rewrite it.
34424   # Note: m4 eats our [], so we need to use [ and ] instead.
34425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34426   if test "x$has_forbidden_chars" != x; then
34427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34428     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34429   fi
34430 
34431 
34432   windows_path="$new_path"
34433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34434     unix_path=`$CYGPATH -u "$windows_path"`
34435     new_path="$unix_path"
34436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34438     new_path="$unix_path"
34439   fi
34440 
34441   if test "x$path" != "x$new_path"; then
34442     FREETYPE_LIB_PATH="$new_path"
34443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34444 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34445   fi
34446 
34447   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34448   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34449 
34450   else
34451     # We're on a posix platform. Hooray! :)
34452     path="$FREETYPE_LIB_PATH"
34453     has_space=`$ECHO "$path" | $GREP " "`
34454     if test "x$has_space" != x; then
34455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34456 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34457       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34458     fi
34459 
34460     # Use eval to expand a potential ~
34461     eval path="$path"
34462     if test ! -f "$path" && test ! -d "$path"; then
34463       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34464     fi
34465 
34466     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34467   fi
34468 
34469       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34470         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34471       else
34472         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34473       fi
34474     fi
34475 
34476     # Try to compile it
34477     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34478 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34479     ac_ext=cpp
34480 ac_cpp='$CXXCPP $CPPFLAGS'
34481 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34482 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34483 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34484 
34485     PREV_CXXCFLAGS="$CXXFLAGS"
34486     PREV_LIBS="$LIBS"
34487     PREV_CXX="$CXX"
34488     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34489     LIBS="$LIBS $FREETYPE_LIBS"
34490     CXX="$FIXPATH $CXX"
34491     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34492 /* end confdefs.h.  */
34493 
34494           #include<ft2build.h>
34495           #include FT_FREETYPE_H
34496           int main () {
34497             FT_Init_FreeType(NULL);
34498             return 0;
34499           }
34500 
34501 _ACEOF
34502 if ac_fn_cxx_try_link "$LINENO"; then :
34503 
34504           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34505 $as_echo "yes" >&6; }
34506 
34507 else
34508 
34509           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34510 $as_echo "no" >&6; }
34511           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34512 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34513           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34514 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34515 
34516 
34517   # Print a helpful message on how to acquire the necessary build dependency.
34518   # freetype is the help tag: freetype, cups, pulse, alsa etc
34519   MISSING_DEPENDENCY=freetype
34520 
34521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34522     cygwin_help $MISSING_DEPENDENCY
34523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34524     msys_help $MISSING_DEPENDENCY
34525   else
34526     PKGHANDLER_COMMAND=
34527 
34528     case $PKGHANDLER in
34529       apt-get)
34530         apt_help     $MISSING_DEPENDENCY ;;
34531       yum)
34532         yum_help     $MISSING_DEPENDENCY ;;
34533       port)
34534         port_help    $MISSING_DEPENDENCY ;;
34535       pkgutil)
34536         pkgutil_help $MISSING_DEPENDENCY ;;
34537       pkgadd)
34538         pkgadd_help  $MISSING_DEPENDENCY ;;
34539     esac
34540 
34541     if test "x$PKGHANDLER_COMMAND" != x; then
34542       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34543     fi
34544   fi
34545 
34546 
34547           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34548 
34549 
34550 fi
34551 rm -f core conftest.err conftest.$ac_objext \
34552     conftest$ac_exeext conftest.$ac_ext
34553     CXXCFLAGS="$PREV_CXXFLAGS"
34554     LIBS="$PREV_LIBS"
34555     CXX="$PREV_CXX"
34556     ac_ext=cpp
34557 ac_cpp='$CXXCPP $CPPFLAGS'
34558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34561 
34562 
34563     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34564 $as_echo_n "checking if we should bundle freetype... " >&6; }
34565     if test "x$BUNDLE_FREETYPE" = xyes; then
34566       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34567     fi
34568     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34569 $as_echo "$BUNDLE_FREETYPE" >&6; }
34570 
34571   fi # end freetype needed
34572 
34573 
34574 
34575 
34576 
34577 
34578 
34579   ###############################################################################
34580   #
34581   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34582   #
34583 
34584 # Check whether --with-alsa was given.
34585 if test "${with_alsa+set}" = set; then :
34586   withval=$with_alsa;
34587 fi
34588 
34589 
34590 # Check whether --with-alsa-include was given.
34591 if test "${with_alsa_include+set}" = set; then :
34592   withval=$with_alsa_include;
34593 fi
34594 
34595 
34596 # Check whether --with-alsa-lib was given.
34597 if test "${with_alsa_lib+set}" = set; then :
34598   withval=$with_alsa_lib;
34599 fi
34600 
34601 
34602   if test "x$ALSA_NOT_NEEDED" = xyes; then
34603     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34604       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34605 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34606     fi
34607     ALSA_CFLAGS=
34608     ALSA_LIBS=
34609   else
34610     ALSA_FOUND=no
34611 
34612     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34613       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34614     fi
34615 
34616     if test "x${with_alsa}" != x; then
34617       ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34618       ALSA_CFLAGS="-I${with_alsa}/include"
34619       ALSA_FOUND=yes
34620     fi
34621     if test "x${with_alsa_include}" != x; then
34622       ALSA_CFLAGS="-I${with_alsa_include}"
34623       ALSA_FOUND=yes
34624     fi
34625     if test "x${with_alsa_lib}" != x; then
34626       ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34627       ALSA_FOUND=yes
34628     fi
34629     if test "x$ALSA_FOUND" = xno; then
34630 
34631 
34632   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34633     # Source the builddeps file again, to make sure it uses the latest variables!
34634     . $builddepsfile
34635     # Look for a target and build machine specific resource!
34636     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34637     if test "x$resource" = x; then
34638       # Ok, lets instead look for a target specific resource
34639       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34640     fi
34641     if test "x$resource" = x; then
34642       # Ok, lets instead look for a build specific resource
34643       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34644     fi
34645     if test "x$resource" = x; then
34646       # Ok, lets instead look for a generic resource
34647       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34648       resource=${builddep_alsa}
34649     fi
34650     if test "x$resource" != x; then
34651       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34652 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34653       # If the resource in the builddeps.conf file is an existing directory,
34654       # for example /java/linux/cups
34655       if test -d ${resource}; then
34656         depdir=${resource}
34657       else
34658 
34659   # alsa is for example mymodule
34660   # $resource is for example libs/general/libmymod_1_2_3.zip
34661   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34662   # $with_builddeps_dir is for example /localhome/builddeps
34663   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34664   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34665   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34666   filename=`basename $resource`
34667   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34668   filebase=${filename%%.*}
34669   extension=${filename#*.}
34670   installdir=$with_builddeps_dir/$filebase
34671   if test ! -f $installdir/$filename.unpacked; then
34672     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34673 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34674     if test ! -d $installdir; then
34675       mkdir -p $installdir
34676     fi
34677     if test ! -d $installdir; then
34678       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34679     fi
34680     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34681     touch $tmpfile
34682     if test ! -f $tmpfile; then
34683       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34684     fi
34685 
34686   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34687   # $tmpfile is the local file name for the downloaded file.
34688   VALID_TOOL=no
34689   if test "x$BDEPS_FTP" = xwget; then
34690     VALID_TOOL=yes
34691     wget -O $tmpfile $with_builddeps_server/$resource
34692   fi
34693   if test "x$BDEPS_FTP" = xlftp; then
34694     VALID_TOOL=yes
34695     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34696   fi
34697   if test "x$BDEPS_FTP" = xftp; then
34698     VALID_TOOL=yes
34699     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34700     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34701     FTPUSERPWD=${FTPSERVER%%@*}
34702     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34703       FTPUSER=${userpwd%%:*}
34704       FTPPWD=${userpwd#*@}
34705       FTPSERVER=${FTPSERVER#*@}
34706     else
34707       FTPUSER=ftp
34708       FTPPWD=ftp
34709     fi
34710     # the "pass" command does not work on some
34711     # ftp clients (read ftp.exe) but if it works,
34712     # passive mode is better!
34713     ( \
34714         echo "user $FTPUSER $FTPPWD"        ; \
34715         echo "pass"                         ; \
34716         echo "bin"                          ; \
34717         echo "get $FTPPATH $tmpfile"              ; \
34718     ) | ftp -in $FTPSERVER
34719   fi
34720   if test "x$VALID_TOOL" != xyes; then
34721     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34722   fi
34723 
34724     mv $tmpfile $installdir/$filename
34725     if test ! -s $installdir/$filename; then
34726       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34727     fi
34728     case "$extension" in
34729       zip)  echo "Unzipping $installdir/$filename..."
34730         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34731         ;;
34732       tar.gz) echo "Untaring $installdir/$filename..."
34733         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34734         ;;
34735       tgz) echo "Untaring $installdir/$filename..."
34736         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34737         ;;
34738       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34739         ;;
34740     esac
34741   fi
34742   if test -f $installdir/$filename.unpacked; then
34743     depdir=$installdir
34744   fi
34745 
34746       fi
34747       # Source the builddeps file again, because in the previous command, the depdir
34748       # was updated to point at the current build dependency install directory.
34749       . $builddepsfile
34750       # Now extract variables from the builddeps.conf files.
34751       theroot=${builddep_alsa_ROOT}
34752       thecflags=${builddep_alsa_CFLAGS}
34753       thelibs=${builddep_alsa_LIBS}
34754       if test "x$depdir" = x; then
34755         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34756       fi
34757       ALSA=$depdir
34758       if test "x$theroot" != x; then
34759         ALSA="$theroot"
34760       fi
34761       if test "x$thecflags" != x; then
34762         ALSA_CFLAGS="$thecflags"
34763       fi
34764       if test "x$thelibs" != x; then
34765         ALSA_LIBS="$thelibs"
34766       fi
34767       ALSA_FOUND=yes
34768       else ALSA_FOUND=no
34769 
34770     fi
34771     else ALSA_FOUND=no
34772 
34773   fi
34774 
34775     fi
34776     if test "x$ALSA_FOUND" = xno; then
34777 
34778 pkg_failed=no
34779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34780 $as_echo_n "checking for ALSA... " >&6; }
34781 
34782 if test -n "$ALSA_CFLAGS"; then
34783     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34784  elif test -n "$PKG_CONFIG"; then
34785     if test -n "$PKG_CONFIG" && \
34786     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34787   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34788   ac_status=$?
34789   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34790   test $ac_status = 0; }; then
34791   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34792 else
34793   pkg_failed=yes
34794 fi
34795  else
34796     pkg_failed=untried
34797 fi
34798 if test -n "$ALSA_LIBS"; then
34799     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34800  elif test -n "$PKG_CONFIG"; then
34801     if test -n "$PKG_CONFIG" && \
34802     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34803   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34804   ac_status=$?
34805   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34806   test $ac_status = 0; }; then
34807   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34808 else
34809   pkg_failed=yes
34810 fi
34811  else
34812     pkg_failed=untried
34813 fi
34814 
34815 
34816 
34817 if test $pkg_failed = yes; then
34818 
34819 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34820         _pkg_short_errors_supported=yes
34821 else
34822         _pkg_short_errors_supported=no
34823 fi
34824         if test $_pkg_short_errors_supported = yes; then
34825                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34826         else
34827                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34828         fi
34829         # Put the nasty error message in config.log where it belongs
34830         echo "$ALSA_PKG_ERRORS" >&5
34831 
34832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34833 $as_echo "no" >&6; }
34834                 ALSA_FOUND=no
34835 elif test $pkg_failed = untried; then
34836         ALSA_FOUND=no
34837 else
34838         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34839         ALSA_LIBS=$pkg_cv_ALSA_LIBS
34840         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34841 $as_echo "yes" >&6; }
34842         ALSA_FOUND=yes
34843 fi
34844     fi
34845     if test "x$ALSA_FOUND" = xno; then
34846       for ac_header in alsa/asoundlib.h
34847 do :
34848   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34849 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34850   cat >>confdefs.h <<_ACEOF
34851 #define HAVE_ALSA_ASOUNDLIB_H 1
34852 _ACEOF
34853 
34854             ALSA_FOUND=yes
34855             ALSA_CFLAGS=-Iignoreme
34856             ALSA_LIBS=-lasound
34857             DEFAULT_ALSA=yes
34858 
34859 else
34860   ALSA_FOUND=no
34861 fi
34862 
34863 done
34864 
34865     fi
34866     if test "x$ALSA_FOUND" = xno; then
34867 
34868   # Print a helpful message on how to acquire the necessary build dependency.
34869   # alsa is the help tag: freetype, cups, pulse, alsa etc
34870   MISSING_DEPENDENCY=alsa
34871 
34872   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34873     cygwin_help $MISSING_DEPENDENCY
34874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34875     msys_help $MISSING_DEPENDENCY
34876   else
34877     PKGHANDLER_COMMAND=
34878 
34879     case $PKGHANDLER in
34880       apt-get)
34881         apt_help     $MISSING_DEPENDENCY ;;
34882       yum)
34883         yum_help     $MISSING_DEPENDENCY ;;
34884       port)
34885         port_help    $MISSING_DEPENDENCY ;;
34886       pkgutil)
34887         pkgutil_help $MISSING_DEPENDENCY ;;
34888       pkgadd)
34889         pkgadd_help  $MISSING_DEPENDENCY ;;
34890     esac
34891 
34892     if test "x$PKGHANDLER_COMMAND" != x; then
34893       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34894     fi
34895   fi
34896 
34897       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34898     fi
34899   fi
34900 
34901 
34902 
34903 
34904 
34905 
34906   ###############################################################################
34907   #
34908   # Check for the jpeg library
34909   #
34910 
34911   USE_EXTERNAL_LIBJPEG=true
34912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34913 $as_echo_n "checking for main in -ljpeg... " >&6; }
34914 if ${ac_cv_lib_jpeg_main+:} false; then :
34915   $as_echo_n "(cached) " >&6
34916 else
34917   ac_check_lib_save_LIBS=$LIBS
34918 LIBS="-ljpeg  $LIBS"
34919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34920 /* end confdefs.h.  */
34921 
34922 
34923 int
34924 main ()
34925 {
34926 return main ();
34927   ;
34928   return 0;
34929 }
34930 _ACEOF
34931 if ac_fn_cxx_try_link "$LINENO"; then :
34932   ac_cv_lib_jpeg_main=yes
34933 else
34934   ac_cv_lib_jpeg_main=no
34935 fi
34936 rm -f core conftest.err conftest.$ac_objext \
34937     conftest$ac_exeext conftest.$ac_ext
34938 LIBS=$ac_check_lib_save_LIBS
34939 fi
34940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34941 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
34942 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34943   cat >>confdefs.h <<_ACEOF
34944 #define HAVE_LIBJPEG 1
34945 _ACEOF
34946 
34947   LIBS="-ljpeg $LIBS"
34948 
34949 else
34950    USE_EXTERNAL_LIBJPEG=false
34951       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34952 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34953 
34954 fi
34955 
34956 
34957 
34958   ###############################################################################
34959   #
34960   # Check for the gif library
34961   #
34962 
34963 
34964 # Check whether --with-giflib was given.
34965 if test "${with_giflib+set}" = set; then :
34966   withval=$with_giflib;
34967 fi
34968 
34969 
34970 
34971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34972 $as_echo_n "checking for which giflib to use... " >&6; }
34973 
34974   # default is bundled
34975   DEFAULT_GIFLIB=bundled
34976 
34977   #
34978   # if user didn't specify, use DEFAULT_GIFLIB
34979   #
34980   if test "x${with_giflib}" = "x"; then
34981     with_giflib=${DEFAULT_GIFLIB}
34982   fi
34983 
34984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34985 $as_echo "${with_giflib}" >&6; }
34986 
34987   if test "x${with_giflib}" = "xbundled"; then
34988     USE_EXTERNAL_LIBGIF=false
34989   elif test "x${with_giflib}" = "xsystem"; then
34990     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
34991 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
34992 
34993 else
34994    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
34995 fi
34996 
34997 
34998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
34999 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
35000 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
35001   $as_echo_n "(cached) " >&6
35002 else
35003   ac_check_lib_save_LIBS=$LIBS
35004 LIBS="-lgif  $LIBS"
35005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35006 /* end confdefs.h.  */
35007 
35008 /* Override any GCC internal prototype to avoid an error.
35009    Use char because int might match the return type of a GCC
35010    builtin and then its argument prototype would still apply.  */
35011 #ifdef __cplusplus
35012 extern "C"
35013 #endif
35014 char DGifGetCode ();
35015 int
35016 main ()
35017 {
35018 return DGifGetCode ();
35019   ;
35020   return 0;
35021 }
35022 _ACEOF
35023 if ac_fn_cxx_try_link "$LINENO"; then :
35024   ac_cv_lib_gif_DGifGetCode=yes
35025 else
35026   ac_cv_lib_gif_DGifGetCode=no
35027 fi
35028 rm -f core conftest.err conftest.$ac_objext \
35029     conftest$ac_exeext conftest.$ac_ext
35030 LIBS=$ac_check_lib_save_LIBS
35031 fi
35032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
35033 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
35034 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
35035   cat >>confdefs.h <<_ACEOF
35036 #define HAVE_LIBGIF 1
35037 _ACEOF
35038 
35039   LIBS="-lgif $LIBS"
35040 
35041 else
35042    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
35043 fi
35044 
35045 
35046     USE_EXTERNAL_LIBGIF=true
35047   else
35048     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
35049   fi
35050 
35051 
35052   ###############################################################################
35053   #
35054   # Check for the zlib library
35055   #
35056 
35057 
35058 # Check whether --with-zlib was given.
35059 if test "${with_zlib+set}" = set; then :
35060   withval=$with_zlib;
35061 fi
35062 
35063 
35064   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35065 $as_echo_n "checking for compress in -lz... " >&6; }
35066 if ${ac_cv_lib_z_compress+:} false; then :
35067   $as_echo_n "(cached) " >&6
35068 else
35069   ac_check_lib_save_LIBS=$LIBS
35070 LIBS="-lz  $LIBS"
35071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35072 /* end confdefs.h.  */
35073 
35074 /* Override any GCC internal prototype to avoid an error.
35075    Use char because int might match the return type of a GCC
35076    builtin and then its argument prototype would still apply.  */
35077 #ifdef __cplusplus
35078 extern "C"
35079 #endif
35080 char compress ();
35081 int
35082 main ()
35083 {
35084 return compress ();
35085   ;
35086   return 0;
35087 }
35088 _ACEOF
35089 if ac_fn_cxx_try_link "$LINENO"; then :
35090   ac_cv_lib_z_compress=yes
35091 else
35092   ac_cv_lib_z_compress=no
35093 fi
35094 rm -f core conftest.err conftest.$ac_objext \
35095     conftest$ac_exeext conftest.$ac_ext
35096 LIBS=$ac_check_lib_save_LIBS
35097 fi
35098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35099 $as_echo "$ac_cv_lib_z_compress" >&6; }
35100 if test "x$ac_cv_lib_z_compress" = xyes; then :
35101    ZLIB_FOUND=yes
35102 else
35103    ZLIB_FOUND=no
35104 fi
35105 
35106 
35107   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35108 $as_echo_n "checking for which zlib to use... " >&6; }
35109 
35110   DEFAULT_ZLIB=bundled
35111   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35112     #
35113     # On macosx default is system...on others default is
35114     #
35115     DEFAULT_ZLIB=system
35116   fi
35117 
35118   if test "x${ZLIB_FOUND}" != "xyes"; then
35119     #
35120     # If we don't find any system...set default to bundled
35121     #
35122     DEFAULT_ZLIB=bundled
35123   fi
35124 
35125   #
35126   # If user didn't specify, use DEFAULT_ZLIB
35127   #
35128   if test "x${with_zlib}" = "x"; then
35129     with_zlib=${DEFAULT_ZLIB}
35130   fi
35131 
35132   if test "x${with_zlib}" = "xbundled"; then
35133     USE_EXTERNAL_LIBZ=false
35134     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35135 $as_echo "bundled" >&6; }
35136   elif test "x${with_zlib}" = "xsystem"; then
35137     if test "x${ZLIB_FOUND}" = "xyes"; then
35138       USE_EXTERNAL_LIBZ=true
35139       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35140 $as_echo "system" >&6; }
35141     else
35142       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35143 $as_echo "system not found" >&6; }
35144       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35145     fi
35146   else
35147     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35148   fi
35149 
35150 
35151 
35152   ###############################################################################
35153   LIBZIP_CAN_USE_MMAP=true
35154 
35155 
35156 
35157   ###############################################################################
35158   #
35159   # Check if altzone exists in time.h
35160   #
35161 
35162   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35163 /* end confdefs.h.  */
35164 #include <time.h>
35165 int
35166 main ()
35167 {
35168 return (int)altzone;
35169   ;
35170   return 0;
35171 }
35172 _ACEOF
35173 if ac_fn_cxx_try_link "$LINENO"; then :
35174   has_altzone=yes
35175 else
35176   has_altzone=no
35177 fi
35178 rm -f core conftest.err conftest.$ac_objext \
35179     conftest$ac_exeext conftest.$ac_ext
35180   if test "x$has_altzone" = xyes; then
35181 
35182 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35183 
35184   fi
35185 
35186   ###############################################################################
35187   #
35188   # Check the maths library
35189   #
35190 
35191   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35192 $as_echo_n "checking for cos in -lm... " >&6; }
35193 if ${ac_cv_lib_m_cos+:} false; then :
35194   $as_echo_n "(cached) " >&6
35195 else
35196   ac_check_lib_save_LIBS=$LIBS
35197 LIBS="-lm  $LIBS"
35198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35199 /* end confdefs.h.  */
35200 
35201 /* Override any GCC internal prototype to avoid an error.
35202    Use char because int might match the return type of a GCC
35203    builtin and then its argument prototype would still apply.  */
35204 #ifdef __cplusplus
35205 extern "C"
35206 #endif
35207 char cos ();
35208 int
35209 main ()
35210 {
35211 return cos ();
35212   ;
35213   return 0;
35214 }
35215 _ACEOF
35216 if ac_fn_cxx_try_link "$LINENO"; then :
35217   ac_cv_lib_m_cos=yes
35218 else
35219   ac_cv_lib_m_cos=no
35220 fi
35221 rm -f core conftest.err conftest.$ac_objext \
35222     conftest$ac_exeext conftest.$ac_ext
35223 LIBS=$ac_check_lib_save_LIBS
35224 fi
35225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35226 $as_echo "$ac_cv_lib_m_cos" >&6; }
35227 if test "x$ac_cv_lib_m_cos" = xyes; then :
35228   cat >>confdefs.h <<_ACEOF
35229 #define HAVE_LIBM 1
35230 _ACEOF
35231 
35232   LIBS="-lm $LIBS"
35233 
35234 else
35235 
35236         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35237 $as_echo "$as_me: Maths library was not found" >&6;}
35238 
35239 
35240 fi
35241 
35242 
35243 
35244   ###############################################################################
35245   #
35246   # Check for libdl.so
35247 
35248   save_LIBS="$LIBS"
35249   LIBS=""
35250   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35251 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35252 if ${ac_cv_lib_dl_dlopen+:} false; then :
35253   $as_echo_n "(cached) " >&6
35254 else
35255   ac_check_lib_save_LIBS=$LIBS
35256 LIBS="-ldl  $LIBS"
35257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35258 /* end confdefs.h.  */
35259 
35260 /* Override any GCC internal prototype to avoid an error.
35261    Use char because int might match the return type of a GCC
35262    builtin and then its argument prototype would still apply.  */
35263 #ifdef __cplusplus
35264 extern "C"
35265 #endif
35266 char dlopen ();
35267 int
35268 main ()
35269 {
35270 return dlopen ();
35271   ;
35272   return 0;
35273 }
35274 _ACEOF
35275 if ac_fn_cxx_try_link "$LINENO"; then :
35276   ac_cv_lib_dl_dlopen=yes
35277 else
35278   ac_cv_lib_dl_dlopen=no
35279 fi
35280 rm -f core conftest.err conftest.$ac_objext \
35281     conftest$ac_exeext conftest.$ac_ext
35282 LIBS=$ac_check_lib_save_LIBS
35283 fi
35284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35285 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35286 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35287   cat >>confdefs.h <<_ACEOF
35288 #define HAVE_LIBDL 1
35289 _ACEOF
35290 
35291   LIBS="-ldl $LIBS"
35292 
35293 fi
35294 
35295   LIBDL="$LIBS"
35296 
35297   LIBS="$save_LIBS"
35298 
35299 
35300   ###############################################################################
35301   #
35302   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35303   # dynamic build is configured on command line.
35304   #
35305 
35306 # Check whether --with-stdc++lib was given.
35307 if test "${with_stdc__lib+set}" = set; then :
35308   withval=$with_stdc__lib;
35309         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35310                 && test "x$with_stdc__lib" != xdefault; then
35311           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35312         fi
35313 
35314 else
35315   with_stdc__lib=default
35316 
35317 fi
35318 
35319 
35320   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35321     # Test if -lstdc++ works.
35322     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35323 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35324     ac_ext=cpp
35325 ac_cpp='$CXXCPP $CPPFLAGS'
35326 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35327 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35328 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35329 
35330     OLD_CXXFLAGS="$CXXFLAGS"
35331     CXXFLAGS="$CXXFLAGS -lstdc++"
35332     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35333 /* end confdefs.h.  */
35334 
35335 int
35336 main ()
35337 {
35338 return 0;
35339   ;
35340   return 0;
35341 }
35342 _ACEOF
35343 if ac_fn_cxx_try_link "$LINENO"; then :
35344   has_dynamic_libstdcxx=yes
35345 else
35346   has_dynamic_libstdcxx=no
35347 fi
35348 rm -f core conftest.err conftest.$ac_objext \
35349     conftest$ac_exeext conftest.$ac_ext
35350     CXXFLAGS="$OLD_CXXFLAGS"
35351     ac_ext=cpp
35352 ac_cpp='$CXXCPP $CPPFLAGS'
35353 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35354 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35355 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35356 
35357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35358 $as_echo "$has_dynamic_libstdcxx" >&6; }
35359 
35360     # Test if stdc++ can be linked statically.
35361     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35362 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35363     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35364     ac_ext=cpp
35365 ac_cpp='$CXXCPP $CPPFLAGS'
35366 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35367 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35368 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35369 
35370     OLD_LIBS="$LIBS"
35371     OLD_CXX="$CXX"
35372     LIBS="$STATIC_STDCXX_FLAGS"
35373     CXX="$CC"
35374     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35375 /* end confdefs.h.  */
35376 
35377 int
35378 main ()
35379 {
35380 return 0;
35381   ;
35382   return 0;
35383 }
35384 _ACEOF
35385 if ac_fn_cxx_try_link "$LINENO"; then :
35386   has_static_libstdcxx=yes
35387 else
35388   has_static_libstdcxx=no
35389 fi
35390 rm -f core conftest.err conftest.$ac_objext \
35391     conftest$ac_exeext conftest.$ac_ext
35392     LIBS="$OLD_LIBS"
35393     CXX="$OLD_CXX"
35394     ac_ext=cpp
35395 ac_cpp='$CXXCPP $CPPFLAGS'
35396 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35397 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35398 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35399 
35400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35401 $as_echo "$has_static_libstdcxx" >&6; }
35402 
35403     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35404       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35405     fi
35406 
35407     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35408       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35409     fi
35410 
35411     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35412       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35413     fi
35414 
35415     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35416 $as_echo_n "checking how to link with libstdc++... " >&6; }
35417     # If dynamic was requested, it's available since it would fail above otherwise.
35418     # If dynamic wasn't requested, go with static unless it isn't available.
35419     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35420       LIBCXX="$LIBCXX -lstdc++"
35421       LDCXX="$CXX"
35422       STATIC_CXX_SETTING="STATIC_CXX=false"
35423       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35424 $as_echo "dynamic" >&6; }
35425     else
35426       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35427       LDCXX="$CC"
35428       STATIC_CXX_SETTING="STATIC_CXX=true"
35429       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35430 $as_echo "static" >&6; }
35431     fi
35432   fi
35433 
35434 
35435   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35436     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35437 
35438 pkg_failed=no
35439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35440 $as_echo_n "checking for LIBFFI... " >&6; }
35441 
35442 if test -n "$LIBFFI_CFLAGS"; then
35443     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35444  elif test -n "$PKG_CONFIG"; then
35445     if test -n "$PKG_CONFIG" && \
35446     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35447   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35448   ac_status=$?
35449   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35450   test $ac_status = 0; }; then
35451   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35452 else
35453   pkg_failed=yes
35454 fi
35455  else
35456     pkg_failed=untried
35457 fi
35458 if test -n "$LIBFFI_LIBS"; then
35459     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35460  elif test -n "$PKG_CONFIG"; then
35461     if test -n "$PKG_CONFIG" && \
35462     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35463   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35464   ac_status=$?
35465   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35466   test $ac_status = 0; }; then
35467   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35468 else
35469   pkg_failed=yes
35470 fi
35471  else
35472     pkg_failed=untried
35473 fi
35474 
35475 
35476 
35477 if test $pkg_failed = yes; then
35478 
35479 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35480         _pkg_short_errors_supported=yes
35481 else
35482         _pkg_short_errors_supported=no
35483 fi
35484         if test $_pkg_short_errors_supported = yes; then
35485                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35486         else
35487                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35488         fi
35489         # Put the nasty error message in config.log where it belongs
35490         echo "$LIBFFI_PKG_ERRORS" >&5
35491 
35492         as_fn_error $? "Package requirements (libffi) were not met:
35493 
35494 $LIBFFI_PKG_ERRORS
35495 
35496 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35497 installed software in a non-standard prefix.
35498 
35499 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35500 and LIBFFI_LIBS to avoid the need to call pkg-config.
35501 See the pkg-config man page for more details.
35502 " "$LINENO" 5
35503 elif test $pkg_failed = untried; then
35504         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35505 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35506 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35507 is in your PATH or set the PKG_CONFIG environment variable to the full
35508 path to pkg-config.
35509 
35510 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35511 and LIBFFI_LIBS to avoid the need to call pkg-config.
35512 See the pkg-config man page for more details.
35513 
35514 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35515 See \`config.log' for more details" "$LINENO" 5; }
35516 else
35517         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35518         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35519         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35520 $as_echo "yes" >&6; }
35521         :
35522 fi
35523 
35524   fi
35525 
35526   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35527     # Extract the first word of "llvm-config", so it can be a program name with args.
35528 set dummy llvm-config; ac_word=$2
35529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35530 $as_echo_n "checking for $ac_word... " >&6; }
35531 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35532   $as_echo_n "(cached) " >&6
35533 else
35534   if test -n "$LLVM_CONFIG"; then
35535   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35536 else
35537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35538 for as_dir in $PATH
35539 do
35540   IFS=$as_save_IFS
35541   test -z "$as_dir" && as_dir=.
35542     for ac_exec_ext in '' $ac_executable_extensions; do
35543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35544     ac_cv_prog_LLVM_CONFIG="llvm-config"
35545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35546     break 2
35547   fi
35548 done
35549   done
35550 IFS=$as_save_IFS
35551 
35552 fi
35553 fi
35554 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35555 if test -n "$LLVM_CONFIG"; then
35556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35557 $as_echo "$LLVM_CONFIG" >&6; }
35558 else
35559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35560 $as_echo "no" >&6; }
35561 fi
35562 
35563 
35564 
35565     if test "x$LLVM_CONFIG" != xllvm-config; then
35566       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35567     fi
35568 
35569     llvm_components="jit mcjit engine nativecodegen native"
35570     unset LLVM_CFLAGS
35571     for flag in $("$LLVM_CONFIG" --cxxflags); do
35572       if echo "${flag}" | grep -q '^-[ID]'; then
35573         if test "${flag}" != "-D_DEBUG" ; then
35574           if test "${LLVM_CFLAGS}" != "" ; then
35575             LLVM_CFLAGS="${LLVM_CFLAGS} "
35576           fi
35577           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35578         fi
35579       fi
35580     done
35581     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35582     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35583 
35584     unset LLVM_LDFLAGS
35585     for flag in $("${LLVM_CONFIG}" --ldflags); do
35586       if echo "${flag}" | grep -q '^-L'; then
35587         if test "${LLVM_LDFLAGS}" != ""; then
35588           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35589         fi
35590         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35591       fi
35592     done
35593 
35594     unset LLVM_LIBS
35595     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35596       if echo "${flag}" | grep -q '^-l'; then
35597         if test "${LLVM_LIBS}" != ""; then
35598           LLVM_LIBS="${LLVM_LIBS} "
35599         fi
35600         LLVM_LIBS="${LLVM_LIBS}${flag}"
35601       fi
35602     done
35603 
35604 
35605 
35606 
35607   fi
35608 
35609   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35610   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35611     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35612   fi
35613 
35614   # TODO better (platform agnostic) test
35615   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35616     LIBCXX="-lstdc++"
35617   fi
35618 
35619 
35620 
35621 
35622 
35623 ###############################################################################
35624 #
35625 # We need to do some final tweaking, when everything else is done.
35626 #
35627 ###############################################################################
35628 
35629 
35630   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35631 
35632 
35633   # The name of the Service Agent jar.
35634   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35635   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35636     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35637   fi
35638 
35639 
35640 
35641     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35642 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35643 
35644     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35645       ENABLE_INTREE_EC=yes
35646       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35647 $as_echo "yes" >&6; }
35648     else
35649       ENABLE_INTREE_EC=no
35650       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35651 $as_echo "no" >&6; }
35652     fi
35653 
35654 
35655 
35656 
35657 ###############################################################################
35658 #
35659 # Configure parts of the build that only affect the build performance,
35660 # not the result.
35661 #
35662 ###############################################################################
35663 
35664 
35665   # How many cores do we have on this build system?
35666 
35667 # Check whether --with-num-cores was given.
35668 if test "${with_num_cores+set}" = set; then :
35669   withval=$with_num_cores;
35670 fi
35671 
35672   if test "x$with_num_cores" = x; then
35673     # The number of cores were not specified, try to probe them.
35674 
35675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35676 $as_echo_n "checking for number of cores... " >&6; }
35677   NUM_CORES=1
35678   FOUND_CORES=no
35679 
35680   if test -f /proc/cpuinfo; then
35681     # Looks like a Linux (or cygwin) system
35682     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35683     FOUND_CORES=yes
35684   elif test -x /usr/sbin/psrinfo; then
35685     # Looks like a Solaris system
35686     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35687     FOUND_CORES=yes
35688   elif test -x /usr/sbin/system_profiler; then
35689     # Looks like a MacOSX system
35690     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35691     FOUND_CORES=yes
35692   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35693     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35694     FOUND_CORES=yes
35695   elif test -n "$NUMBER_OF_PROCESSORS"; then
35696     # On windows, look in the env
35697     NUM_CORES=$NUMBER_OF_PROCESSORS
35698     FOUND_CORES=yes
35699   fi
35700 
35701   if test "x$FOUND_CORES" = xyes; then
35702     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35703 $as_echo "$NUM_CORES" >&6; }
35704   else
35705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35706 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
35707     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35708 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35709   fi
35710 
35711   else
35712     NUM_CORES=$with_num_cores
35713   fi
35714 
35715 
35716 
35717   # How much memory do we have on this build system?
35718 
35719 # Check whether --with-memory-size was given.
35720 if test "${with_memory_size+set}" = set; then :
35721   withval=$with_memory_size;
35722 fi
35723 
35724   if test "x$with_memory_size" = x; then
35725     # The memory size was not specified, try to probe it.
35726 
35727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35728 $as_echo_n "checking for memory size... " >&6; }
35729   # Default to 1024 MB
35730   MEMORY_SIZE=1024
35731   FOUND_MEM=no
35732 
35733   if test -f /proc/meminfo; then
35734     # Looks like a Linux (or cygwin) system
35735     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35736     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35737     FOUND_MEM=yes
35738   elif test -x /usr/sbin/prtconf; then
35739     # Looks like a Solaris or AIX system
35740     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35741     FOUND_MEM=yes
35742   elif test -x /usr/sbin/system_profiler; then
35743     # Looks like a MacOSX system
35744     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35745     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35746     FOUND_MEM=yes
35747   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35748     # Windows, but without cygwin
35749     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35750     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35751     FOUND_MEM=yes
35752   fi
35753 
35754   if test "x$FOUND_MEM" = xyes; then
35755     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35756 $as_echo "$MEMORY_SIZE MB" >&6; }
35757   else
35758     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35759 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35760     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35761 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35762   fi
35763 
35764   else
35765     MEMORY_SIZE=$with_memory_size
35766   fi
35767 
35768 
35769 
35770   # Provide a decent default number of parallel jobs for make depending on
35771   # number of cores, amount of memory and machine architecture.
35772 
35773 # Check whether --with-jobs was given.
35774 if test "${with_jobs+set}" = set; then :
35775   withval=$with_jobs;
35776 fi
35777 
35778   if test "x$with_jobs" = x; then
35779     # Number of jobs was not specified, calculate.
35780     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35781 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35782     # Approximate memory in GB, rounding up a bit.
35783     memory_gb=`expr $MEMORY_SIZE / 1100`
35784     # Pick the lowest of memory in gb and number of cores.
35785     if test "$memory_gb" -lt "$NUM_CORES"; then
35786       JOBS="$memory_gb"
35787     else
35788       JOBS="$NUM_CORES"
35789       # On bigger machines, leave some room for other processes to run
35790       if test "$JOBS" -gt "4"; then
35791         JOBS=`expr $JOBS '*' 90 / 100`
35792       fi
35793     fi
35794     # Cap number of jobs to 16
35795     if test "$JOBS" -gt "16"; then
35796       JOBS=16
35797     fi
35798     if test "$JOBS" -eq "0"; then
35799       JOBS=1
35800     fi
35801     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35802 $as_echo "$JOBS" >&6; }
35803   else
35804     JOBS=$with_jobs
35805   fi
35806 
35807 
35808 
35809 # Setup smart javac (after cores and memory have been setup)
35810 
35811 
35812 # Check whether --with-sjavac-server-java was given.
35813 if test "${with_sjavac_server_java+set}" = set; then :
35814   withval=$with_sjavac_server_java;
35815 fi
35816 
35817 
35818   if test "x$with_sjavac_server_java" != x; then
35819     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35820     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35821     if test "x$FOUND_VERSION" = x; then
35822       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35823     fi
35824   else
35825     SJAVAC_SERVER_JAVA=""
35826     # Hotspot specific options.
35827 
35828   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35829   $ECHO "Command: $JAVA -verbosegc -version" >&5
35830   OUTPUT=`$JAVA -verbosegc -version 2>&1`
35831   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35832   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35833   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35834     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35835     JVM_ARG_OK=true
35836   else
35837     $ECHO "Arg failed:" >&5
35838     $ECHO "$OUTPUT" >&5
35839     JVM_ARG_OK=false
35840   fi
35841 
35842     # JRockit specific options.
35843 
35844   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35845   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35846   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35847   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35848   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35849   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35850     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35851     JVM_ARG_OK=true
35852   else
35853     $ECHO "Arg failed:" >&5
35854     $ECHO "$OUTPUT" >&5
35855     JVM_ARG_OK=false
35856   fi
35857 
35858     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35859   fi
35860 
35861 
35862   if test "$MEMORY_SIZE" -gt "2500"; then
35863 
35864   $ECHO "Check if jvm arg is ok: -d64" >&5
35865   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35866   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35867   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35868   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35869   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35870     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35871     JVM_ARG_OK=true
35872   else
35873     $ECHO "Arg failed:" >&5
35874     $ECHO "$OUTPUT" >&5
35875     JVM_ARG_OK=false
35876   fi
35877 
35878     if test "$JVM_ARG_OK" = true; then
35879       JVM_64BIT=true
35880       JVM_ARG_OK=false
35881     fi
35882   fi
35883 
35884   if test "$JVM_64BIT" = true; then
35885     if test "$MEMORY_SIZE" -gt "17000"; then
35886 
35887   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35888   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35889   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35890   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35891   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35892   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35893     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35894     JVM_ARG_OK=true
35895   else
35896     $ECHO "Arg failed:" >&5
35897     $ECHO "$OUTPUT" >&5
35898     JVM_ARG_OK=false
35899   fi
35900 
35901     fi
35902     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35903 
35904   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35905   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35906   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35907   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35908   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35909   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35910     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35911     JVM_ARG_OK=true
35912   else
35913     $ECHO "Arg failed:" >&5
35914     $ECHO "$OUTPUT" >&5
35915     JVM_ARG_OK=false
35916   fi
35917 
35918     fi
35919     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35920 
35921   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35922   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35923   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35924   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35925   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35926   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35927     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35928     JVM_ARG_OK=true
35929   else
35930     $ECHO "Arg failed:" >&5
35931     $ECHO "$OUTPUT" >&5
35932     JVM_ARG_OK=false
35933   fi
35934 
35935     fi
35936     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35937 
35938   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35939   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35940   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35941   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35942   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35943   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35944     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35945     JVM_ARG_OK=true
35946   else
35947     $ECHO "Arg failed:" >&5
35948     $ECHO "$OUTPUT" >&5
35949     JVM_ARG_OK=false
35950   fi
35951 
35952     fi
35953   fi
35954   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35955 
35956   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35957   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35958   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35959   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35960   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35961   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35962     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35963     JVM_ARG_OK=true
35964   else
35965     $ECHO "Arg failed:" >&5
35966     $ECHO "$OUTPUT" >&5
35967     JVM_ARG_OK=false
35968   fi
35969 
35970   fi
35971   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35972 
35973   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35974   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35975   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35976   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35977   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35978   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35979     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35980     JVM_ARG_OK=true
35981   else
35982     $ECHO "Arg failed:" >&5
35983     $ECHO "$OUTPUT" >&5
35984     JVM_ARG_OK=false
35985   fi
35986 
35987   fi
35988   if test "$JVM_ARG_OK" = false; then
35989 
35990   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
35991   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
35992   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
35993   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35994   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35995   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35996     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
35997     JVM_ARG_OK=true
35998   else
35999     $ECHO "Arg failed:" >&5
36000     $ECHO "$OUTPUT" >&5
36001     JVM_ARG_OK=false
36002   fi
36003 
36004   fi
36005 
36006   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
36007 $as_echo_n "checking whether to use sjavac... " >&6; }
36008   # Check whether --enable-sjavac was given.
36009 if test "${enable_sjavac+set}" = set; then :
36010   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
36011 else
36012   ENABLE_SJAVAC='no'
36013 fi
36014 
36015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
36016 $as_echo "$ENABLE_SJAVAC" >&6; }
36017 
36018 
36019   if test "x$ENABLE_SJAVAC" = xyes; then
36020     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
36021   else
36022     SJAVAC_SERVER_DIR=
36023   fi
36024 
36025 
36026 
36027 # Can the C/C++ compiler use precompiled headers?
36028 
36029 
36030   ###############################################################################
36031   #
36032   # Can the C/C++ compiler use precompiled headers?
36033   #
36034   # Check whether --enable-precompiled-headers was given.
36035 if test "${enable_precompiled_headers+set}" = set; then :
36036   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
36037 else
36038   ENABLE_PRECOMPH=yes
36039 fi
36040 
36041 
36042   USE_PRECOMPILED_HEADER=1
36043   if test "x$ENABLE_PRECOMPH" = xno; then
36044     USE_PRECOMPILED_HEADER=0
36045   fi
36046 
36047   if test "x$ENABLE_PRECOMPH" = xyes; then
36048     # Check that the compiler actually supports precomp headers.
36049     if test "x$GCC" = xyes; then
36050       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
36051 $as_echo_n "checking that precompiled headers work... " >&6; }
36052       echo "int alfa();" > conftest.h
36053       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
36054       if test ! -f conftest.hpp.gch; then
36055         USE_PRECOMPILED_HEADER=0
36056         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36057 $as_echo "no" >&6; }
36058       else
36059         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36060 $as_echo "yes" >&6; }
36061       fi
36062       rm -f conftest.h conftest.hpp.gch
36063     fi
36064   fi
36065 
36066 
36067 
36068 
36069 # Setup use of ccache, if available
36070 
36071   # Check whether --enable-ccache was given.
36072 if test "${enable_ccache+set}" = set; then :
36073   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
36074 else
36075   ENABLE_CCACHE=yes
36076 fi
36077 
36078   if test "x$ENABLE_CCACHE" = xyes; then
36079     OLD_PATH="$PATH"
36080     if test "x$TOOLS_DIR" != x; then
36081       PATH=$TOOLS_DIR:$PATH
36082     fi
36083     # Extract the first word of "ccache", so it can be a program name with args.
36084 set dummy ccache; ac_word=$2
36085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36086 $as_echo_n "checking for $ac_word... " >&6; }
36087 if ${ac_cv_path_CCACHE+:} false; then :
36088   $as_echo_n "(cached) " >&6
36089 else
36090   case $CCACHE in
36091   [\\/]* | ?:[\\/]*)
36092   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36093   ;;
36094   *)
36095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36096 for as_dir in $PATH
36097 do
36098   IFS=$as_save_IFS
36099   test -z "$as_dir" && as_dir=.
36100     for ac_exec_ext in '' $ac_executable_extensions; do
36101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36102     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36104     break 2
36105   fi
36106 done
36107   done
36108 IFS=$as_save_IFS
36109 
36110   ;;
36111 esac
36112 fi
36113 CCACHE=$ac_cv_path_CCACHE
36114 if test -n "$CCACHE"; then
36115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36116 $as_echo "$CCACHE" >&6; }
36117 else
36118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36119 $as_echo "no" >&6; }
36120 fi
36121 
36122 
36123     PATH="$OLD_PATH"
36124   else
36125     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36126 $as_echo_n "checking for ccache... " >&6; }
36127     { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36128 $as_echo "explicitly disabled" >&6; }
36129     CCACHE=
36130   fi
36131 
36132 
36133 
36134 # Check whether --with-ccache-dir was given.
36135 if test "${with_ccache_dir+set}" = set; then :
36136   withval=$with_ccache_dir;
36137 fi
36138 
36139 
36140   if test "x$with_ccache_dir" != x; then
36141     # When using a non home ccache directory, assume the use is to share ccache files
36142     # with other users. Thus change the umask.
36143     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36144   fi
36145   CCACHE_FOUND=""
36146   if test "x$CCACHE" != x; then
36147 
36148   if test "x$CCACHE" != x; then
36149     CCACHE_FOUND="true"
36150     # Only use ccache if it is 3.1.4 or later, which supports
36151     # precompiled headers.
36152     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36153 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36154     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36155     if test "x$HAS_GOOD_CCACHE" = x; then
36156       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36157 $as_echo "no, disabling ccache" >&6; }
36158       CCACHE=
36159     else
36160       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36161 $as_echo "yes" >&6; }
36162       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36163 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36164       PUSHED_FLAGS="$CXXFLAGS"
36165       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36166       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36167 /* end confdefs.h.  */
36168 
36169 int
36170 main ()
36171 {
36172 
36173   ;
36174   return 0;
36175 }
36176 _ACEOF
36177 if ac_fn_cxx_try_compile "$LINENO"; then :
36178   CC_KNOWS_CCACHE_TRICK=yes
36179 else
36180   CC_KNOWS_CCACHE_TRICK=no
36181 fi
36182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36183       CXXFLAGS="$PUSHED_FLAGS"
36184       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36185         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36186 $as_echo "yes" >&6; }
36187       else
36188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36189 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36190         CCACHE=
36191       fi
36192     fi
36193   fi
36194 
36195   if test "x$CCACHE" != x; then
36196     CCACHE_SLOPPINESS=time_macros
36197     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36198     CCACHE_FLAGS=-fpch-preprocess
36199 
36200     if test "x$SET_CCACHE_DIR" != x; then
36201       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36202       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36203     fi
36204   fi
36205 
36206   fi
36207 
36208 
36209 ###############################################################################
36210 #
36211 # And now the finish...
36212 #
36213 ###############################################################################
36214 
36215 # Check for some common pitfalls
36216 
36217   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36218     file_to_test="$SRC_ROOT/LICENSE"
36219     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36220       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
36221     fi
36222   fi
36223 
36224 
36225   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36226 $as_echo_n "checking if build directory is on local disk... " >&6; }
36227 
36228   # df -l lists only local disks; if the given directory is not found then
36229   # a non-zero exit code is given
36230   if test "x$DF" = x; then
36231     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36232       # msys does not have df; use Windows "net use" instead.
36233       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36234       if test "x$IS_NETWORK_DISK" = x; then
36235         OUTPUT_DIR_IS_LOCAL="yes"
36236       else
36237         OUTPUT_DIR_IS_LOCAL="no"
36238       fi
36239     else
36240       # No df here, say it's local
36241       OUTPUT_DIR_IS_LOCAL="yes"
36242     fi
36243   else
36244     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36245       OUTPUT_DIR_IS_LOCAL="yes"
36246     else
36247       OUTPUT_DIR_IS_LOCAL="no"
36248     fi
36249   fi
36250 
36251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36252 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36253 
36254 
36255 
36256   # Check if the user has any old-style ALT_ variables set.
36257   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36258 
36259   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36260   # Since we can't properly handle the dependencies for this, warn the user about the situation
36261   if test -e $OUTPUT_ROOT/spec.gmk; then
36262     IS_RECONFIGURE=yes
36263   else
36264     IS_RECONFIGURE=no
36265   fi
36266 
36267   if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36268     HIDE_PERFORMANCE_HINTS=yes
36269   else
36270     HIDE_PERFORMANCE_HINTS=no
36271     # Hide it the next time around...
36272     $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36273   fi
36274 
36275 
36276 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36277 
36278 
36279 # We're messing a bit with internal autoconf variables to put the config.status
36280 # in the output directory instead of the current directory.
36281 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36282 
36283 # Create the actual output files. Now the main work of configure is done.
36284 cat >confcache <<\_ACEOF
36285 # This file is a shell script that caches the results of configure
36286 # tests run on this system so they can be shared between configure
36287 # scripts and configure runs, see configure's option --config-cache.
36288 # It is not useful on other systems.  If it contains results you don't
36289 # want to keep, you may remove or edit it.
36290 #
36291 # config.status only pays attention to the cache file if you give it
36292 # the --recheck option to rerun configure.
36293 #
36294 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36295 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36296 # following values.
36297 
36298 _ACEOF
36299 
36300 # The following way of writing the cache mishandles newlines in values,
36301 # but we know of no workaround that is simple, portable, and efficient.
36302 # So, we kill variables containing newlines.
36303 # Ultrix sh set writes to stderr and can't be redirected directly,
36304 # and sets the high bit in the cache file unless we assign to the vars.
36305 (
36306   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36307     eval ac_val=\$$ac_var
36308     case $ac_val in #(
36309     *${as_nl}*)
36310       case $ac_var in #(
36311       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36312 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36313       esac
36314       case $ac_var in #(
36315       _ | IFS | as_nl) ;; #(
36316       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36317       *) { eval $ac_var=; unset $ac_var;} ;;
36318       esac ;;
36319     esac
36320   done
36321 
36322   (set) 2>&1 |
36323     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36324     *${as_nl}ac_space=\ *)
36325       # `set' does not quote correctly, so add quotes: double-quote
36326       # substitution turns \\\\ into \\, and sed turns \\ into \.
36327       sed -n \
36328         "s/'/'\\\\''/g;
36329           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36330       ;; #(
36331     *)
36332       # `set' quotes correctly as required by POSIX, so do not add quotes.
36333       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36334       ;;
36335     esac |
36336     sort
36337 ) |
36338   sed '
36339      /^ac_cv_env_/b end
36340      t clear
36341      :clear
36342      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36343      t end
36344      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36345      :end' >>confcache
36346 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36347   if test -w "$cache_file"; then
36348     if test "x$cache_file" != "x/dev/null"; then
36349       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36350 $as_echo "$as_me: updating cache $cache_file" >&6;}
36351       if test ! -f "$cache_file" || test -h "$cache_file"; then
36352         cat confcache >"$cache_file"
36353       else
36354         case $cache_file in #(
36355         */* | ?:*)
36356           mv -f confcache "$cache_file"$$ &&
36357           mv -f "$cache_file"$$ "$cache_file" ;; #(
36358         *)
36359           mv -f confcache "$cache_file" ;;
36360         esac
36361       fi
36362     fi
36363   else
36364     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36365 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36366   fi
36367 fi
36368 rm -f confcache
36369 
36370 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36371 # Let make expand exec_prefix.
36372 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36373 
36374 DEFS=-DHAVE_CONFIG_H
36375 
36376 ac_libobjs=
36377 ac_ltlibobjs=
36378 U=
36379 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36380   # 1. Remove the extension, and $U if already installed.
36381   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36382   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36383   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36384   #    will be set to the directory where LIBOBJS objects are built.
36385   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36386   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36387 done
36388 LIBOBJS=$ac_libobjs
36389 
36390 LTLIBOBJS=$ac_ltlibobjs
36391 
36392 
36393 
36394 : "${CONFIG_STATUS=./config.status}"
36395 ac_write_fail=0
36396 ac_clean_files_save=$ac_clean_files
36397 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36398 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36399 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36400 as_write_fail=0
36401 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36402 #! $SHELL
36403 # Generated by $as_me.
36404 # Run this file to recreate the current configuration.
36405 # Compiler output produced by configure, useful for debugging
36406 # configure, is in config.log if it exists.
36407 
36408 debug=false
36409 ac_cs_recheck=false
36410 ac_cs_silent=false
36411 
36412 SHELL=\${CONFIG_SHELL-$SHELL}
36413 export SHELL
36414 _ASEOF
36415 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36416 ## -------------------- ##
36417 ## M4sh Initialization. ##
36418 ## -------------------- ##
36419 
36420 # Be more Bourne compatible
36421 DUALCASE=1; export DUALCASE # for MKS sh
36422 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36423   emulate sh
36424   NULLCMD=:
36425   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36426   # is contrary to our usage.  Disable this feature.
36427   alias -g '${1+"$@"}'='"$@"'
36428   setopt NO_GLOB_SUBST
36429 else
36430   case `(set -o) 2>/dev/null` in #(
36431   *posix*) :
36432     set -o posix ;; #(
36433   *) :
36434      ;;
36435 esac
36436 fi
36437 
36438 
36439 as_nl='
36440 '
36441 export as_nl
36442 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36443 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36444 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36445 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36446 # Prefer a ksh shell builtin over an external printf program on Solaris,
36447 # but without wasting forks for bash or zsh.
36448 if test -z "$BASH_VERSION$ZSH_VERSION" \
36449     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36450   as_echo='print -r --'
36451   as_echo_n='print -rn --'
36452 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36453   as_echo='printf %s\n'
36454   as_echo_n='printf %s'
36455 else
36456   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36457     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36458     as_echo_n='/usr/ucb/echo -n'
36459   else
36460     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36461     as_echo_n_body='eval
36462       arg=$1;
36463       case $arg in #(
36464       *"$as_nl"*)
36465         expr "X$arg" : "X\\(.*\\)$as_nl";
36466         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36467       esac;
36468       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36469     '
36470     export as_echo_n_body
36471     as_echo_n='sh -c $as_echo_n_body as_echo'
36472   fi
36473   export as_echo_body
36474   as_echo='sh -c $as_echo_body as_echo'
36475 fi
36476 
36477 # The user is always right.
36478 if test "${PATH_SEPARATOR+set}" != set; then
36479   PATH_SEPARATOR=:
36480   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36481     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36482       PATH_SEPARATOR=';'
36483   }
36484 fi
36485 
36486 
36487 # IFS
36488 # We need space, tab and new line, in precisely that order.  Quoting is
36489 # there to prevent editors from complaining about space-tab.
36490 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36491 # splitting by setting IFS to empty value.)
36492 IFS=" ""        $as_nl"
36493 
36494 # Find who we are.  Look in the path if we contain no directory separator.
36495 as_myself=
36496 case $0 in #((
36497   *[\\/]* ) as_myself=$0 ;;
36498   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36499 for as_dir in $PATH
36500 do
36501   IFS=$as_save_IFS
36502   test -z "$as_dir" && as_dir=.
36503     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36504   done
36505 IFS=$as_save_IFS
36506 
36507      ;;
36508 esac
36509 # We did not find ourselves, most probably we were run as `sh COMMAND'
36510 # in which case we are not to be found in the path.
36511 if test "x$as_myself" = x; then
36512   as_myself=$0
36513 fi
36514 if test ! -f "$as_myself"; then
36515   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36516   exit 1
36517 fi
36518 
36519 # Unset variables that we do not need and which cause bugs (e.g. in
36520 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36521 # suppresses any "Segmentation fault" message there.  '((' could
36522 # trigger a bug in pdksh 5.2.14.
36523 for as_var in BASH_ENV ENV MAIL MAILPATH
36524 do eval test x\${$as_var+set} = xset \
36525   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36526 done
36527 PS1='$ '
36528 PS2='> '
36529 PS4='+ '
36530 
36531 # NLS nuisances.
36532 LC_ALL=C
36533 export LC_ALL
36534 LANGUAGE=C
36535 export LANGUAGE
36536 
36537 # CDPATH.
36538 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36539 
36540 
36541 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36542 # ----------------------------------------
36543 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36544 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36545 # script with STATUS, using 1 if that was 0.
36546 as_fn_error ()
36547 {
36548   as_status=$1; test $as_status -eq 0 && as_status=1
36549   if test "$4"; then
36550     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36551     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36552   fi
36553   $as_echo "$as_me: error: $2" >&2
36554   as_fn_exit $as_status
36555 } # as_fn_error
36556 
36557 
36558 # as_fn_set_status STATUS
36559 # -----------------------
36560 # Set $? to STATUS, without forking.
36561 as_fn_set_status ()
36562 {
36563   return $1
36564 } # as_fn_set_status
36565 
36566 # as_fn_exit STATUS
36567 # -----------------
36568 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36569 as_fn_exit ()
36570 {
36571   set +e
36572   as_fn_set_status $1
36573   exit $1
36574 } # as_fn_exit
36575 
36576 # as_fn_unset VAR
36577 # ---------------
36578 # Portably unset VAR.
36579 as_fn_unset ()
36580 {
36581   { eval $1=; unset $1;}
36582 }
36583 as_unset=as_fn_unset
36584 # as_fn_append VAR VALUE
36585 # ----------------------
36586 # Append the text in VALUE to the end of the definition contained in VAR. Take
36587 # advantage of any shell optimizations that allow amortized linear growth over
36588 # repeated appends, instead of the typical quadratic growth present in naive
36589 # implementations.
36590 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36591   eval 'as_fn_append ()
36592   {
36593     eval $1+=\$2
36594   }'
36595 else
36596   as_fn_append ()
36597   {
36598     eval $1=\$$1\$2
36599   }
36600 fi # as_fn_append
36601 
36602 # as_fn_arith ARG...
36603 # ------------------
36604 # Perform arithmetic evaluation on the ARGs, and store the result in the
36605 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36606 # must be portable across $(()) and expr.
36607 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36608   eval 'as_fn_arith ()
36609   {
36610     as_val=$(( $* ))
36611   }'
36612 else
36613   as_fn_arith ()
36614   {
36615     as_val=`expr "$@" || test $? -eq 1`
36616   }
36617 fi # as_fn_arith
36618 
36619 
36620 if expr a : '\(a\)' >/dev/null 2>&1 &&
36621    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36622   as_expr=expr
36623 else
36624   as_expr=false
36625 fi
36626 
36627 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36628   as_basename=basename
36629 else
36630   as_basename=false
36631 fi
36632 
36633 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36634   as_dirname=dirname
36635 else
36636   as_dirname=false
36637 fi
36638 
36639 as_me=`$as_basename -- "$0" ||
36640 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36641          X"$0" : 'X\(//\)$' \| \
36642          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36643 $as_echo X/"$0" |
36644     sed '/^.*\/\([^/][^/]*\)\/*$/{
36645             s//\1/
36646             q
36647           }
36648           /^X\/\(\/\/\)$/{
36649             s//\1/
36650             q
36651           }
36652           /^X\/\(\/\).*/{
36653             s//\1/
36654             q
36655           }
36656           s/.*/./; q'`
36657 
36658 # Avoid depending upon Character Ranges.
36659 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36660 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36661 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36662 as_cr_digits='0123456789'
36663 as_cr_alnum=$as_cr_Letters$as_cr_digits
36664 
36665 ECHO_C= ECHO_N= ECHO_T=
36666 case `echo -n x` in #(((((
36667 -n*)
36668   case `echo 'xy\c'` in
36669   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36670   xy)  ECHO_C='\c';;
36671   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36672        ECHO_T=' ';;
36673   esac;;
36674 *)
36675   ECHO_N='-n';;
36676 esac
36677 
36678 rm -f conf$$ conf$$.exe conf$$.file
36679 if test -d conf$$.dir; then
36680   rm -f conf$$.dir/conf$$.file
36681 else
36682   rm -f conf$$.dir
36683   mkdir conf$$.dir 2>/dev/null
36684 fi
36685 if (echo >conf$$.file) 2>/dev/null; then
36686   if ln -s conf$$.file conf$$ 2>/dev/null; then
36687     as_ln_s='ln -s'
36688     # ... but there are two gotchas:
36689     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36690     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36691     # In both cases, we have to default to `cp -pR'.
36692     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36693       as_ln_s='cp -pR'
36694   elif ln conf$$.file conf$$ 2>/dev/null; then
36695     as_ln_s=ln
36696   else
36697     as_ln_s='cp -pR'
36698   fi
36699 else
36700   as_ln_s='cp -pR'
36701 fi
36702 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36703 rmdir conf$$.dir 2>/dev/null
36704 
36705 
36706 # as_fn_mkdir_p
36707 # -------------
36708 # Create "$as_dir" as a directory, including parents if necessary.
36709 as_fn_mkdir_p ()
36710 {
36711 
36712   case $as_dir in #(
36713   -*) as_dir=./$as_dir;;
36714   esac
36715   test -d "$as_dir" || eval $as_mkdir_p || {
36716     as_dirs=
36717     while :; do
36718       case $as_dir in #(
36719       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36720       *) as_qdir=$as_dir;;
36721       esac
36722       as_dirs="'$as_qdir' $as_dirs"
36723       as_dir=`$as_dirname -- "$as_dir" ||
36724 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36725          X"$as_dir" : 'X\(//\)[^/]' \| \
36726          X"$as_dir" : 'X\(//\)$' \| \
36727          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36728 $as_echo X"$as_dir" |
36729     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36730             s//\1/
36731             q
36732           }
36733           /^X\(\/\/\)[^/].*/{
36734             s//\1/
36735             q
36736           }
36737           /^X\(\/\/\)$/{
36738             s//\1/
36739             q
36740           }
36741           /^X\(\/\).*/{
36742             s//\1/
36743             q
36744           }
36745           s/.*/./; q'`
36746       test -d "$as_dir" && break
36747     done
36748     test -z "$as_dirs" || eval "mkdir $as_dirs"
36749   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36750 
36751 
36752 } # as_fn_mkdir_p
36753 if mkdir -p . 2>/dev/null; then
36754   as_mkdir_p='mkdir -p "$as_dir"'
36755 else
36756   test -d ./-p && rmdir ./-p
36757   as_mkdir_p=false
36758 fi
36759 
36760 
36761 # as_fn_executable_p FILE
36762 # -----------------------
36763 # Test if FILE is an executable regular file.
36764 as_fn_executable_p ()
36765 {
36766   test -f "$1" && test -x "$1"
36767 } # as_fn_executable_p
36768 as_test_x='test -x'
36769 as_executable_p=as_fn_executable_p
36770 
36771 # Sed expression to map a string onto a valid CPP name.
36772 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36773 
36774 # Sed expression to map a string onto a valid variable name.
36775 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36776 
36777 
36778 exec 6>&1
36779 ## ----------------------------------- ##
36780 ## Main body of $CONFIG_STATUS script. ##
36781 ## ----------------------------------- ##
36782 _ASEOF
36783 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36784 
36785 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36786 # Save the log message, to keep $0 and so on meaningful, and to
36787 # report actual input values of CONFIG_FILES etc. instead of their
36788 # values after options handling.
36789 ac_log="
36790 This file was extended by OpenJDK $as_me jdk8, which was
36791 generated by GNU Autoconf 2.69.  Invocation command line was
36792 
36793   CONFIG_FILES    = $CONFIG_FILES
36794   CONFIG_HEADERS  = $CONFIG_HEADERS
36795   CONFIG_LINKS    = $CONFIG_LINKS
36796   CONFIG_COMMANDS = $CONFIG_COMMANDS
36797   $ $0 $@
36798 
36799 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36800 "
36801 
36802 _ACEOF
36803 
36804 case $ac_config_files in *"
36805 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36806 esac
36807 
36808 case $ac_config_headers in *"
36809 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36810 esac
36811 
36812 
36813 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36814 # Files that config.status was made for.
36815 config_files="$ac_config_files"
36816 config_headers="$ac_config_headers"
36817 
36818 _ACEOF
36819 
36820 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36821 ac_cs_usage="\
36822 \`$as_me' instantiates files and other configuration actions
36823 from templates according to the current configuration.  Unless the files
36824 and actions are specified as TAGs, all are instantiated by default.
36825 
36826 Usage: $0 [OPTION]... [TAG]...
36827 
36828   -h, --help       print this help, then exit
36829   -V, --version    print version number and configuration settings, then exit
36830       --config     print configuration, then exit
36831   -q, --quiet, --silent
36832                    do not print progress messages
36833   -d, --debug      don't remove temporary files
36834       --recheck    update $as_me by reconfiguring in the same conditions
36835       --file=FILE[:TEMPLATE]
36836                    instantiate the configuration file FILE
36837       --header=FILE[:TEMPLATE]
36838                    instantiate the configuration header FILE
36839 
36840 Configuration files:
36841 $config_files
36842 
36843 Configuration headers:
36844 $config_headers
36845 
36846 Report bugs to <build-dev@openjdk.java.net>.
36847 OpenJDK home page: <http://openjdk.java.net>."
36848 
36849 _ACEOF
36850 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36851 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36852 ac_cs_version="\\
36853 OpenJDK config.status jdk8
36854 configured by $0, generated by GNU Autoconf 2.69,
36855   with options \\"\$ac_cs_config\\"
36856 
36857 Copyright (C) 2012 Free Software Foundation, Inc.
36858 This config.status script is free software; the Free Software Foundation
36859 gives unlimited permission to copy, distribute and modify it."
36860 
36861 ac_pwd='$ac_pwd'
36862 srcdir='$srcdir'
36863 AWK='$AWK'
36864 test -n "\$AWK" || AWK=awk
36865 _ACEOF
36866 
36867 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36868 # The default lists apply if the user does not specify any file.
36869 ac_need_defaults=:
36870 while test $# != 0
36871 do
36872   case $1 in
36873   --*=?*)
36874     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36875     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36876     ac_shift=:
36877     ;;
36878   --*=)
36879     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36880     ac_optarg=
36881     ac_shift=:
36882     ;;
36883   *)
36884     ac_option=$1
36885     ac_optarg=$2
36886     ac_shift=shift
36887     ;;
36888   esac
36889 
36890   case $ac_option in
36891   # Handling of the options.
36892   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36893     ac_cs_recheck=: ;;
36894   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36895     $as_echo "$ac_cs_version"; exit ;;
36896   --config | --confi | --conf | --con | --co | --c )
36897     $as_echo "$ac_cs_config"; exit ;;
36898   --debug | --debu | --deb | --de | --d | -d )
36899     debug=: ;;
36900   --file | --fil | --fi | --f )
36901     $ac_shift
36902     case $ac_optarg in
36903     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36904     '') as_fn_error $? "missing file argument" ;;
36905     esac
36906     as_fn_append CONFIG_FILES " '$ac_optarg'"
36907     ac_need_defaults=false;;
36908   --header | --heade | --head | --hea )
36909     $ac_shift
36910     case $ac_optarg in
36911     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36912     esac
36913     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36914     ac_need_defaults=false;;
36915   --he | --h)
36916     # Conflict between --help and --header
36917     as_fn_error $? "ambiguous option: \`$1'
36918 Try \`$0 --help' for more information.";;
36919   --help | --hel | -h )
36920     $as_echo "$ac_cs_usage"; exit ;;
36921   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36922   | -silent | --silent | --silen | --sile | --sil | --si | --s)
36923     ac_cs_silent=: ;;
36924 
36925   # This is an error.
36926   -*) as_fn_error $? "unrecognized option: \`$1'
36927 Try \`$0 --help' for more information." ;;
36928 
36929   *) as_fn_append ac_config_targets " $1"
36930      ac_need_defaults=false ;;
36931 
36932   esac
36933   shift
36934 done
36935 
36936 ac_configure_extra_args=
36937 
36938 if $ac_cs_silent; then
36939   exec 6>/dev/null
36940   ac_configure_extra_args="$ac_configure_extra_args --silent"
36941 fi
36942 
36943 _ACEOF
36944 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36945 if \$ac_cs_recheck; then
36946   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36947   shift
36948   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36949   CONFIG_SHELL='$SHELL'
36950   export CONFIG_SHELL
36951   exec "\$@"
36952 fi
36953 
36954 _ACEOF
36955 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36956 exec 5>>config.log
36957 {
36958   echo
36959   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36960 ## Running $as_me. ##
36961 _ASBOX
36962   $as_echo "$ac_log"
36963 } >&5
36964 
36965 _ACEOF
36966 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36967 _ACEOF
36968 
36969 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36970 
36971 # Handling of arguments.
36972 for ac_config_target in $ac_config_targets
36973 do
36974   case $ac_config_target in
36975     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36976     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36977     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36978     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36979     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36980     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36981     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36982 
36983   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36984   esac
36985 done
36986 
36987 
36988 # If the user did not use the arguments to specify the items to instantiate,
36989 # then the envvar interface is used.  Set only those that are not.
36990 # We use the long form for the default assignment because of an extremely
36991 # bizarre bug on SunOS 4.1.3.
36992 if $ac_need_defaults; then
36993   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
36994   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
36995 fi
36996 
36997 # Have a temporary directory for convenience.  Make it in the build tree
36998 # simply because there is no reason against having it here, and in addition,
36999 # creating and moving files from /tmp can sometimes cause problems.
37000 # Hook for its removal unless debugging.
37001 # Note that there is a small window in which the directory will not be cleaned:
37002 # after its creation but before its name has been assigned to `$tmp'.
37003 $debug ||
37004 {
37005   tmp= ac_tmp=
37006   trap 'exit_status=$?
37007   : "${ac_tmp:=$tmp}"
37008   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37009 ' 0
37010   trap 'as_fn_exit 1' 1 2 13 15
37011 }
37012 # Create a (secure) tmp directory for tmp files.
37013 
37014 {
37015   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37016   test -d "$tmp"
37017 }  ||
37018 {
37019   tmp=./conf$$-$RANDOM
37020   (umask 077 && mkdir "$tmp")
37021 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37022 ac_tmp=$tmp
37023 
37024 # Set up the scripts for CONFIG_FILES section.
37025 # No need to generate them if there are no CONFIG_FILES.
37026 # This happens for instance with `./config.status config.h'.
37027 if test -n "$CONFIG_FILES"; then
37028 
37029 
37030 ac_cr=`echo X | tr X '\015'`
37031 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37032 # But we know of no other shell where ac_cr would be empty at this
37033 # point, so we can use a bashism as a fallback.
37034 if test "x$ac_cr" = x; then
37035   eval ac_cr=\$\'\\r\'
37036 fi
37037 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37038 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37039   ac_cs_awk_cr='\\r'
37040 else
37041   ac_cs_awk_cr=$ac_cr
37042 fi
37043 
37044 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37045 _ACEOF
37046 
37047 
37048 {
37049   echo "cat >conf$$subs.awk <<_ACEOF" &&
37050   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37051   echo "_ACEOF"
37052 } >conf$$subs.sh ||
37053   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37054 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37055 ac_delim='%!_!# '
37056 for ac_last_try in false false false false false :; do
37057   . ./conf$$subs.sh ||
37058     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37059 
37060   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37061   if test $ac_delim_n = $ac_delim_num; then
37062     break
37063   elif $ac_last_try; then
37064     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37065   else
37066     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37067   fi
37068 done
37069 rm -f conf$$subs.sh
37070 
37071 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37072 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37073 _ACEOF
37074 sed -n '
37075 h
37076 s/^/S["/; s/!.*/"]=/
37077 p
37078 g
37079 s/^[^!]*!//
37080 :repl
37081 t repl
37082 s/'"$ac_delim"'$//
37083 t delim
37084 :nl
37085 h
37086 s/\(.\{148\}\)..*/\1/
37087 t more1
37088 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37089 p
37090 n
37091 b repl
37092 :more1
37093 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37094 p
37095 g
37096 s/.\{148\}//
37097 t nl
37098 :delim
37099 h
37100 s/\(.\{148\}\)..*/\1/
37101 t more2
37102 s/["\\]/\\&/g; s/^/"/; s/$/"/
37103 p
37104 b
37105 :more2
37106 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37107 p
37108 g
37109 s/.\{148\}//
37110 t delim
37111 ' <conf$$subs.awk | sed '
37112 /^[^""]/{
37113   N
37114   s/\n//
37115 }
37116 ' >>$CONFIG_STATUS || ac_write_fail=1
37117 rm -f conf$$subs.awk
37118 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37119 _ACAWK
37120 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37121   for (key in S) S_is_set[key] = 1
37122   FS = ""
37123 
37124 }
37125 {
37126   line = $ 0
37127   nfields = split(line, field, "@")
37128   substed = 0
37129   len = length(field[1])
37130   for (i = 2; i < nfields; i++) {
37131     key = field[i]
37132     keylen = length(key)
37133     if (S_is_set[key]) {
37134       value = S[key]
37135       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37136       len += length(value) + length(field[++i])
37137       substed = 1
37138     } else
37139       len += 1 + keylen
37140   }
37141 
37142   print line
37143 }
37144 
37145 _ACAWK
37146 _ACEOF
37147 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37148 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37149   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37150 else
37151   cat
37152 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37153   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37154 _ACEOF
37155 
37156 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37157 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37158 # trailing colons and then remove the whole line if VPATH becomes empty
37159 # (actually we leave an empty line to preserve line numbers).
37160 if test "x$srcdir" = x.; then
37161   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37162 h
37163 s///
37164 s/^/:/
37165 s/[      ]*$/:/
37166 s/:\$(srcdir):/:/g
37167 s/:\${srcdir}:/:/g
37168 s/:@srcdir@:/:/g
37169 s/^:*//
37170 s/:*$//
37171 x
37172 s/\(=[   ]*\).*/\1/
37173 G
37174 s/\n//
37175 s/^[^=]*=[       ]*$//
37176 }'
37177 fi
37178 
37179 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37180 fi # test -n "$CONFIG_FILES"
37181 
37182 # Set up the scripts for CONFIG_HEADERS section.
37183 # No need to generate them if there are no CONFIG_HEADERS.
37184 # This happens for instance with `./config.status Makefile'.
37185 if test -n "$CONFIG_HEADERS"; then
37186 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37187 BEGIN {
37188 _ACEOF
37189 
37190 # Transform confdefs.h into an awk script `defines.awk', embedded as
37191 # here-document in config.status, that substitutes the proper values into
37192 # config.h.in to produce config.h.
37193 
37194 # Create a delimiter string that does not exist in confdefs.h, to ease
37195 # handling of long lines.
37196 ac_delim='%!_!# '
37197 for ac_last_try in false false :; do
37198   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37199   if test -z "$ac_tt"; then
37200     break
37201   elif $ac_last_try; then
37202     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37203   else
37204     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37205   fi
37206 done
37207 
37208 # For the awk script, D is an array of macro values keyed by name,
37209 # likewise P contains macro parameters if any.  Preserve backslash
37210 # newline sequences.
37211 
37212 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37213 sed -n '
37214 s/.\{148\}/&'"$ac_delim"'/g
37215 t rset
37216 :rset
37217 s/^[     ]*#[    ]*define[       ][      ]*/ /
37218 t def
37219 d
37220 :def
37221 s/\\$//
37222 t bsnl
37223 s/["\\]/\\&/g
37224 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37225 D["\1"]=" \3"/p
37226 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37227 d
37228 :bsnl
37229 s/["\\]/\\&/g
37230 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37231 D["\1"]=" \3\\\\\\n"\\/p
37232 t cont
37233 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37234 t cont
37235 d
37236 :cont
37237 n
37238 s/.\{148\}/&'"$ac_delim"'/g
37239 t clear
37240 :clear
37241 s/\\$//
37242 t bsnlc
37243 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37244 d
37245 :bsnlc
37246 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37247 b cont
37248 ' <confdefs.h | sed '
37249 s/'"$ac_delim"'/"\\\
37250 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37251 
37252 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37253   for (key in D) D_is_set[key] = 1
37254   FS = ""
37255 }
37256 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37257   line = \$ 0
37258   split(line, arg, " ")
37259   if (arg[1] == "#") {
37260     defundef = arg[2]
37261     mac1 = arg[3]
37262   } else {
37263     defundef = substr(arg[1], 2)
37264     mac1 = arg[2]
37265   }
37266   split(mac1, mac2, "(") #)
37267   macro = mac2[1]
37268   prefix = substr(line, 1, index(line, defundef) - 1)
37269   if (D_is_set[macro]) {
37270     # Preserve the white space surrounding the "#".
37271     print prefix "define", macro P[macro] D[macro]
37272     next
37273   } else {
37274     # Replace #undef with comments.  This is necessary, for example,
37275     # in the case of _POSIX_SOURCE, which is predefined and required
37276     # on some systems where configure will not decide to define it.
37277     if (defundef == "undef") {
37278       print "/*", prefix defundef, macro, "*/"
37279       next
37280     }
37281   }
37282 }
37283 { print }
37284 _ACAWK
37285 _ACEOF
37286 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37287   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37288 fi # test -n "$CONFIG_HEADERS"
37289 
37290 
37291 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37292 shift
37293 for ac_tag
37294 do
37295   case $ac_tag in
37296   :[FHLC]) ac_mode=$ac_tag; continue;;
37297   esac
37298   case $ac_mode$ac_tag in
37299   :[FHL]*:*);;
37300   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37301   :[FH]-) ac_tag=-:-;;
37302   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37303   esac
37304   ac_save_IFS=$IFS
37305   IFS=:
37306   set x $ac_tag
37307   IFS=$ac_save_IFS
37308   shift
37309   ac_file=$1
37310   shift
37311 
37312   case $ac_mode in
37313   :L) ac_source=$1;;
37314   :[FH])
37315     ac_file_inputs=
37316     for ac_f
37317     do
37318       case $ac_f in
37319       -) ac_f="$ac_tmp/stdin";;
37320       *) # Look for the file first in the build tree, then in the source tree
37321          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37322          # because $ac_f cannot contain `:'.
37323          test -f "$ac_f" ||
37324            case $ac_f in
37325            [\\/$]*) false;;
37326            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37327            esac ||
37328            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37329       esac
37330       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37331       as_fn_append ac_file_inputs " '$ac_f'"
37332     done
37333 
37334     # Let's still pretend it is `configure' which instantiates (i.e., don't
37335     # use $as_me), people would be surprised to read:
37336     #    /* config.h.  Generated by config.status.  */
37337     configure_input='Generated from '`
37338           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37339         `' by configure.'
37340     if test x"$ac_file" != x-; then
37341       configure_input="$ac_file.  $configure_input"
37342       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37343 $as_echo "$as_me: creating $ac_file" >&6;}
37344     fi
37345     # Neutralize special characters interpreted by sed in replacement strings.
37346     case $configure_input in #(
37347     *\&* | *\|* | *\\* )
37348        ac_sed_conf_input=`$as_echo "$configure_input" |
37349        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37350     *) ac_sed_conf_input=$configure_input;;
37351     esac
37352 
37353     case $ac_tag in
37354     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37355       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37356     esac
37357     ;;
37358   esac
37359 
37360   ac_dir=`$as_dirname -- "$ac_file" ||
37361 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37362          X"$ac_file" : 'X\(//\)[^/]' \| \
37363          X"$ac_file" : 'X\(//\)$' \| \
37364          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37365 $as_echo X"$ac_file" |
37366     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37367             s//\1/
37368             q
37369           }
37370           /^X\(\/\/\)[^/].*/{
37371             s//\1/
37372             q
37373           }
37374           /^X\(\/\/\)$/{
37375             s//\1/
37376             q
37377           }
37378           /^X\(\/\).*/{
37379             s//\1/
37380             q
37381           }
37382           s/.*/./; q'`
37383   as_dir="$ac_dir"; as_fn_mkdir_p
37384   ac_builddir=.
37385 
37386 case "$ac_dir" in
37387 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37388 *)
37389   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37390   # A ".." for each directory in $ac_dir_suffix.
37391   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37392   case $ac_top_builddir_sub in
37393   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37394   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37395   esac ;;
37396 esac
37397 ac_abs_top_builddir=$ac_pwd
37398 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37399 # for backward compatibility:
37400 ac_top_builddir=$ac_top_build_prefix
37401 
37402 case $srcdir in
37403   .)  # We are building in place.
37404     ac_srcdir=.
37405     ac_top_srcdir=$ac_top_builddir_sub
37406     ac_abs_top_srcdir=$ac_pwd ;;
37407   [\\/]* | ?:[\\/]* )  # Absolute name.
37408     ac_srcdir=$srcdir$ac_dir_suffix;
37409     ac_top_srcdir=$srcdir
37410     ac_abs_top_srcdir=$srcdir ;;
37411   *) # Relative name.
37412     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37413     ac_top_srcdir=$ac_top_build_prefix$srcdir
37414     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37415 esac
37416 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37417 
37418 
37419   case $ac_mode in
37420   :F)
37421   #
37422   # CONFIG_FILE
37423   #
37424 
37425 _ACEOF
37426 
37427 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37428 # If the template does not know about datarootdir, expand it.
37429 # FIXME: This hack should be removed a few years after 2.60.
37430 ac_datarootdir_hack=; ac_datarootdir_seen=
37431 ac_sed_dataroot='
37432 /datarootdir/ {
37433   p
37434   q
37435 }
37436 /@datadir@/p
37437 /@docdir@/p
37438 /@infodir@/p
37439 /@localedir@/p
37440 /@mandir@/p'
37441 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37442 *datarootdir*) ac_datarootdir_seen=yes;;
37443 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37444   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37445 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37446 _ACEOF
37447 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37448   ac_datarootdir_hack='
37449   s&@datadir@&$datadir&g
37450   s&@docdir@&$docdir&g
37451   s&@infodir@&$infodir&g
37452   s&@localedir@&$localedir&g
37453   s&@mandir@&$mandir&g
37454   s&\\\${datarootdir}&$datarootdir&g' ;;
37455 esac
37456 _ACEOF
37457 
37458 # Neutralize VPATH when `$srcdir' = `.'.
37459 # Shell code in configure.ac might set extrasub.
37460 # FIXME: do we really want to maintain this feature?
37461 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37462 ac_sed_extra="$ac_vpsub
37463 $extrasub
37464 _ACEOF
37465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37466 :t
37467 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37468 s|@configure_input@|$ac_sed_conf_input|;t t
37469 s&@top_builddir@&$ac_top_builddir_sub&;t t
37470 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37471 s&@srcdir@&$ac_srcdir&;t t
37472 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37473 s&@top_srcdir@&$ac_top_srcdir&;t t
37474 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37475 s&@builddir@&$ac_builddir&;t t
37476 s&@abs_builddir@&$ac_abs_builddir&;t t
37477 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37478 $ac_datarootdir_hack
37479 "
37480 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37481   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37482 
37483 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37484   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37485   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37486       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37487   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37488 which seems to be undefined.  Please make sure it is defined" >&5
37489 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37490 which seems to be undefined.  Please make sure it is defined" >&2;}
37491 
37492   rm -f "$ac_tmp/stdin"
37493   case $ac_file in
37494   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37495   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37496   esac \
37497   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37498  ;;
37499   :H)
37500   #
37501   # CONFIG_HEADER
37502   #
37503   if test x"$ac_file" != x-; then
37504     {
37505       $as_echo "/* $configure_input  */" \
37506       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37507     } >"$ac_tmp/config.h" \
37508       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37509     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37510       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37511 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37512     else
37513       rm -f "$ac_file"
37514       mv "$ac_tmp/config.h" "$ac_file" \
37515         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37516     fi
37517   else
37518     $as_echo "/* $configure_input  */" \
37519       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37520       || as_fn_error $? "could not create -" "$LINENO" 5
37521   fi
37522  ;;
37523 
37524 
37525   esac
37526 
37527 done # for ac_tag
37528 
37529 
37530 as_fn_exit 0
37531 _ACEOF
37532 ac_clean_files=$ac_clean_files_save
37533 
37534 test $ac_write_fail = 0 ||
37535   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37536 
37537 
37538 # configure is writing to config.log, and then calls config.status.
37539 # config.status does its own redirection, appending to config.log.
37540 # Unfortunately, on DOS this fails, as config.log is still kept open
37541 # by configure, so config.status won't be able to write to it; its
37542 # output is simply discarded.  So we exec the FD to /dev/null,
37543 # effectively closing config.log, so it can be properly (re)opened and
37544 # appended to by config.status.  When coming back to configure, we
37545 # need to make the FD available again.
37546 if test "$no_create" != yes; then
37547   ac_cs_success=:
37548   ac_config_status_args=
37549   test "$silent" = yes &&
37550     ac_config_status_args="$ac_config_status_args --quiet"
37551   exec 5>/dev/null
37552   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37553   exec 5>>config.log
37554   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37555   # would make configure fail if this is the last instruction.
37556   $ac_cs_success || as_fn_exit 1
37557 fi
37558 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37559   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37560 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37561 fi
37562 
37563 
37564 # Try to move the config.log file to the output directory.
37565 if test -e ./config.log; then
37566   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37567 fi
37568 
37569 # Make the compare script executable
37570 $CHMOD +x $OUTPUT_ROOT/compare.sh
37571 
37572 # Finally output some useful information to the user
37573 
37574   # Finally output some useful information to the user
37575 
37576   if test "x$CCACHE_FOUND" != x; then
37577     if  test "x$HAS_GOOD_CCACHE" = x; then
37578       CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37579       CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37580     else
37581       CCACHE_STATUS="installed and in use"
37582     fi
37583   else
37584     if test "x$GCC" = xyes; then
37585       CCACHE_STATUS="not installed (consider installing)"
37586       CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37587     else
37588       CCACHE_STATUS="not available for your system"
37589     fi
37590   fi
37591 
37592   printf "\n"
37593   printf "====================================================\n"
37594   printf "A new configuration has been successfully created in\n"
37595   printf "$OUTPUT_ROOT\n"
37596   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37597     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37598   else
37599     printf "using default settings.\n"
37600   fi
37601 
37602   printf "\n"
37603   printf "Configuration summary:\n"
37604   printf "* Debug level:    $DEBUG_LEVEL\n"
37605   printf "* JDK variant:    $JDK_VARIANT\n"
37606   printf "* JVM variants:   $with_jvm_variants\n"
37607   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37608 
37609   printf "\n"
37610   printf "Tools summary:\n"
37611   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37612     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37613   fi
37614   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37615   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37616   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37617 
37618   printf "\n"
37619   printf "Build performance summary:\n"
37620   printf "* Cores to use:   $JOBS\n"
37621   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37622   printf "* ccache status:  $CCACHE_STATUS\n"
37623   printf "\n"
37624 
37625   if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37626     printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37627     printf "$CCACHE_HELP_MSG\n"
37628 
37629   # Print a helpful message on how to acquire the necessary build dependency.
37630   # ccache is the help tag: freetype, cups, pulse, alsa etc
37631   MISSING_DEPENDENCY=ccache
37632 
37633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37634     cygwin_help $MISSING_DEPENDENCY
37635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37636     msys_help $MISSING_DEPENDENCY
37637   else
37638     PKGHANDLER_COMMAND=
37639 
37640     case $PKGHANDLER in
37641       apt-get)
37642         apt_help     $MISSING_DEPENDENCY ;;
37643       yum)
37644         yum_help     $MISSING_DEPENDENCY ;;
37645       port)
37646         port_help    $MISSING_DEPENDENCY ;;
37647       pkgutil)
37648         pkgutil_help $MISSING_DEPENDENCY ;;
37649       pkgadd)
37650         pkgadd_help  $MISSING_DEPENDENCY ;;
37651     esac
37652 
37653     if test "x$PKGHANDLER_COMMAND" != x; then
37654       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37655     fi
37656   fi
37657 
37658     printf "$HELP_MSG\n"
37659     printf "\n"
37660   fi
37661 
37662   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37663     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37664     printf "will result in longer build times.\n"
37665     printf "\n"
37666   fi
37667 
37668   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37669     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37670     printf "These are not respected, and will be ignored. It is recommended\n"
37671     printf "that you clean your environment. The following variables are set:\n"
37672     printf "$FOUND_ALT_VARIABLES\n"
37673     printf "\n"
37674   fi
37675 
37676   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37677     printf "WARNING: Your build output directory is not on a local disk.\n"
37678     printf "This will severely degrade build performance!\n"
37679     printf "It is recommended that you create an output directory on a local disk,\n"
37680     printf "and run the configure script again from that directory.\n"
37681     printf "\n"
37682   fi
37683 
37684   if test "x$IS_RECONFIGURE" = "xyes"; then
37685     printf "WARNING: The result of this configuration has overridden an older\n"
37686     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37687     printf "proper build. Failure to do so might result in strange build problems.\n"
37688     printf "\n"
37689   fi
37690