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=1384766704
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   # Get the value of BOOT_RTJAR by parsing the 'sun.boot.class.path' property.
15923   # We only use the existing jar-files and directories of 'sun.boot.class.path'.
15924   #
15925   # The tricky thing is that we must quote AWK field references (i.e. , , ..)
15926   # and the name 'index' which is a M4-buildin function by placing brackets
15927   # (i.e. '[]') into the corresponding names.
15928   BOOT_RTJAR=`$BOOT_JDK/bin/java -XshowSettings:properties 2>&1 | $NAWK ' \
15929       /path.separator/      { path_separator = $3 } \
15930       /sun.boot.class.path/ { if (system("test -e \"" $3 "\"") == 0) sun_boot_class_path = $3; \
15931                               while (getline && !index($0,"=")) { \
15932                                 if (system("test -e \"" $1 "\"") == 0) sun_boot_class_path = sun_boot_class_path "\n" $1 \
15933                               } \
15934                               sub("^\n", "", sun_boot_class_path) \
15935                             } \
15936       END { gsub("\n", path_separator, sun_boot_class_path); print sun_boot_class_path }'`
15937 
15938   # The content of sun.boot.class.path is in Windows form on Windows.
15939   # We have to convert it to Unix form first, but with Windows path
15940   # separators. This is required by the FIXPATH utility which will convert
15941   # it back to the Windows form later on during the build process.
15942   if test "x$OPENJDK_TARGET_OS" = xwindows; then
15943     BOOT_RTJAR=`cygpath -u -p "$BOOT_RTJAR" | $TR ':' ';'`
15944   fi
15945 
15946   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15947   BOOT_JDK="$BOOT_JDK"
15948 
15949 
15950 
15951 
15952   # Setup tools from the Boot JDK.
15953 
15954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15955 $as_echo_n "checking for java in Boot JDK... " >&6; }
15956   JAVA=$BOOT_JDK/bin/java
15957   if test ! -x $JAVA; 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 java 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 javac in Boot JDK" >&5
15969 $as_echo_n "checking for javac in Boot JDK... " >&6; }
15970   JAVAC=$BOOT_JDK/bin/javac
15971   if test ! -x $JAVAC; 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 javac 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 javah in Boot JDK" >&5
15983 $as_echo_n "checking for javah in Boot JDK... " >&6; }
15984   JAVAH=$BOOT_JDK/bin/javah
15985   if test ! -x $JAVAH; 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 javah 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 javap in Boot JDK" >&5
15997 $as_echo_n "checking for javap in Boot JDK... " >&6; }
15998   JAVAP=$BOOT_JDK/bin/javap
15999   if test ! -x $JAVAP; 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 javap 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 jar in Boot JDK" >&5
16011 $as_echo_n "checking for jar in Boot JDK... " >&6; }
16012   JAR=$BOOT_JDK/bin/jar
16013   if test ! -x $JAR; 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 jar 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 rmic in Boot JDK" >&5
16025 $as_echo_n "checking for rmic in Boot JDK... " >&6; }
16026   RMIC=$BOOT_JDK/bin/rmic
16027   if test ! -x $RMIC; 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 rmic 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   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
16039 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
16040   NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
16041   if test ! -x $NATIVE2ASCII; then
16042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16043 $as_echo "not found" >&6; }
16044     { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
16045 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
16046     as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
16047   fi
16048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16049 $as_echo "ok" >&6; }
16050 
16051 
16052   # Finally, set some other options...
16053 
16054   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
16055   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
16056 
16057 
16058 
16059 
16060   ##############################################################################
16061   #
16062   # Specify options for anything that is run with the Boot JDK.
16063   #
16064 
16065 # Check whether --with-boot-jdk-jvmargs was given.
16066 if test "${with_boot_jdk_jvmargs+set}" = set; then :
16067   withval=$with_boot_jdk_jvmargs;
16068 fi
16069 
16070 
16071   if test "x$with_boot_jdk_jvmargs" = x; then
16072     # Not all JVM:s accept the same arguments on the command line.
16073     # OpenJDK specific increase in thread stack for JDK build,
16074     # well more specifically, when running javac.
16075     if test "x$BUILD_NUM_BITS" = x32; then
16076       STACK_SIZE=768
16077     else
16078       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
16079       # since 64-bit pointers are pushed on the stach. Apparently, we need
16080       # to increase the stack space when javacing the JDK....
16081       STACK_SIZE=1536
16082     fi
16083 
16084     # Minimum amount of heap memory.
16085 
16086   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
16087   $ECHO "Command: $JAVA -Xms64M -version" >&5
16088   OUTPUT=`$JAVA -Xms64M -version 2>&1`
16089   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16090   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16091   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16092     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
16093     JVM_ARG_OK=true
16094   else
16095     $ECHO "Arg failed:" >&5
16096     $ECHO "$OUTPUT" >&5
16097     JVM_ARG_OK=false
16098   fi
16099 
16100     if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
16101       # Why does macosx need more heap? Its the huge JDK batch.
16102 
16103   $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
16104   $ECHO "Command: $JAVA -Xmx1600M -version" >&5
16105   OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
16106   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16107   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16108   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16109     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
16110     JVM_ARG_OK=true
16111   else
16112     $ECHO "Arg failed:" >&5
16113     $ECHO "$OUTPUT" >&5
16114     JVM_ARG_OK=false
16115   fi
16116 
16117     else
16118 
16119   $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
16120   $ECHO "Command: $JAVA -Xmx1100M -version" >&5
16121   OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
16122   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16123   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16124   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16125     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
16126     JVM_ARG_OK=true
16127   else
16128     $ECHO "Arg failed:" >&5
16129     $ECHO "$OUTPUT" >&5
16130     JVM_ARG_OK=false
16131   fi
16132 
16133     fi
16134     # When is adding -client something that speeds up the JVM?
16135     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
16136 
16137   $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
16138   $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
16139   OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
16140   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16141   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16142   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16143     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
16144     JVM_ARG_OK=true
16145   else
16146     $ECHO "Arg failed:" >&5
16147     $ECHO "$OUTPUT" >&5
16148     JVM_ARG_OK=false
16149   fi
16150 
16151 
16152   $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
16153   $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
16154   OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
16155   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16156   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16157   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16158     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
16159     JVM_ARG_OK=true
16160   else
16161     $ECHO "Arg failed:" >&5
16162     $ECHO "$OUTPUT" >&5
16163     JVM_ARG_OK=false
16164   fi
16165 
16166 
16167   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
16168   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
16169   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
16170   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16171   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16172   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16173     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
16174     JVM_ARG_OK=true
16175   else
16176     $ECHO "Arg failed:" >&5
16177     $ECHO "$OUTPUT" >&5
16178     JVM_ARG_OK=false
16179   fi
16180 
16181     # Disable special log output when a debug build is used as Boot JDK...
16182 
16183   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
16184   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
16185   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
16186   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
16187   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
16188   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
16189     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
16190     JVM_ARG_OK=true
16191   else
16192     $ECHO "Arg failed:" >&5
16193     $ECHO "$OUTPUT" >&5
16194     JVM_ARG_OK=false
16195   fi
16196 
16197   fi
16198 
16199   BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
16200 
16201 
16202 
16203 ###############################################################################
16204 #
16205 # Configure the sources to use. We can add or override individual directories.
16206 #
16207 ###############################################################################
16208 
16209 
16210   # Where are the sources. Any of these can be overridden
16211   # using --with-override-corba and the likes.
16212   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
16213   CORBA_TOPDIR="$SRC_ROOT/corba"
16214   JAXP_TOPDIR="$SRC_ROOT/jaxp"
16215   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
16216   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
16217   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
16218   JDK_TOPDIR="$SRC_ROOT/jdk"
16219 
16220 
16221 
16222 
16223 
16224 
16225 
16226 
16227 
16228 
16229   ###############################################################################
16230   #
16231   # Pickup additional source for a component from outside of the source root
16232   # or override source for a component.
16233   #
16234 
16235 # Check whether --with-add-source-root was given.
16236 if test "${with_add_source_root+set}" = set; then :
16237   withval=$with_add_source_root;
16238 fi
16239 
16240 
16241 
16242 # Check whether --with-override-source-root was given.
16243 if test "${with_override_source_root+set}" = set; then :
16244   withval=$with_override_source_root;
16245 fi
16246 
16247 
16248 
16249 # Check whether --with-adds-and-overrides was given.
16250 if test "${with_adds_and_overrides+set}" = set; then :
16251   withval=$with_adds_and_overrides;
16252 fi
16253 
16254 
16255   if test "x$with_adds_and_overrides" != x; then
16256     with_add_source_root="$with_adds_and_overrides/adds"
16257     with_override_source_root="$with_adds_and_overrides/overrides"
16258   fi
16259 
16260   if test "x$with_add_source_root" != x; then
16261     if ! test -d $with_add_source_root; then
16262       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
16263     fi
16264     CURDIR="$PWD"
16265     cd "$with_add_source_root"
16266     ADD_SRC_ROOT="`pwd`"
16267     cd "$CURDIR"
16268     # Verify that the addon source root does not have any root makefiles.
16269     # If it does, then it is usually an error, prevent this.
16270     if test -f $with_add_source_root/langtools/makefiles/Makefile || \
16271       test -f $with_add_source_root/langtools/make/Makefile; then
16272       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
16273     fi
16274     if test -f $with_add_source_root/corba/makefiles/Makefile || \
16275       test -f $with_add_source_root/corba/make/Makefile; then
16276       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
16277     fi
16278     if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
16279       test -f $with_add_source_root/jaxp/make/Makefile; then
16280       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
16281     fi
16282     if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
16283       test -f $with_add_source_root/jaxws/make/Makefile; then
16284       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
16285     fi
16286     if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
16287       test -f $with_add_source_root/hotspot/make/Makefile; then
16288       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
16289     fi
16290     if test -f $with_add_source_root/nashorn/makefiles/Makefile || \
16291       test -f $with_add_source_root/nashorn/make/Makefile; then
16292       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
16293     fi
16294     if test -f $with_add_source_root/jdk/makefiles/Makefile || \
16295       test -f $with_add_source_root/jdk/make/Makefile; then
16296       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
16297     fi
16298   fi
16299 
16300 
16301   if test "x$with_override_source_root" != x; then
16302     if ! test -d $with_override_source_root; then
16303       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16304     fi
16305     CURDIR="$PWD"
16306     cd "$with_override_source_root"
16307     OVERRIDE_SRC_ROOT="`pwd`"
16308     cd "$CURDIR"
16309     if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16310       test -f $with_override_source_root/langtools/make/Makefile; then
16311       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
16312     fi
16313     if test -f $with_override_source_root/corba/makefiles/Makefile || \
16314       test -f $with_override_source_root/corba/make/Makefile; then
16315       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
16316     fi
16317     if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16318       test -f $with_override_source_root/jaxp/make/Makefile; then
16319       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
16320     fi
16321     if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16322       test -f $with_override_source_root/jaxws/make/Makefile; then
16323       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
16324     fi
16325     if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16326       test -f $with_override_source_root/hotspot/make/Makefile; then
16327       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
16328     fi
16329     if test -f $with_override_source_root/nashorn/makefiles/Makefile || \
16330       test -f $with_override_source_root/nashorn/make/Makefile; then
16331       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
16332     fi
16333     if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16334       test -f $with_override_source_root/jdk/make/Makefile; then
16335       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
16336     fi
16337   fi
16338 
16339 
16340   ###############################################################################
16341   #
16342   # Override a repo completely, this is used for example when you have 3 small
16343   # development sandboxes of the langtools sources and want to avoid having 3 full
16344   # OpenJDK sources checked out on disk.
16345   #
16346   # Assuming that the 3 langtools sandboxes are located here:
16347   # /home/fredrik/sandbox1/langtools
16348   # /home/fredrik/sandbox2/langtools
16349   # /home/fredrik/sandbox3/langtools
16350   #
16351   # From the source root you create build subdirs manually:
16352   #     mkdir -p build1 build2 build3
16353   # in each build directory run:
16354   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16355   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16356   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16357   #
16358 
16359 
16360 # Check whether --with-override-langtools was given.
16361 if test "${with_override_langtools+set}" = set; then :
16362   withval=$with_override_langtools;
16363 fi
16364 
16365 
16366 
16367 # Check whether --with-override-corba was given.
16368 if test "${with_override_corba+set}" = set; then :
16369   withval=$with_override_corba;
16370 fi
16371 
16372 
16373 
16374 # Check whether --with-override-jaxp was given.
16375 if test "${with_override_jaxp+set}" = set; then :
16376   withval=$with_override_jaxp;
16377 fi
16378 
16379 
16380 
16381 # Check whether --with-override-jaxws was given.
16382 if test "${with_override_jaxws+set}" = set; then :
16383   withval=$with_override_jaxws;
16384 fi
16385 
16386 
16387 
16388 # Check whether --with-override-hotspot was given.
16389 if test "${with_override_hotspot+set}" = set; then :
16390   withval=$with_override_hotspot;
16391 fi
16392 
16393 
16394 
16395 # Check whether --with-override-nashorn was given.
16396 if test "${with_override_nashorn+set}" = set; then :
16397   withval=$with_override_nashorn;
16398 fi
16399 
16400 
16401 
16402 # Check whether --with-override-jdk was given.
16403 if test "${with_override_jdk+set}" = set; then :
16404   withval=$with_override_jdk;
16405 fi
16406 
16407 
16408   if test "x$with_override_langtools" != x; then
16409     CURDIR="$PWD"
16410     cd "$with_override_langtools"
16411     LANGTOOLS_TOPDIR="`pwd`"
16412     cd "$CURDIR"
16413     if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16414       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16415     fi
16416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16417 $as_echo_n "checking if langtools should be overridden... " >&6; }
16418     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16419 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16420   fi
16421   if test "x$with_override_corba" != x; then
16422     CURDIR="$PWD"
16423     cd "$with_override_corba"
16424     CORBA_TOPDIR="`pwd`"
16425     cd "$CURDIR"
16426     if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16427       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16428     fi
16429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16430 $as_echo_n "checking if corba should be overridden... " >&6; }
16431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16432 $as_echo "yes with $CORBA_TOPDIR" >&6; }
16433   fi
16434   if test "x$with_override_jaxp" != x; then
16435     CURDIR="$PWD"
16436     cd "$with_override_jaxp"
16437     JAXP_TOPDIR="`pwd`"
16438     cd "$CURDIR"
16439     if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16440       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16441     fi
16442     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16443 $as_echo_n "checking if jaxp should be overridden... " >&6; }
16444     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16445 $as_echo "yes with $JAXP_TOPDIR" >&6; }
16446   fi
16447   if test "x$with_override_jaxws" != x; then
16448     CURDIR="$PWD"
16449     cd "$with_override_jaxws"
16450     JAXWS_TOPDIR="`pwd`"
16451     cd "$CURDIR"
16452     if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16453       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16454     fi
16455     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16456 $as_echo_n "checking if jaxws should be overridden... " >&6; }
16457     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16458 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
16459   fi
16460   if test "x$with_override_hotspot" != x; then
16461     CURDIR="$PWD"
16462     cd "$with_override_hotspot"
16463     HOTSPOT_TOPDIR="`pwd`"
16464     cd "$CURDIR"
16465     if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16466         ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16467       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16468     fi
16469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16470 $as_echo_n "checking if hotspot should be overridden... " >&6; }
16471     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16472 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16473   fi
16474   if test "x$with_override_nashorn" != x; then
16475     CURDIR="$PWD"
16476     cd "$with_override_nashorn"
16477     NASHORN_TOPDIR="`pwd`"
16478     cd "$CURDIR"
16479     if ! test -f $NASHORN_TOPDIR/makefiles/Makefile; then
16480       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16481     fi
16482     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16483 $as_echo_n "checking if nashorn should be overridden... " >&6; }
16484     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16485 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
16486   fi
16487   if test "x$with_override_jdk" != x; then
16488     CURDIR="$PWD"
16489     cd "$with_override_jdk"
16490     JDK_TOPDIR="`pwd`"
16491     cd "$CURDIR"
16492     if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16493       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16494     fi
16495     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16496 $as_echo_n "checking if JDK should be overridden... " >&6; }
16497     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16498 $as_echo "yes with $JDK_TOPDIR" >&6; }
16499   fi
16500 
16501 
16502   BUILD_OUTPUT="$OUTPUT_ROOT"
16503 
16504 
16505   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16506   BUILD_HOTSPOT=true
16507 
16508 
16509 
16510 # Check whether --with-import-hotspot was given.
16511 if test "${with_import_hotspot+set}" = set; then :
16512   withval=$with_import_hotspot;
16513 fi
16514 
16515   if test "x$with_import_hotspot" != x; then
16516     CURDIR="$PWD"
16517     cd "$with_import_hotspot"
16518     HOTSPOT_DIST="`pwd`"
16519     cd "$CURDIR"
16520     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16521       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16522     fi
16523     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16524 $as_echo_n "checking if hotspot should be imported... " >&6; }
16525     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16526 $as_echo "yes from $HOTSPOT_DIST" >&6; }
16527     BUILD_HOTSPOT=false
16528   fi
16529 
16530   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16531 
16532 
16533 ###############################################################################
16534 #
16535 # Setup the toolchain (compilers etc), i.e. the tools that need to be
16536 # cross-compilation aware.
16537 #
16538 ###############################################################################
16539 
16540 
16541   ###############################################################################
16542   #
16543   # Configure the development tool paths and potential sysroot.
16544   #
16545   ac_ext=cpp
16546 ac_cpp='$CXXCPP $CPPFLAGS'
16547 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16548 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16549 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16550 
16551 
16552   # The option used to specify the target .o,.a or .so file.
16553   # When compiling, how to specify the to be created object file.
16554   CC_OUT_OPTION='-o$(SPACE)'
16555   # When linking, how to specify the to be created executable.
16556   EXE_OUT_OPTION='-o$(SPACE)'
16557   # When linking, how to specify the to be created dynamically linkable library.
16558   LD_OUT_OPTION='-o$(SPACE)'
16559   # When archiving, how to specify the to be create static archive for object files.
16560   AR_OUT_OPTION='rcs$(SPACE)'
16561 
16562 
16563 
16564 
16565 
16566 # Locate the actual tools
16567 
16568 
16569 # Check whether --with-jtreg was given.
16570 if test "${with_jtreg+set}" = set; then :
16571   withval=$with_jtreg;
16572 else
16573   with_jtreg=no
16574 fi
16575 
16576 
16577   if test "x$with_jtreg" = xno; then
16578     # jtreg disabled
16579     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16580 $as_echo_n "checking for jtreg... " >&6; }
16581     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16582 $as_echo "no" >&6; }
16583   else
16584     if test "x$with_jtreg" != xyes; then
16585       # with path specified.
16586       JT_HOME="$with_jtreg"
16587     fi
16588 
16589     if test "x$JT_HOME" != x; then
16590       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
16591 $as_echo_n "checking for jtreg... " >&6; }
16592 
16593       # use JT_HOME enviroment var.
16594 
16595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16596 
16597   # Input might be given as Windows format, start by converting to
16598   # unix format.
16599   path="$JT_HOME"
16600   new_path=`$CYGPATH -u "$path"`
16601 
16602   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16603   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16604   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16605   # "foo.exe" is OK but "foo" is an error.
16606   #
16607   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16608   # It is also a way to make sure we got the proper file name for the real test later on.
16609   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16610   if test "x$test_shortpath" = x; then
16611     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16612 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16613     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16614   fi
16615 
16616   # Call helper function which possibly converts this using DOS-style short mode.
16617   # If so, the updated path is stored in $new_path.
16618 
16619   input_path="$new_path"
16620   # Check if we need to convert this using DOS-style short mode. If the path
16621   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16622   # take no chances and rewrite it.
16623   # Note: m4 eats our [], so we need to use [ and ] instead.
16624   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16625   if test "x$has_forbidden_chars" != x; then
16626     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16627     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16628     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16629     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16630       # Going to short mode and back again did indeed matter. Since short mode is
16631       # case insensitive, let's make it lowercase to improve readability.
16632       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16633       # Now convert it back to Unix-stile (cygpath)
16634       input_path=`$CYGPATH -u "$shortmode_path"`
16635       new_path="$input_path"
16636     fi
16637   fi
16638 
16639   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16640   if test "x$test_cygdrive_prefix" = x; then
16641     # As a simple fix, exclude /usr/bin since it's not a real path.
16642     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16643       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16644       # a path prefixed by /cygdrive for fixpath to work.
16645       new_path="$CYGWIN_ROOT_PATH$input_path"
16646     fi
16647   fi
16648 
16649 
16650   if test "x$path" != "x$new_path"; then
16651     JT_HOME="$new_path"
16652     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16653 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16654   fi
16655 
16656   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16657 
16658   path="$JT_HOME"
16659   has_colon=`$ECHO $path | $GREP ^.:`
16660   new_path="$path"
16661   if test "x$has_colon" = x; then
16662     # Not in mixed or Windows style, start by that.
16663     new_path=`cmd //c echo $path`
16664   fi
16665 
16666 
16667   input_path="$new_path"
16668   # Check if we need to convert this using DOS-style short mode. If the path
16669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16670   # take no chances and rewrite it.
16671   # Note: m4 eats our [], so we need to use [ and ] instead.
16672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16673   if test "x$has_forbidden_chars" != x; then
16674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16675     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16676   fi
16677 
16678 
16679   windows_path="$new_path"
16680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16681     unix_path=`$CYGPATH -u "$windows_path"`
16682     new_path="$unix_path"
16683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16685     new_path="$unix_path"
16686   fi
16687 
16688   if test "x$path" != "x$new_path"; then
16689     JT_HOME="$new_path"
16690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16691 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16692   fi
16693 
16694   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16695   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16696 
16697   else
16698     # We're on a posix platform. Hooray! :)
16699     path="$JT_HOME"
16700     has_space=`$ECHO "$path" | $GREP " "`
16701     if test "x$has_space" != x; then
16702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16703 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16704       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16705     fi
16706 
16707     # Use eval to expand a potential ~
16708     eval path="$path"
16709     if test ! -f "$path" && test ! -d "$path"; then
16710       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16711     fi
16712 
16713     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
16714   fi
16715 
16716 
16717       # jtreg win32 script works for everybody
16718       JTREGEXE="$JT_HOME/win32/bin/jtreg"
16719 
16720       if test ! -f "$JTREGEXE"; then
16721         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16722       fi
16723 
16724       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16725 $as_echo "$JTREGEXE" >&6; }
16726     else
16727       # try to find jtreg on path
16728 
16729   for ac_prog in jtreg
16730 do
16731   # Extract the first word of "$ac_prog", so it can be a program name with args.
16732 set dummy $ac_prog; ac_word=$2
16733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16734 $as_echo_n "checking for $ac_word... " >&6; }
16735 if ${ac_cv_path_JTREGEXE+:} false; then :
16736   $as_echo_n "(cached) " >&6
16737 else
16738   case $JTREGEXE in
16739   [\\/]* | ?:[\\/]*)
16740   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
16741   ;;
16742   *)
16743   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16744 for as_dir in $PATH
16745 do
16746   IFS=$as_save_IFS
16747   test -z "$as_dir" && as_dir=.
16748     for ac_exec_ext in '' $ac_executable_extensions; do
16749   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16750     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
16751     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16752     break 2
16753   fi
16754 done
16755   done
16756 IFS=$as_save_IFS
16757 
16758   ;;
16759 esac
16760 fi
16761 JTREGEXE=$ac_cv_path_JTREGEXE
16762 if test -n "$JTREGEXE"; then
16763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
16764 $as_echo "$JTREGEXE" >&6; }
16765 else
16766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16767 $as_echo "no" >&6; }
16768 fi
16769 
16770 
16771   test -n "$JTREGEXE" && break
16772 done
16773 
16774 
16775   if test "x$JTREGEXE" = x; then
16776     if test "xjtreg" = x; then
16777       PROG_NAME=jtregexe
16778     else
16779       PROG_NAME=jtreg
16780     fi
16781     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
16782 $as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
16783     as_fn_error $? "Cannot continue" "$LINENO" 5
16784   fi
16785 
16786 
16787       JT_HOME="`$DIRNAME $JTREGEXE`"
16788     fi
16789   fi
16790 
16791 
16792 
16793 
16794 
16795   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16796 
16797   # Store path to cygwin link.exe to help excluding it when searching for
16798   # VS linker. This must be done before changing the PATH when looking for VS.
16799   # Extract the first word of "link", so it can be a program name with args.
16800 set dummy link; ac_word=$2
16801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16802 $as_echo_n "checking for $ac_word... " >&6; }
16803 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
16804   $as_echo_n "(cached) " >&6
16805 else
16806   case $CYGWIN_LINK in
16807   [\\/]* | ?:[\\/]*)
16808   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16809   ;;
16810   *)
16811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16812 for as_dir in $PATH
16813 do
16814   IFS=$as_save_IFS
16815   test -z "$as_dir" && as_dir=.
16816     for ac_exec_ext in '' $ac_executable_extensions; do
16817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16818     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16820     break 2
16821   fi
16822 done
16823   done
16824 IFS=$as_save_IFS
16825 
16826   ;;
16827 esac
16828 fi
16829 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16830 if test -n "$CYGWIN_LINK"; then
16831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16832 $as_echo "$CYGWIN_LINK" >&6; }
16833 else
16834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16835 $as_echo "no" >&6; }
16836 fi
16837 
16838 
16839   if test "x$CYGWIN_LINK" != x; then
16840     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16841 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16842     "$CYGWIN_LINK" --version > /dev/null
16843     if test $? -eq 0 ; then
16844       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16845 $as_echo "yes" >&6; }
16846     else
16847       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16848 $as_echo "no" >&6; }
16849       # This might be the VS linker. Don't exclude it later on.
16850       CYGWIN_LINK=""
16851     fi
16852   fi
16853 
16854   # First-hand choice is to locate and run the vsvars bat file.
16855 
16856   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16857     VCVARSFILE="vc/bin/vcvars32.bat"
16858   else
16859     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16860   fi
16861 
16862   VS_ENV_CMD=""
16863   VS_ENV_ARGS=""
16864   if test "x$with_toolsdir" != x; then
16865 
16866   if test "x$VS_ENV_CMD" = x; then
16867     VS100BASE="$with_toolsdir/../.."
16868     METHOD="--with-tools-dir"
16869 
16870   windows_path="$VS100BASE"
16871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16872     unix_path=`$CYGPATH -u "$windows_path"`
16873     VS100BASE="$unix_path"
16874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16876     VS100BASE="$unix_path"
16877   fi
16878 
16879     if test -d "$VS100BASE"; then
16880       if test -f "$VS100BASE/$VCVARSFILE"; then
16881         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16882 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16883         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16884       else
16885         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16886 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16887         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16888 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16889       fi
16890     fi
16891   fi
16892 
16893   fi
16894 
16895   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16896     # Having specified an argument which is incorrect will produce an instant failure;
16897     # we should not go on looking
16898     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16899 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16900     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16901 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16902     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16903   fi
16904 
16905   if test "x$VS100COMNTOOLS" != x; then
16906 
16907   if test "x$VS_ENV_CMD" = x; then
16908     VS100BASE="$VS100COMNTOOLS/../.."
16909     METHOD="VS100COMNTOOLS variable"
16910 
16911   windows_path="$VS100BASE"
16912   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16913     unix_path=`$CYGPATH -u "$windows_path"`
16914     VS100BASE="$unix_path"
16915   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16916     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16917     VS100BASE="$unix_path"
16918   fi
16919 
16920     if test -d "$VS100BASE"; then
16921       if test -f "$VS100BASE/$VCVARSFILE"; then
16922         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16923 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16924         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16925       else
16926         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16927 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16928         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16929 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16930       fi
16931     fi
16932   fi
16933 
16934   fi
16935   if test "x$PROGRAMFILES" != x; then
16936 
16937   if test "x$VS_ENV_CMD" = x; then
16938     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16939     METHOD="well-known name"
16940 
16941   windows_path="$VS100BASE"
16942   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16943     unix_path=`$CYGPATH -u "$windows_path"`
16944     VS100BASE="$unix_path"
16945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16946     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16947     VS100BASE="$unix_path"
16948   fi
16949 
16950     if test -d "$VS100BASE"; then
16951       if test -f "$VS100BASE/$VCVARSFILE"; then
16952         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16953 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16954         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16955       else
16956         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16957 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16958         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16959 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16960       fi
16961     fi
16962   fi
16963 
16964   fi
16965 
16966   if test "x$VS_ENV_CMD" = x; then
16967     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16968     METHOD="well-known name"
16969 
16970   windows_path="$VS100BASE"
16971   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16972     unix_path=`$CYGPATH -u "$windows_path"`
16973     VS100BASE="$unix_path"
16974   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16975     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16976     VS100BASE="$unix_path"
16977   fi
16978 
16979     if test -d "$VS100BASE"; then
16980       if test -f "$VS100BASE/$VCVARSFILE"; then
16981         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16982 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16983         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16984       else
16985         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16986 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16987         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16988 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16989       fi
16990     fi
16991   fi
16992 
16993 
16994   if test "x$VS_ENV_CMD" = x; then
16995     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16996     METHOD="well-known name"
16997 
16998   windows_path="$VS100BASE"
16999   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17000     unix_path=`$CYGPATH -u "$windows_path"`
17001     VS100BASE="$unix_path"
17002   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17003     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17004     VS100BASE="$unix_path"
17005   fi
17006 
17007     if test -d "$VS100BASE"; then
17008       if test -f "$VS100BASE/$VCVARSFILE"; then
17009         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17010 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17011         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
17012       else
17013         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
17014 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
17015         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
17016 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
17017       fi
17018     fi
17019   fi
17020 
17021 
17022   if test "x$ProgramW6432" != x; then
17023 
17024   if test "x$VS_ENV_CMD" = x; then
17025     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
17026     METHOD="well-known name"
17027 
17028   windows_path="$WIN_SDK_BASE"
17029   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17030     unix_path=`$CYGPATH -u "$windows_path"`
17031     WIN_SDK_BASE="$unix_path"
17032   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17033     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17034     WIN_SDK_BASE="$unix_path"
17035   fi
17036 
17037     if test -d "$WIN_SDK_BASE"; then
17038       # There have been cases of partial or broken SDK installations. A missing
17039       # lib dir is not going to work.
17040       if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
17044 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17045       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17046         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17047 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17048         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17049         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17050           VS_ENV_ARGS="/x86"
17051         else
17052           VS_ENV_ARGS="/x64"
17053         fi
17054       else
17055         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17056 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17057         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17058 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17059       fi
17060     fi
17061   fi
17062 
17063   fi
17064   if test "x$PROGRAMW6432" != x; then
17065 
17066   if test "x$VS_ENV_CMD" = x; then
17067     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
17068     METHOD="well-known name"
17069 
17070   windows_path="$WIN_SDK_BASE"
17071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17072     unix_path=`$CYGPATH -u "$windows_path"`
17073     WIN_SDK_BASE="$unix_path"
17074   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17075     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17076     WIN_SDK_BASE="$unix_path"
17077   fi
17078 
17079     if test -d "$WIN_SDK_BASE"; then
17080       # There have been cases of partial or broken SDK installations. A missing
17081       # lib dir is not going to work.
17082       if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
17086 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17087       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17088         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17089 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17090         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17091         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17092           VS_ENV_ARGS="/x86"
17093         else
17094           VS_ENV_ARGS="/x64"
17095         fi
17096       else
17097         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17098 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17099         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17100 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17101       fi
17102     fi
17103   fi
17104 
17105   fi
17106   if test "x$PROGRAMFILES" != x; then
17107 
17108   if test "x$VS_ENV_CMD" = x; then
17109     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
17110     METHOD="well-known name"
17111 
17112   windows_path="$WIN_SDK_BASE"
17113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17114     unix_path=`$CYGPATH -u "$windows_path"`
17115     WIN_SDK_BASE="$unix_path"
17116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17118     WIN_SDK_BASE="$unix_path"
17119   fi
17120 
17121     if test -d "$WIN_SDK_BASE"; then
17122       # There have been cases of partial or broken SDK installations. A missing
17123       # lib dir is not going to work.
17124       if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
17128 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17129       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17130         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17131 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17132         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17133         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17134           VS_ENV_ARGS="/x86"
17135         else
17136           VS_ENV_ARGS="/x64"
17137         fi
17138       else
17139         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17140 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17141         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17142 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17143       fi
17144     fi
17145   fi
17146 
17147   fi
17148 
17149   if test "x$VS_ENV_CMD" = x; then
17150     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
17151     METHOD="well-known name"
17152 
17153   windows_path="$WIN_SDK_BASE"
17154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17155     unix_path=`$CYGPATH -u "$windows_path"`
17156     WIN_SDK_BASE="$unix_path"
17157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17159     WIN_SDK_BASE="$unix_path"
17160   fi
17161 
17162     if test -d "$WIN_SDK_BASE"; then
17163       # There have been cases of partial or broken SDK installations. A missing
17164       # lib dir is not going to work.
17165       if test ! -d "$WIN_SDK_BASE/../lib"; then
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, lib dir is missing. Ignoring" >&5
17169 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17170       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17171         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17172 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17173         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17174         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17175           VS_ENV_ARGS="/x86"
17176         else
17177           VS_ENV_ARGS="/x64"
17178         fi
17179       else
17180         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17181 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17182         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17183 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17184       fi
17185     fi
17186   fi
17187 
17188 
17189   if test "x$VS_ENV_CMD" = x; then
17190     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
17191     METHOD="well-known name"
17192 
17193   windows_path="$WIN_SDK_BASE"
17194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17195     unix_path=`$CYGPATH -u "$windows_path"`
17196     WIN_SDK_BASE="$unix_path"
17197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17199     WIN_SDK_BASE="$unix_path"
17200   fi
17201 
17202     if test -d "$WIN_SDK_BASE"; then
17203       # There have been cases of partial or broken SDK installations. A missing
17204       # lib dir is not going to work.
17205       if test ! -d "$WIN_SDK_BASE/../lib"; then
17206         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17207 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17208         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
17209 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
17210       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
17211         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17212 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17213         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
17214         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17215           VS_ENV_ARGS="/x86"
17216         else
17217           VS_ENV_ARGS="/x64"
17218         fi
17219       else
17220         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
17221 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
17222         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
17223 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
17224       fi
17225     fi
17226   fi
17227 
17228 
17229   if test "x$VS_ENV_CMD" != x; then
17230     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
17231 
17232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17233 
17234   # First separate the path from the arguments. This will split at the first
17235   # space.
17236   complete="$VS_ENV_CMD"
17237   path="${complete%% *}"
17238   tmp="$complete EOL"
17239   arguments="${tmp#* }"
17240 
17241   # Input might be given as Windows format, start by converting to
17242   # unix format.
17243   new_path=`$CYGPATH -u "$path"`
17244 
17245   # Now try to locate executable using which
17246   new_path=`$WHICH "$new_path" 2> /dev/null`
17247   # bat and cmd files are not always considered executable in cygwin causing which
17248   # to not find them
17249   if test "x$new_path" = x \
17250       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17251       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17252     new_path=`$CYGPATH -u "$path"`
17253   fi
17254   if test "x$new_path" = x; then
17255     # Oops. Which didn't find the executable.
17256     # The splitting of arguments from the executable at a space might have been incorrect,
17257     # since paths with space are more likely in Windows. Give it another try with the whole
17258     # argument.
17259     path="$complete"
17260     arguments="EOL"
17261     new_path=`$CYGPATH -u "$path"`
17262     new_path=`$WHICH "$new_path" 2> /dev/null`
17263     # bat and cmd files are not always considered executable in cygwin causing which
17264     # to not find them
17265     if test "x$new_path" = x \
17266         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17267         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17268       new_path=`$CYGPATH -u "$path"`
17269     fi
17270     if test "x$new_path" = x; then
17271       # It's still not found. Now this is an unrecoverable error.
17272       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17273 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17274       has_space=`$ECHO "$complete" | $GREP " "`
17275       if test "x$has_space" != x; then
17276         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17277 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17278       fi
17279       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17280     fi
17281   fi
17282 
17283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17286   # "foo.exe" is OK but "foo" is an error.
17287   #
17288   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17289   # It is also a way to make sure we got the proper file name for the real test later on.
17290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17291   if test "x$test_shortpath" = x; then
17292     # Short path failed, file does not exist as specified.
17293     # Try adding .exe or .cmd
17294     if test -f "${new_path}.exe"; then
17295       input_to_shortpath="${new_path}.exe"
17296     elif test -f "${new_path}.cmd"; then
17297       input_to_shortpath="${new_path}.cmd"
17298     else
17299       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
17300 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
17301       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17302 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17303       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17304     fi
17305   else
17306     input_to_shortpath="$new_path"
17307   fi
17308 
17309   # Call helper function which possibly converts this using DOS-style short mode.
17310   # If so, the updated path is stored in $new_path.
17311   new_path="$input_to_shortpath"
17312 
17313   input_path="$input_to_shortpath"
17314   # Check if we need to convert this using DOS-style short mode. If the path
17315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17316   # take no chances and rewrite it.
17317   # Note: m4 eats our [], so we need to use [ and ] instead.
17318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17319   if test "x$has_forbidden_chars" != x; then
17320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17324       # Going to short mode and back again did indeed matter. Since short mode is
17325       # case insensitive, let's make it lowercase to improve readability.
17326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17327       # Now convert it back to Unix-stile (cygpath)
17328       input_path=`$CYGPATH -u "$shortmode_path"`
17329       new_path="$input_path"
17330     fi
17331   fi
17332 
17333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17334   if test "x$test_cygdrive_prefix" = x; then
17335     # As a simple fix, exclude /usr/bin since it's not a real path.
17336     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17338       # a path prefixed by /cygdrive for fixpath to work.
17339       new_path="$CYGWIN_ROOT_PATH$input_path"
17340     fi
17341   fi
17342 
17343   # remove trailing .exe if any
17344   new_path="${new_path/%.exe/}"
17345 
17346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17347 
17348   # First separate the path from the arguments. This will split at the first
17349   # space.
17350   complete="$VS_ENV_CMD"
17351   path="${complete%% *}"
17352   tmp="$complete EOL"
17353   arguments="${tmp#* }"
17354 
17355   # Input might be given as Windows format, start by converting to
17356   # unix format.
17357   new_path="$path"
17358 
17359   windows_path="$new_path"
17360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17361     unix_path=`$CYGPATH -u "$windows_path"`
17362     new_path="$unix_path"
17363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17364     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17365     new_path="$unix_path"
17366   fi
17367 
17368 
17369   # Now try to locate executable using which
17370   new_path=`$WHICH "$new_path" 2> /dev/null`
17371 
17372   if test "x$new_path" = x; then
17373     # Oops. Which didn't find the executable.
17374     # The splitting of arguments from the executable at a space might have been incorrect,
17375     # since paths with space are more likely in Windows. Give it another try with the whole
17376     # argument.
17377     path="$complete"
17378     arguments="EOL"
17379     new_path="$path"
17380 
17381   windows_path="$new_path"
17382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17383     unix_path=`$CYGPATH -u "$windows_path"`
17384     new_path="$unix_path"
17385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17387     new_path="$unix_path"
17388   fi
17389 
17390 
17391     new_path=`$WHICH "$new_path" 2> /dev/null`
17392 
17393     if test "x$new_path" = x; then
17394       # It's still not found. Now this is an unrecoverable error.
17395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17396 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17397       has_space=`$ECHO "$complete" | $GREP " "`
17398       if test "x$has_space" != x; then
17399         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17400 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17401       fi
17402       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17403     fi
17404   fi
17405 
17406   # Now new_path has a complete unix path to the binary
17407   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17408     # Keep paths in /bin as-is, but remove trailing .exe if any
17409     new_path="${new_path/%.exe/}"
17410     # Do not save /bin paths to all_fixpath_prefixes!
17411   else
17412     # Not in mixed or Windows style, start by that.
17413     new_path=`cmd //c echo $new_path`
17414 
17415   input_path="$new_path"
17416   # Check if we need to convert this using DOS-style short mode. If the path
17417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17418   # take no chances and rewrite it.
17419   # Note: m4 eats our [], so we need to use [ and ] instead.
17420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17421   if test "x$has_forbidden_chars" != x; then
17422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17423     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17424   fi
17425 
17426     # Output is in $new_path
17427 
17428   windows_path="$new_path"
17429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17430     unix_path=`$CYGPATH -u "$windows_path"`
17431     new_path="$unix_path"
17432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17434     new_path="$unix_path"
17435   fi
17436 
17437     # remove trailing .exe if any
17438     new_path="${new_path/%.exe/}"
17439 
17440     # Save the first 10 bytes of this path to the storage, so fixpath can work.
17441     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17442   fi
17443 
17444   else
17445     # We're on a posix platform. Hooray! :)
17446     # First separate the path from the arguments. This will split at the first
17447     # space.
17448     complete="$VS_ENV_CMD"
17449     path="${complete%% *}"
17450     tmp="$complete EOL"
17451     arguments="${tmp#* }"
17452 
17453     # Cannot rely on the command "which" here since it doesn't always work.
17454     is_absolute_path=`$ECHO "$path" | $GREP ^/`
17455     if test -z "$is_absolute_path"; then
17456       # Path to executable is not absolute. Find it.
17457       IFS_save="$IFS"
17458       IFS=:
17459       for p in $PATH; do
17460         if test -f "$p/$path" && test -x "$p/$path"; then
17461           new_path="$p/$path"
17462           break
17463         fi
17464       done
17465       IFS="$IFS_save"
17466     else
17467       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17468 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17469       new_path="$path"
17470     fi
17471 
17472     if test "x$new_path" = x; then
17473       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17474 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17475       has_space=`$ECHO "$complete" | $GREP " "`
17476       if test "x$has_space" != x; then
17477         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17478 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17479       fi
17480       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17481     fi
17482   fi
17483 
17484   # Now join together the path and the arguments once again
17485   if test "x$arguments" != xEOL; then
17486     new_complete="$new_path ${arguments% *}"
17487   else
17488     new_complete="$new_path"
17489   fi
17490 
17491   if test "x$complete" != "x$new_complete"; then
17492     VS_ENV_CMD="$new_complete"
17493     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17494 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17495   fi
17496 
17497 
17498     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17499     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17500 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17501     cd $OUTPUT_ROOT
17502     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17503     # to autoconf standards.
17504 
17505     #----
17506 
17507     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17508     # but calculate the difference in Cygwin environment before/after running it and then
17509     # apply the diff.
17510 
17511     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17512       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17513       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17514       _dosbash=`cygpath -a -w -s \`which bash\`.*`
17515     else
17516       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17517       _dosbash=`cmd //c echo \`which bash\``
17518     fi
17519 
17520     # generate the set of exported vars before/after the vs10 setup
17521     $ECHO "@echo off"                                           >  localdevenvtmp.bat
17522     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17523     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17524     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17525 
17526     # Now execute the newly created bat file.
17527     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17528     cmd /c localdevenvtmp.bat | cat
17529 
17530     # apply the diff (less some non-vs10 vars named by "!")
17531     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17532     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17533     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17534 
17535     # cleanup
17536     $RM localdevenvtmp*
17537     #----
17538     cd $CURDIR
17539     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17540       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17541 $as_echo "no" >&6; }
17542       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17543 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17544       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17545 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17546       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17547 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17548       as_fn_error $? "Cannot continue" "$LINENO" 5
17549     fi
17550 
17551     # Now set all paths and other env variables. This will allow the rest of
17552     # the configure script to find and run the compiler in the proper way.
17553     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17554 $as_echo "$as_me: Setting extracted environment variables" >&6;}
17555     . $OUTPUT_ROOT/localdevenv.sh
17556   else
17557     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17558     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17559 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17560   fi
17561 
17562   # At this point, we should have corrent variables in the environment, or we can't continue.
17563   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17564 $as_echo_n "checking for Visual Studio variables... " >&6; }
17565 
17566   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17567     if test "x$INCLUDE" = x || test "x$LIB" = x; then
17568       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17569 $as_echo "present but broken" >&6; }
17570       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17571     else
17572       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17573 $as_echo "ok" >&6; }
17574       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17575       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17576       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17577       # Remove any paths containing # (typically F#) as that messes up make
17578       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
17579       VS_PATH="$PATH"
17580 
17581 
17582 
17583     fi
17584   else
17585     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17586 $as_echo "not found" >&6; }
17587 
17588     if test "x$VS_ENV_CMD" = x; then
17589       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17590 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17591       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17592 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17593     else
17594       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17595 $as_echo "$as_me: Running the extraction script failed." >&6;}
17596     fi
17597     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17598 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17599     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17600 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17601     as_fn_error $? "Cannot continue" "$LINENO" 5
17602   fi
17603 
17604 
17605 
17606 # Check whether --with-msvcr-dll was given.
17607 if test "${with_msvcr_dll+set}" = set; then :
17608   withval=$with_msvcr_dll;
17609 fi
17610 
17611 
17612   if test "x$with_msvcr_dll" != x; then
17613     # If given explicitely by user, do not probe. If not present, fail directly.
17614 
17615   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
17616   METHOD="--with-msvcr-dll"
17617   if test -e "$POSSIBLE_MSVCR_DLL"; then
17618     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17619 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17620 
17621     # Need to check if the found msvcr is correct architecture
17622     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17623 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17624     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17625     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17626       CORRECT_MSVCR_ARCH=386
17627     else
17628       CORRECT_MSVCR_ARCH=x86-64
17629     fi
17630     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17631       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17632 $as_echo "ok" >&6; }
17633       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17634       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17635 $as_echo_n "checking for msvcr100.dll... " >&6; }
17636       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17637 $as_echo "$MSVCR_DLL" >&6; }
17638     else
17639       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17640 $as_echo "incorrect, ignoring" >&6; }
17641       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17642 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17643     fi
17644   fi
17645 
17646     if test "x$MSVCR_DLL" = x; then
17647       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
17648     fi
17649   fi
17650 
17651   if test "x$MSVCR_DLL" = x; then
17652     # Probe: Using well-known location from Visual Studio 10.0
17653     if test "x$VCINSTALLDIR" != x; then
17654       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
17655 
17656   windows_path="$CYGWIN_VC_INSTALL_DIR"
17657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17658     unix_path=`$CYGPATH -u "$windows_path"`
17659     CYGWIN_VC_INSTALL_DIR="$unix_path"
17660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17662     CYGWIN_VC_INSTALL_DIR="$unix_path"
17663   fi
17664 
17665       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17666         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
17667       else
17668         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
17669       fi
17670 
17671   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17672   METHOD="well-known location in VCINSTALLDIR"
17673   if test -e "$POSSIBLE_MSVCR_DLL"; then
17674     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17675 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17676 
17677     # Need to check if the found msvcr is correct architecture
17678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17679 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17680     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17681     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17682       CORRECT_MSVCR_ARCH=386
17683     else
17684       CORRECT_MSVCR_ARCH=x86-64
17685     fi
17686     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17687       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17688 $as_echo "ok" >&6; }
17689       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17690       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17691 $as_echo_n "checking for msvcr100.dll... " >&6; }
17692       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17693 $as_echo "$MSVCR_DLL" >&6; }
17694     else
17695       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17696 $as_echo "incorrect, ignoring" >&6; }
17697       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17698 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17699     fi
17700   fi
17701 
17702     fi
17703   fi
17704 
17705   if test "x$MSVCR_DLL" = x; then
17706     # Probe: Check in the Boot JDK directory.
17707     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
17708 
17709   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17710   METHOD="well-known location in Boot JDK"
17711   if test -e "$POSSIBLE_MSVCR_DLL"; then
17712     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17713 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17714 
17715     # Need to check if the found msvcr is correct architecture
17716     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17717 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17718     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17719     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17720       CORRECT_MSVCR_ARCH=386
17721     else
17722       CORRECT_MSVCR_ARCH=x86-64
17723     fi
17724     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17725       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17726 $as_echo "ok" >&6; }
17727       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17728       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17729 $as_echo_n "checking for msvcr100.dll... " >&6; }
17730       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17731 $as_echo "$MSVCR_DLL" >&6; }
17732     else
17733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17734 $as_echo "incorrect, ignoring" >&6; }
17735       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17736 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17737     fi
17738   fi
17739 
17740   fi
17741 
17742   if test "x$MSVCR_DLL" = x; then
17743     # Probe: Look in the Windows system32 directory
17744     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
17745 
17746   windows_path="$CYGWIN_SYSTEMROOT"
17747   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17748     unix_path=`$CYGPATH -u "$windows_path"`
17749     CYGWIN_SYSTEMROOT="$unix_path"
17750   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17751     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17752     CYGWIN_SYSTEMROOT="$unix_path"
17753   fi
17754 
17755     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
17756 
17757   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17758   METHOD="well-known location in SYSTEMROOT"
17759   if test -e "$POSSIBLE_MSVCR_DLL"; then
17760     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17761 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17762 
17763     # Need to check if the found msvcr is correct architecture
17764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17765 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17766     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17767     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17768       CORRECT_MSVCR_ARCH=386
17769     else
17770       CORRECT_MSVCR_ARCH=x86-64
17771     fi
17772     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17773       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17774 $as_echo "ok" >&6; }
17775       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17776       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17777 $as_echo_n "checking for msvcr100.dll... " >&6; }
17778       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17779 $as_echo "$MSVCR_DLL" >&6; }
17780     else
17781       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17782 $as_echo "incorrect, ignoring" >&6; }
17783       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17784 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17785     fi
17786   fi
17787 
17788   fi
17789 
17790   if test "x$MSVCR_DLL" = x; then
17791     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
17792     if test "x$VS100COMNTOOLS" != x; then
17793       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
17794 
17795   windows_path="$CYGWIN_VS_TOOLS_DIR"
17796   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797     unix_path=`$CYGPATH -u "$windows_path"`
17798     CYGWIN_VS_TOOLS_DIR="$unix_path"
17799   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801     CYGWIN_VS_TOOLS_DIR="$unix_path"
17802   fi
17803 
17804       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17805         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
17806       else
17807         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
17808       fi
17809 
17810   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17811   METHOD="search of VS100COMNTOOLS"
17812   if test -e "$POSSIBLE_MSVCR_DLL"; then
17813     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17814 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17815 
17816     # Need to check if the found msvcr is correct architecture
17817     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17818 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17819     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17820     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17821       CORRECT_MSVCR_ARCH=386
17822     else
17823       CORRECT_MSVCR_ARCH=x86-64
17824     fi
17825     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17826       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17827 $as_echo "ok" >&6; }
17828       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17829       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17830 $as_echo_n "checking for msvcr100.dll... " >&6; }
17831       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17832 $as_echo "$MSVCR_DLL" >&6; }
17833     else
17834       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17835 $as_echo "incorrect, ignoring" >&6; }
17836       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17837 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17838     fi
17839   fi
17840 
17841     fi
17842   fi
17843 
17844   if test "x$MSVCR_DLL" = x; then
17845     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
17846     # (This was the original behaviour; kept since it might turn up something)
17847     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
17848       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17849         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
17850       else
17851         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
17852         if test "x$POSSIBLE_MSVCR_DLL" = x; then
17853           # We're grasping at straws now...
17854           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
17855         fi
17856       fi
17857 
17858 
17859   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17860   METHOD="search of VCINSTALLDIR"
17861   if test -e "$POSSIBLE_MSVCR_DLL"; then
17862     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
17863 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
17864 
17865     # Need to check if the found msvcr is correct architecture
17866     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
17867 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
17868     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
17869     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
17870       CORRECT_MSVCR_ARCH=386
17871     else
17872       CORRECT_MSVCR_ARCH=x86-64
17873     fi
17874     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
17875       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17876 $as_echo "ok" >&6; }
17877       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
17878       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17879 $as_echo_n "checking for msvcr100.dll... " >&6; }
17880       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17881 $as_echo "$MSVCR_DLL" >&6; }
17882     else
17883       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
17884 $as_echo "incorrect, ignoring" >&6; }
17885       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
17886 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
17887     fi
17888   fi
17889 
17890     fi
17891   fi
17892 
17893   if test "x$MSVCR_DLL" = x; then
17894     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17895 $as_echo_n "checking for msvcr100.dll... " >&6; }
17896     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17897 $as_echo "no" >&6; }
17898     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
17899   fi
17900 
17901 
17902   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17903 
17904   # Input might be given as Windows format, start by converting to
17905   # unix format.
17906   path="$MSVCR_DLL"
17907   new_path=`$CYGPATH -u "$path"`
17908 
17909   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17910   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17911   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17912   # "foo.exe" is OK but "foo" is an error.
17913   #
17914   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17915   # It is also a way to make sure we got the proper file name for the real test later on.
17916   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17917   if test "x$test_shortpath" = x; then
17918     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17919 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17920     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17921   fi
17922 
17923   # Call helper function which possibly converts this using DOS-style short mode.
17924   # If so, the updated path is stored in $new_path.
17925 
17926   input_path="$new_path"
17927   # Check if we need to convert this using DOS-style short mode. If the path
17928   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17929   # take no chances and rewrite it.
17930   # Note: m4 eats our [], so we need to use [ and ] instead.
17931   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17932   if test "x$has_forbidden_chars" != x; then
17933     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17934     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17935     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17936     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17937       # Going to short mode and back again did indeed matter. Since short mode is
17938       # case insensitive, let's make it lowercase to improve readability.
17939       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17940       # Now convert it back to Unix-stile (cygpath)
17941       input_path=`$CYGPATH -u "$shortmode_path"`
17942       new_path="$input_path"
17943     fi
17944   fi
17945 
17946   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17947   if test "x$test_cygdrive_prefix" = x; then
17948     # As a simple fix, exclude /usr/bin since it's not a real path.
17949     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17950       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17951       # a path prefixed by /cygdrive for fixpath to work.
17952       new_path="$CYGWIN_ROOT_PATH$input_path"
17953     fi
17954   fi
17955 
17956 
17957   if test "x$path" != "x$new_path"; then
17958     MSVCR_DLL="$new_path"
17959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17960 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17961   fi
17962 
17963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17964 
17965   path="$MSVCR_DLL"
17966   has_colon=`$ECHO $path | $GREP ^.:`
17967   new_path="$path"
17968   if test "x$has_colon" = x; then
17969     # Not in mixed or Windows style, start by that.
17970     new_path=`cmd //c echo $path`
17971   fi
17972 
17973 
17974   input_path="$new_path"
17975   # Check if we need to convert this using DOS-style short mode. If the path
17976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17977   # take no chances and rewrite it.
17978   # Note: m4 eats our [], so we need to use [ and ] instead.
17979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17980   if test "x$has_forbidden_chars" != x; then
17981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17982     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17983   fi
17984 
17985 
17986   windows_path="$new_path"
17987   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17988     unix_path=`$CYGPATH -u "$windows_path"`
17989     new_path="$unix_path"
17990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17991     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17992     new_path="$unix_path"
17993   fi
17994 
17995   if test "x$path" != "x$new_path"; then
17996     MSVCR_DLL="$new_path"
17997     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17998 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17999   fi
18000 
18001   # Save the first 10 bytes of this path to the storage, so fixpath can work.
18002   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18003 
18004   else
18005     # We're on a posix platform. Hooray! :)
18006     path="$MSVCR_DLL"
18007     has_space=`$ECHO "$path" | $GREP " "`
18008     if test "x$has_space" != x; then
18009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
18010 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
18011       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
18012     fi
18013 
18014     # Use eval to expand a potential ~
18015     eval path="$path"
18016     if test ! -f "$path" && test ! -d "$path"; then
18017       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
18018     fi
18019 
18020     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
18021   fi
18022 
18023 
18024 
18025 
18026 # Check whether --with-dxsdk was given.
18027 if test "${with_dxsdk+set}" = set; then :
18028   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
18029 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
18030 fi
18031 
18032 
18033 
18034 
18035 # Check whether --with-dxsdk-lib was given.
18036 if test "${with_dxsdk_lib+set}" = set; then :
18037   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
18038 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
18039 fi
18040 
18041 
18042 
18043 
18044 # Check whether --with-dxsdk-include was given.
18045 if test "${with_dxsdk_include+set}" = set; then :
18046   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
18047 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
18048 fi
18049 
18050 
18051   fi
18052 
18053 
18054 
18055   # If --build AND --host is set, then the configure script will find any
18056   # cross compilation tools in the PATH. Cross compilation tools
18057   # follows the cross compilation standard where they are prefixed with ${host}.
18058   # For example the binary i686-sun-solaris2.10-gcc
18059   # will cross compile for i686-sun-solaris2.10
18060   # If neither of build and host is not set, then build=host and the
18061   # default compiler found in the path will be used.
18062   # Setting only --host, does not seem to be really supported.
18063   # Please set both --build and --host if you want to cross compile.
18064 
18065   if test "x$COMPILE_TYPE" = "xcross"; then
18066     # Now we to find a C/C++ compiler that can build executables for the build
18067     # platform. We can't use the AC_PROG_CC macro, since it can only be used
18068     # once. Also, we need to do this before adding a tools dir to the path,
18069     # otherwise we might pick up cross-compilers which don't use standard naming.
18070     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
18071     # to wait until they are properly discovered.
18072     for ac_prog in cl cc gcc
18073 do
18074   # Extract the first word of "$ac_prog", so it can be a program name with args.
18075 set dummy $ac_prog; ac_word=$2
18076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077 $as_echo_n "checking for $ac_word... " >&6; }
18078 if ${ac_cv_path_BUILD_CC+:} false; then :
18079   $as_echo_n "(cached) " >&6
18080 else
18081   case $BUILD_CC in
18082   [\\/]* | ?:[\\/]*)
18083   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
18084   ;;
18085   *)
18086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18087 for as_dir in $PATH
18088 do
18089   IFS=$as_save_IFS
18090   test -z "$as_dir" && as_dir=.
18091     for ac_exec_ext in '' $ac_executable_extensions; do
18092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18093     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
18094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18095     break 2
18096   fi
18097 done
18098   done
18099 IFS=$as_save_IFS
18100 
18101   ;;
18102 esac
18103 fi
18104 BUILD_CC=$ac_cv_path_BUILD_CC
18105 if test -n "$BUILD_CC"; then
18106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
18107 $as_echo "$BUILD_CC" >&6; }
18108 else
18109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18110 $as_echo "no" >&6; }
18111 fi
18112 
18113 
18114   test -n "$BUILD_CC" && break
18115 done
18116 
18117 
18118   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18119 
18120   # First separate the path from the arguments. This will split at the first
18121   # space.
18122   complete="$BUILD_CC"
18123   path="${complete%% *}"
18124   tmp="$complete EOL"
18125   arguments="${tmp#* }"
18126 
18127   # Input might be given as Windows format, start by converting to
18128   # unix format.
18129   new_path=`$CYGPATH -u "$path"`
18130 
18131   # Now try to locate executable using which
18132   new_path=`$WHICH "$new_path" 2> /dev/null`
18133   # bat and cmd files are not always considered executable in cygwin causing which
18134   # to not find them
18135   if test "x$new_path" = x \
18136       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18137       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18138     new_path=`$CYGPATH -u "$path"`
18139   fi
18140   if test "x$new_path" = x; then
18141     # Oops. Which didn't find the executable.
18142     # The splitting of arguments from the executable at a space might have been incorrect,
18143     # since paths with space are more likely in Windows. Give it another try with the whole
18144     # argument.
18145     path="$complete"
18146     arguments="EOL"
18147     new_path=`$CYGPATH -u "$path"`
18148     new_path=`$WHICH "$new_path" 2> /dev/null`
18149     # bat and cmd files are not always considered executable in cygwin causing which
18150     # to not find them
18151     if test "x$new_path" = x \
18152         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18153         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18154       new_path=`$CYGPATH -u "$path"`
18155     fi
18156     if test "x$new_path" = x; then
18157       # It's still not found. Now this is an unrecoverable error.
18158       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18159 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18160       has_space=`$ECHO "$complete" | $GREP " "`
18161       if test "x$has_space" != x; then
18162         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18163 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18164       fi
18165       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18166     fi
18167   fi
18168 
18169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18172   # "foo.exe" is OK but "foo" is an error.
18173   #
18174   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18175   # It is also a way to make sure we got the proper file name for the real test later on.
18176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18177   if test "x$test_shortpath" = x; then
18178     # Short path failed, file does not exist as specified.
18179     # Try adding .exe or .cmd
18180     if test -f "${new_path}.exe"; then
18181       input_to_shortpath="${new_path}.exe"
18182     elif test -f "${new_path}.cmd"; then
18183       input_to_shortpath="${new_path}.cmd"
18184     else
18185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
18186 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
18187       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18188 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18189       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18190     fi
18191   else
18192     input_to_shortpath="$new_path"
18193   fi
18194 
18195   # Call helper function which possibly converts this using DOS-style short mode.
18196   # If so, the updated path is stored in $new_path.
18197   new_path="$input_to_shortpath"
18198 
18199   input_path="$input_to_shortpath"
18200   # Check if we need to convert this using DOS-style short mode. If the path
18201   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18202   # take no chances and rewrite it.
18203   # Note: m4 eats our [], so we need to use [ and ] instead.
18204   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18205   if test "x$has_forbidden_chars" != x; then
18206     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18207     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18208     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18209     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18210       # Going to short mode and back again did indeed matter. Since short mode is
18211       # case insensitive, let's make it lowercase to improve readability.
18212       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18213       # Now convert it back to Unix-stile (cygpath)
18214       input_path=`$CYGPATH -u "$shortmode_path"`
18215       new_path="$input_path"
18216     fi
18217   fi
18218 
18219   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18220   if test "x$test_cygdrive_prefix" = x; then
18221     # As a simple fix, exclude /usr/bin since it's not a real path.
18222     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18223       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18224       # a path prefixed by /cygdrive for fixpath to work.
18225       new_path="$CYGWIN_ROOT_PATH$input_path"
18226     fi
18227   fi
18228 
18229   # remove trailing .exe if any
18230   new_path="${new_path/%.exe/}"
18231 
18232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18233 
18234   # First separate the path from the arguments. This will split at the first
18235   # space.
18236   complete="$BUILD_CC"
18237   path="${complete%% *}"
18238   tmp="$complete EOL"
18239   arguments="${tmp#* }"
18240 
18241   # Input might be given as Windows format, start by converting to
18242   # unix format.
18243   new_path="$path"
18244 
18245   windows_path="$new_path"
18246   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18247     unix_path=`$CYGPATH -u "$windows_path"`
18248     new_path="$unix_path"
18249   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18250     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18251     new_path="$unix_path"
18252   fi
18253 
18254 
18255   # Now try to locate executable using which
18256   new_path=`$WHICH "$new_path" 2> /dev/null`
18257 
18258   if test "x$new_path" = x; then
18259     # Oops. Which didn't find the executable.
18260     # The splitting of arguments from the executable at a space might have been incorrect,
18261     # since paths with space are more likely in Windows. Give it another try with the whole
18262     # argument.
18263     path="$complete"
18264     arguments="EOL"
18265     new_path="$path"
18266 
18267   windows_path="$new_path"
18268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18269     unix_path=`$CYGPATH -u "$windows_path"`
18270     new_path="$unix_path"
18271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18273     new_path="$unix_path"
18274   fi
18275 
18276 
18277     new_path=`$WHICH "$new_path" 2> /dev/null`
18278 
18279     if test "x$new_path" = x; then
18280       # It's still not found. Now this is an unrecoverable error.
18281       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18282 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18283       has_space=`$ECHO "$complete" | $GREP " "`
18284       if test "x$has_space" != x; then
18285         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18286 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18287       fi
18288       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18289     fi
18290   fi
18291 
18292   # Now new_path has a complete unix path to the binary
18293   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18294     # Keep paths in /bin as-is, but remove trailing .exe if any
18295     new_path="${new_path/%.exe/}"
18296     # Do not save /bin paths to all_fixpath_prefixes!
18297   else
18298     # Not in mixed or Windows style, start by that.
18299     new_path=`cmd //c echo $new_path`
18300 
18301   input_path="$new_path"
18302   # Check if we need to convert this using DOS-style short mode. If the path
18303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18304   # take no chances and rewrite it.
18305   # Note: m4 eats our [], so we need to use [ and ] instead.
18306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18307   if test "x$has_forbidden_chars" != x; then
18308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18310   fi
18311 
18312     # Output is in $new_path
18313 
18314   windows_path="$new_path"
18315   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18316     unix_path=`$CYGPATH -u "$windows_path"`
18317     new_path="$unix_path"
18318   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18319     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18320     new_path="$unix_path"
18321   fi
18322 
18323     # remove trailing .exe if any
18324     new_path="${new_path/%.exe/}"
18325 
18326     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18327     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18328   fi
18329 
18330   else
18331     # We're on a posix platform. Hooray! :)
18332     # First separate the path from the arguments. This will split at the first
18333     # space.
18334     complete="$BUILD_CC"
18335     path="${complete%% *}"
18336     tmp="$complete EOL"
18337     arguments="${tmp#* }"
18338 
18339     # Cannot rely on the command "which" here since it doesn't always work.
18340     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18341     if test -z "$is_absolute_path"; then
18342       # Path to executable is not absolute. Find it.
18343       IFS_save="$IFS"
18344       IFS=:
18345       for p in $PATH; do
18346         if test -f "$p/$path" && test -x "$p/$path"; then
18347           new_path="$p/$path"
18348           break
18349         fi
18350       done
18351       IFS="$IFS_save"
18352     else
18353       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18354 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18355       new_path="$path"
18356     fi
18357 
18358     if test "x$new_path" = x; then
18359       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18360 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18361       has_space=`$ECHO "$complete" | $GREP " "`
18362       if test "x$has_space" != x; then
18363         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18364 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18365       fi
18366       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18367     fi
18368   fi
18369 
18370   # Now join together the path and the arguments once again
18371   if test "x$arguments" != xEOL; then
18372     new_complete="$new_path ${arguments% *}"
18373   else
18374     new_complete="$new_path"
18375   fi
18376 
18377   if test "x$complete" != "x$new_complete"; then
18378     BUILD_CC="$new_complete"
18379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18380 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18381   fi
18382 
18383     for ac_prog in cl CC g++
18384 do
18385   # Extract the first word of "$ac_prog", so it can be a program name with args.
18386 set dummy $ac_prog; ac_word=$2
18387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18388 $as_echo_n "checking for $ac_word... " >&6; }
18389 if ${ac_cv_path_BUILD_CXX+:} false; then :
18390   $as_echo_n "(cached) " >&6
18391 else
18392   case $BUILD_CXX in
18393   [\\/]* | ?:[\\/]*)
18394   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18395   ;;
18396   *)
18397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18398 for as_dir in $PATH
18399 do
18400   IFS=$as_save_IFS
18401   test -z "$as_dir" && as_dir=.
18402     for ac_exec_ext in '' $ac_executable_extensions; do
18403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18404     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18406     break 2
18407   fi
18408 done
18409   done
18410 IFS=$as_save_IFS
18411 
18412   ;;
18413 esac
18414 fi
18415 BUILD_CXX=$ac_cv_path_BUILD_CXX
18416 if test -n "$BUILD_CXX"; then
18417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18418 $as_echo "$BUILD_CXX" >&6; }
18419 else
18420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18421 $as_echo "no" >&6; }
18422 fi
18423 
18424 
18425   test -n "$BUILD_CXX" && break
18426 done
18427 
18428 
18429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18430 
18431   # First separate the path from the arguments. This will split at the first
18432   # space.
18433   complete="$BUILD_CXX"
18434   path="${complete%% *}"
18435   tmp="$complete EOL"
18436   arguments="${tmp#* }"
18437 
18438   # Input might be given as Windows format, start by converting to
18439   # unix format.
18440   new_path=`$CYGPATH -u "$path"`
18441 
18442   # Now try to locate executable using which
18443   new_path=`$WHICH "$new_path" 2> /dev/null`
18444   # bat and cmd files are not always considered executable in cygwin causing which
18445   # to not find them
18446   if test "x$new_path" = x \
18447       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18448       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18449     new_path=`$CYGPATH -u "$path"`
18450   fi
18451   if test "x$new_path" = x; then
18452     # Oops. Which didn't find the executable.
18453     # The splitting of arguments from the executable at a space might have been incorrect,
18454     # since paths with space are more likely in Windows. Give it another try with the whole
18455     # argument.
18456     path="$complete"
18457     arguments="EOL"
18458     new_path=`$CYGPATH -u "$path"`
18459     new_path=`$WHICH "$new_path" 2> /dev/null`
18460     # bat and cmd files are not always considered executable in cygwin causing which
18461     # to not find them
18462     if test "x$new_path" = x \
18463         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18464         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18465       new_path=`$CYGPATH -u "$path"`
18466     fi
18467     if test "x$new_path" = x; then
18468       # It's still not found. Now this is an unrecoverable error.
18469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18470 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18471       has_space=`$ECHO "$complete" | $GREP " "`
18472       if test "x$has_space" != x; then
18473         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18474 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18475       fi
18476       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18477     fi
18478   fi
18479 
18480   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18481   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18482   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18483   # "foo.exe" is OK but "foo" is an error.
18484   #
18485   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18486   # It is also a way to make sure we got the proper file name for the real test later on.
18487   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18488   if test "x$test_shortpath" = x; then
18489     # Short path failed, file does not exist as specified.
18490     # Try adding .exe or .cmd
18491     if test -f "${new_path}.exe"; then
18492       input_to_shortpath="${new_path}.exe"
18493     elif test -f "${new_path}.cmd"; then
18494       input_to_shortpath="${new_path}.cmd"
18495     else
18496       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18497 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18498       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18499 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18500       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18501     fi
18502   else
18503     input_to_shortpath="$new_path"
18504   fi
18505 
18506   # Call helper function which possibly converts this using DOS-style short mode.
18507   # If so, the updated path is stored in $new_path.
18508   new_path="$input_to_shortpath"
18509 
18510   input_path="$input_to_shortpath"
18511   # Check if we need to convert this using DOS-style short mode. If the path
18512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18513   # take no chances and rewrite it.
18514   # Note: m4 eats our [], so we need to use [ and ] instead.
18515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18516   if test "x$has_forbidden_chars" != x; then
18517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18518     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18519     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18520     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18521       # Going to short mode and back again did indeed matter. Since short mode is
18522       # case insensitive, let's make it lowercase to improve readability.
18523       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18524       # Now convert it back to Unix-stile (cygpath)
18525       input_path=`$CYGPATH -u "$shortmode_path"`
18526       new_path="$input_path"
18527     fi
18528   fi
18529 
18530   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18531   if test "x$test_cygdrive_prefix" = x; then
18532     # As a simple fix, exclude /usr/bin since it's not a real path.
18533     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18534       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18535       # a path prefixed by /cygdrive for fixpath to work.
18536       new_path="$CYGWIN_ROOT_PATH$input_path"
18537     fi
18538   fi
18539 
18540   # remove trailing .exe if any
18541   new_path="${new_path/%.exe/}"
18542 
18543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18544 
18545   # First separate the path from the arguments. This will split at the first
18546   # space.
18547   complete="$BUILD_CXX"
18548   path="${complete%% *}"
18549   tmp="$complete EOL"
18550   arguments="${tmp#* }"
18551 
18552   # Input might be given as Windows format, start by converting to
18553   # unix format.
18554   new_path="$path"
18555 
18556   windows_path="$new_path"
18557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18558     unix_path=`$CYGPATH -u "$windows_path"`
18559     new_path="$unix_path"
18560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18562     new_path="$unix_path"
18563   fi
18564 
18565 
18566   # Now try to locate executable using which
18567   new_path=`$WHICH "$new_path" 2> /dev/null`
18568 
18569   if test "x$new_path" = x; then
18570     # Oops. Which didn't find the executable.
18571     # The splitting of arguments from the executable at a space might have been incorrect,
18572     # since paths with space are more likely in Windows. Give it another try with the whole
18573     # argument.
18574     path="$complete"
18575     arguments="EOL"
18576     new_path="$path"
18577 
18578   windows_path="$new_path"
18579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18580     unix_path=`$CYGPATH -u "$windows_path"`
18581     new_path="$unix_path"
18582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18584     new_path="$unix_path"
18585   fi
18586 
18587 
18588     new_path=`$WHICH "$new_path" 2> /dev/null`
18589 
18590     if test "x$new_path" = x; then
18591       # It's still not found. Now this is an unrecoverable error.
18592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18593 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18594       has_space=`$ECHO "$complete" | $GREP " "`
18595       if test "x$has_space" != x; then
18596         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18597 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18598       fi
18599       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18600     fi
18601   fi
18602 
18603   # Now new_path has a complete unix path to the binary
18604   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18605     # Keep paths in /bin as-is, but remove trailing .exe if any
18606     new_path="${new_path/%.exe/}"
18607     # Do not save /bin paths to all_fixpath_prefixes!
18608   else
18609     # Not in mixed or Windows style, start by that.
18610     new_path=`cmd //c echo $new_path`
18611 
18612   input_path="$new_path"
18613   # Check if we need to convert this using DOS-style short mode. If the path
18614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18615   # take no chances and rewrite it.
18616   # Note: m4 eats our [], so we need to use [ and ] instead.
18617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18618   if test "x$has_forbidden_chars" != x; then
18619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18621   fi
18622 
18623     # Output is in $new_path
18624 
18625   windows_path="$new_path"
18626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18627     unix_path=`$CYGPATH -u "$windows_path"`
18628     new_path="$unix_path"
18629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18631     new_path="$unix_path"
18632   fi
18633 
18634     # remove trailing .exe if any
18635     new_path="${new_path/%.exe/}"
18636 
18637     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18638     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18639   fi
18640 
18641   else
18642     # We're on a posix platform. Hooray! :)
18643     # First separate the path from the arguments. This will split at the first
18644     # space.
18645     complete="$BUILD_CXX"
18646     path="${complete%% *}"
18647     tmp="$complete EOL"
18648     arguments="${tmp#* }"
18649 
18650     # Cannot rely on the command "which" here since it doesn't always work.
18651     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18652     if test -z "$is_absolute_path"; then
18653       # Path to executable is not absolute. Find it.
18654       IFS_save="$IFS"
18655       IFS=:
18656       for p in $PATH; do
18657         if test -f "$p/$path" && test -x "$p/$path"; then
18658           new_path="$p/$path"
18659           break
18660         fi
18661       done
18662       IFS="$IFS_save"
18663     else
18664       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18665 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18666       new_path="$path"
18667     fi
18668 
18669     if test "x$new_path" = x; then
18670       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18671 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18672       has_space=`$ECHO "$complete" | $GREP " "`
18673       if test "x$has_space" != x; then
18674         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18675 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18676       fi
18677       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18678     fi
18679   fi
18680 
18681   # Now join together the path and the arguments once again
18682   if test "x$arguments" != xEOL; then
18683     new_complete="$new_path ${arguments% *}"
18684   else
18685     new_complete="$new_path"
18686   fi
18687 
18688   if test "x$complete" != "x$new_complete"; then
18689     BUILD_CXX="$new_complete"
18690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18691 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18692   fi
18693 
18694     # Extract the first word of "ld", so it can be a program name with args.
18695 set dummy ld; ac_word=$2
18696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18697 $as_echo_n "checking for $ac_word... " >&6; }
18698 if ${ac_cv_path_BUILD_LD+:} false; then :
18699   $as_echo_n "(cached) " >&6
18700 else
18701   case $BUILD_LD in
18702   [\\/]* | ?:[\\/]*)
18703   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18704   ;;
18705   *)
18706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18707 for as_dir in $PATH
18708 do
18709   IFS=$as_save_IFS
18710   test -z "$as_dir" && as_dir=.
18711     for ac_exec_ext in '' $ac_executable_extensions; do
18712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18713     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18715     break 2
18716   fi
18717 done
18718   done
18719 IFS=$as_save_IFS
18720 
18721   ;;
18722 esac
18723 fi
18724 BUILD_LD=$ac_cv_path_BUILD_LD
18725 if test -n "$BUILD_LD"; then
18726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18727 $as_echo "$BUILD_LD" >&6; }
18728 else
18729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18730 $as_echo "no" >&6; }
18731 fi
18732 
18733 
18734 
18735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18736 
18737   # First separate the path from the arguments. This will split at the first
18738   # space.
18739   complete="$BUILD_LD"
18740   path="${complete%% *}"
18741   tmp="$complete EOL"
18742   arguments="${tmp#* }"
18743 
18744   # Input might be given as Windows format, start by converting to
18745   # unix format.
18746   new_path=`$CYGPATH -u "$path"`
18747 
18748   # Now try to locate executable using which
18749   new_path=`$WHICH "$new_path" 2> /dev/null`
18750   # bat and cmd files are not always considered executable in cygwin causing which
18751   # to not find them
18752   if test "x$new_path" = x \
18753       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18754       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18755     new_path=`$CYGPATH -u "$path"`
18756   fi
18757   if test "x$new_path" = x; then
18758     # Oops. Which didn't find the executable.
18759     # The splitting of arguments from the executable at a space might have been incorrect,
18760     # since paths with space are more likely in Windows. Give it another try with the whole
18761     # argument.
18762     path="$complete"
18763     arguments="EOL"
18764     new_path=`$CYGPATH -u "$path"`
18765     new_path=`$WHICH "$new_path" 2> /dev/null`
18766     # bat and cmd files are not always considered executable in cygwin causing which
18767     # to not find them
18768     if test "x$new_path" = x \
18769         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18770         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18771       new_path=`$CYGPATH -u "$path"`
18772     fi
18773     if test "x$new_path" = x; then
18774       # It's still not found. Now this is an unrecoverable error.
18775       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18776 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18777       has_space=`$ECHO "$complete" | $GREP " "`
18778       if test "x$has_space" != x; then
18779         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18780 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18781       fi
18782       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18783     fi
18784   fi
18785 
18786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18789   # "foo.exe" is OK but "foo" is an error.
18790   #
18791   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18792   # It is also a way to make sure we got the proper file name for the real test later on.
18793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18794   if test "x$test_shortpath" = x; then
18795     # Short path failed, file does not exist as specified.
18796     # Try adding .exe or .cmd
18797     if test -f "${new_path}.exe"; then
18798       input_to_shortpath="${new_path}.exe"
18799     elif test -f "${new_path}.cmd"; then
18800       input_to_shortpath="${new_path}.cmd"
18801     else
18802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18803 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18804       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18805 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18806       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18807     fi
18808   else
18809     input_to_shortpath="$new_path"
18810   fi
18811 
18812   # Call helper function which possibly converts this using DOS-style short mode.
18813   # If so, the updated path is stored in $new_path.
18814   new_path="$input_to_shortpath"
18815 
18816   input_path="$input_to_shortpath"
18817   # Check if we need to convert this using DOS-style short mode. If the path
18818   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18819   # take no chances and rewrite it.
18820   # Note: m4 eats our [], so we need to use [ and ] instead.
18821   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18822   if test "x$has_forbidden_chars" != x; then
18823     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18824     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18825     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18826     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18827       # Going to short mode and back again did indeed matter. Since short mode is
18828       # case insensitive, let's make it lowercase to improve readability.
18829       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18830       # Now convert it back to Unix-stile (cygpath)
18831       input_path=`$CYGPATH -u "$shortmode_path"`
18832       new_path="$input_path"
18833     fi
18834   fi
18835 
18836   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18837   if test "x$test_cygdrive_prefix" = x; then
18838     # As a simple fix, exclude /usr/bin since it's not a real path.
18839     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18840       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18841       # a path prefixed by /cygdrive for fixpath to work.
18842       new_path="$CYGWIN_ROOT_PATH$input_path"
18843     fi
18844   fi
18845 
18846   # remove trailing .exe if any
18847   new_path="${new_path/%.exe/}"
18848 
18849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18850 
18851   # First separate the path from the arguments. This will split at the first
18852   # space.
18853   complete="$BUILD_LD"
18854   path="${complete%% *}"
18855   tmp="$complete EOL"
18856   arguments="${tmp#* }"
18857 
18858   # Input might be given as Windows format, start by converting to
18859   # unix format.
18860   new_path="$path"
18861 
18862   windows_path="$new_path"
18863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18864     unix_path=`$CYGPATH -u "$windows_path"`
18865     new_path="$unix_path"
18866   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18867     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18868     new_path="$unix_path"
18869   fi
18870 
18871 
18872   # Now try to locate executable using which
18873   new_path=`$WHICH "$new_path" 2> /dev/null`
18874 
18875   if test "x$new_path" = x; then
18876     # Oops. Which didn't find the executable.
18877     # The splitting of arguments from the executable at a space might have been incorrect,
18878     # since paths with space are more likely in Windows. Give it another try with the whole
18879     # argument.
18880     path="$complete"
18881     arguments="EOL"
18882     new_path="$path"
18883 
18884   windows_path="$new_path"
18885   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18886     unix_path=`$CYGPATH -u "$windows_path"`
18887     new_path="$unix_path"
18888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18889     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18890     new_path="$unix_path"
18891   fi
18892 
18893 
18894     new_path=`$WHICH "$new_path" 2> /dev/null`
18895 
18896     if test "x$new_path" = x; then
18897       # It's still not found. Now this is an unrecoverable error.
18898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18899 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18900       has_space=`$ECHO "$complete" | $GREP " "`
18901       if test "x$has_space" != x; then
18902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18904       fi
18905       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18906     fi
18907   fi
18908 
18909   # Now new_path has a complete unix path to the binary
18910   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18911     # Keep paths in /bin as-is, but remove trailing .exe if any
18912     new_path="${new_path/%.exe/}"
18913     # Do not save /bin paths to all_fixpath_prefixes!
18914   else
18915     # Not in mixed or Windows style, start by that.
18916     new_path=`cmd //c echo $new_path`
18917 
18918   input_path="$new_path"
18919   # Check if we need to convert this using DOS-style short mode. If the path
18920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18921   # take no chances and rewrite it.
18922   # Note: m4 eats our [], so we need to use [ and ] instead.
18923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18924   if test "x$has_forbidden_chars" != x; then
18925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18927   fi
18928 
18929     # Output is in $new_path
18930 
18931   windows_path="$new_path"
18932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933     unix_path=`$CYGPATH -u "$windows_path"`
18934     new_path="$unix_path"
18935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937     new_path="$unix_path"
18938   fi
18939 
18940     # remove trailing .exe if any
18941     new_path="${new_path/%.exe/}"
18942 
18943     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18944     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18945   fi
18946 
18947   else
18948     # We're on a posix platform. Hooray! :)
18949     # First separate the path from the arguments. This will split at the first
18950     # space.
18951     complete="$BUILD_LD"
18952     path="${complete%% *}"
18953     tmp="$complete EOL"
18954     arguments="${tmp#* }"
18955 
18956     # Cannot rely on the command "which" here since it doesn't always work.
18957     is_absolute_path=`$ECHO "$path" | $GREP ^/`
18958     if test -z "$is_absolute_path"; then
18959       # Path to executable is not absolute. Find it.
18960       IFS_save="$IFS"
18961       IFS=:
18962       for p in $PATH; do
18963         if test -f "$p/$path" && test -x "$p/$path"; then
18964           new_path="$p/$path"
18965           break
18966         fi
18967       done
18968       IFS="$IFS_save"
18969     else
18970       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18971 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18972       new_path="$path"
18973     fi
18974 
18975     if test "x$new_path" = x; then
18976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18977 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18978       has_space=`$ECHO "$complete" | $GREP " "`
18979       if test "x$has_space" != x; then
18980         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18981 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18982       fi
18983       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18984     fi
18985   fi
18986 
18987   # Now join together the path and the arguments once again
18988   if test "x$arguments" != xEOL; then
18989     new_complete="$new_path ${arguments% *}"
18990   else
18991     new_complete="$new_path"
18992   fi
18993 
18994   if test "x$complete" != "x$new_complete"; then
18995     BUILD_LD="$new_complete"
18996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18997 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18998   fi
18999 
19000   fi
19001 
19002 
19003 
19004 
19005   # If a devkit is found on the builddeps server, then prepend its path to the
19006   # PATH variable. If there are cross compilers available in the devkit, these
19007   # will be found by AC_PROG_CC et al.
19008   DEVKIT=
19009 
19010 
19011   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19012     # Source the builddeps file again, to make sure it uses the latest variables!
19013     . $builddepsfile
19014     # Look for a target and build machine specific resource!
19015     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19016     if test "x$resource" = x; then
19017       # Ok, lets instead look for a target specific resource
19018       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
19019     fi
19020     if test "x$resource" = x; then
19021       # Ok, lets instead look for a build specific resource
19022       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
19023     fi
19024     if test "x$resource" = x; then
19025       # Ok, lets instead look for a generic resource
19026       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
19027       resource=${builddep_devkit}
19028     fi
19029     if test "x$resource" != x; then
19030       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
19031 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
19032       # If the resource in the builddeps.conf file is an existing directory,
19033       # for example /java/linux/cups
19034       if test -d ${resource}; then
19035         depdir=${resource}
19036       else
19037 
19038   # devkit is for example mymodule
19039   # $resource is for example libs/general/libmymod_1_2_3.zip
19040   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19041   # $with_builddeps_dir is for example /localhome/builddeps
19042   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19043   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19044   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19045   filename=`basename $resource`
19046   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19047   filebase=${filename%%.*}
19048   extension=${filename#*.}
19049   installdir=$with_builddeps_dir/$filebase
19050   if test ! -f $installdir/$filename.unpacked; then
19051     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
19052 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19053     if test ! -d $installdir; then
19054       mkdir -p $installdir
19055     fi
19056     if test ! -d $installdir; then
19057       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19058     fi
19059     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
19060     touch $tmpfile
19061     if test ! -f $tmpfile; then
19062       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19063     fi
19064 
19065   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19066   # $tmpfile is the local file name for the downloaded file.
19067   VALID_TOOL=no
19068   if test "x$BDEPS_FTP" = xwget; then
19069     VALID_TOOL=yes
19070     wget -O $tmpfile $with_builddeps_server/$resource
19071   fi
19072   if test "x$BDEPS_FTP" = xlftp; then
19073     VALID_TOOL=yes
19074     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19075   fi
19076   if test "x$BDEPS_FTP" = xftp; then
19077     VALID_TOOL=yes
19078     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19079     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19080     FTPUSERPWD=${FTPSERVER%%@*}
19081     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19082       FTPUSER=${userpwd%%:*}
19083       FTPPWD=${userpwd#*@}
19084       FTPSERVER=${FTPSERVER#*@}
19085     else
19086       FTPUSER=ftp
19087       FTPPWD=ftp
19088     fi
19089     # the "pass" command does not work on some
19090     # ftp clients (read ftp.exe) but if it works,
19091     # passive mode is better!
19092     ( \
19093         echo "user $FTPUSER $FTPPWD"        ; \
19094         echo "pass"                         ; \
19095         echo "bin"                          ; \
19096         echo "get $FTPPATH $tmpfile"              ; \
19097     ) | ftp -in $FTPSERVER
19098   fi
19099   if test "x$VALID_TOOL" != xyes; then
19100     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19101   fi
19102 
19103     mv $tmpfile $installdir/$filename
19104     if test ! -s $installdir/$filename; then
19105       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19106     fi
19107     case "$extension" in
19108       zip)  echo "Unzipping $installdir/$filename..."
19109         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19110         ;;
19111       tar.gz) echo "Untaring $installdir/$filename..."
19112         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19113         ;;
19114       tgz) echo "Untaring $installdir/$filename..."
19115         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19116         ;;
19117       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19118         ;;
19119     esac
19120   fi
19121   if test -f $installdir/$filename.unpacked; then
19122     depdir=$installdir
19123   fi
19124 
19125       fi
19126       # Source the builddeps file again, because in the previous command, the depdir
19127       # was updated to point at the current build dependency install directory.
19128       . $builddepsfile
19129       # Now extract variables from the builddeps.conf files.
19130       theroot=${builddep_devkit_ROOT}
19131       thecflags=${builddep_devkit_CFLAGS}
19132       thelibs=${builddep_devkit_LIBS}
19133       if test "x$depdir" = x; then
19134         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
19135       fi
19136       DEVKIT=$depdir
19137       if test "x$theroot" != x; then
19138         DEVKIT="$theroot"
19139       fi
19140       if test "x$thecflags" != x; then
19141         DEVKIT_CFLAGS="$thecflags"
19142       fi
19143       if test "x$thelibs" != x; then
19144         DEVKIT_LIBS="$thelibs"
19145       fi
19146 
19147         # Found devkit
19148         PATH="$DEVKIT/bin:$PATH"
19149         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
19150         if test "x$x_includes" = "xNONE"; then
19151           x_includes="$SYS_ROOT/usr/include/X11"
19152         fi
19153         if test "x$x_libraries" = "xNONE"; then
19154           x_libraries="$SYS_ROOT/usr/lib"
19155         fi
19156 
19157 
19158     fi
19159 
19160   fi
19161 
19162 
19163   # Store the CFLAGS etal passed to the configure script.
19164   ORG_CFLAGS="$CFLAGS"
19165   ORG_CXXFLAGS="$CXXFLAGS"
19166   ORG_OBJCFLAGS="$OBJCFLAGS"
19167 
19168   # autoconf magic only relies on PATH, so update it if tools dir is specified
19169   OLD_PATH="$PATH"
19170   if test "x$TOOLS_DIR" != x; then
19171     PATH=$TOOLS_DIR:$PATH
19172   fi
19173 
19174 
19175   ### Locate C compiler (CC)
19176 
19177   # On windows, only cl.exe is supported.
19178   # On Solaris, cc is preferred to gcc.
19179   # Elsewhere, gcc is preferred to cc.
19180 
19181   if test "x$CC" != x; then
19182     COMPILER_CHECK_LIST="$CC"
19183   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19184     COMPILER_CHECK_LIST="cl"
19185   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19186     COMPILER_CHECK_LIST="cc gcc"
19187   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
19188     # Do not probe for cc on AIX.
19189     COMPILER_CHECK_LIST="xlc_r"
19190   else
19191     COMPILER_CHECK_LIST="gcc cc"
19192   fi
19193 
19194 
19195   COMPILER_NAME=C
19196 
19197   CC=
19198   # If TOOLS_DIR is set, check for all compiler names in there first
19199   # before checking the rest of the PATH.
19200   if test -n "$TOOLS_DIR"; then
19201     PATH_save="$PATH"
19202     PATH="$TOOLS_DIR"
19203     for ac_prog in $COMPILER_CHECK_LIST
19204 do
19205   # Extract the first word of "$ac_prog", so it can be a program name with args.
19206 set dummy $ac_prog; ac_word=$2
19207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19208 $as_echo_n "checking for $ac_word... " >&6; }
19209 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
19210   $as_echo_n "(cached) " >&6
19211 else
19212   case $TOOLS_DIR_CC in
19213   [\\/]* | ?:[\\/]*)
19214   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
19215   ;;
19216   *)
19217   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19218 for as_dir in $PATH
19219 do
19220   IFS=$as_save_IFS
19221   test -z "$as_dir" && as_dir=.
19222     for ac_exec_ext in '' $ac_executable_extensions; do
19223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19224     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
19225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19226     break 2
19227   fi
19228 done
19229   done
19230 IFS=$as_save_IFS
19231 
19232   ;;
19233 esac
19234 fi
19235 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19236 if test -n "$TOOLS_DIR_CC"; then
19237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19238 $as_echo "$TOOLS_DIR_CC" >&6; }
19239 else
19240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19241 $as_echo "no" >&6; }
19242 fi
19243 
19244 
19245   test -n "$TOOLS_DIR_CC" && break
19246 done
19247 
19248     CC=$TOOLS_DIR_CC
19249     PATH="$PATH_save"
19250   fi
19251 
19252   # AC_PATH_PROGS can't be run multiple times with the same variable,
19253   # so create a new name for this run.
19254   if test "x$CC" = x; then
19255     for ac_prog in $COMPILER_CHECK_LIST
19256 do
19257   # Extract the first word of "$ac_prog", so it can be a program name with args.
19258 set dummy $ac_prog; ac_word=$2
19259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19260 $as_echo_n "checking for $ac_word... " >&6; }
19261 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
19262   $as_echo_n "(cached) " >&6
19263 else
19264   case $POTENTIAL_CC in
19265   [\\/]* | ?:[\\/]*)
19266   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19267   ;;
19268   *)
19269   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19270 for as_dir in $PATH
19271 do
19272   IFS=$as_save_IFS
19273   test -z "$as_dir" && as_dir=.
19274     for ac_exec_ext in '' $ac_executable_extensions; do
19275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19276     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19278     break 2
19279   fi
19280 done
19281   done
19282 IFS=$as_save_IFS
19283 
19284   ;;
19285 esac
19286 fi
19287 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19288 if test -n "$POTENTIAL_CC"; then
19289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19290 $as_echo "$POTENTIAL_CC" >&6; }
19291 else
19292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19293 $as_echo "no" >&6; }
19294 fi
19295 
19296 
19297   test -n "$POTENTIAL_CC" && break
19298 done
19299 
19300     CC=$POTENTIAL_CC
19301   fi
19302 
19303   if test "x$CC" = x; then
19304 
19305   # Print a helpful message on how to acquire the necessary build dependency.
19306   # devkit is the help tag: freetype, cups, pulse, alsa etc
19307   MISSING_DEPENDENCY=devkit
19308 
19309   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19310     cygwin_help $MISSING_DEPENDENCY
19311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19312     msys_help $MISSING_DEPENDENCY
19313   else
19314     PKGHANDLER_COMMAND=
19315 
19316     case $PKGHANDLER in
19317       apt-get)
19318         apt_help     $MISSING_DEPENDENCY ;;
19319       yum)
19320         yum_help     $MISSING_DEPENDENCY ;;
19321       port)
19322         port_help    $MISSING_DEPENDENCY ;;
19323       pkgutil)
19324         pkgutil_help $MISSING_DEPENDENCY ;;
19325       pkgadd)
19326         pkgadd_help  $MISSING_DEPENDENCY ;;
19327     esac
19328 
19329     if test "x$PKGHANDLER_COMMAND" != x; then
19330       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19331     fi
19332   fi
19333 
19334     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19335   fi
19336 
19337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19338 
19339   # First separate the path from the arguments. This will split at the first
19340   # space.
19341   complete="$CC"
19342   path="${complete%% *}"
19343   tmp="$complete EOL"
19344   arguments="${tmp#* }"
19345 
19346   # Input might be given as Windows format, start by converting to
19347   # unix format.
19348   new_path=`$CYGPATH -u "$path"`
19349 
19350   # Now try to locate executable using which
19351   new_path=`$WHICH "$new_path" 2> /dev/null`
19352   # bat and cmd files are not always considered executable in cygwin causing which
19353   # to not find them
19354   if test "x$new_path" = x \
19355       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19356       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19357     new_path=`$CYGPATH -u "$path"`
19358   fi
19359   if test "x$new_path" = x; then
19360     # Oops. Which didn't find the executable.
19361     # The splitting of arguments from the executable at a space might have been incorrect,
19362     # since paths with space are more likely in Windows. Give it another try with the whole
19363     # argument.
19364     path="$complete"
19365     arguments="EOL"
19366     new_path=`$CYGPATH -u "$path"`
19367     new_path=`$WHICH "$new_path" 2> /dev/null`
19368     # bat and cmd files are not always considered executable in cygwin causing which
19369     # to not find them
19370     if test "x$new_path" = x \
19371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19373       new_path=`$CYGPATH -u "$path"`
19374     fi
19375     if test "x$new_path" = x; then
19376       # It's still not found. Now this is an unrecoverable error.
19377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19378 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19379       has_space=`$ECHO "$complete" | $GREP " "`
19380       if test "x$has_space" != x; then
19381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19383       fi
19384       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19385     fi
19386   fi
19387 
19388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19391   # "foo.exe" is OK but "foo" is an error.
19392   #
19393   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19394   # It is also a way to make sure we got the proper file name for the real test later on.
19395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19396   if test "x$test_shortpath" = x; then
19397     # Short path failed, file does not exist as specified.
19398     # Try adding .exe or .cmd
19399     if test -f "${new_path}.exe"; then
19400       input_to_shortpath="${new_path}.exe"
19401     elif test -f "${new_path}.cmd"; then
19402       input_to_shortpath="${new_path}.cmd"
19403     else
19404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19405 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19406       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19407 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19408       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19409     fi
19410   else
19411     input_to_shortpath="$new_path"
19412   fi
19413 
19414   # Call helper function which possibly converts this using DOS-style short mode.
19415   # If so, the updated path is stored in $new_path.
19416   new_path="$input_to_shortpath"
19417 
19418   input_path="$input_to_shortpath"
19419   # Check if we need to convert this using DOS-style short mode. If the path
19420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19421   # take no chances and rewrite it.
19422   # Note: m4 eats our [], so we need to use [ and ] instead.
19423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19424   if test "x$has_forbidden_chars" != x; then
19425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19429       # Going to short mode and back again did indeed matter. Since short mode is
19430       # case insensitive, let's make it lowercase to improve readability.
19431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19432       # Now convert it back to Unix-stile (cygpath)
19433       input_path=`$CYGPATH -u "$shortmode_path"`
19434       new_path="$input_path"
19435     fi
19436   fi
19437 
19438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19439   if test "x$test_cygdrive_prefix" = x; then
19440     # As a simple fix, exclude /usr/bin since it's not a real path.
19441     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19443       # a path prefixed by /cygdrive for fixpath to work.
19444       new_path="$CYGWIN_ROOT_PATH$input_path"
19445     fi
19446   fi
19447 
19448   # remove trailing .exe if any
19449   new_path="${new_path/%.exe/}"
19450 
19451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19452 
19453   # First separate the path from the arguments. This will split at the first
19454   # space.
19455   complete="$CC"
19456   path="${complete%% *}"
19457   tmp="$complete EOL"
19458   arguments="${tmp#* }"
19459 
19460   # Input might be given as Windows format, start by converting to
19461   # unix format.
19462   new_path="$path"
19463 
19464   windows_path="$new_path"
19465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19466     unix_path=`$CYGPATH -u "$windows_path"`
19467     new_path="$unix_path"
19468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19470     new_path="$unix_path"
19471   fi
19472 
19473 
19474   # Now try to locate executable using which
19475   new_path=`$WHICH "$new_path" 2> /dev/null`
19476 
19477   if test "x$new_path" = x; then
19478     # Oops. Which didn't find the executable.
19479     # The splitting of arguments from the executable at a space might have been incorrect,
19480     # since paths with space are more likely in Windows. Give it another try with the whole
19481     # argument.
19482     path="$complete"
19483     arguments="EOL"
19484     new_path="$path"
19485 
19486   windows_path="$new_path"
19487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19488     unix_path=`$CYGPATH -u "$windows_path"`
19489     new_path="$unix_path"
19490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19492     new_path="$unix_path"
19493   fi
19494 
19495 
19496     new_path=`$WHICH "$new_path" 2> /dev/null`
19497 
19498     if test "x$new_path" = x; then
19499       # It's still not found. Now this is an unrecoverable error.
19500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19501 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19502       has_space=`$ECHO "$complete" | $GREP " "`
19503       if test "x$has_space" != x; then
19504         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19505 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19506       fi
19507       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19508     fi
19509   fi
19510 
19511   # Now new_path has a complete unix path to the binary
19512   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19513     # Keep paths in /bin as-is, but remove trailing .exe if any
19514     new_path="${new_path/%.exe/}"
19515     # Do not save /bin paths to all_fixpath_prefixes!
19516   else
19517     # Not in mixed or Windows style, start by that.
19518     new_path=`cmd //c echo $new_path`
19519 
19520   input_path="$new_path"
19521   # Check if we need to convert this using DOS-style short mode. If the path
19522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19523   # take no chances and rewrite it.
19524   # Note: m4 eats our [], so we need to use [ and ] instead.
19525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19526   if test "x$has_forbidden_chars" != x; then
19527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19528     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19529   fi
19530 
19531     # Output is in $new_path
19532 
19533   windows_path="$new_path"
19534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19535     unix_path=`$CYGPATH -u "$windows_path"`
19536     new_path="$unix_path"
19537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19539     new_path="$unix_path"
19540   fi
19541 
19542     # remove trailing .exe if any
19543     new_path="${new_path/%.exe/}"
19544 
19545     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19546     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19547   fi
19548 
19549   else
19550     # We're on a posix platform. Hooray! :)
19551     # First separate the path from the arguments. This will split at the first
19552     # space.
19553     complete="$CC"
19554     path="${complete%% *}"
19555     tmp="$complete EOL"
19556     arguments="${tmp#* }"
19557 
19558     # Cannot rely on the command "which" here since it doesn't always work.
19559     is_absolute_path=`$ECHO "$path" | $GREP ^/`
19560     if test -z "$is_absolute_path"; then
19561       # Path to executable is not absolute. Find it.
19562       IFS_save="$IFS"
19563       IFS=:
19564       for p in $PATH; do
19565         if test -f "$p/$path" && test -x "$p/$path"; then
19566           new_path="$p/$path"
19567           break
19568         fi
19569       done
19570       IFS="$IFS_save"
19571     else
19572       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19573 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19574       new_path="$path"
19575     fi
19576 
19577     if test "x$new_path" = x; then
19578       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19579 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19580       has_space=`$ECHO "$complete" | $GREP " "`
19581       if test "x$has_space" != x; then
19582         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19583 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19584       fi
19585       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19586     fi
19587   fi
19588 
19589   # Now join together the path and the arguments once again
19590   if test "x$arguments" != xEOL; then
19591     new_complete="$new_path ${arguments% *}"
19592   else
19593     new_complete="$new_path"
19594   fi
19595 
19596   if test "x$complete" != "x$new_complete"; then
19597     CC="$new_complete"
19598     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19599 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19600   fi
19601 
19602   TEST_COMPILER="$CC"
19603   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
19604   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
19605   if test "x$OPENJDK_BUILD_OS" != xaix; then
19606     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19607 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
19608 
19609   if test "x$OPENJDK_BUILD_OS" != xwindows; then
19610     # Follow a chain of symbolic links. Use readlink
19611     # where it exists, else fall back to horribly
19612     # complicated shell code.
19613     if test "x$READLINK_TESTED" != yes; then
19614       # On MacOSX there is a readlink tool with a different
19615       # purpose than the GNU readlink tool. Check the found readlink.
19616       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19617       if test "x$ISGNU" = x; then
19618         # A readlink that we do not know how to use.
19619         # Are there other non-GNU readlinks out there?
19620         READLINK_TESTED=yes
19621         READLINK=
19622       fi
19623     fi
19624 
19625     if test "x$READLINK" != x; then
19626       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19627     else
19628       # Save the current directory for restoring afterwards
19629       STARTDIR=$PWD
19630       COUNTER=0
19631       sym_link_dir=`$DIRNAME $TEST_COMPILER`
19632       sym_link_file=`$BASENAME $TEST_COMPILER`
19633       cd $sym_link_dir
19634       # Use -P flag to resolve symlinks in directories.
19635       cd `$THEPWDCMD -P`
19636       sym_link_dir=`$THEPWDCMD -P`
19637       # Resolve file symlinks
19638       while test $COUNTER -lt 20; do
19639         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19640         if test "x$ISLINK" == x; then
19641           # This is not a symbolic link! We are done!
19642           break
19643         fi
19644         # Again resolve directory symlinks since the target of the just found
19645         # link could be in a different directory
19646         cd `$DIRNAME $ISLINK`
19647         sym_link_dir=`$THEPWDCMD -P`
19648         sym_link_file=`$BASENAME $ISLINK`
19649         let COUNTER=COUNTER+1
19650       done
19651       cd $STARTDIR
19652       TEST_COMPILER=$sym_link_dir/$sym_link_file
19653     fi
19654   fi
19655 
19656     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19657 $as_echo "$TEST_COMPILER" >&6; }
19658   fi
19659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19660 $as_echo_n "checking if CC is disguised ccache... " >&6; }
19661 
19662   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19663   if test "x$COMPILER_BASENAME" = "xccache"; then
19664     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19665 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19666     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19667     # We want to control ccache invocation ourselves, so ignore this cc and try
19668     # searching again.
19669 
19670     # Remove the path to the fake ccache cc from the PATH
19671     RETRY_COMPILER_SAVED_PATH="$PATH"
19672     COMPILER_DIRNAME=`$DIRNAME $CC`
19673     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19674 
19675     # Try again looking for our compiler
19676     if test -n "$ac_tool_prefix"; then
19677   for ac_prog in $COMPILER_CHECK_LIST
19678   do
19679     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19680 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19682 $as_echo_n "checking for $ac_word... " >&6; }
19683 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
19684   $as_echo_n "(cached) " >&6
19685 else
19686   if test -n "$PROPER_COMPILER_CC"; then
19687   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19688 else
19689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19690 for as_dir in $PATH
19691 do
19692   IFS=$as_save_IFS
19693   test -z "$as_dir" && as_dir=.
19694     for ac_exec_ext in '' $ac_executable_extensions; do
19695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19696     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19698     break 2
19699   fi
19700 done
19701   done
19702 IFS=$as_save_IFS
19703 
19704 fi
19705 fi
19706 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19707 if test -n "$PROPER_COMPILER_CC"; then
19708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19709 $as_echo "$PROPER_COMPILER_CC" >&6; }
19710 else
19711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19712 $as_echo "no" >&6; }
19713 fi
19714 
19715 
19716     test -n "$PROPER_COMPILER_CC" && break
19717   done
19718 fi
19719 if test -z "$PROPER_COMPILER_CC"; then
19720   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19721   for ac_prog in $COMPILER_CHECK_LIST
19722 do
19723   # Extract the first word of "$ac_prog", so it can be a program name with args.
19724 set dummy $ac_prog; ac_word=$2
19725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19726 $as_echo_n "checking for $ac_word... " >&6; }
19727 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
19728   $as_echo_n "(cached) " >&6
19729 else
19730   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19731   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19732 else
19733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19734 for as_dir in $PATH
19735 do
19736   IFS=$as_save_IFS
19737   test -z "$as_dir" && as_dir=.
19738     for ac_exec_ext in '' $ac_executable_extensions; do
19739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19740     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19742     break 2
19743   fi
19744 done
19745   done
19746 IFS=$as_save_IFS
19747 
19748 fi
19749 fi
19750 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19751 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19753 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19754 else
19755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19756 $as_echo "no" >&6; }
19757 fi
19758 
19759 
19760   test -n "$ac_ct_PROPER_COMPILER_CC" && break
19761 done
19762 
19763   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19764     PROPER_COMPILER_CC=""
19765   else
19766     case $cross_compiling:$ac_tool_warned in
19767 yes:)
19768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19769 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19770 ac_tool_warned=yes ;;
19771 esac
19772     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19773   fi
19774 fi
19775 
19776 
19777   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19778 
19779   # First separate the path from the arguments. This will split at the first
19780   # space.
19781   complete="$PROPER_COMPILER_CC"
19782   path="${complete%% *}"
19783   tmp="$complete EOL"
19784   arguments="${tmp#* }"
19785 
19786   # Input might be given as Windows format, start by converting to
19787   # unix format.
19788   new_path=`$CYGPATH -u "$path"`
19789 
19790   # Now try to locate executable using which
19791   new_path=`$WHICH "$new_path" 2> /dev/null`
19792   # bat and cmd files are not always considered executable in cygwin causing which
19793   # to not find them
19794   if test "x$new_path" = x \
19795       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19796       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19797     new_path=`$CYGPATH -u "$path"`
19798   fi
19799   if test "x$new_path" = x; then
19800     # Oops. Which didn't find the executable.
19801     # The splitting of arguments from the executable at a space might have been incorrect,
19802     # since paths with space are more likely in Windows. Give it another try with the whole
19803     # argument.
19804     path="$complete"
19805     arguments="EOL"
19806     new_path=`$CYGPATH -u "$path"`
19807     new_path=`$WHICH "$new_path" 2> /dev/null`
19808     # bat and cmd files are not always considered executable in cygwin causing which
19809     # to not find them
19810     if test "x$new_path" = x \
19811         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19812         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19813       new_path=`$CYGPATH -u "$path"`
19814     fi
19815     if test "x$new_path" = x; then
19816       # It's still not found. Now this is an unrecoverable error.
19817       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19818 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19819       has_space=`$ECHO "$complete" | $GREP " "`
19820       if test "x$has_space" != x; then
19821         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19822 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19823       fi
19824       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19825     fi
19826   fi
19827 
19828   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19829   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19830   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19831   # "foo.exe" is OK but "foo" is an error.
19832   #
19833   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19834   # It is also a way to make sure we got the proper file name for the real test later on.
19835   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19836   if test "x$test_shortpath" = x; then
19837     # Short path failed, file does not exist as specified.
19838     # Try adding .exe or .cmd
19839     if test -f "${new_path}.exe"; then
19840       input_to_shortpath="${new_path}.exe"
19841     elif test -f "${new_path}.cmd"; then
19842       input_to_shortpath="${new_path}.cmd"
19843     else
19844       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19845 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19846       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19847 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19848       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19849     fi
19850   else
19851     input_to_shortpath="$new_path"
19852   fi
19853 
19854   # Call helper function which possibly converts this using DOS-style short mode.
19855   # If so, the updated path is stored in $new_path.
19856   new_path="$input_to_shortpath"
19857 
19858   input_path="$input_to_shortpath"
19859   # Check if we need to convert this using DOS-style short mode. If the path
19860   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19861   # take no chances and rewrite it.
19862   # Note: m4 eats our [], so we need to use [ and ] instead.
19863   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19864   if test "x$has_forbidden_chars" != x; then
19865     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19866     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19867     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19868     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19869       # Going to short mode and back again did indeed matter. Since short mode is
19870       # case insensitive, let's make it lowercase to improve readability.
19871       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19872       # Now convert it back to Unix-stile (cygpath)
19873       input_path=`$CYGPATH -u "$shortmode_path"`
19874       new_path="$input_path"
19875     fi
19876   fi
19877 
19878   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19879   if test "x$test_cygdrive_prefix" = x; then
19880     # As a simple fix, exclude /usr/bin since it's not a real path.
19881     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19882       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19883       # a path prefixed by /cygdrive for fixpath to work.
19884       new_path="$CYGWIN_ROOT_PATH$input_path"
19885     fi
19886   fi
19887 
19888   # remove trailing .exe if any
19889   new_path="${new_path/%.exe/}"
19890 
19891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19892 
19893   # First separate the path from the arguments. This will split at the first
19894   # space.
19895   complete="$PROPER_COMPILER_CC"
19896   path="${complete%% *}"
19897   tmp="$complete EOL"
19898   arguments="${tmp#* }"
19899 
19900   # Input might be given as Windows format, start by converting to
19901   # unix format.
19902   new_path="$path"
19903 
19904   windows_path="$new_path"
19905   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19906     unix_path=`$CYGPATH -u "$windows_path"`
19907     new_path="$unix_path"
19908   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19909     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19910     new_path="$unix_path"
19911   fi
19912 
19913 
19914   # Now try to locate executable using which
19915   new_path=`$WHICH "$new_path" 2> /dev/null`
19916 
19917   if test "x$new_path" = x; then
19918     # Oops. Which didn't find the executable.
19919     # The splitting of arguments from the executable at a space might have been incorrect,
19920     # since paths with space are more likely in Windows. Give it another try with the whole
19921     # argument.
19922     path="$complete"
19923     arguments="EOL"
19924     new_path="$path"
19925 
19926   windows_path="$new_path"
19927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19928     unix_path=`$CYGPATH -u "$windows_path"`
19929     new_path="$unix_path"
19930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19932     new_path="$unix_path"
19933   fi
19934 
19935 
19936     new_path=`$WHICH "$new_path" 2> /dev/null`
19937 
19938     if test "x$new_path" = x; then
19939       # It's still not found. Now this is an unrecoverable error.
19940       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19941 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19942       has_space=`$ECHO "$complete" | $GREP " "`
19943       if test "x$has_space" != x; then
19944         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19945 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19946       fi
19947       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19948     fi
19949   fi
19950 
19951   # Now new_path has a complete unix path to the binary
19952   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19953     # Keep paths in /bin as-is, but remove trailing .exe if any
19954     new_path="${new_path/%.exe/}"
19955     # Do not save /bin paths to all_fixpath_prefixes!
19956   else
19957     # Not in mixed or Windows style, start by that.
19958     new_path=`cmd //c echo $new_path`
19959 
19960   input_path="$new_path"
19961   # Check if we need to convert this using DOS-style short mode. If the path
19962   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19963   # take no chances and rewrite it.
19964   # Note: m4 eats our [], so we need to use [ and ] instead.
19965   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19966   if test "x$has_forbidden_chars" != x; then
19967     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19968     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19969   fi
19970 
19971     # Output is in $new_path
19972 
19973   windows_path="$new_path"
19974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19975     unix_path=`$CYGPATH -u "$windows_path"`
19976     new_path="$unix_path"
19977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19979     new_path="$unix_path"
19980   fi
19981 
19982     # remove trailing .exe if any
19983     new_path="${new_path/%.exe/}"
19984 
19985     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19986     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19987   fi
19988 
19989   else
19990     # We're on a posix platform. Hooray! :)
19991     # First separate the path from the arguments. This will split at the first
19992     # space.
19993     complete="$PROPER_COMPILER_CC"
19994     path="${complete%% *}"
19995     tmp="$complete EOL"
19996     arguments="${tmp#* }"
19997 
19998     # Cannot rely on the command "which" here since it doesn't always work.
19999     is_absolute_path=`$ECHO "$path" | $GREP ^/`
20000     if test -z "$is_absolute_path"; then
20001       # Path to executable is not absolute. Find it.
20002       IFS_save="$IFS"
20003       IFS=:
20004       for p in $PATH; do
20005         if test -f "$p/$path" && test -x "$p/$path"; then
20006           new_path="$p/$path"
20007           break
20008         fi
20009       done
20010       IFS="$IFS_save"
20011     else
20012       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
20013 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
20014       new_path="$path"
20015     fi
20016 
20017     if test "x$new_path" = x; then
20018       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
20019 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
20020       has_space=`$ECHO "$complete" | $GREP " "`
20021       if test "x$has_space" != x; then
20022         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20023 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20024       fi
20025       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
20026     fi
20027   fi
20028 
20029   # Now join together the path and the arguments once again
20030   if test "x$arguments" != xEOL; then
20031     new_complete="$new_path ${arguments% *}"
20032   else
20033     new_complete="$new_path"
20034   fi
20035 
20036   if test "x$complete" != "x$new_complete"; then
20037     PROPER_COMPILER_CC="$new_complete"
20038     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
20039 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
20040   fi
20041 
20042     PATH="$RETRY_COMPILER_SAVED_PATH"
20043 
20044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
20045 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
20046 
20047   if test "x$OPENJDK_BUILD_OS" != xwindows; then
20048     # Follow a chain of symbolic links. Use readlink
20049     # where it exists, else fall back to horribly
20050     # complicated shell code.
20051     if test "x$READLINK_TESTED" != yes; then
20052       # On MacOSX there is a readlink tool with a different
20053       # purpose than the GNU readlink tool. Check the found readlink.
20054       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20055       if test "x$ISGNU" = x; then
20056         # A readlink that we do not know how to use.
20057         # Are there other non-GNU readlinks out there?
20058         READLINK_TESTED=yes
20059         READLINK=
20060       fi
20061     fi
20062 
20063     if test "x$READLINK" != x; then
20064       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
20065     else
20066       # Save the current directory for restoring afterwards
20067       STARTDIR=$PWD
20068       COUNTER=0
20069       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
20070       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
20071       cd $sym_link_dir
20072       # Use -P flag to resolve symlinks in directories.
20073       cd `$THEPWDCMD -P`
20074       sym_link_dir=`$THEPWDCMD -P`
20075       # Resolve file symlinks
20076       while test $COUNTER -lt 20; do
20077         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20078         if test "x$ISLINK" == x; then
20079           # This is not a symbolic link! We are done!
20080           break
20081         fi
20082         # Again resolve directory symlinks since the target of the just found
20083         # link could be in a different directory
20084         cd `$DIRNAME $ISLINK`
20085         sym_link_dir=`$THEPWDCMD -P`
20086         sym_link_file=`$BASENAME $ISLINK`
20087         let COUNTER=COUNTER+1
20088       done
20089       cd $STARTDIR
20090       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
20091     fi
20092   fi
20093 
20094     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
20095 $as_echo "$PROPER_COMPILER_CC" >&6; }
20096     CC="$PROPER_COMPILER_CC"
20097   else
20098     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
20099 $as_echo "no, keeping CC" >&6; }
20100     CC="$TEST_COMPILER"
20101   fi
20102 
20103   COMPILER=$CC
20104   COMPILER_NAME=$COMPILER_NAME
20105 
20106   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20107     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20108     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20109     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20110     if test $? -ne 0; then
20111       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20112 
20113       { $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
20114 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20115       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20116 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20117       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20118     else
20119       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20120       COMPILER_VENDOR="Sun Studio"
20121     fi
20122   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
20123       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
20124       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
20125       if test $? -ne 0; then
20126         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
20127       else
20128         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
20129         COMPILER_VENDOR='IBM'
20130       fi
20131   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20132     # First line typically looks something like:
20133     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
20134     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
20135     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20136     COMPILER_VENDOR="Microsoft CL.EXE"
20137     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20138     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20139       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20140         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20141       fi
20142     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20143       if test "x$COMPILER_CPU_TEST" != "xx64"; then
20144         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20145       fi
20146     fi
20147   else
20148     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20149     # Check that this is likely to be GCC.
20150     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20151     if test $? -ne 0; then
20152       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20153 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20154       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20155 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20156       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20157     fi
20158 
20159     # First line typically looks something like:
20160     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20161     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20162     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20163   fi
20164   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20165   CC_VERSION="$COMPILER_VERSION"
20166   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20167   CC_VENDOR="$COMPILER_VENDOR"
20168 
20169   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20170 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20171 
20172 
20173   # Now that we have resolved CC ourself, let autoconf have its go at it
20174   ac_ext=c
20175 ac_cpp='$CPP $CPPFLAGS'
20176 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20177 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20178 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20179 if test -n "$ac_tool_prefix"; then
20180   for ac_prog in $CC
20181   do
20182     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20183 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20185 $as_echo_n "checking for $ac_word... " >&6; }
20186 if ${ac_cv_prog_CC+:} false; then :
20187   $as_echo_n "(cached) " >&6
20188 else
20189   if test -n "$CC"; then
20190   ac_cv_prog_CC="$CC" # Let the user override the test.
20191 else
20192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20193 for as_dir in $PATH
20194 do
20195   IFS=$as_save_IFS
20196   test -z "$as_dir" && as_dir=.
20197     for ac_exec_ext in '' $ac_executable_extensions; do
20198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20199     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
20200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20201     break 2
20202   fi
20203 done
20204   done
20205 IFS=$as_save_IFS
20206 
20207 fi
20208 fi
20209 CC=$ac_cv_prog_CC
20210 if test -n "$CC"; then
20211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
20212 $as_echo "$CC" >&6; }
20213 else
20214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20215 $as_echo "no" >&6; }
20216 fi
20217 
20218 
20219     test -n "$CC" && break
20220   done
20221 fi
20222 if test -z "$CC"; then
20223   ac_ct_CC=$CC
20224   for ac_prog in $CC
20225 do
20226   # Extract the first word of "$ac_prog", so it can be a program name with args.
20227 set dummy $ac_prog; ac_word=$2
20228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20229 $as_echo_n "checking for $ac_word... " >&6; }
20230 if ${ac_cv_prog_ac_ct_CC+:} false; then :
20231   $as_echo_n "(cached) " >&6
20232 else
20233   if test -n "$ac_ct_CC"; then
20234   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
20235 else
20236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20237 for as_dir in $PATH
20238 do
20239   IFS=$as_save_IFS
20240   test -z "$as_dir" && as_dir=.
20241     for ac_exec_ext in '' $ac_executable_extensions; do
20242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20243     ac_cv_prog_ac_ct_CC="$ac_prog"
20244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20245     break 2
20246   fi
20247 done
20248   done
20249 IFS=$as_save_IFS
20250 
20251 fi
20252 fi
20253 ac_ct_CC=$ac_cv_prog_ac_ct_CC
20254 if test -n "$ac_ct_CC"; then
20255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20256 $as_echo "$ac_ct_CC" >&6; }
20257 else
20258   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20259 $as_echo "no" >&6; }
20260 fi
20261 
20262 
20263   test -n "$ac_ct_CC" && break
20264 done
20265 
20266   if test "x$ac_ct_CC" = x; then
20267     CC=""
20268   else
20269     case $cross_compiling:$ac_tool_warned in
20270 yes:)
20271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20272 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20273 ac_tool_warned=yes ;;
20274 esac
20275     CC=$ac_ct_CC
20276   fi
20277 fi
20278 
20279 
20280 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20281 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20282 as_fn_error $? "no acceptable C compiler found in \$PATH
20283 See \`config.log' for more details" "$LINENO" 5; }
20284 
20285 # Provide some information about the compiler.
20286 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20287 set X $ac_compile
20288 ac_compiler=$2
20289 for ac_option in --version -v -V -qversion; do
20290   { { ac_try="$ac_compiler $ac_option >&5"
20291 case "(($ac_try" in
20292   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20293   *) ac_try_echo=$ac_try;;
20294 esac
20295 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20296 $as_echo "$ac_try_echo"; } >&5
20297   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20298   ac_status=$?
20299   if test -s conftest.err; then
20300     sed '10a\
20301 ... rest of stderr output deleted ...
20302          10q' conftest.err >conftest.er1
20303     cat conftest.er1 >&5
20304   fi
20305   rm -f conftest.er1 conftest.err
20306   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20307   test $ac_status = 0; }
20308 done
20309 
20310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20311 /* end confdefs.h.  */
20312 
20313 int
20314 main ()
20315 {
20316 
20317   ;
20318   return 0;
20319 }
20320 _ACEOF
20321 ac_clean_files_save=$ac_clean_files
20322 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20323 # Try to create an executable without -o first, disregard a.out.
20324 # It will help us diagnose broken compilers, and finding out an intuition
20325 # of exeext.
20326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20327 $as_echo_n "checking whether the C compiler works... " >&6; }
20328 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20329 
20330 # The possible output files:
20331 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20332 
20333 ac_rmfiles=
20334 for ac_file in $ac_files
20335 do
20336   case $ac_file in
20337     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20338     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20339   esac
20340 done
20341 rm -f $ac_rmfiles
20342 
20343 if { { ac_try="$ac_link_default"
20344 case "(($ac_try" in
20345   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20346   *) ac_try_echo=$ac_try;;
20347 esac
20348 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20349 $as_echo "$ac_try_echo"; } >&5
20350   (eval "$ac_link_default") 2>&5
20351   ac_status=$?
20352   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20353   test $ac_status = 0; }; then :
20354   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20355 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20356 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
20357 # so that the user can short-circuit this test for compilers unknown to
20358 # Autoconf.
20359 for ac_file in $ac_files ''
20360 do
20361   test -f "$ac_file" || continue
20362   case $ac_file in
20363     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20364         ;;
20365     [ab].out )
20366         # We found the default executable, but exeext='' is most
20367         # certainly right.
20368         break;;
20369     *.* )
20370         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20371         then :; else
20372            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20373         fi
20374         # We set ac_cv_exeext here because the later test for it is not
20375         # safe: cross compilers may not add the suffix if given an `-o'
20376         # argument, so we may need to know it at that point already.
20377         # Even if this section looks crufty: it has the advantage of
20378         # actually working.
20379         break;;
20380     * )
20381         break;;
20382   esac
20383 done
20384 test "$ac_cv_exeext" = no && ac_cv_exeext=
20385 
20386 else
20387   ac_file=''
20388 fi
20389 if test -z "$ac_file"; then :
20390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20391 $as_echo "no" >&6; }
20392 $as_echo "$as_me: failed program was:" >&5
20393 sed 's/^/| /' conftest.$ac_ext >&5
20394 
20395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20396 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20397 as_fn_error 77 "C compiler cannot create executables
20398 See \`config.log' for more details" "$LINENO" 5; }
20399 else
20400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20401 $as_echo "yes" >&6; }
20402 fi
20403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20404 $as_echo_n "checking for C compiler default output file name... " >&6; }
20405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20406 $as_echo "$ac_file" >&6; }
20407 ac_exeext=$ac_cv_exeext
20408 
20409 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20410 ac_clean_files=$ac_clean_files_save
20411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20412 $as_echo_n "checking for suffix of executables... " >&6; }
20413 if { { ac_try="$ac_link"
20414 case "(($ac_try" in
20415   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20416   *) ac_try_echo=$ac_try;;
20417 esac
20418 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20419 $as_echo "$ac_try_echo"; } >&5
20420   (eval "$ac_link") 2>&5
20421   ac_status=$?
20422   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20423   test $ac_status = 0; }; then :
20424   # If both `conftest.exe' and `conftest' are `present' (well, observable)
20425 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20426 # work properly (i.e., refer to `conftest.exe'), while it won't with
20427 # `rm'.
20428 for ac_file in conftest.exe conftest conftest.*; do
20429   test -f "$ac_file" || continue
20430   case $ac_file in
20431     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20432     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20433           break;;
20434     * ) break;;
20435   esac
20436 done
20437 else
20438   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20439 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20440 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20441 See \`config.log' for more details" "$LINENO" 5; }
20442 fi
20443 rm -f conftest conftest$ac_cv_exeext
20444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20445 $as_echo "$ac_cv_exeext" >&6; }
20446 
20447 rm -f conftest.$ac_ext
20448 EXEEXT=$ac_cv_exeext
20449 ac_exeext=$EXEEXT
20450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20451 /* end confdefs.h.  */
20452 #include <stdio.h>
20453 int
20454 main ()
20455 {
20456 FILE *f = fopen ("conftest.out", "w");
20457  return ferror (f) || fclose (f) != 0;
20458 
20459   ;
20460   return 0;
20461 }
20462 _ACEOF
20463 ac_clean_files="$ac_clean_files conftest.out"
20464 # Check that the compiler produces executables we can run.  If not, either
20465 # the compiler is broken, or we cross compile.
20466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20467 $as_echo_n "checking whether we are cross compiling... " >&6; }
20468 if test "$cross_compiling" != yes; then
20469   { { ac_try="$ac_link"
20470 case "(($ac_try" in
20471   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20472   *) ac_try_echo=$ac_try;;
20473 esac
20474 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20475 $as_echo "$ac_try_echo"; } >&5
20476   (eval "$ac_link") 2>&5
20477   ac_status=$?
20478   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20479   test $ac_status = 0; }
20480   if { ac_try='./conftest$ac_cv_exeext'
20481   { { case "(($ac_try" in
20482   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20483   *) ac_try_echo=$ac_try;;
20484 esac
20485 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20486 $as_echo "$ac_try_echo"; } >&5
20487   (eval "$ac_try") 2>&5
20488   ac_status=$?
20489   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20490   test $ac_status = 0; }; }; then
20491     cross_compiling=no
20492   else
20493     if test "$cross_compiling" = maybe; then
20494         cross_compiling=yes
20495     else
20496         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20497 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20498 as_fn_error $? "cannot run C compiled programs.
20499 If you meant to cross compile, use \`--host'.
20500 See \`config.log' for more details" "$LINENO" 5; }
20501     fi
20502   fi
20503 fi
20504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20505 $as_echo "$cross_compiling" >&6; }
20506 
20507 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20508 ac_clean_files=$ac_clean_files_save
20509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20510 $as_echo_n "checking for suffix of object files... " >&6; }
20511 if ${ac_cv_objext+:} false; then :
20512   $as_echo_n "(cached) " >&6
20513 else
20514   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20515 /* end confdefs.h.  */
20516 
20517 int
20518 main ()
20519 {
20520 
20521   ;
20522   return 0;
20523 }
20524 _ACEOF
20525 rm -f conftest.o conftest.obj
20526 if { { ac_try="$ac_compile"
20527 case "(($ac_try" in
20528   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20529   *) ac_try_echo=$ac_try;;
20530 esac
20531 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20532 $as_echo "$ac_try_echo"; } >&5
20533   (eval "$ac_compile") 2>&5
20534   ac_status=$?
20535   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20536   test $ac_status = 0; }; then :
20537   for ac_file in conftest.o conftest.obj conftest.*; do
20538   test -f "$ac_file" || continue;
20539   case $ac_file in
20540     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20541     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20542        break;;
20543   esac
20544 done
20545 else
20546   $as_echo "$as_me: failed program was:" >&5
20547 sed 's/^/| /' conftest.$ac_ext >&5
20548 
20549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20550 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20551 as_fn_error $? "cannot compute suffix of object files: cannot compile
20552 See \`config.log' for more details" "$LINENO" 5; }
20553 fi
20554 rm -f conftest.$ac_cv_objext conftest.$ac_ext
20555 fi
20556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20557 $as_echo "$ac_cv_objext" >&6; }
20558 OBJEXT=$ac_cv_objext
20559 ac_objext=$OBJEXT
20560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20561 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20562 if ${ac_cv_c_compiler_gnu+:} false; then :
20563   $as_echo_n "(cached) " >&6
20564 else
20565   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20566 /* end confdefs.h.  */
20567 
20568 int
20569 main ()
20570 {
20571 #ifndef __GNUC__
20572        choke me
20573 #endif
20574 
20575   ;
20576   return 0;
20577 }
20578 _ACEOF
20579 if ac_fn_c_try_compile "$LINENO"; then :
20580   ac_compiler_gnu=yes
20581 else
20582   ac_compiler_gnu=no
20583 fi
20584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20585 ac_cv_c_compiler_gnu=$ac_compiler_gnu
20586 
20587 fi
20588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20589 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
20590 if test $ac_compiler_gnu = yes; then
20591   GCC=yes
20592 else
20593   GCC=
20594 fi
20595 ac_test_CFLAGS=${CFLAGS+set}
20596 ac_save_CFLAGS=$CFLAGS
20597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20598 $as_echo_n "checking whether $CC accepts -g... " >&6; }
20599 if ${ac_cv_prog_cc_g+:} false; then :
20600   $as_echo_n "(cached) " >&6
20601 else
20602   ac_save_c_werror_flag=$ac_c_werror_flag
20603    ac_c_werror_flag=yes
20604    ac_cv_prog_cc_g=no
20605    CFLAGS="-g"
20606    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20607 /* end confdefs.h.  */
20608 
20609 int
20610 main ()
20611 {
20612 
20613   ;
20614   return 0;
20615 }
20616 _ACEOF
20617 if ac_fn_c_try_compile "$LINENO"; then :
20618   ac_cv_prog_cc_g=yes
20619 else
20620   CFLAGS=""
20621       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20622 /* end confdefs.h.  */
20623 
20624 int
20625 main ()
20626 {
20627 
20628   ;
20629   return 0;
20630 }
20631 _ACEOF
20632 if ac_fn_c_try_compile "$LINENO"; then :
20633 
20634 else
20635   ac_c_werror_flag=$ac_save_c_werror_flag
20636          CFLAGS="-g"
20637          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20638 /* end confdefs.h.  */
20639 
20640 int
20641 main ()
20642 {
20643 
20644   ;
20645   return 0;
20646 }
20647 _ACEOF
20648 if ac_fn_c_try_compile "$LINENO"; then :
20649   ac_cv_prog_cc_g=yes
20650 fi
20651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20652 fi
20653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20654 fi
20655 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20656    ac_c_werror_flag=$ac_save_c_werror_flag
20657 fi
20658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20659 $as_echo "$ac_cv_prog_cc_g" >&6; }
20660 if test "$ac_test_CFLAGS" = set; then
20661   CFLAGS=$ac_save_CFLAGS
20662 elif test $ac_cv_prog_cc_g = yes; then
20663   if test "$GCC" = yes; then
20664     CFLAGS="-g -O2"
20665   else
20666     CFLAGS="-g"
20667   fi
20668 else
20669   if test "$GCC" = yes; then
20670     CFLAGS="-O2"
20671   else
20672     CFLAGS=
20673   fi
20674 fi
20675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20676 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20677 if ${ac_cv_prog_cc_c89+:} false; then :
20678   $as_echo_n "(cached) " >&6
20679 else
20680   ac_cv_prog_cc_c89=no
20681 ac_save_CC=$CC
20682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20683 /* end confdefs.h.  */
20684 #include <stdarg.h>
20685 #include <stdio.h>
20686 struct stat;
20687 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20688 struct buf { int x; };
20689 FILE * (*rcsopen) (struct buf *, struct stat *, int);
20690 static char *e (p, i)
20691      char **p;
20692      int i;
20693 {
20694   return p[i];
20695 }
20696 static char *f (char * (*g) (char **, int), char **p, ...)
20697 {
20698   char *s;
20699   va_list v;
20700   va_start (v,p);
20701   s = g (p, va_arg (v,int));
20702   va_end (v);
20703   return s;
20704 }
20705 
20706 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20707    function prototypes and stuff, but not '\xHH' hex character constants.
20708    These don't provoke an error unfortunately, instead are silently treated
20709    as 'x'.  The following induces an error, until -std is added to get
20710    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20711    array size at least.  It's necessary to write '\x00'==0 to get something
20712    that's true only with -std.  */
20713 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20714 
20715 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20716    inside strings and character constants.  */
20717 #define FOO(x) 'x'
20718 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20719 
20720 int test (int i, double x);
20721 struct s1 {int (*f) (int a);};
20722 struct s2 {int (*f) (double a);};
20723 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20724 int argc;
20725 char **argv;
20726 int
20727 main ()
20728 {
20729 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20730   ;
20731   return 0;
20732 }
20733 _ACEOF
20734 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20735         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20736 do
20737   CC="$ac_save_CC $ac_arg"
20738   if ac_fn_c_try_compile "$LINENO"; then :
20739   ac_cv_prog_cc_c89=$ac_arg
20740 fi
20741 rm -f core conftest.err conftest.$ac_objext
20742   test "x$ac_cv_prog_cc_c89" != "xno" && break
20743 done
20744 rm -f conftest.$ac_ext
20745 CC=$ac_save_CC
20746 
20747 fi
20748 # AC_CACHE_VAL
20749 case "x$ac_cv_prog_cc_c89" in
20750   x)
20751     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20752 $as_echo "none needed" >&6; } ;;
20753   xno)
20754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20755 $as_echo "unsupported" >&6; } ;;
20756   *)
20757     CC="$CC $ac_cv_prog_cc_c89"
20758     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20759 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20760 esac
20761 if test "x$ac_cv_prog_cc_c89" != xno; then :
20762 
20763 fi
20764 
20765 ac_ext=cpp
20766 ac_cpp='$CXXCPP $CPPFLAGS'
20767 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20768 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20769 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20770 
20771 
20772   # Option used to tell the compiler whether to create 32- or 64-bit executables
20773   # Notice that CC contains the full compiler path at this point.
20774   case $CC in
20775     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
20776     *)      COMPILER_TARGET_BITS_FLAG="-m";;
20777   esac
20778 
20779 
20780   ### Locate C++ compiler (CXX)
20781 
20782   if test "x$CXX" != x; then
20783     COMPILER_CHECK_LIST="$CXX"
20784   elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20785     COMPILER_CHECK_LIST="cl"
20786   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20787     COMPILER_CHECK_LIST="CC g++"
20788   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
20789     # Do not probe for CC on AIX .
20790     COMPILER_CHECK_LIST="xlC_r"
20791   else
20792     COMPILER_CHECK_LIST="g++ CC"
20793   fi
20794 
20795 
20796   COMPILER_NAME=C++
20797 
20798   CXX=
20799   # If TOOLS_DIR is set, check for all compiler names in there first
20800   # before checking the rest of the PATH.
20801   if test -n "$TOOLS_DIR"; then
20802     PATH_save="$PATH"
20803     PATH="$TOOLS_DIR"
20804     for ac_prog in $COMPILER_CHECK_LIST
20805 do
20806   # Extract the first word of "$ac_prog", so it can be a program name with args.
20807 set dummy $ac_prog; ac_word=$2
20808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20809 $as_echo_n "checking for $ac_word... " >&6; }
20810 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
20811   $as_echo_n "(cached) " >&6
20812 else
20813   case $TOOLS_DIR_CXX in
20814   [\\/]* | ?:[\\/]*)
20815   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20816   ;;
20817   *)
20818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20819 for as_dir in $PATH
20820 do
20821   IFS=$as_save_IFS
20822   test -z "$as_dir" && as_dir=.
20823     for ac_exec_ext in '' $ac_executable_extensions; do
20824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20825     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20827     break 2
20828   fi
20829 done
20830   done
20831 IFS=$as_save_IFS
20832 
20833   ;;
20834 esac
20835 fi
20836 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20837 if test -n "$TOOLS_DIR_CXX"; then
20838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20839 $as_echo "$TOOLS_DIR_CXX" >&6; }
20840 else
20841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20842 $as_echo "no" >&6; }
20843 fi
20844 
20845 
20846   test -n "$TOOLS_DIR_CXX" && break
20847 done
20848 
20849     CXX=$TOOLS_DIR_CXX
20850     PATH="$PATH_save"
20851   fi
20852 
20853   # AC_PATH_PROGS can't be run multiple times with the same variable,
20854   # so create a new name for this run.
20855   if test "x$CXX" = x; then
20856     for ac_prog in $COMPILER_CHECK_LIST
20857 do
20858   # Extract the first word of "$ac_prog", so it can be a program name with args.
20859 set dummy $ac_prog; ac_word=$2
20860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20861 $as_echo_n "checking for $ac_word... " >&6; }
20862 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
20863   $as_echo_n "(cached) " >&6
20864 else
20865   case $POTENTIAL_CXX in
20866   [\\/]* | ?:[\\/]*)
20867   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20868   ;;
20869   *)
20870   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20871 for as_dir in $PATH
20872 do
20873   IFS=$as_save_IFS
20874   test -z "$as_dir" && as_dir=.
20875     for ac_exec_ext in '' $ac_executable_extensions; do
20876   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20877     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20878     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20879     break 2
20880   fi
20881 done
20882   done
20883 IFS=$as_save_IFS
20884 
20885   ;;
20886 esac
20887 fi
20888 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20889 if test -n "$POTENTIAL_CXX"; then
20890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20891 $as_echo "$POTENTIAL_CXX" >&6; }
20892 else
20893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20894 $as_echo "no" >&6; }
20895 fi
20896 
20897 
20898   test -n "$POTENTIAL_CXX" && break
20899 done
20900 
20901     CXX=$POTENTIAL_CXX
20902   fi
20903 
20904   if test "x$CXX" = x; then
20905 
20906   # Print a helpful message on how to acquire the necessary build dependency.
20907   # devkit is the help tag: freetype, cups, pulse, alsa etc
20908   MISSING_DEPENDENCY=devkit
20909 
20910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20911     cygwin_help $MISSING_DEPENDENCY
20912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20913     msys_help $MISSING_DEPENDENCY
20914   else
20915     PKGHANDLER_COMMAND=
20916 
20917     case $PKGHANDLER in
20918       apt-get)
20919         apt_help     $MISSING_DEPENDENCY ;;
20920       yum)
20921         yum_help     $MISSING_DEPENDENCY ;;
20922       port)
20923         port_help    $MISSING_DEPENDENCY ;;
20924       pkgutil)
20925         pkgutil_help $MISSING_DEPENDENCY ;;
20926       pkgadd)
20927         pkgadd_help  $MISSING_DEPENDENCY ;;
20928     esac
20929 
20930     if test "x$PKGHANDLER_COMMAND" != x; then
20931       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20932     fi
20933   fi
20934 
20935     as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20936   fi
20937 
20938   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20939 
20940   # First separate the path from the arguments. This will split at the first
20941   # space.
20942   complete="$CXX"
20943   path="${complete%% *}"
20944   tmp="$complete EOL"
20945   arguments="${tmp#* }"
20946 
20947   # Input might be given as Windows format, start by converting to
20948   # unix format.
20949   new_path=`$CYGPATH -u "$path"`
20950 
20951   # Now try to locate executable using which
20952   new_path=`$WHICH "$new_path" 2> /dev/null`
20953   # bat and cmd files are not always considered executable in cygwin causing which
20954   # to not find them
20955   if test "x$new_path" = x \
20956       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20957       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20958     new_path=`$CYGPATH -u "$path"`
20959   fi
20960   if test "x$new_path" = x; then
20961     # Oops. Which didn't find the executable.
20962     # The splitting of arguments from the executable at a space might have been incorrect,
20963     # since paths with space are more likely in Windows. Give it another try with the whole
20964     # argument.
20965     path="$complete"
20966     arguments="EOL"
20967     new_path=`$CYGPATH -u "$path"`
20968     new_path=`$WHICH "$new_path" 2> /dev/null`
20969     # bat and cmd files are not always considered executable in cygwin causing which
20970     # to not find them
20971     if test "x$new_path" = x \
20972         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20973         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20974       new_path=`$CYGPATH -u "$path"`
20975     fi
20976     if test "x$new_path" = x; then
20977       # It's still not found. Now this is an unrecoverable error.
20978       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20979 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20980       has_space=`$ECHO "$complete" | $GREP " "`
20981       if test "x$has_space" != x; then
20982         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20983 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20984       fi
20985       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20986     fi
20987   fi
20988 
20989   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20990   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20991   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20992   # "foo.exe" is OK but "foo" is an error.
20993   #
20994   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20995   # It is also a way to make sure we got the proper file name for the real test later on.
20996   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20997   if test "x$test_shortpath" = x; then
20998     # Short path failed, file does not exist as specified.
20999     # Try adding .exe or .cmd
21000     if test -f "${new_path}.exe"; then
21001       input_to_shortpath="${new_path}.exe"
21002     elif test -f "${new_path}.cmd"; then
21003       input_to_shortpath="${new_path}.cmd"
21004     else
21005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
21006 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
21007       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21008 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21009       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21010     fi
21011   else
21012     input_to_shortpath="$new_path"
21013   fi
21014 
21015   # Call helper function which possibly converts this using DOS-style short mode.
21016   # If so, the updated path is stored in $new_path.
21017   new_path="$input_to_shortpath"
21018 
21019   input_path="$input_to_shortpath"
21020   # Check if we need to convert this using DOS-style short mode. If the path
21021   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21022   # take no chances and rewrite it.
21023   # Note: m4 eats our [], so we need to use [ and ] instead.
21024   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21025   if test "x$has_forbidden_chars" != x; then
21026     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21027     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21028     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21029     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21030       # Going to short mode and back again did indeed matter. Since short mode is
21031       # case insensitive, let's make it lowercase to improve readability.
21032       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21033       # Now convert it back to Unix-stile (cygpath)
21034       input_path=`$CYGPATH -u "$shortmode_path"`
21035       new_path="$input_path"
21036     fi
21037   fi
21038 
21039   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21040   if test "x$test_cygdrive_prefix" = x; then
21041     # As a simple fix, exclude /usr/bin since it's not a real path.
21042     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21043       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21044       # a path prefixed by /cygdrive for fixpath to work.
21045       new_path="$CYGWIN_ROOT_PATH$input_path"
21046     fi
21047   fi
21048 
21049   # remove trailing .exe if any
21050   new_path="${new_path/%.exe/}"
21051 
21052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21053 
21054   # First separate the path from the arguments. This will split at the first
21055   # space.
21056   complete="$CXX"
21057   path="${complete%% *}"
21058   tmp="$complete EOL"
21059   arguments="${tmp#* }"
21060 
21061   # Input might be given as Windows format, start by converting to
21062   # unix format.
21063   new_path="$path"
21064 
21065   windows_path="$new_path"
21066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21067     unix_path=`$CYGPATH -u "$windows_path"`
21068     new_path="$unix_path"
21069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21071     new_path="$unix_path"
21072   fi
21073 
21074 
21075   # Now try to locate executable using which
21076   new_path=`$WHICH "$new_path" 2> /dev/null`
21077 
21078   if test "x$new_path" = x; then
21079     # Oops. Which didn't find the executable.
21080     # The splitting of arguments from the executable at a space might have been incorrect,
21081     # since paths with space are more likely in Windows. Give it another try with the whole
21082     # argument.
21083     path="$complete"
21084     arguments="EOL"
21085     new_path="$path"
21086 
21087   windows_path="$new_path"
21088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21089     unix_path=`$CYGPATH -u "$windows_path"`
21090     new_path="$unix_path"
21091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21093     new_path="$unix_path"
21094   fi
21095 
21096 
21097     new_path=`$WHICH "$new_path" 2> /dev/null`
21098 
21099     if test "x$new_path" = x; then
21100       # It's still not found. Now this is an unrecoverable error.
21101       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21102 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21103       has_space=`$ECHO "$complete" | $GREP " "`
21104       if test "x$has_space" != x; then
21105         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21106 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21107       fi
21108       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21109     fi
21110   fi
21111 
21112   # Now new_path has a complete unix path to the binary
21113   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21114     # Keep paths in /bin as-is, but remove trailing .exe if any
21115     new_path="${new_path/%.exe/}"
21116     # Do not save /bin paths to all_fixpath_prefixes!
21117   else
21118     # Not in mixed or Windows style, start by that.
21119     new_path=`cmd //c echo $new_path`
21120 
21121   input_path="$new_path"
21122   # Check if we need to convert this using DOS-style short mode. If the path
21123   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21124   # take no chances and rewrite it.
21125   # Note: m4 eats our [], so we need to use [ and ] instead.
21126   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21127   if test "x$has_forbidden_chars" != x; then
21128     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21129     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21130   fi
21131 
21132     # Output is in $new_path
21133 
21134   windows_path="$new_path"
21135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21136     unix_path=`$CYGPATH -u "$windows_path"`
21137     new_path="$unix_path"
21138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21140     new_path="$unix_path"
21141   fi
21142 
21143     # remove trailing .exe if any
21144     new_path="${new_path/%.exe/}"
21145 
21146     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21147     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21148   fi
21149 
21150   else
21151     # We're on a posix platform. Hooray! :)
21152     # First separate the path from the arguments. This will split at the first
21153     # space.
21154     complete="$CXX"
21155     path="${complete%% *}"
21156     tmp="$complete EOL"
21157     arguments="${tmp#* }"
21158 
21159     # Cannot rely on the command "which" here since it doesn't always work.
21160     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21161     if test -z "$is_absolute_path"; then
21162       # Path to executable is not absolute. Find it.
21163       IFS_save="$IFS"
21164       IFS=:
21165       for p in $PATH; do
21166         if test -f "$p/$path" && test -x "$p/$path"; then
21167           new_path="$p/$path"
21168           break
21169         fi
21170       done
21171       IFS="$IFS_save"
21172     else
21173       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
21174 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
21175       new_path="$path"
21176     fi
21177 
21178     if test "x$new_path" = x; then
21179       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
21180 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
21181       has_space=`$ECHO "$complete" | $GREP " "`
21182       if test "x$has_space" != x; then
21183         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21184 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21185       fi
21186       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
21187     fi
21188   fi
21189 
21190   # Now join together the path and the arguments once again
21191   if test "x$arguments" != xEOL; then
21192     new_complete="$new_path ${arguments% *}"
21193   else
21194     new_complete="$new_path"
21195   fi
21196 
21197   if test "x$complete" != "x$new_complete"; then
21198     CXX="$new_complete"
21199     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
21200 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
21201   fi
21202 
21203   TEST_COMPILER="$CXX"
21204   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
21205   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
21206   if test "x$OPENJDK_BUILD_OS" != xaix; then
21207     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
21208 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
21209 
21210   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21211     # Follow a chain of symbolic links. Use readlink
21212     # where it exists, else fall back to horribly
21213     # complicated shell code.
21214     if test "x$READLINK_TESTED" != yes; then
21215       # On MacOSX there is a readlink tool with a different
21216       # purpose than the GNU readlink tool. Check the found readlink.
21217       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21218       if test "x$ISGNU" = x; then
21219         # A readlink that we do not know how to use.
21220         # Are there other non-GNU readlinks out there?
21221         READLINK_TESTED=yes
21222         READLINK=
21223       fi
21224     fi
21225 
21226     if test "x$READLINK" != x; then
21227       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
21228     else
21229       # Save the current directory for restoring afterwards
21230       STARTDIR=$PWD
21231       COUNTER=0
21232       sym_link_dir=`$DIRNAME $TEST_COMPILER`
21233       sym_link_file=`$BASENAME $TEST_COMPILER`
21234       cd $sym_link_dir
21235       # Use -P flag to resolve symlinks in directories.
21236       cd `$THEPWDCMD -P`
21237       sym_link_dir=`$THEPWDCMD -P`
21238       # Resolve file symlinks
21239       while test $COUNTER -lt 20; do
21240         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21241         if test "x$ISLINK" == x; then
21242           # This is not a symbolic link! We are done!
21243           break
21244         fi
21245         # Again resolve directory symlinks since the target of the just found
21246         # link could be in a different directory
21247         cd `$DIRNAME $ISLINK`
21248         sym_link_dir=`$THEPWDCMD -P`
21249         sym_link_file=`$BASENAME $ISLINK`
21250         let COUNTER=COUNTER+1
21251       done
21252       cd $STARTDIR
21253       TEST_COMPILER=$sym_link_dir/$sym_link_file
21254     fi
21255   fi
21256 
21257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
21258 $as_echo "$TEST_COMPILER" >&6; }
21259   fi
21260   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
21261 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
21262 
21263   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21264   if test "x$COMPILER_BASENAME" = "xccache"; then
21265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21266 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21267     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21268     # We want to control ccache invocation ourselves, so ignore this cc and try
21269     # searching again.
21270 
21271     # Remove the path to the fake ccache cc from the PATH
21272     RETRY_COMPILER_SAVED_PATH="$PATH"
21273     COMPILER_DIRNAME=`$DIRNAME $CXX`
21274     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21275 
21276     # Try again looking for our compiler
21277     if test -n "$ac_tool_prefix"; then
21278   for ac_prog in $COMPILER_CHECK_LIST
21279   do
21280     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21281 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21283 $as_echo_n "checking for $ac_word... " >&6; }
21284 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
21285   $as_echo_n "(cached) " >&6
21286 else
21287   if test -n "$PROPER_COMPILER_CXX"; then
21288   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21289 else
21290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21291 for as_dir in $PATH
21292 do
21293   IFS=$as_save_IFS
21294   test -z "$as_dir" && as_dir=.
21295     for ac_exec_ext in '' $ac_executable_extensions; do
21296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21297     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21299     break 2
21300   fi
21301 done
21302   done
21303 IFS=$as_save_IFS
21304 
21305 fi
21306 fi
21307 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21308 if test -n "$PROPER_COMPILER_CXX"; then
21309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21310 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21311 else
21312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21313 $as_echo "no" >&6; }
21314 fi
21315 
21316 
21317     test -n "$PROPER_COMPILER_CXX" && break
21318   done
21319 fi
21320 if test -z "$PROPER_COMPILER_CXX"; then
21321   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21322   for ac_prog in $COMPILER_CHECK_LIST
21323 do
21324   # Extract the first word of "$ac_prog", so it can be a program name with args.
21325 set dummy $ac_prog; ac_word=$2
21326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21327 $as_echo_n "checking for $ac_word... " >&6; }
21328 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
21329   $as_echo_n "(cached) " >&6
21330 else
21331   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21332   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21333 else
21334 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21335 for as_dir in $PATH
21336 do
21337   IFS=$as_save_IFS
21338   test -z "$as_dir" && as_dir=.
21339     for ac_exec_ext in '' $ac_executable_extensions; do
21340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21341     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21343     break 2
21344   fi
21345 done
21346   done
21347 IFS=$as_save_IFS
21348 
21349 fi
21350 fi
21351 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21352 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21354 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21355 else
21356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21357 $as_echo "no" >&6; }
21358 fi
21359 
21360 
21361   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21362 done
21363 
21364   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21365     PROPER_COMPILER_CXX=""
21366   else
21367     case $cross_compiling:$ac_tool_warned in
21368 yes:)
21369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21370 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21371 ac_tool_warned=yes ;;
21372 esac
21373     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21374   fi
21375 fi
21376 
21377 
21378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21379 
21380   # First separate the path from the arguments. This will split at the first
21381   # space.
21382   complete="$PROPER_COMPILER_CXX"
21383   path="${complete%% *}"
21384   tmp="$complete EOL"
21385   arguments="${tmp#* }"
21386 
21387   # Input might be given as Windows format, start by converting to
21388   # unix format.
21389   new_path=`$CYGPATH -u "$path"`
21390 
21391   # Now try to locate executable using which
21392   new_path=`$WHICH "$new_path" 2> /dev/null`
21393   # bat and cmd files are not always considered executable in cygwin causing which
21394   # to not find them
21395   if test "x$new_path" = x \
21396       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21397       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21398     new_path=`$CYGPATH -u "$path"`
21399   fi
21400   if test "x$new_path" = x; then
21401     # Oops. Which didn't find the executable.
21402     # The splitting of arguments from the executable at a space might have been incorrect,
21403     # since paths with space are more likely in Windows. Give it another try with the whole
21404     # argument.
21405     path="$complete"
21406     arguments="EOL"
21407     new_path=`$CYGPATH -u "$path"`
21408     new_path=`$WHICH "$new_path" 2> /dev/null`
21409     # bat and cmd files are not always considered executable in cygwin causing which
21410     # to not find them
21411     if test "x$new_path" = x \
21412         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21413         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21414       new_path=`$CYGPATH -u "$path"`
21415     fi
21416     if test "x$new_path" = x; then
21417       # It's still not found. Now this is an unrecoverable error.
21418       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21419 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21420       has_space=`$ECHO "$complete" | $GREP " "`
21421       if test "x$has_space" != x; then
21422         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21424       fi
21425       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21426     fi
21427   fi
21428 
21429   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21430   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21431   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21432   # "foo.exe" is OK but "foo" is an error.
21433   #
21434   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21435   # It is also a way to make sure we got the proper file name for the real test later on.
21436   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21437   if test "x$test_shortpath" = x; then
21438     # Short path failed, file does not exist as specified.
21439     # Try adding .exe or .cmd
21440     if test -f "${new_path}.exe"; then
21441       input_to_shortpath="${new_path}.exe"
21442     elif test -f "${new_path}.cmd"; then
21443       input_to_shortpath="${new_path}.cmd"
21444     else
21445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21446 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21447       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21448 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21449       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21450     fi
21451   else
21452     input_to_shortpath="$new_path"
21453   fi
21454 
21455   # Call helper function which possibly converts this using DOS-style short mode.
21456   # If so, the updated path is stored in $new_path.
21457   new_path="$input_to_shortpath"
21458 
21459   input_path="$input_to_shortpath"
21460   # Check if we need to convert this using DOS-style short mode. If the path
21461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21462   # take no chances and rewrite it.
21463   # Note: m4 eats our [], so we need to use [ and ] instead.
21464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21465   if test "x$has_forbidden_chars" != x; then
21466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21467     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21468     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21469     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21470       # Going to short mode and back again did indeed matter. Since short mode is
21471       # case insensitive, let's make it lowercase to improve readability.
21472       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21473       # Now convert it back to Unix-stile (cygpath)
21474       input_path=`$CYGPATH -u "$shortmode_path"`
21475       new_path="$input_path"
21476     fi
21477   fi
21478 
21479   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21480   if test "x$test_cygdrive_prefix" = x; then
21481     # As a simple fix, exclude /usr/bin since it's not a real path.
21482     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21483       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21484       # a path prefixed by /cygdrive for fixpath to work.
21485       new_path="$CYGWIN_ROOT_PATH$input_path"
21486     fi
21487   fi
21488 
21489   # remove trailing .exe if any
21490   new_path="${new_path/%.exe/}"
21491 
21492   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21493 
21494   # First separate the path from the arguments. This will split at the first
21495   # space.
21496   complete="$PROPER_COMPILER_CXX"
21497   path="${complete%% *}"
21498   tmp="$complete EOL"
21499   arguments="${tmp#* }"
21500 
21501   # Input might be given as Windows format, start by converting to
21502   # unix format.
21503   new_path="$path"
21504 
21505   windows_path="$new_path"
21506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21507     unix_path=`$CYGPATH -u "$windows_path"`
21508     new_path="$unix_path"
21509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21511     new_path="$unix_path"
21512   fi
21513 
21514 
21515   # Now try to locate executable using which
21516   new_path=`$WHICH "$new_path" 2> /dev/null`
21517 
21518   if test "x$new_path" = x; then
21519     # Oops. Which didn't find the executable.
21520     # The splitting of arguments from the executable at a space might have been incorrect,
21521     # since paths with space are more likely in Windows. Give it another try with the whole
21522     # argument.
21523     path="$complete"
21524     arguments="EOL"
21525     new_path="$path"
21526 
21527   windows_path="$new_path"
21528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21529     unix_path=`$CYGPATH -u "$windows_path"`
21530     new_path="$unix_path"
21531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21533     new_path="$unix_path"
21534   fi
21535 
21536 
21537     new_path=`$WHICH "$new_path" 2> /dev/null`
21538 
21539     if test "x$new_path" = x; then
21540       # It's still not found. Now this is an unrecoverable error.
21541       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21542 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21543       has_space=`$ECHO "$complete" | $GREP " "`
21544       if test "x$has_space" != x; then
21545         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21546 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21547       fi
21548       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21549     fi
21550   fi
21551 
21552   # Now new_path has a complete unix path to the binary
21553   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21554     # Keep paths in /bin as-is, but remove trailing .exe if any
21555     new_path="${new_path/%.exe/}"
21556     # Do not save /bin paths to all_fixpath_prefixes!
21557   else
21558     # Not in mixed or Windows style, start by that.
21559     new_path=`cmd //c echo $new_path`
21560 
21561   input_path="$new_path"
21562   # Check if we need to convert this using DOS-style short mode. If the path
21563   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21564   # take no chances and rewrite it.
21565   # Note: m4 eats our [], so we need to use [ and ] instead.
21566   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21567   if test "x$has_forbidden_chars" != x; then
21568     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21569     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21570   fi
21571 
21572     # Output is in $new_path
21573 
21574   windows_path="$new_path"
21575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21576     unix_path=`$CYGPATH -u "$windows_path"`
21577     new_path="$unix_path"
21578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21580     new_path="$unix_path"
21581   fi
21582 
21583     # remove trailing .exe if any
21584     new_path="${new_path/%.exe/}"
21585 
21586     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21587     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21588   fi
21589 
21590   else
21591     # We're on a posix platform. Hooray! :)
21592     # First separate the path from the arguments. This will split at the first
21593     # space.
21594     complete="$PROPER_COMPILER_CXX"
21595     path="${complete%% *}"
21596     tmp="$complete EOL"
21597     arguments="${tmp#* }"
21598 
21599     # Cannot rely on the command "which" here since it doesn't always work.
21600     is_absolute_path=`$ECHO "$path" | $GREP ^/`
21601     if test -z "$is_absolute_path"; then
21602       # Path to executable is not absolute. Find it.
21603       IFS_save="$IFS"
21604       IFS=:
21605       for p in $PATH; do
21606         if test -f "$p/$path" && test -x "$p/$path"; then
21607           new_path="$p/$path"
21608           break
21609         fi
21610       done
21611       IFS="$IFS_save"
21612     else
21613       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21614 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21615       new_path="$path"
21616     fi
21617 
21618     if test "x$new_path" = x; then
21619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21620 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21621       has_space=`$ECHO "$complete" | $GREP " "`
21622       if test "x$has_space" != x; then
21623         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21624 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21625       fi
21626       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21627     fi
21628   fi
21629 
21630   # Now join together the path and the arguments once again
21631   if test "x$arguments" != xEOL; then
21632     new_complete="$new_path ${arguments% *}"
21633   else
21634     new_complete="$new_path"
21635   fi
21636 
21637   if test "x$complete" != "x$new_complete"; then
21638     PROPER_COMPILER_CXX="$new_complete"
21639     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21640 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21641   fi
21642 
21643     PATH="$RETRY_COMPILER_SAVED_PATH"
21644 
21645     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21646 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21647 
21648   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21649     # Follow a chain of symbolic links. Use readlink
21650     # where it exists, else fall back to horribly
21651     # complicated shell code.
21652     if test "x$READLINK_TESTED" != yes; then
21653       # On MacOSX there is a readlink tool with a different
21654       # purpose than the GNU readlink tool. Check the found readlink.
21655       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21656       if test "x$ISGNU" = x; then
21657         # A readlink that we do not know how to use.
21658         # Are there other non-GNU readlinks out there?
21659         READLINK_TESTED=yes
21660         READLINK=
21661       fi
21662     fi
21663 
21664     if test "x$READLINK" != x; then
21665       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21666     else
21667       # Save the current directory for restoring afterwards
21668       STARTDIR=$PWD
21669       COUNTER=0
21670       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21671       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21672       cd $sym_link_dir
21673       # Use -P flag to resolve symlinks in directories.
21674       cd `$THEPWDCMD -P`
21675       sym_link_dir=`$THEPWDCMD -P`
21676       # Resolve file symlinks
21677       while test $COUNTER -lt 20; do
21678         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21679         if test "x$ISLINK" == x; then
21680           # This is not a symbolic link! We are done!
21681           break
21682         fi
21683         # Again resolve directory symlinks since the target of the just found
21684         # link could be in a different directory
21685         cd `$DIRNAME $ISLINK`
21686         sym_link_dir=`$THEPWDCMD -P`
21687         sym_link_file=`$BASENAME $ISLINK`
21688         let COUNTER=COUNTER+1
21689       done
21690       cd $STARTDIR
21691       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21692     fi
21693   fi
21694 
21695     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21696 $as_echo "$PROPER_COMPILER_CXX" >&6; }
21697     CXX="$PROPER_COMPILER_CXX"
21698   else
21699     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21700 $as_echo "no, keeping CXX" >&6; }
21701     CXX="$TEST_COMPILER"
21702   fi
21703 
21704   COMPILER=$CXX
21705   COMPILER_NAME=$COMPILER_NAME
21706 
21707   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21708     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21709     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21710     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21711     if test $? -ne 0; then
21712       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21713 
21714       { $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
21715 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21716       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21717 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21718       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21719     else
21720       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21721       COMPILER_VENDOR="Sun Studio"
21722     fi
21723   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
21724       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
21725       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
21726       if test $? -ne 0; then
21727         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
21728       else
21729         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
21730         COMPILER_VENDOR='IBM'
21731       fi
21732   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21733     # First line typically looks something like:
21734     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
21735     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
21736     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21737     COMPILER_VENDOR="Microsoft CL.EXE"
21738     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21739     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21740       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21741         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21742       fi
21743     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21744       if test "x$COMPILER_CPU_TEST" != "xx64"; then
21745         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21746       fi
21747     fi
21748   else
21749     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21750     # Check that this is likely to be GCC.
21751     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21752     if test $? -ne 0; then
21753       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21754 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21755       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21756 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21757       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21758     fi
21759 
21760     # First line typically looks something like:
21761     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21762     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21763     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21764   fi
21765   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21766   CXX_VERSION="$COMPILER_VERSION"
21767   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21768   CXX_VENDOR="$COMPILER_VENDOR"
21769 
21770   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21771 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21772 
21773 
21774   # Now that we have resolved CXX ourself, let autoconf have its go at it
21775   ac_ext=cpp
21776 ac_cpp='$CXXCPP $CPPFLAGS'
21777 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21778 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21779 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21780 if test -z "$CXX"; then
21781   if test -n "$CCC"; then
21782     CXX=$CCC
21783   else
21784     if test -n "$ac_tool_prefix"; then
21785   for ac_prog in $CXX
21786   do
21787     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21788 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21790 $as_echo_n "checking for $ac_word... " >&6; }
21791 if ${ac_cv_prog_CXX+:} false; then :
21792   $as_echo_n "(cached) " >&6
21793 else
21794   if test -n "$CXX"; then
21795   ac_cv_prog_CXX="$CXX" # Let the user override the test.
21796 else
21797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21798 for as_dir in $PATH
21799 do
21800   IFS=$as_save_IFS
21801   test -z "$as_dir" && as_dir=.
21802     for ac_exec_ext in '' $ac_executable_extensions; do
21803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21804     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21806     break 2
21807   fi
21808 done
21809   done
21810 IFS=$as_save_IFS
21811 
21812 fi
21813 fi
21814 CXX=$ac_cv_prog_CXX
21815 if test -n "$CXX"; then
21816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21817 $as_echo "$CXX" >&6; }
21818 else
21819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21820 $as_echo "no" >&6; }
21821 fi
21822 
21823 
21824     test -n "$CXX" && break
21825   done
21826 fi
21827 if test -z "$CXX"; then
21828   ac_ct_CXX=$CXX
21829   for ac_prog in $CXX
21830 do
21831   # Extract the first word of "$ac_prog", so it can be a program name with args.
21832 set dummy $ac_prog; ac_word=$2
21833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21834 $as_echo_n "checking for $ac_word... " >&6; }
21835 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
21836   $as_echo_n "(cached) " >&6
21837 else
21838   if test -n "$ac_ct_CXX"; then
21839   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21840 else
21841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21842 for as_dir in $PATH
21843 do
21844   IFS=$as_save_IFS
21845   test -z "$as_dir" && as_dir=.
21846     for ac_exec_ext in '' $ac_executable_extensions; do
21847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21848     ac_cv_prog_ac_ct_CXX="$ac_prog"
21849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21850     break 2
21851   fi
21852 done
21853   done
21854 IFS=$as_save_IFS
21855 
21856 fi
21857 fi
21858 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21859 if test -n "$ac_ct_CXX"; then
21860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21861 $as_echo "$ac_ct_CXX" >&6; }
21862 else
21863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21864 $as_echo "no" >&6; }
21865 fi
21866 
21867 
21868   test -n "$ac_ct_CXX" && break
21869 done
21870 
21871   if test "x$ac_ct_CXX" = x; then
21872     CXX="g++"
21873   else
21874     case $cross_compiling:$ac_tool_warned in
21875 yes:)
21876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21877 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21878 ac_tool_warned=yes ;;
21879 esac
21880     CXX=$ac_ct_CXX
21881   fi
21882 fi
21883 
21884   fi
21885 fi
21886 # Provide some information about the compiler.
21887 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21888 set X $ac_compile
21889 ac_compiler=$2
21890 for ac_option in --version -v -V -qversion; do
21891   { { ac_try="$ac_compiler $ac_option >&5"
21892 case "(($ac_try" in
21893   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21894   *) ac_try_echo=$ac_try;;
21895 esac
21896 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21897 $as_echo "$ac_try_echo"; } >&5
21898   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21899   ac_status=$?
21900   if test -s conftest.err; then
21901     sed '10a\
21902 ... rest of stderr output deleted ...
21903          10q' conftest.err >conftest.er1
21904     cat conftest.er1 >&5
21905   fi
21906   rm -f conftest.er1 conftest.err
21907   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21908   test $ac_status = 0; }
21909 done
21910 
21911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21912 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21913 if ${ac_cv_cxx_compiler_gnu+:} false; then :
21914   $as_echo_n "(cached) " >&6
21915 else
21916   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21917 /* end confdefs.h.  */
21918 
21919 int
21920 main ()
21921 {
21922 #ifndef __GNUC__
21923        choke me
21924 #endif
21925 
21926   ;
21927   return 0;
21928 }
21929 _ACEOF
21930 if ac_fn_cxx_try_compile "$LINENO"; then :
21931   ac_compiler_gnu=yes
21932 else
21933   ac_compiler_gnu=no
21934 fi
21935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21936 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21937 
21938 fi
21939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21940 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21941 if test $ac_compiler_gnu = yes; then
21942   GXX=yes
21943 else
21944   GXX=
21945 fi
21946 ac_test_CXXFLAGS=${CXXFLAGS+set}
21947 ac_save_CXXFLAGS=$CXXFLAGS
21948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21949 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
21950 if ${ac_cv_prog_cxx_g+:} false; then :
21951   $as_echo_n "(cached) " >&6
21952 else
21953   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21954    ac_cxx_werror_flag=yes
21955    ac_cv_prog_cxx_g=no
21956    CXXFLAGS="-g"
21957    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21958 /* end confdefs.h.  */
21959 
21960 int
21961 main ()
21962 {
21963 
21964   ;
21965   return 0;
21966 }
21967 _ACEOF
21968 if ac_fn_cxx_try_compile "$LINENO"; then :
21969   ac_cv_prog_cxx_g=yes
21970 else
21971   CXXFLAGS=""
21972       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21973 /* end confdefs.h.  */
21974 
21975 int
21976 main ()
21977 {
21978 
21979   ;
21980   return 0;
21981 }
21982 _ACEOF
21983 if ac_fn_cxx_try_compile "$LINENO"; then :
21984 
21985 else
21986   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21987          CXXFLAGS="-g"
21988          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21989 /* end confdefs.h.  */
21990 
21991 int
21992 main ()
21993 {
21994 
21995   ;
21996   return 0;
21997 }
21998 _ACEOF
21999 if ac_fn_cxx_try_compile "$LINENO"; then :
22000   ac_cv_prog_cxx_g=yes
22001 fi
22002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22003 fi
22004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22005 fi
22006 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22007    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
22008 fi
22009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
22010 $as_echo "$ac_cv_prog_cxx_g" >&6; }
22011 if test "$ac_test_CXXFLAGS" = set; then
22012   CXXFLAGS=$ac_save_CXXFLAGS
22013 elif test $ac_cv_prog_cxx_g = yes; then
22014   if test "$GXX" = yes; then
22015     CXXFLAGS="-g -O2"
22016   else
22017     CXXFLAGS="-g"
22018   fi
22019 else
22020   if test "$GXX" = yes; then
22021     CXXFLAGS="-O2"
22022   else
22023     CXXFLAGS=
22024   fi
22025 fi
22026 ac_ext=cpp
22027 ac_cpp='$CXXCPP $CPPFLAGS'
22028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22031 
22032 
22033   ### Locate other tools
22034 
22035   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22036     ac_ext=m
22037 ac_cpp='$OBJCPP $CPPFLAGS'
22038 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22039 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22040 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
22041 if test -n "$ac_tool_prefix"; then
22042   for ac_prog in gcc objcc objc cc CC
22043   do
22044     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
22045 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
22046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22047 $as_echo_n "checking for $ac_word... " >&6; }
22048 if ${ac_cv_prog_OBJC+:} false; then :
22049   $as_echo_n "(cached) " >&6
22050 else
22051   if test -n "$OBJC"; then
22052   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
22053 else
22054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22055 for as_dir in $PATH
22056 do
22057   IFS=$as_save_IFS
22058   test -z "$as_dir" && as_dir=.
22059     for ac_exec_ext in '' $ac_executable_extensions; do
22060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22061     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
22062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22063     break 2
22064   fi
22065 done
22066   done
22067 IFS=$as_save_IFS
22068 
22069 fi
22070 fi
22071 OBJC=$ac_cv_prog_OBJC
22072 if test -n "$OBJC"; then
22073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
22074 $as_echo "$OBJC" >&6; }
22075 else
22076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22077 $as_echo "no" >&6; }
22078 fi
22079 
22080 
22081     test -n "$OBJC" && break
22082   done
22083 fi
22084 if test -z "$OBJC"; then
22085   ac_ct_OBJC=$OBJC
22086   for ac_prog in gcc objcc objc cc CC
22087 do
22088   # Extract the first word of "$ac_prog", so it can be a program name with args.
22089 set dummy $ac_prog; ac_word=$2
22090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22091 $as_echo_n "checking for $ac_word... " >&6; }
22092 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
22093   $as_echo_n "(cached) " >&6
22094 else
22095   if test -n "$ac_ct_OBJC"; then
22096   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
22097 else
22098 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22099 for as_dir in $PATH
22100 do
22101   IFS=$as_save_IFS
22102   test -z "$as_dir" && as_dir=.
22103     for ac_exec_ext in '' $ac_executable_extensions; do
22104   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22105     ac_cv_prog_ac_ct_OBJC="$ac_prog"
22106     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22107     break 2
22108   fi
22109 done
22110   done
22111 IFS=$as_save_IFS
22112 
22113 fi
22114 fi
22115 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
22116 if test -n "$ac_ct_OBJC"; then
22117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
22118 $as_echo "$ac_ct_OBJC" >&6; }
22119 else
22120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22121 $as_echo "no" >&6; }
22122 fi
22123 
22124 
22125   test -n "$ac_ct_OBJC" && break
22126 done
22127 
22128   if test "x$ac_ct_OBJC" = x; then
22129     OBJC="gcc"
22130   else
22131     case $cross_compiling:$ac_tool_warned in
22132 yes:)
22133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22134 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22135 ac_tool_warned=yes ;;
22136 esac
22137     OBJC=$ac_ct_OBJC
22138   fi
22139 fi
22140 
22141 # Provide some information about the compiler.
22142 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
22143 set X $ac_compile
22144 ac_compiler=$2
22145 for ac_option in --version -v -V -qversion; do
22146   { { ac_try="$ac_compiler $ac_option >&5"
22147 case "(($ac_try" in
22148   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22149   *) ac_try_echo=$ac_try;;
22150 esac
22151 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
22152 $as_echo "$ac_try_echo"; } >&5
22153   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
22154   ac_status=$?
22155   if test -s conftest.err; then
22156     sed '10a\
22157 ... rest of stderr output deleted ...
22158          10q' conftest.err >conftest.er1
22159     cat conftest.er1 >&5
22160   fi
22161   rm -f conftest.er1 conftest.err
22162   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22163   test $ac_status = 0; }
22164 done
22165 
22166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
22167 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
22168 if ${ac_cv_objc_compiler_gnu+:} false; then :
22169   $as_echo_n "(cached) " >&6
22170 else
22171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22172 /* end confdefs.h.  */
22173 
22174 int
22175 main ()
22176 {
22177 #ifndef __GNUC__
22178        choke me
22179 #endif
22180 
22181   ;
22182   return 0;
22183 }
22184 _ACEOF
22185 if ac_fn_objc_try_compile "$LINENO"; then :
22186   ac_compiler_gnu=yes
22187 else
22188   ac_compiler_gnu=no
22189 fi
22190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22191 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
22192 
22193 fi
22194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
22195 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
22196 if test $ac_compiler_gnu = yes; then
22197   GOBJC=yes
22198 else
22199   GOBJC=
22200 fi
22201 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
22202 ac_save_OBJCFLAGS=$OBJCFLAGS
22203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
22204 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
22205 if ${ac_cv_prog_objc_g+:} false; then :
22206   $as_echo_n "(cached) " >&6
22207 else
22208   ac_save_objc_werror_flag=$ac_objc_werror_flag
22209    ac_objc_werror_flag=yes
22210    ac_cv_prog_objc_g=no
22211    OBJCFLAGS="-g"
22212    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22213 /* end confdefs.h.  */
22214 
22215 int
22216 main ()
22217 {
22218 
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 if ac_fn_objc_try_compile "$LINENO"; then :
22224   ac_cv_prog_objc_g=yes
22225 else
22226   OBJCFLAGS=""
22227       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22228 /* end confdefs.h.  */
22229 
22230 int
22231 main ()
22232 {
22233 
22234   ;
22235   return 0;
22236 }
22237 _ACEOF
22238 if ac_fn_objc_try_compile "$LINENO"; then :
22239 
22240 else
22241   ac_objc_werror_flag=$ac_save_objc_werror_flag
22242          OBJCFLAGS="-g"
22243          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22244 /* end confdefs.h.  */
22245 
22246 int
22247 main ()
22248 {
22249 
22250   ;
22251   return 0;
22252 }
22253 _ACEOF
22254 if ac_fn_objc_try_compile "$LINENO"; then :
22255   ac_cv_prog_objc_g=yes
22256 fi
22257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22258 fi
22259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22260 fi
22261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22262    ac_objc_werror_flag=$ac_save_objc_werror_flag
22263 fi
22264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
22265 $as_echo "$ac_cv_prog_objc_g" >&6; }
22266 if test "$ac_test_OBJCFLAGS" = set; then
22267   OBJCFLAGS=$ac_save_OBJCFLAGS
22268 elif test $ac_cv_prog_objc_g = yes; then
22269   if test "$GOBJC" = yes; then
22270     OBJCFLAGS="-g -O2"
22271   else
22272     OBJCFLAGS="-g"
22273   fi
22274 else
22275   if test "$GOBJC" = yes; then
22276     OBJCFLAGS="-O2"
22277   else
22278     OBJCFLAGS=
22279   fi
22280 fi
22281 ac_ext=cpp
22282 ac_cpp='$CXXCPP $CPPFLAGS'
22283 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22284 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22285 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22286 
22287 
22288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22289 
22290   # First separate the path from the arguments. This will split at the first
22291   # space.
22292   complete="$OBJC"
22293   path="${complete%% *}"
22294   tmp="$complete EOL"
22295   arguments="${tmp#* }"
22296 
22297   # Input might be given as Windows format, start by converting to
22298   # unix format.
22299   new_path=`$CYGPATH -u "$path"`
22300 
22301   # Now try to locate executable using which
22302   new_path=`$WHICH "$new_path" 2> /dev/null`
22303   # bat and cmd files are not always considered executable in cygwin causing which
22304   # to not find them
22305   if test "x$new_path" = x \
22306       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22307       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22308     new_path=`$CYGPATH -u "$path"`
22309   fi
22310   if test "x$new_path" = x; then
22311     # Oops. Which didn't find the executable.
22312     # The splitting of arguments from the executable at a space might have been incorrect,
22313     # since paths with space are more likely in Windows. Give it another try with the whole
22314     # argument.
22315     path="$complete"
22316     arguments="EOL"
22317     new_path=`$CYGPATH -u "$path"`
22318     new_path=`$WHICH "$new_path" 2> /dev/null`
22319     # bat and cmd files are not always considered executable in cygwin causing which
22320     # to not find them
22321     if test "x$new_path" = x \
22322         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22323         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22324       new_path=`$CYGPATH -u "$path"`
22325     fi
22326     if test "x$new_path" = x; then
22327       # It's still not found. Now this is an unrecoverable error.
22328       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22329 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22330       has_space=`$ECHO "$complete" | $GREP " "`
22331       if test "x$has_space" != x; then
22332         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22333 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22334       fi
22335       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22336     fi
22337   fi
22338 
22339   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22340   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22341   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22342   # "foo.exe" is OK but "foo" is an error.
22343   #
22344   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22345   # It is also a way to make sure we got the proper file name for the real test later on.
22346   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22347   if test "x$test_shortpath" = x; then
22348     # Short path failed, file does not exist as specified.
22349     # Try adding .exe or .cmd
22350     if test -f "${new_path}.exe"; then
22351       input_to_shortpath="${new_path}.exe"
22352     elif test -f "${new_path}.cmd"; then
22353       input_to_shortpath="${new_path}.cmd"
22354     else
22355       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22356 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22357       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22358 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22359       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22360     fi
22361   else
22362     input_to_shortpath="$new_path"
22363   fi
22364 
22365   # Call helper function which possibly converts this using DOS-style short mode.
22366   # If so, the updated path is stored in $new_path.
22367   new_path="$input_to_shortpath"
22368 
22369   input_path="$input_to_shortpath"
22370   # Check if we need to convert this using DOS-style short mode. If the path
22371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22372   # take no chances and rewrite it.
22373   # Note: m4 eats our [], so we need to use [ and ] instead.
22374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22375   if test "x$has_forbidden_chars" != x; then
22376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22377     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22378     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22379     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22380       # Going to short mode and back again did indeed matter. Since short mode is
22381       # case insensitive, let's make it lowercase to improve readability.
22382       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22383       # Now convert it back to Unix-stile (cygpath)
22384       input_path=`$CYGPATH -u "$shortmode_path"`
22385       new_path="$input_path"
22386     fi
22387   fi
22388 
22389   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22390   if test "x$test_cygdrive_prefix" = x; then
22391     # As a simple fix, exclude /usr/bin since it's not a real path.
22392     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22393       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22394       # a path prefixed by /cygdrive for fixpath to work.
22395       new_path="$CYGWIN_ROOT_PATH$input_path"
22396     fi
22397   fi
22398 
22399   # remove trailing .exe if any
22400   new_path="${new_path/%.exe/}"
22401 
22402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22403 
22404   # First separate the path from the arguments. This will split at the first
22405   # space.
22406   complete="$OBJC"
22407   path="${complete%% *}"
22408   tmp="$complete EOL"
22409   arguments="${tmp#* }"
22410 
22411   # Input might be given as Windows format, start by converting to
22412   # unix format.
22413   new_path="$path"
22414 
22415   windows_path="$new_path"
22416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22417     unix_path=`$CYGPATH -u "$windows_path"`
22418     new_path="$unix_path"
22419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22421     new_path="$unix_path"
22422   fi
22423 
22424 
22425   # Now try to locate executable using which
22426   new_path=`$WHICH "$new_path" 2> /dev/null`
22427 
22428   if test "x$new_path" = x; then
22429     # Oops. Which didn't find the executable.
22430     # The splitting of arguments from the executable at a space might have been incorrect,
22431     # since paths with space are more likely in Windows. Give it another try with the whole
22432     # argument.
22433     path="$complete"
22434     arguments="EOL"
22435     new_path="$path"
22436 
22437   windows_path="$new_path"
22438   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22439     unix_path=`$CYGPATH -u "$windows_path"`
22440     new_path="$unix_path"
22441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22442     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22443     new_path="$unix_path"
22444   fi
22445 
22446 
22447     new_path=`$WHICH "$new_path" 2> /dev/null`
22448 
22449     if test "x$new_path" = x; then
22450       # It's still not found. Now this is an unrecoverable error.
22451       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22452 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22453       has_space=`$ECHO "$complete" | $GREP " "`
22454       if test "x$has_space" != x; then
22455         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22456 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22457       fi
22458       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22459     fi
22460   fi
22461 
22462   # Now new_path has a complete unix path to the binary
22463   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22464     # Keep paths in /bin as-is, but remove trailing .exe if any
22465     new_path="${new_path/%.exe/}"
22466     # Do not save /bin paths to all_fixpath_prefixes!
22467   else
22468     # Not in mixed or Windows style, start by that.
22469     new_path=`cmd //c echo $new_path`
22470 
22471   input_path="$new_path"
22472   # Check if we need to convert this using DOS-style short mode. If the path
22473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22474   # take no chances and rewrite it.
22475   # Note: m4 eats our [], so we need to use [ and ] instead.
22476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22477   if test "x$has_forbidden_chars" != x; then
22478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22479     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22480   fi
22481 
22482     # Output is in $new_path
22483 
22484   windows_path="$new_path"
22485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22486     unix_path=`$CYGPATH -u "$windows_path"`
22487     new_path="$unix_path"
22488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22490     new_path="$unix_path"
22491   fi
22492 
22493     # remove trailing .exe if any
22494     new_path="${new_path/%.exe/}"
22495 
22496     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22497     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22498   fi
22499 
22500   else
22501     # We're on a posix platform. Hooray! :)
22502     # First separate the path from the arguments. This will split at the first
22503     # space.
22504     complete="$OBJC"
22505     path="${complete%% *}"
22506     tmp="$complete EOL"
22507     arguments="${tmp#* }"
22508 
22509     # Cannot rely on the command "which" here since it doesn't always work.
22510     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22511     if test -z "$is_absolute_path"; then
22512       # Path to executable is not absolute. Find it.
22513       IFS_save="$IFS"
22514       IFS=:
22515       for p in $PATH; do
22516         if test -f "$p/$path" && test -x "$p/$path"; then
22517           new_path="$p/$path"
22518           break
22519         fi
22520       done
22521       IFS="$IFS_save"
22522     else
22523       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22524 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22525       new_path="$path"
22526     fi
22527 
22528     if test "x$new_path" = x; then
22529       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22530 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22531       has_space=`$ECHO "$complete" | $GREP " "`
22532       if test "x$has_space" != x; then
22533         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22534 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22535       fi
22536       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22537     fi
22538   fi
22539 
22540   # Now join together the path and the arguments once again
22541   if test "x$arguments" != xEOL; then
22542     new_complete="$new_path ${arguments% *}"
22543   else
22544     new_complete="$new_path"
22545   fi
22546 
22547   if test "x$complete" != "x$new_complete"; then
22548     OBJC="$new_complete"
22549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22550 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22551   fi
22552 
22553   else
22554     OBJC=
22555   fi
22556 
22557   # Restore the flags to the user specified values.
22558   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22559   CFLAGS="$ORG_CFLAGS"
22560   CXXFLAGS="$ORG_CXXFLAGS"
22561   OBJCFLAGS="$ORG_OBJCFLAGS"
22562 
22563   LD="$CC"
22564   LDEXE="$CC"
22565   LDCXX="$CXX"
22566   LDEXECXX="$CXX"
22567 
22568   # LDEXE is the linker to use, when creating executables.
22569 
22570   # Linking C++ libraries.
22571 
22572   # Linking C++ executables.
22573 
22574 
22575   if test "x$OPENJDK_TARGET_OS" != xwindows; then
22576     if test -n "$ac_tool_prefix"; then
22577   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22578 set dummy ${ac_tool_prefix}ar; ac_word=$2
22579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22580 $as_echo_n "checking for $ac_word... " >&6; }
22581 if ${ac_cv_prog_AR+:} false; then :
22582   $as_echo_n "(cached) " >&6
22583 else
22584   if test -n "$AR"; then
22585   ac_cv_prog_AR="$AR" # Let the user override the test.
22586 else
22587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22588 for as_dir in $PATH
22589 do
22590   IFS=$as_save_IFS
22591   test -z "$as_dir" && as_dir=.
22592     for ac_exec_ext in '' $ac_executable_extensions; do
22593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22594     ac_cv_prog_AR="${ac_tool_prefix}ar"
22595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22596     break 2
22597   fi
22598 done
22599   done
22600 IFS=$as_save_IFS
22601 
22602 fi
22603 fi
22604 AR=$ac_cv_prog_AR
22605 if test -n "$AR"; then
22606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22607 $as_echo "$AR" >&6; }
22608 else
22609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22610 $as_echo "no" >&6; }
22611 fi
22612 
22613 
22614 fi
22615 if test -z "$ac_cv_prog_AR"; then
22616   ac_ct_AR=$AR
22617   # Extract the first word of "ar", so it can be a program name with args.
22618 set dummy ar; ac_word=$2
22619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22620 $as_echo_n "checking for $ac_word... " >&6; }
22621 if ${ac_cv_prog_ac_ct_AR+:} false; then :
22622   $as_echo_n "(cached) " >&6
22623 else
22624   if test -n "$ac_ct_AR"; then
22625   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22626 else
22627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22628 for as_dir in $PATH
22629 do
22630   IFS=$as_save_IFS
22631   test -z "$as_dir" && as_dir=.
22632     for ac_exec_ext in '' $ac_executable_extensions; do
22633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22634     ac_cv_prog_ac_ct_AR="ar"
22635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22636     break 2
22637   fi
22638 done
22639   done
22640 IFS=$as_save_IFS
22641 
22642 fi
22643 fi
22644 ac_ct_AR=$ac_cv_prog_ac_ct_AR
22645 if test -n "$ac_ct_AR"; then
22646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22647 $as_echo "$ac_ct_AR" >&6; }
22648 else
22649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22650 $as_echo "no" >&6; }
22651 fi
22652 
22653   if test "x$ac_ct_AR" = x; then
22654     AR=""
22655   else
22656     case $cross_compiling:$ac_tool_warned in
22657 yes:)
22658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22659 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22660 ac_tool_warned=yes ;;
22661 esac
22662     AR=$ac_ct_AR
22663   fi
22664 else
22665   AR="$ac_cv_prog_AR"
22666 fi
22667 
22668 
22669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22670 
22671   # First separate the path from the arguments. This will split at the first
22672   # space.
22673   complete="$AR"
22674   path="${complete%% *}"
22675   tmp="$complete EOL"
22676   arguments="${tmp#* }"
22677 
22678   # Input might be given as Windows format, start by converting to
22679   # unix format.
22680   new_path=`$CYGPATH -u "$path"`
22681 
22682   # Now try to locate executable using which
22683   new_path=`$WHICH "$new_path" 2> /dev/null`
22684   # bat and cmd files are not always considered executable in cygwin causing which
22685   # to not find them
22686   if test "x$new_path" = x \
22687       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22688       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22689     new_path=`$CYGPATH -u "$path"`
22690   fi
22691   if test "x$new_path" = x; then
22692     # Oops. Which didn't find the executable.
22693     # The splitting of arguments from the executable at a space might have been incorrect,
22694     # since paths with space are more likely in Windows. Give it another try with the whole
22695     # argument.
22696     path="$complete"
22697     arguments="EOL"
22698     new_path=`$CYGPATH -u "$path"`
22699     new_path=`$WHICH "$new_path" 2> /dev/null`
22700     # bat and cmd files are not always considered executable in cygwin causing which
22701     # to not find them
22702     if test "x$new_path" = x \
22703         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22704         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22705       new_path=`$CYGPATH -u "$path"`
22706     fi
22707     if test "x$new_path" = x; then
22708       # It's still not found. Now this is an unrecoverable error.
22709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22710 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22711       has_space=`$ECHO "$complete" | $GREP " "`
22712       if test "x$has_space" != x; then
22713         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22714 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22715       fi
22716       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22717     fi
22718   fi
22719 
22720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22723   # "foo.exe" is OK but "foo" is an error.
22724   #
22725   # This test is therefore slightly more accurate than "test -f" to check for file presence.
22726   # It is also a way to make sure we got the proper file name for the real test later on.
22727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22728   if test "x$test_shortpath" = x; then
22729     # Short path failed, file does not exist as specified.
22730     # Try adding .exe or .cmd
22731     if test -f "${new_path}.exe"; then
22732       input_to_shortpath="${new_path}.exe"
22733     elif test -f "${new_path}.cmd"; then
22734       input_to_shortpath="${new_path}.cmd"
22735     else
22736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22737 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22738       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22739 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22740       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22741     fi
22742   else
22743     input_to_shortpath="$new_path"
22744   fi
22745 
22746   # Call helper function which possibly converts this using DOS-style short mode.
22747   # If so, the updated path is stored in $new_path.
22748   new_path="$input_to_shortpath"
22749 
22750   input_path="$input_to_shortpath"
22751   # Check if we need to convert this using DOS-style short mode. If the path
22752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22753   # take no chances and rewrite it.
22754   # Note: m4 eats our [], so we need to use [ and ] instead.
22755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22756   if test "x$has_forbidden_chars" != x; then
22757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22761       # Going to short mode and back again did indeed matter. Since short mode is
22762       # case insensitive, let's make it lowercase to improve readability.
22763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22764       # Now convert it back to Unix-stile (cygpath)
22765       input_path=`$CYGPATH -u "$shortmode_path"`
22766       new_path="$input_path"
22767     fi
22768   fi
22769 
22770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22771   if test "x$test_cygdrive_prefix" = x; then
22772     # As a simple fix, exclude /usr/bin since it's not a real path.
22773     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22775       # a path prefixed by /cygdrive for fixpath to work.
22776       new_path="$CYGWIN_ROOT_PATH$input_path"
22777     fi
22778   fi
22779 
22780   # remove trailing .exe if any
22781   new_path="${new_path/%.exe/}"
22782 
22783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22784 
22785   # First separate the path from the arguments. This will split at the first
22786   # space.
22787   complete="$AR"
22788   path="${complete%% *}"
22789   tmp="$complete EOL"
22790   arguments="${tmp#* }"
22791 
22792   # Input might be given as Windows format, start by converting to
22793   # unix format.
22794   new_path="$path"
22795 
22796   windows_path="$new_path"
22797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22798     unix_path=`$CYGPATH -u "$windows_path"`
22799     new_path="$unix_path"
22800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22802     new_path="$unix_path"
22803   fi
22804 
22805 
22806   # Now try to locate executable using which
22807   new_path=`$WHICH "$new_path" 2> /dev/null`
22808 
22809   if test "x$new_path" = x; then
22810     # Oops. Which didn't find the executable.
22811     # The splitting of arguments from the executable at a space might have been incorrect,
22812     # since paths with space are more likely in Windows. Give it another try with the whole
22813     # argument.
22814     path="$complete"
22815     arguments="EOL"
22816     new_path="$path"
22817 
22818   windows_path="$new_path"
22819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22820     unix_path=`$CYGPATH -u "$windows_path"`
22821     new_path="$unix_path"
22822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22824     new_path="$unix_path"
22825   fi
22826 
22827 
22828     new_path=`$WHICH "$new_path" 2> /dev/null`
22829 
22830     if test "x$new_path" = x; then
22831       # It's still not found. Now this is an unrecoverable error.
22832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22833 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22834       has_space=`$ECHO "$complete" | $GREP " "`
22835       if test "x$has_space" != x; then
22836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22838       fi
22839       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22840     fi
22841   fi
22842 
22843   # Now new_path has a complete unix path to the binary
22844   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22845     # Keep paths in /bin as-is, but remove trailing .exe if any
22846     new_path="${new_path/%.exe/}"
22847     # Do not save /bin paths to all_fixpath_prefixes!
22848   else
22849     # Not in mixed or Windows style, start by that.
22850     new_path=`cmd //c echo $new_path`
22851 
22852   input_path="$new_path"
22853   # Check if we need to convert this using DOS-style short mode. If the path
22854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22855   # take no chances and rewrite it.
22856   # Note: m4 eats our [], so we need to use [ and ] instead.
22857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22858   if test "x$has_forbidden_chars" != x; then
22859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22861   fi
22862 
22863     # Output is in $new_path
22864 
22865   windows_path="$new_path"
22866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22867     unix_path=`$CYGPATH -u "$windows_path"`
22868     new_path="$unix_path"
22869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22871     new_path="$unix_path"
22872   fi
22873 
22874     # remove trailing .exe if any
22875     new_path="${new_path/%.exe/}"
22876 
22877     # Save the first 10 bytes of this path to the storage, so fixpath can work.
22878     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22879   fi
22880 
22881   else
22882     # We're on a posix platform. Hooray! :)
22883     # First separate the path from the arguments. This will split at the first
22884     # space.
22885     complete="$AR"
22886     path="${complete%% *}"
22887     tmp="$complete EOL"
22888     arguments="${tmp#* }"
22889 
22890     # Cannot rely on the command "which" here since it doesn't always work.
22891     is_absolute_path=`$ECHO "$path" | $GREP ^/`
22892     if test -z "$is_absolute_path"; then
22893       # Path to executable is not absolute. Find it.
22894       IFS_save="$IFS"
22895       IFS=:
22896       for p in $PATH; do
22897         if test -f "$p/$path" && test -x "$p/$path"; then
22898           new_path="$p/$path"
22899           break
22900         fi
22901       done
22902       IFS="$IFS_save"
22903     else
22904       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22905 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22906       new_path="$path"
22907     fi
22908 
22909     if test "x$new_path" = x; then
22910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22911 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22912       has_space=`$ECHO "$complete" | $GREP " "`
22913       if test "x$has_space" != x; then
22914         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22916       fi
22917       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22918     fi
22919   fi
22920 
22921   # Now join together the path and the arguments once again
22922   if test "x$arguments" != xEOL; then
22923     new_complete="$new_path ${arguments% *}"
22924   else
22925     new_complete="$new_path"
22926   fi
22927 
22928   if test "x$complete" != "x$new_complete"; then
22929     AR="$new_complete"
22930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22931 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22932   fi
22933 
22934   fi
22935   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22936     ARFLAGS="-r"
22937   elif test "x$OPENJDK_TARGET_OS" = xaix; then
22938     ARFLAGS="-X64"
22939   else
22940     ARFLAGS=""
22941   fi
22942 
22943 
22944   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
22945   HOTSPOT_CXX="$CXX"
22946   HOTSPOT_LD="$LD"
22947 
22948 
22949 
22950   COMPILER_NAME=gcc
22951   COMPILER_TYPE=CC
22952   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22953 
22954     # For now, assume that we are always compiling using cl.exe.
22955     CC_OUT_OPTION=-Fo
22956     EXE_OUT_OPTION=-out:
22957     LD_OUT_OPTION=-out:
22958     AR_OUT_OPTION=-out:
22959     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22960     # program for something completely different.
22961     # Extract the first word of "link", so it can be a program name with args.
22962 set dummy link; ac_word=$2
22963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22964 $as_echo_n "checking for $ac_word... " >&6; }
22965 if ${ac_cv_prog_WINLD+:} false; then :
22966   $as_echo_n "(cached) " >&6
22967 else
22968   if test -n "$WINLD"; then
22969   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22970 else
22971   ac_prog_rejected=no
22972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22973 for as_dir in $PATH
22974 do
22975   IFS=$as_save_IFS
22976   test -z "$as_dir" && as_dir=.
22977     for ac_exec_ext in '' $ac_executable_extensions; do
22978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22979     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22980        ac_prog_rejected=yes
22981        continue
22982      fi
22983     ac_cv_prog_WINLD="link"
22984     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22985     break 2
22986   fi
22987 done
22988   done
22989 IFS=$as_save_IFS
22990 
22991 if test $ac_prog_rejected = yes; then
22992   # We found a bogon in the path, so make sure we never use it.
22993   set dummy $ac_cv_prog_WINLD
22994   shift
22995   if test $# != 0; then
22996     # We chose a different compiler from the bogus one.
22997     # However, it has the same basename, so the bogon will be chosen
22998     # first if we set WINLD to just the basename; use the full file name.
22999     shift
23000     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
23001   fi
23002 fi
23003 fi
23004 fi
23005 WINLD=$ac_cv_prog_WINLD
23006 if test -n "$WINLD"; then
23007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
23008 $as_echo "$WINLD" >&6; }
23009 else
23010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23011 $as_echo "no" >&6; }
23012 fi
23013 
23014 
23015     # Since we must ignore the first found link, WINLD will contain
23016     # the full path to the link.exe program.
23017 
23018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23019 
23020   # First separate the path from the arguments. This will split at the first
23021   # space.
23022   complete="$WINLD"
23023   path="${complete%% *}"
23024   tmp="$complete EOL"
23025   arguments="${tmp#* }"
23026 
23027   # Input might be given as Windows format, start by converting to
23028   # unix format.
23029   new_path=`$CYGPATH -u "$path"`
23030 
23031   # Now try to locate executable using which
23032   new_path=`$WHICH "$new_path" 2> /dev/null`
23033   # bat and cmd files are not always considered executable in cygwin causing which
23034   # to not find them
23035   if test "x$new_path" = x \
23036       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23037       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23038     new_path=`$CYGPATH -u "$path"`
23039   fi
23040   if test "x$new_path" = x; then
23041     # Oops. Which didn't find the executable.
23042     # The splitting of arguments from the executable at a space might have been incorrect,
23043     # since paths with space are more likely in Windows. Give it another try with the whole
23044     # argument.
23045     path="$complete"
23046     arguments="EOL"
23047     new_path=`$CYGPATH -u "$path"`
23048     new_path=`$WHICH "$new_path" 2> /dev/null`
23049     # bat and cmd files are not always considered executable in cygwin causing which
23050     # to not find them
23051     if test "x$new_path" = x \
23052         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23053         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23054       new_path=`$CYGPATH -u "$path"`
23055     fi
23056     if test "x$new_path" = x; then
23057       # It's still not found. Now this is an unrecoverable error.
23058       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23059 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23060       has_space=`$ECHO "$complete" | $GREP " "`
23061       if test "x$has_space" != x; then
23062         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23063 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23064       fi
23065       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23066     fi
23067   fi
23068 
23069   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23070   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23071   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23072   # "foo.exe" is OK but "foo" is an error.
23073   #
23074   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23075   # It is also a way to make sure we got the proper file name for the real test later on.
23076   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23077   if test "x$test_shortpath" = x; then
23078     # Short path failed, file does not exist as specified.
23079     # Try adding .exe or .cmd
23080     if test -f "${new_path}.exe"; then
23081       input_to_shortpath="${new_path}.exe"
23082     elif test -f "${new_path}.cmd"; then
23083       input_to_shortpath="${new_path}.cmd"
23084     else
23085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
23086 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
23087       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23088 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23089       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23090     fi
23091   else
23092     input_to_shortpath="$new_path"
23093   fi
23094 
23095   # Call helper function which possibly converts this using DOS-style short mode.
23096   # If so, the updated path is stored in $new_path.
23097   new_path="$input_to_shortpath"
23098 
23099   input_path="$input_to_shortpath"
23100   # Check if we need to convert this using DOS-style short mode. If the path
23101   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23102   # take no chances and rewrite it.
23103   # Note: m4 eats our [], so we need to use [ and ] instead.
23104   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23105   if test "x$has_forbidden_chars" != x; then
23106     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23107     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23108     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23109     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23110       # Going to short mode and back again did indeed matter. Since short mode is
23111       # case insensitive, let's make it lowercase to improve readability.
23112       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23113       # Now convert it back to Unix-stile (cygpath)
23114       input_path=`$CYGPATH -u "$shortmode_path"`
23115       new_path="$input_path"
23116     fi
23117   fi
23118 
23119   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23120   if test "x$test_cygdrive_prefix" = x; then
23121     # As a simple fix, exclude /usr/bin since it's not a real path.
23122     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23123       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23124       # a path prefixed by /cygdrive for fixpath to work.
23125       new_path="$CYGWIN_ROOT_PATH$input_path"
23126     fi
23127   fi
23128 
23129   # remove trailing .exe if any
23130   new_path="${new_path/%.exe/}"
23131 
23132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23133 
23134   # First separate the path from the arguments. This will split at the first
23135   # space.
23136   complete="$WINLD"
23137   path="${complete%% *}"
23138   tmp="$complete EOL"
23139   arguments="${tmp#* }"
23140 
23141   # Input might be given as Windows format, start by converting to
23142   # unix format.
23143   new_path="$path"
23144 
23145   windows_path="$new_path"
23146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23147     unix_path=`$CYGPATH -u "$windows_path"`
23148     new_path="$unix_path"
23149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23151     new_path="$unix_path"
23152   fi
23153 
23154 
23155   # Now try to locate executable using which
23156   new_path=`$WHICH "$new_path" 2> /dev/null`
23157 
23158   if test "x$new_path" = x; then
23159     # Oops. Which didn't find the executable.
23160     # The splitting of arguments from the executable at a space might have been incorrect,
23161     # since paths with space are more likely in Windows. Give it another try with the whole
23162     # argument.
23163     path="$complete"
23164     arguments="EOL"
23165     new_path="$path"
23166 
23167   windows_path="$new_path"
23168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23169     unix_path=`$CYGPATH -u "$windows_path"`
23170     new_path="$unix_path"
23171   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23172     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23173     new_path="$unix_path"
23174   fi
23175 
23176 
23177     new_path=`$WHICH "$new_path" 2> /dev/null`
23178 
23179     if test "x$new_path" = x; then
23180       # It's still not found. Now this is an unrecoverable error.
23181       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23182 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23183       has_space=`$ECHO "$complete" | $GREP " "`
23184       if test "x$has_space" != x; then
23185         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23186 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23187       fi
23188       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23189     fi
23190   fi
23191 
23192   # Now new_path has a complete unix path to the binary
23193   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23194     # Keep paths in /bin as-is, but remove trailing .exe if any
23195     new_path="${new_path/%.exe/}"
23196     # Do not save /bin paths to all_fixpath_prefixes!
23197   else
23198     # Not in mixed or Windows style, start by that.
23199     new_path=`cmd //c echo $new_path`
23200 
23201   input_path="$new_path"
23202   # Check if we need to convert this using DOS-style short mode. If the path
23203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23204   # take no chances and rewrite it.
23205   # Note: m4 eats our [], so we need to use [ and ] instead.
23206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23207   if test "x$has_forbidden_chars" != x; then
23208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23209     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23210   fi
23211 
23212     # Output is in $new_path
23213 
23214   windows_path="$new_path"
23215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23216     unix_path=`$CYGPATH -u "$windows_path"`
23217     new_path="$unix_path"
23218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23220     new_path="$unix_path"
23221   fi
23222 
23223     # remove trailing .exe if any
23224     new_path="${new_path/%.exe/}"
23225 
23226     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23227     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23228   fi
23229 
23230   else
23231     # We're on a posix platform. Hooray! :)
23232     # First separate the path from the arguments. This will split at the first
23233     # space.
23234     complete="$WINLD"
23235     path="${complete%% *}"
23236     tmp="$complete EOL"
23237     arguments="${tmp#* }"
23238 
23239     # Cannot rely on the command "which" here since it doesn't always work.
23240     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23241     if test -z "$is_absolute_path"; then
23242       # Path to executable is not absolute. Find it.
23243       IFS_save="$IFS"
23244       IFS=:
23245       for p in $PATH; do
23246         if test -f "$p/$path" && test -x "$p/$path"; then
23247           new_path="$p/$path"
23248           break
23249         fi
23250       done
23251       IFS="$IFS_save"
23252     else
23253       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
23254 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
23255       new_path="$path"
23256     fi
23257 
23258     if test "x$new_path" = x; then
23259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
23260 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
23261       has_space=`$ECHO "$complete" | $GREP " "`
23262       if test "x$has_space" != x; then
23263         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23264 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23265       fi
23266       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
23267     fi
23268   fi
23269 
23270   # Now join together the path and the arguments once again
23271   if test "x$arguments" != xEOL; then
23272     new_complete="$new_path ${arguments% *}"
23273   else
23274     new_complete="$new_path"
23275   fi
23276 
23277   if test "x$complete" != "x$new_complete"; then
23278     WINLD="$new_complete"
23279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23280 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23281   fi
23282 
23283     printf "Windows linker was found at $WINLD\n"
23284     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23285 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23286     "$WINLD" --version > /dev/null
23287     if test $? -eq 0 ; then
23288       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23289 $as_echo "no" >&6; }
23290       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23291     else
23292       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23293 $as_echo "yes" >&6; }
23294     fi
23295     LD="$WINLD"
23296     LDEXE="$WINLD"
23297     LDCXX="$WINLD"
23298     LDEXECXX="$WINLD"
23299 
23300     # Extract the first word of "mt", so it can be a program name with args.
23301 set dummy mt; ac_word=$2
23302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23303 $as_echo_n "checking for $ac_word... " >&6; }
23304 if ${ac_cv_prog_MT+:} false; then :
23305   $as_echo_n "(cached) " >&6
23306 else
23307   if test -n "$MT"; then
23308   ac_cv_prog_MT="$MT" # Let the user override the test.
23309 else
23310   ac_prog_rejected=no
23311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23312 for as_dir in $PATH
23313 do
23314   IFS=$as_save_IFS
23315   test -z "$as_dir" && as_dir=.
23316     for ac_exec_ext in '' $ac_executable_extensions; do
23317   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23318     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23319        ac_prog_rejected=yes
23320        continue
23321      fi
23322     ac_cv_prog_MT="mt"
23323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23324     break 2
23325   fi
23326 done
23327   done
23328 IFS=$as_save_IFS
23329 
23330 if test $ac_prog_rejected = yes; then
23331   # We found a bogon in the path, so make sure we never use it.
23332   set dummy $ac_cv_prog_MT
23333   shift
23334   if test $# != 0; then
23335     # We chose a different compiler from the bogus one.
23336     # However, it has the same basename, so the bogon will be chosen
23337     # first if we set MT to just the basename; use the full file name.
23338     shift
23339     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23340   fi
23341 fi
23342 fi
23343 fi
23344 MT=$ac_cv_prog_MT
23345 if test -n "$MT"; then
23346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23347 $as_echo "$MT" >&6; }
23348 else
23349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23350 $as_echo "no" >&6; }
23351 fi
23352 
23353 
23354 
23355   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23356 
23357   # First separate the path from the arguments. This will split at the first
23358   # space.
23359   complete="$MT"
23360   path="${complete%% *}"
23361   tmp="$complete EOL"
23362   arguments="${tmp#* }"
23363 
23364   # Input might be given as Windows format, start by converting to
23365   # unix format.
23366   new_path=`$CYGPATH -u "$path"`
23367 
23368   # Now try to locate executable using which
23369   new_path=`$WHICH "$new_path" 2> /dev/null`
23370   # bat and cmd files are not always considered executable in cygwin causing which
23371   # to not find them
23372   if test "x$new_path" = x \
23373       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23374       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23375     new_path=`$CYGPATH -u "$path"`
23376   fi
23377   if test "x$new_path" = x; then
23378     # Oops. Which didn't find the executable.
23379     # The splitting of arguments from the executable at a space might have been incorrect,
23380     # since paths with space are more likely in Windows. Give it another try with the whole
23381     # argument.
23382     path="$complete"
23383     arguments="EOL"
23384     new_path=`$CYGPATH -u "$path"`
23385     new_path=`$WHICH "$new_path" 2> /dev/null`
23386     # bat and cmd files are not always considered executable in cygwin causing which
23387     # to not find them
23388     if test "x$new_path" = x \
23389         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23390         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23391       new_path=`$CYGPATH -u "$path"`
23392     fi
23393     if test "x$new_path" = x; then
23394       # It's still not found. Now this is an unrecoverable error.
23395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23396 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23397       has_space=`$ECHO "$complete" | $GREP " "`
23398       if test "x$has_space" != x; then
23399         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23400 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23401       fi
23402       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23403     fi
23404   fi
23405 
23406   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23407   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23408   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23409   # "foo.exe" is OK but "foo" is an error.
23410   #
23411   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23412   # It is also a way to make sure we got the proper file name for the real test later on.
23413   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23414   if test "x$test_shortpath" = x; then
23415     # Short path failed, file does not exist as specified.
23416     # Try adding .exe or .cmd
23417     if test -f "${new_path}.exe"; then
23418       input_to_shortpath="${new_path}.exe"
23419     elif test -f "${new_path}.cmd"; then
23420       input_to_shortpath="${new_path}.cmd"
23421     else
23422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23423 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23424       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23425 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23426       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23427     fi
23428   else
23429     input_to_shortpath="$new_path"
23430   fi
23431 
23432   # Call helper function which possibly converts this using DOS-style short mode.
23433   # If so, the updated path is stored in $new_path.
23434   new_path="$input_to_shortpath"
23435 
23436   input_path="$input_to_shortpath"
23437   # Check if we need to convert this using DOS-style short mode. If the path
23438   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23439   # take no chances and rewrite it.
23440   # Note: m4 eats our [], so we need to use [ and ] instead.
23441   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23442   if test "x$has_forbidden_chars" != x; then
23443     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23444     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23445     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23446     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23447       # Going to short mode and back again did indeed matter. Since short mode is
23448       # case insensitive, let's make it lowercase to improve readability.
23449       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23450       # Now convert it back to Unix-stile (cygpath)
23451       input_path=`$CYGPATH -u "$shortmode_path"`
23452       new_path="$input_path"
23453     fi
23454   fi
23455 
23456   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23457   if test "x$test_cygdrive_prefix" = x; then
23458     # As a simple fix, exclude /usr/bin since it's not a real path.
23459     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23460       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23461       # a path prefixed by /cygdrive for fixpath to work.
23462       new_path="$CYGWIN_ROOT_PATH$input_path"
23463     fi
23464   fi
23465 
23466   # remove trailing .exe if any
23467   new_path="${new_path/%.exe/}"
23468 
23469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23470 
23471   # First separate the path from the arguments. This will split at the first
23472   # space.
23473   complete="$MT"
23474   path="${complete%% *}"
23475   tmp="$complete EOL"
23476   arguments="${tmp#* }"
23477 
23478   # Input might be given as Windows format, start by converting to
23479   # unix format.
23480   new_path="$path"
23481 
23482   windows_path="$new_path"
23483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23484     unix_path=`$CYGPATH -u "$windows_path"`
23485     new_path="$unix_path"
23486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23488     new_path="$unix_path"
23489   fi
23490 
23491 
23492   # Now try to locate executable using which
23493   new_path=`$WHICH "$new_path" 2> /dev/null`
23494 
23495   if test "x$new_path" = x; then
23496     # Oops. Which didn't find the executable.
23497     # The splitting of arguments from the executable at a space might have been incorrect,
23498     # since paths with space are more likely in Windows. Give it another try with the whole
23499     # argument.
23500     path="$complete"
23501     arguments="EOL"
23502     new_path="$path"
23503 
23504   windows_path="$new_path"
23505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23506     unix_path=`$CYGPATH -u "$windows_path"`
23507     new_path="$unix_path"
23508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23510     new_path="$unix_path"
23511   fi
23512 
23513 
23514     new_path=`$WHICH "$new_path" 2> /dev/null`
23515 
23516     if test "x$new_path" = x; then
23517       # It's still not found. Now this is an unrecoverable error.
23518       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23519 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23520       has_space=`$ECHO "$complete" | $GREP " "`
23521       if test "x$has_space" != x; then
23522         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23523 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23524       fi
23525       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23526     fi
23527   fi
23528 
23529   # Now new_path has a complete unix path to the binary
23530   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23531     # Keep paths in /bin as-is, but remove trailing .exe if any
23532     new_path="${new_path/%.exe/}"
23533     # Do not save /bin paths to all_fixpath_prefixes!
23534   else
23535     # Not in mixed or Windows style, start by that.
23536     new_path=`cmd //c echo $new_path`
23537 
23538   input_path="$new_path"
23539   # Check if we need to convert this using DOS-style short mode. If the path
23540   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23541   # take no chances and rewrite it.
23542   # Note: m4 eats our [], so we need to use [ and ] instead.
23543   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23544   if test "x$has_forbidden_chars" != x; then
23545     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23546     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23547   fi
23548 
23549     # Output is in $new_path
23550 
23551   windows_path="$new_path"
23552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23553     unix_path=`$CYGPATH -u "$windows_path"`
23554     new_path="$unix_path"
23555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23557     new_path="$unix_path"
23558   fi
23559 
23560     # remove trailing .exe if any
23561     new_path="${new_path/%.exe/}"
23562 
23563     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23564     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23565   fi
23566 
23567   else
23568     # We're on a posix platform. Hooray! :)
23569     # First separate the path from the arguments. This will split at the first
23570     # space.
23571     complete="$MT"
23572     path="${complete%% *}"
23573     tmp="$complete EOL"
23574     arguments="${tmp#* }"
23575 
23576     # Cannot rely on the command "which" here since it doesn't always work.
23577     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23578     if test -z "$is_absolute_path"; then
23579       # Path to executable is not absolute. Find it.
23580       IFS_save="$IFS"
23581       IFS=:
23582       for p in $PATH; do
23583         if test -f "$p/$path" && test -x "$p/$path"; then
23584           new_path="$p/$path"
23585           break
23586         fi
23587       done
23588       IFS="$IFS_save"
23589     else
23590       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23591 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23592       new_path="$path"
23593     fi
23594 
23595     if test "x$new_path" = x; then
23596       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23597 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23598       has_space=`$ECHO "$complete" | $GREP " "`
23599       if test "x$has_space" != x; then
23600         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23601 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23602       fi
23603       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23604     fi
23605   fi
23606 
23607   # Now join together the path and the arguments once again
23608   if test "x$arguments" != xEOL; then
23609     new_complete="$new_path ${arguments% *}"
23610   else
23611     new_complete="$new_path"
23612   fi
23613 
23614   if test "x$complete" != "x$new_complete"; then
23615     MT="$new_complete"
23616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23617 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23618   fi
23619 
23620     # The resource compiler
23621     # Extract the first word of "rc", so it can be a program name with args.
23622 set dummy rc; ac_word=$2
23623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23624 $as_echo_n "checking for $ac_word... " >&6; }
23625 if ${ac_cv_prog_RC+:} false; then :
23626   $as_echo_n "(cached) " >&6
23627 else
23628   if test -n "$RC"; then
23629   ac_cv_prog_RC="$RC" # Let the user override the test.
23630 else
23631   ac_prog_rejected=no
23632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23633 for as_dir in $PATH
23634 do
23635   IFS=$as_save_IFS
23636   test -z "$as_dir" && as_dir=.
23637     for ac_exec_ext in '' $ac_executable_extensions; do
23638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23639     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23640        ac_prog_rejected=yes
23641        continue
23642      fi
23643     ac_cv_prog_RC="rc"
23644     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23645     break 2
23646   fi
23647 done
23648   done
23649 IFS=$as_save_IFS
23650 
23651 if test $ac_prog_rejected = yes; then
23652   # We found a bogon in the path, so make sure we never use it.
23653   set dummy $ac_cv_prog_RC
23654   shift
23655   if test $# != 0; then
23656     # We chose a different compiler from the bogus one.
23657     # However, it has the same basename, so the bogon will be chosen
23658     # first if we set RC to just the basename; use the full file name.
23659     shift
23660     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23661   fi
23662 fi
23663 fi
23664 fi
23665 RC=$ac_cv_prog_RC
23666 if test -n "$RC"; then
23667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23668 $as_echo "$RC" >&6; }
23669 else
23670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23671 $as_echo "no" >&6; }
23672 fi
23673 
23674 
23675 
23676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23677 
23678   # First separate the path from the arguments. This will split at the first
23679   # space.
23680   complete="$RC"
23681   path="${complete%% *}"
23682   tmp="$complete EOL"
23683   arguments="${tmp#* }"
23684 
23685   # Input might be given as Windows format, start by converting to
23686   # unix format.
23687   new_path=`$CYGPATH -u "$path"`
23688 
23689   # Now try to locate executable using which
23690   new_path=`$WHICH "$new_path" 2> /dev/null`
23691   # bat and cmd files are not always considered executable in cygwin causing which
23692   # to not find them
23693   if test "x$new_path" = x \
23694       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23695       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23696     new_path=`$CYGPATH -u "$path"`
23697   fi
23698   if test "x$new_path" = x; then
23699     # Oops. Which didn't find the executable.
23700     # The splitting of arguments from the executable at a space might have been incorrect,
23701     # since paths with space are more likely in Windows. Give it another try with the whole
23702     # argument.
23703     path="$complete"
23704     arguments="EOL"
23705     new_path=`$CYGPATH -u "$path"`
23706     new_path=`$WHICH "$new_path" 2> /dev/null`
23707     # bat and cmd files are not always considered executable in cygwin causing which
23708     # to not find them
23709     if test "x$new_path" = x \
23710         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23711         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23712       new_path=`$CYGPATH -u "$path"`
23713     fi
23714     if test "x$new_path" = x; then
23715       # It's still not found. Now this is an unrecoverable error.
23716       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23717 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23718       has_space=`$ECHO "$complete" | $GREP " "`
23719       if test "x$has_space" != x; then
23720         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23721 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23722       fi
23723       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23724     fi
23725   fi
23726 
23727   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23728   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23729   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23730   # "foo.exe" is OK but "foo" is an error.
23731   #
23732   # This test is therefore slightly more accurate than "test -f" to check for file presence.
23733   # It is also a way to make sure we got the proper file name for the real test later on.
23734   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23735   if test "x$test_shortpath" = x; then
23736     # Short path failed, file does not exist as specified.
23737     # Try adding .exe or .cmd
23738     if test -f "${new_path}.exe"; then
23739       input_to_shortpath="${new_path}.exe"
23740     elif test -f "${new_path}.cmd"; then
23741       input_to_shortpath="${new_path}.cmd"
23742     else
23743       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23744 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23745       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23746 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23747       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23748     fi
23749   else
23750     input_to_shortpath="$new_path"
23751   fi
23752 
23753   # Call helper function which possibly converts this using DOS-style short mode.
23754   # If so, the updated path is stored in $new_path.
23755   new_path="$input_to_shortpath"
23756 
23757   input_path="$input_to_shortpath"
23758   # Check if we need to convert this using DOS-style short mode. If the path
23759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23760   # take no chances and rewrite it.
23761   # Note: m4 eats our [], so we need to use [ and ] instead.
23762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23763   if test "x$has_forbidden_chars" != x; then
23764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23765     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23766     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23767     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23768       # Going to short mode and back again did indeed matter. Since short mode is
23769       # case insensitive, let's make it lowercase to improve readability.
23770       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23771       # Now convert it back to Unix-stile (cygpath)
23772       input_path=`$CYGPATH -u "$shortmode_path"`
23773       new_path="$input_path"
23774     fi
23775   fi
23776 
23777   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23778   if test "x$test_cygdrive_prefix" = x; then
23779     # As a simple fix, exclude /usr/bin since it's not a real path.
23780     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23781       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23782       # a path prefixed by /cygdrive for fixpath to work.
23783       new_path="$CYGWIN_ROOT_PATH$input_path"
23784     fi
23785   fi
23786 
23787   # remove trailing .exe if any
23788   new_path="${new_path/%.exe/}"
23789 
23790   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23791 
23792   # First separate the path from the arguments. This will split at the first
23793   # space.
23794   complete="$RC"
23795   path="${complete%% *}"
23796   tmp="$complete EOL"
23797   arguments="${tmp#* }"
23798 
23799   # Input might be given as Windows format, start by converting to
23800   # unix format.
23801   new_path="$path"
23802 
23803   windows_path="$new_path"
23804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23805     unix_path=`$CYGPATH -u "$windows_path"`
23806     new_path="$unix_path"
23807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23809     new_path="$unix_path"
23810   fi
23811 
23812 
23813   # Now try to locate executable using which
23814   new_path=`$WHICH "$new_path" 2> /dev/null`
23815 
23816   if test "x$new_path" = x; then
23817     # Oops. Which didn't find the executable.
23818     # The splitting of arguments from the executable at a space might have been incorrect,
23819     # since paths with space are more likely in Windows. Give it another try with the whole
23820     # argument.
23821     path="$complete"
23822     arguments="EOL"
23823     new_path="$path"
23824 
23825   windows_path="$new_path"
23826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23827     unix_path=`$CYGPATH -u "$windows_path"`
23828     new_path="$unix_path"
23829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23831     new_path="$unix_path"
23832   fi
23833 
23834 
23835     new_path=`$WHICH "$new_path" 2> /dev/null`
23836 
23837     if test "x$new_path" = x; then
23838       # It's still not found. Now this is an unrecoverable error.
23839       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23840 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23841       has_space=`$ECHO "$complete" | $GREP " "`
23842       if test "x$has_space" != x; then
23843         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23844 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23845       fi
23846       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23847     fi
23848   fi
23849 
23850   # Now new_path has a complete unix path to the binary
23851   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23852     # Keep paths in /bin as-is, but remove trailing .exe if any
23853     new_path="${new_path/%.exe/}"
23854     # Do not save /bin paths to all_fixpath_prefixes!
23855   else
23856     # Not in mixed or Windows style, start by that.
23857     new_path=`cmd //c echo $new_path`
23858 
23859   input_path="$new_path"
23860   # Check if we need to convert this using DOS-style short mode. If the path
23861   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23862   # take no chances and rewrite it.
23863   # Note: m4 eats our [], so we need to use [ and ] instead.
23864   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23865   if test "x$has_forbidden_chars" != x; then
23866     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23867     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23868   fi
23869 
23870     # Output is in $new_path
23871 
23872   windows_path="$new_path"
23873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23874     unix_path=`$CYGPATH -u "$windows_path"`
23875     new_path="$unix_path"
23876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23878     new_path="$unix_path"
23879   fi
23880 
23881     # remove trailing .exe if any
23882     new_path="${new_path/%.exe/}"
23883 
23884     # Save the first 10 bytes of this path to the storage, so fixpath can work.
23885     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23886   fi
23887 
23888   else
23889     # We're on a posix platform. Hooray! :)
23890     # First separate the path from the arguments. This will split at the first
23891     # space.
23892     complete="$RC"
23893     path="${complete%% *}"
23894     tmp="$complete EOL"
23895     arguments="${tmp#* }"
23896 
23897     # Cannot rely on the command "which" here since it doesn't always work.
23898     is_absolute_path=`$ECHO "$path" | $GREP ^/`
23899     if test -z "$is_absolute_path"; then
23900       # Path to executable is not absolute. Find it.
23901       IFS_save="$IFS"
23902       IFS=:
23903       for p in $PATH; do
23904         if test -f "$p/$path" && test -x "$p/$path"; then
23905           new_path="$p/$path"
23906           break
23907         fi
23908       done
23909       IFS="$IFS_save"
23910     else
23911       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23912 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23913       new_path="$path"
23914     fi
23915 
23916     if test "x$new_path" = x; then
23917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23918 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23919       has_space=`$ECHO "$complete" | $GREP " "`
23920       if test "x$has_space" != x; then
23921         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23922 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23923       fi
23924       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23925     fi
23926   fi
23927 
23928   # Now join together the path and the arguments once again
23929   if test "x$arguments" != xEOL; then
23930     new_complete="$new_path ${arguments% *}"
23931   else
23932     new_complete="$new_path"
23933   fi
23934 
23935   if test "x$complete" != "x$new_complete"; then
23936     RC="$new_complete"
23937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23938 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23939   fi
23940 
23941 
23942     # For hotspot, we need these in Windows mixed path,
23943     # so rewrite them all. Need added .exe suffix.
23944     HOTSPOT_CXX="$CXX.exe"
23945     HOTSPOT_LD="$LD.exe"
23946     HOTSPOT_MT="$MT.exe"
23947     HOTSPOT_RC="$RC.exe"
23948 
23949   unix_path="$HOTSPOT_CXX"
23950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23951     windows_path=`$CYGPATH -m "$unix_path"`
23952     HOTSPOT_CXX="$windows_path"
23953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23954     windows_path=`cmd //c echo $unix_path`
23955     HOTSPOT_CXX="$windows_path"
23956   fi
23957 
23958 
23959   unix_path="$HOTSPOT_LD"
23960   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23961     windows_path=`$CYGPATH -m "$unix_path"`
23962     HOTSPOT_LD="$windows_path"
23963   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23964     windows_path=`cmd //c echo $unix_path`
23965     HOTSPOT_LD="$windows_path"
23966   fi
23967 
23968 
23969   unix_path="$HOTSPOT_MT"
23970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23971     windows_path=`$CYGPATH -m "$unix_path"`
23972     HOTSPOT_MT="$windows_path"
23973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23974     windows_path=`cmd //c echo $unix_path`
23975     HOTSPOT_MT="$windows_path"
23976   fi
23977 
23978 
23979   unix_path="$HOTSPOT_RC"
23980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23981     windows_path=`$CYGPATH -m "$unix_path"`
23982     HOTSPOT_RC="$windows_path"
23983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23984     windows_path=`cmd //c echo $unix_path`
23985     HOTSPOT_RC="$windows_path"
23986   fi
23987 
23988 
23989 
23990 
23991     RC_FLAGS="-nologo -l 0x409 -r"
23992     if test "x$VARIANT" = xOPT; then :
23993 
23994     RC_FLAGS="$RC_FLAGS -d NDEBUG"
23995 
23996 fi
23997 
23998   # The version variables used to create RC_FLAGS may be overridden
23999   # in a custom configure script, or possibly the command line.
24000   # Let those variables be expanded at make time in spec.gmk.
24001   # The \$ are escaped to the shell, and the $(...) variables
24002   # are evaluated by make.
24003   RC_FLAGS="$RC_FLAGS \
24004       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
24005       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
24006       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
24007       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
24008       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
24009       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
24010       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
24011 
24012   # lib.exe is used to create static libraries.
24013   # Extract the first word of "lib", so it can be a program name with args.
24014 set dummy lib; ac_word=$2
24015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24016 $as_echo_n "checking for $ac_word... " >&6; }
24017 if ${ac_cv_prog_WINAR+:} false; then :
24018   $as_echo_n "(cached) " >&6
24019 else
24020   if test -n "$WINAR"; then
24021   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
24022 else
24023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24024 for as_dir in $PATH
24025 do
24026   IFS=$as_save_IFS
24027   test -z "$as_dir" && as_dir=.
24028     for ac_exec_ext in '' $ac_executable_extensions; do
24029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24030     ac_cv_prog_WINAR="lib"
24031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24032     break 2
24033   fi
24034 done
24035   done
24036 IFS=$as_save_IFS
24037 
24038 fi
24039 fi
24040 WINAR=$ac_cv_prog_WINAR
24041 if test -n "$WINAR"; then
24042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
24043 $as_echo "$WINAR" >&6; }
24044 else
24045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24046 $as_echo "no" >&6; }
24047 fi
24048 
24049 
24050 
24051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24052 
24053   # First separate the path from the arguments. This will split at the first
24054   # space.
24055   complete="$WINAR"
24056   path="${complete%% *}"
24057   tmp="$complete EOL"
24058   arguments="${tmp#* }"
24059 
24060   # Input might be given as Windows format, start by converting to
24061   # unix format.
24062   new_path=`$CYGPATH -u "$path"`
24063 
24064   # Now try to locate executable using which
24065   new_path=`$WHICH "$new_path" 2> /dev/null`
24066   # bat and cmd files are not always considered executable in cygwin causing which
24067   # to not find them
24068   if test "x$new_path" = x \
24069       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24070       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24071     new_path=`$CYGPATH -u "$path"`
24072   fi
24073   if test "x$new_path" = x; then
24074     # Oops. Which didn't find the executable.
24075     # The splitting of arguments from the executable at a space might have been incorrect,
24076     # since paths with space are more likely in Windows. Give it another try with the whole
24077     # argument.
24078     path="$complete"
24079     arguments="EOL"
24080     new_path=`$CYGPATH -u "$path"`
24081     new_path=`$WHICH "$new_path" 2> /dev/null`
24082     # bat and cmd files are not always considered executable in cygwin causing which
24083     # to not find them
24084     if test "x$new_path" = x \
24085         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24086         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24087       new_path=`$CYGPATH -u "$path"`
24088     fi
24089     if test "x$new_path" = x; then
24090       # It's still not found. Now this is an unrecoverable error.
24091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24092 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24093       has_space=`$ECHO "$complete" | $GREP " "`
24094       if test "x$has_space" != x; then
24095         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24096 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24097       fi
24098       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24099     fi
24100   fi
24101 
24102   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24103   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24104   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24105   # "foo.exe" is OK but "foo" is an error.
24106   #
24107   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24108   # It is also a way to make sure we got the proper file name for the real test later on.
24109   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24110   if test "x$test_shortpath" = x; then
24111     # Short path failed, file does not exist as specified.
24112     # Try adding .exe or .cmd
24113     if test -f "${new_path}.exe"; then
24114       input_to_shortpath="${new_path}.exe"
24115     elif test -f "${new_path}.cmd"; then
24116       input_to_shortpath="${new_path}.cmd"
24117     else
24118       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
24119 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
24120       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24121 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24122       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24123     fi
24124   else
24125     input_to_shortpath="$new_path"
24126   fi
24127 
24128   # Call helper function which possibly converts this using DOS-style short mode.
24129   # If so, the updated path is stored in $new_path.
24130   new_path="$input_to_shortpath"
24131 
24132   input_path="$input_to_shortpath"
24133   # Check if we need to convert this using DOS-style short mode. If the path
24134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24135   # take no chances and rewrite it.
24136   # Note: m4 eats our [], so we need to use [ and ] instead.
24137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24138   if test "x$has_forbidden_chars" != x; then
24139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24143       # Going to short mode and back again did indeed matter. Since short mode is
24144       # case insensitive, let's make it lowercase to improve readability.
24145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24146       # Now convert it back to Unix-stile (cygpath)
24147       input_path=`$CYGPATH -u "$shortmode_path"`
24148       new_path="$input_path"
24149     fi
24150   fi
24151 
24152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24153   if test "x$test_cygdrive_prefix" = x; then
24154     # As a simple fix, exclude /usr/bin since it's not a real path.
24155     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24157       # a path prefixed by /cygdrive for fixpath to work.
24158       new_path="$CYGWIN_ROOT_PATH$input_path"
24159     fi
24160   fi
24161 
24162   # remove trailing .exe if any
24163   new_path="${new_path/%.exe/}"
24164 
24165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24166 
24167   # First separate the path from the arguments. This will split at the first
24168   # space.
24169   complete="$WINAR"
24170   path="${complete%% *}"
24171   tmp="$complete EOL"
24172   arguments="${tmp#* }"
24173 
24174   # Input might be given as Windows format, start by converting to
24175   # unix format.
24176   new_path="$path"
24177 
24178   windows_path="$new_path"
24179   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24180     unix_path=`$CYGPATH -u "$windows_path"`
24181     new_path="$unix_path"
24182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24183     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24184     new_path="$unix_path"
24185   fi
24186 
24187 
24188   # Now try to locate executable using which
24189   new_path=`$WHICH "$new_path" 2> /dev/null`
24190 
24191   if test "x$new_path" = x; then
24192     # Oops. Which didn't find the executable.
24193     # The splitting of arguments from the executable at a space might have been incorrect,
24194     # since paths with space are more likely in Windows. Give it another try with the whole
24195     # argument.
24196     path="$complete"
24197     arguments="EOL"
24198     new_path="$path"
24199 
24200   windows_path="$new_path"
24201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24202     unix_path=`$CYGPATH -u "$windows_path"`
24203     new_path="$unix_path"
24204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24206     new_path="$unix_path"
24207   fi
24208 
24209 
24210     new_path=`$WHICH "$new_path" 2> /dev/null`
24211 
24212     if test "x$new_path" = x; then
24213       # It's still not found. Now this is an unrecoverable error.
24214       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24215 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24216       has_space=`$ECHO "$complete" | $GREP " "`
24217       if test "x$has_space" != x; then
24218         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24219 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24220       fi
24221       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24222     fi
24223   fi
24224 
24225   # Now new_path has a complete unix path to the binary
24226   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24227     # Keep paths in /bin as-is, but remove trailing .exe if any
24228     new_path="${new_path/%.exe/}"
24229     # Do not save /bin paths to all_fixpath_prefixes!
24230   else
24231     # Not in mixed or Windows style, start by that.
24232     new_path=`cmd //c echo $new_path`
24233 
24234   input_path="$new_path"
24235   # Check if we need to convert this using DOS-style short mode. If the path
24236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24237   # take no chances and rewrite it.
24238   # Note: m4 eats our [], so we need to use [ and ] instead.
24239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24240   if test "x$has_forbidden_chars" != x; then
24241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24242     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24243   fi
24244 
24245     # Output is in $new_path
24246 
24247   windows_path="$new_path"
24248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24249     unix_path=`$CYGPATH -u "$windows_path"`
24250     new_path="$unix_path"
24251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24253     new_path="$unix_path"
24254   fi
24255 
24256     # remove trailing .exe if any
24257     new_path="${new_path/%.exe/}"
24258 
24259     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24260     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24261   fi
24262 
24263   else
24264     # We're on a posix platform. Hooray! :)
24265     # First separate the path from the arguments. This will split at the first
24266     # space.
24267     complete="$WINAR"
24268     path="${complete%% *}"
24269     tmp="$complete EOL"
24270     arguments="${tmp#* }"
24271 
24272     # Cannot rely on the command "which" here since it doesn't always work.
24273     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24274     if test -z "$is_absolute_path"; then
24275       # Path to executable is not absolute. Find it.
24276       IFS_save="$IFS"
24277       IFS=:
24278       for p in $PATH; do
24279         if test -f "$p/$path" && test -x "$p/$path"; then
24280           new_path="$p/$path"
24281           break
24282         fi
24283       done
24284       IFS="$IFS_save"
24285     else
24286       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24287 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24288       new_path="$path"
24289     fi
24290 
24291     if test "x$new_path" = x; then
24292       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24293 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24294       has_space=`$ECHO "$complete" | $GREP " "`
24295       if test "x$has_space" != x; then
24296         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24297 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24298       fi
24299       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24300     fi
24301   fi
24302 
24303   # Now join together the path and the arguments once again
24304   if test "x$arguments" != xEOL; then
24305     new_complete="$new_path ${arguments% *}"
24306   else
24307     new_complete="$new_path"
24308   fi
24309 
24310   if test "x$complete" != "x$new_complete"; then
24311     WINAR="$new_complete"
24312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24313 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24314   fi
24315 
24316   AR="$WINAR"
24317   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24318 
24319   # Extract the first word of "dumpbin", so it can be a program name with args.
24320 set dummy dumpbin; ac_word=$2
24321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24322 $as_echo_n "checking for $ac_word... " >&6; }
24323 if ${ac_cv_prog_DUMPBIN+:} false; then :
24324   $as_echo_n "(cached) " >&6
24325 else
24326   if test -n "$DUMPBIN"; then
24327   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24328 else
24329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24330 for as_dir in $PATH
24331 do
24332   IFS=$as_save_IFS
24333   test -z "$as_dir" && as_dir=.
24334     for ac_exec_ext in '' $ac_executable_extensions; do
24335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24336     ac_cv_prog_DUMPBIN="dumpbin"
24337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24338     break 2
24339   fi
24340 done
24341   done
24342 IFS=$as_save_IFS
24343 
24344 fi
24345 fi
24346 DUMPBIN=$ac_cv_prog_DUMPBIN
24347 if test -n "$DUMPBIN"; then
24348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24349 $as_echo "$DUMPBIN" >&6; }
24350 else
24351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24352 $as_echo "no" >&6; }
24353 fi
24354 
24355 
24356 
24357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24358 
24359   # First separate the path from the arguments. This will split at the first
24360   # space.
24361   complete="$DUMPBIN"
24362   path="${complete%% *}"
24363   tmp="$complete EOL"
24364   arguments="${tmp#* }"
24365 
24366   # Input might be given as Windows format, start by converting to
24367   # unix format.
24368   new_path=`$CYGPATH -u "$path"`
24369 
24370   # Now try to locate executable using which
24371   new_path=`$WHICH "$new_path" 2> /dev/null`
24372   # bat and cmd files are not always considered executable in cygwin causing which
24373   # to not find them
24374   if test "x$new_path" = x \
24375       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24376       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24377     new_path=`$CYGPATH -u "$path"`
24378   fi
24379   if test "x$new_path" = x; then
24380     # Oops. Which didn't find the executable.
24381     # The splitting of arguments from the executable at a space might have been incorrect,
24382     # since paths with space are more likely in Windows. Give it another try with the whole
24383     # argument.
24384     path="$complete"
24385     arguments="EOL"
24386     new_path=`$CYGPATH -u "$path"`
24387     new_path=`$WHICH "$new_path" 2> /dev/null`
24388     # bat and cmd files are not always considered executable in cygwin causing which
24389     # to not find them
24390     if test "x$new_path" = x \
24391         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24392         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24393       new_path=`$CYGPATH -u "$path"`
24394     fi
24395     if test "x$new_path" = x; then
24396       # It's still not found. Now this is an unrecoverable error.
24397       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24398 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24399       has_space=`$ECHO "$complete" | $GREP " "`
24400       if test "x$has_space" != x; then
24401         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24402 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24403       fi
24404       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24405     fi
24406   fi
24407 
24408   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24409   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24410   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24411   # "foo.exe" is OK but "foo" is an error.
24412   #
24413   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24414   # It is also a way to make sure we got the proper file name for the real test later on.
24415   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24416   if test "x$test_shortpath" = x; then
24417     # Short path failed, file does not exist as specified.
24418     # Try adding .exe or .cmd
24419     if test -f "${new_path}.exe"; then
24420       input_to_shortpath="${new_path}.exe"
24421     elif test -f "${new_path}.cmd"; then
24422       input_to_shortpath="${new_path}.cmd"
24423     else
24424       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24425 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24426       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24427 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24428       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24429     fi
24430   else
24431     input_to_shortpath="$new_path"
24432   fi
24433 
24434   # Call helper function which possibly converts this using DOS-style short mode.
24435   # If so, the updated path is stored in $new_path.
24436   new_path="$input_to_shortpath"
24437 
24438   input_path="$input_to_shortpath"
24439   # Check if we need to convert this using DOS-style short mode. If the path
24440   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24441   # take no chances and rewrite it.
24442   # Note: m4 eats our [], so we need to use [ and ] instead.
24443   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24444   if test "x$has_forbidden_chars" != x; then
24445     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24446     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24447     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24448     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24449       # Going to short mode and back again did indeed matter. Since short mode is
24450       # case insensitive, let's make it lowercase to improve readability.
24451       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24452       # Now convert it back to Unix-stile (cygpath)
24453       input_path=`$CYGPATH -u "$shortmode_path"`
24454       new_path="$input_path"
24455     fi
24456   fi
24457 
24458   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24459   if test "x$test_cygdrive_prefix" = x; then
24460     # As a simple fix, exclude /usr/bin since it's not a real path.
24461     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24462       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24463       # a path prefixed by /cygdrive for fixpath to work.
24464       new_path="$CYGWIN_ROOT_PATH$input_path"
24465     fi
24466   fi
24467 
24468   # remove trailing .exe if any
24469   new_path="${new_path/%.exe/}"
24470 
24471   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24472 
24473   # First separate the path from the arguments. This will split at the first
24474   # space.
24475   complete="$DUMPBIN"
24476   path="${complete%% *}"
24477   tmp="$complete EOL"
24478   arguments="${tmp#* }"
24479 
24480   # Input might be given as Windows format, start by converting to
24481   # unix format.
24482   new_path="$path"
24483 
24484   windows_path="$new_path"
24485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24486     unix_path=`$CYGPATH -u "$windows_path"`
24487     new_path="$unix_path"
24488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24490     new_path="$unix_path"
24491   fi
24492 
24493 
24494   # Now try to locate executable using which
24495   new_path=`$WHICH "$new_path" 2> /dev/null`
24496 
24497   if test "x$new_path" = x; then
24498     # Oops. Which didn't find the executable.
24499     # The splitting of arguments from the executable at a space might have been incorrect,
24500     # since paths with space are more likely in Windows. Give it another try with the whole
24501     # argument.
24502     path="$complete"
24503     arguments="EOL"
24504     new_path="$path"
24505 
24506   windows_path="$new_path"
24507   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24508     unix_path=`$CYGPATH -u "$windows_path"`
24509     new_path="$unix_path"
24510   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24511     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24512     new_path="$unix_path"
24513   fi
24514 
24515 
24516     new_path=`$WHICH "$new_path" 2> /dev/null`
24517 
24518     if test "x$new_path" = x; then
24519       # It's still not found. Now this is an unrecoverable error.
24520       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24521 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24522       has_space=`$ECHO "$complete" | $GREP " "`
24523       if test "x$has_space" != x; then
24524         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24525 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24526       fi
24527       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24528     fi
24529   fi
24530 
24531   # Now new_path has a complete unix path to the binary
24532   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24533     # Keep paths in /bin as-is, but remove trailing .exe if any
24534     new_path="${new_path/%.exe/}"
24535     # Do not save /bin paths to all_fixpath_prefixes!
24536   else
24537     # Not in mixed or Windows style, start by that.
24538     new_path=`cmd //c echo $new_path`
24539 
24540   input_path="$new_path"
24541   # Check if we need to convert this using DOS-style short mode. If the path
24542   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24543   # take no chances and rewrite it.
24544   # Note: m4 eats our [], so we need to use [ and ] instead.
24545   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24546   if test "x$has_forbidden_chars" != x; then
24547     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24548     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24549   fi
24550 
24551     # Output is in $new_path
24552 
24553   windows_path="$new_path"
24554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24555     unix_path=`$CYGPATH -u "$windows_path"`
24556     new_path="$unix_path"
24557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24559     new_path="$unix_path"
24560   fi
24561 
24562     # remove trailing .exe if any
24563     new_path="${new_path/%.exe/}"
24564 
24565     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24566     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24567   fi
24568 
24569   else
24570     # We're on a posix platform. Hooray! :)
24571     # First separate the path from the arguments. This will split at the first
24572     # space.
24573     complete="$DUMPBIN"
24574     path="${complete%% *}"
24575     tmp="$complete EOL"
24576     arguments="${tmp#* }"
24577 
24578     # Cannot rely on the command "which" here since it doesn't always work.
24579     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24580     if test -z "$is_absolute_path"; then
24581       # Path to executable is not absolute. Find it.
24582       IFS_save="$IFS"
24583       IFS=:
24584       for p in $PATH; do
24585         if test -f "$p/$path" && test -x "$p/$path"; then
24586           new_path="$p/$path"
24587           break
24588         fi
24589       done
24590       IFS="$IFS_save"
24591     else
24592       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24593 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24594       new_path="$path"
24595     fi
24596 
24597     if test "x$new_path" = x; then
24598       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24599 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24600       has_space=`$ECHO "$complete" | $GREP " "`
24601       if test "x$has_space" != x; then
24602         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24603 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24604       fi
24605       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24606     fi
24607   fi
24608 
24609   # Now join together the path and the arguments once again
24610   if test "x$arguments" != xEOL; then
24611     new_complete="$new_path ${arguments% *}"
24612   else
24613     new_complete="$new_path"
24614   fi
24615 
24616   if test "x$complete" != "x$new_complete"; then
24617     DUMPBIN="$new_complete"
24618     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24619 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24620   fi
24621 
24622 
24623       COMPILER_TYPE=CL
24624       CCXXFLAGS="$CCXXFLAGS -nologo"
24625 
24626 fi
24627 
24628 
24629 
24630   ac_ext=c
24631 ac_cpp='$CPP $CPPFLAGS'
24632 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24633 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24634 ac_compiler_gnu=$ac_cv_c_compiler_gnu
24635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24636 $as_echo_n "checking how to run the C preprocessor... " >&6; }
24637 # On Suns, sometimes $CPP names a directory.
24638 if test -n "$CPP" && test -d "$CPP"; then
24639   CPP=
24640 fi
24641 if test -z "$CPP"; then
24642   if ${ac_cv_prog_CPP+:} false; then :
24643   $as_echo_n "(cached) " >&6
24644 else
24645       # Double quotes because CPP needs to be expanded
24646     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24647     do
24648       ac_preproc_ok=false
24649 for ac_c_preproc_warn_flag in '' yes
24650 do
24651   # Use a header file that comes with gcc, so configuring glibc
24652   # with a fresh cross-compiler works.
24653   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24654   # <limits.h> exists even on freestanding compilers.
24655   # On the NeXT, cc -E runs the code through the compiler's parser,
24656   # not just through cpp. "Syntax error" is here to catch this case.
24657   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24658 /* end confdefs.h.  */
24659 #ifdef __STDC__
24660 # include <limits.h>
24661 #else
24662 # include <assert.h>
24663 #endif
24664                      Syntax error
24665 _ACEOF
24666 if ac_fn_c_try_cpp "$LINENO"; then :
24667 
24668 else
24669   # Broken: fails on valid input.
24670 continue
24671 fi
24672 rm -f conftest.err conftest.i conftest.$ac_ext
24673 
24674   # OK, works on sane cases.  Now check whether nonexistent headers
24675   # can be detected and how.
24676   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24677 /* end confdefs.h.  */
24678 #include <ac_nonexistent.h>
24679 _ACEOF
24680 if ac_fn_c_try_cpp "$LINENO"; then :
24681   # Broken: success on invalid input.
24682 continue
24683 else
24684   # Passes both tests.
24685 ac_preproc_ok=:
24686 break
24687 fi
24688 rm -f conftest.err conftest.i conftest.$ac_ext
24689 
24690 done
24691 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24692 rm -f conftest.i conftest.err conftest.$ac_ext
24693 if $ac_preproc_ok; then :
24694   break
24695 fi
24696 
24697     done
24698     ac_cv_prog_CPP=$CPP
24699 
24700 fi
24701   CPP=$ac_cv_prog_CPP
24702 else
24703   ac_cv_prog_CPP=$CPP
24704 fi
24705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24706 $as_echo "$CPP" >&6; }
24707 ac_preproc_ok=false
24708 for ac_c_preproc_warn_flag in '' yes
24709 do
24710   # Use a header file that comes with gcc, so configuring glibc
24711   # with a fresh cross-compiler works.
24712   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24713   # <limits.h> exists even on freestanding compilers.
24714   # On the NeXT, cc -E runs the code through the compiler's parser,
24715   # not just through cpp. "Syntax error" is here to catch this case.
24716   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24717 /* end confdefs.h.  */
24718 #ifdef __STDC__
24719 # include <limits.h>
24720 #else
24721 # include <assert.h>
24722 #endif
24723                      Syntax error
24724 _ACEOF
24725 if ac_fn_c_try_cpp "$LINENO"; then :
24726 
24727 else
24728   # Broken: fails on valid input.
24729 continue
24730 fi
24731 rm -f conftest.err conftest.i conftest.$ac_ext
24732 
24733   # OK, works on sane cases.  Now check whether nonexistent headers
24734   # can be detected and how.
24735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24736 /* end confdefs.h.  */
24737 #include <ac_nonexistent.h>
24738 _ACEOF
24739 if ac_fn_c_try_cpp "$LINENO"; then :
24740   # Broken: success on invalid input.
24741 continue
24742 else
24743   # Passes both tests.
24744 ac_preproc_ok=:
24745 break
24746 fi
24747 rm -f conftest.err conftest.i conftest.$ac_ext
24748 
24749 done
24750 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24751 rm -f conftest.i conftest.err conftest.$ac_ext
24752 if $ac_preproc_ok; then :
24753 
24754 else
24755   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24756 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24757 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24758 See \`config.log' for more details" "$LINENO" 5; }
24759 fi
24760 
24761 ac_ext=cpp
24762 ac_cpp='$CXXCPP $CPPFLAGS'
24763 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24764 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24765 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24766 
24767 
24768   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24769 
24770   # First separate the path from the arguments. This will split at the first
24771   # space.
24772   complete="$CPP"
24773   path="${complete%% *}"
24774   tmp="$complete EOL"
24775   arguments="${tmp#* }"
24776 
24777   # Input might be given as Windows format, start by converting to
24778   # unix format.
24779   new_path=`$CYGPATH -u "$path"`
24780 
24781   # Now try to locate executable using which
24782   new_path=`$WHICH "$new_path" 2> /dev/null`
24783   # bat and cmd files are not always considered executable in cygwin causing which
24784   # to not find them
24785   if test "x$new_path" = x \
24786       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24787       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24788     new_path=`$CYGPATH -u "$path"`
24789   fi
24790   if test "x$new_path" = x; then
24791     # Oops. Which didn't find the executable.
24792     # The splitting of arguments from the executable at a space might have been incorrect,
24793     # since paths with space are more likely in Windows. Give it another try with the whole
24794     # argument.
24795     path="$complete"
24796     arguments="EOL"
24797     new_path=`$CYGPATH -u "$path"`
24798     new_path=`$WHICH "$new_path" 2> /dev/null`
24799     # bat and cmd files are not always considered executable in cygwin causing which
24800     # to not find them
24801     if test "x$new_path" = x \
24802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24804       new_path=`$CYGPATH -u "$path"`
24805     fi
24806     if test "x$new_path" = x; then
24807       # It's still not found. Now this is an unrecoverable error.
24808       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24809 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24810       has_space=`$ECHO "$complete" | $GREP " "`
24811       if test "x$has_space" != x; then
24812         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24813 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24814       fi
24815       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24816     fi
24817   fi
24818 
24819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24822   # "foo.exe" is OK but "foo" is an error.
24823   #
24824   # This test is therefore slightly more accurate than "test -f" to check for file presence.
24825   # It is also a way to make sure we got the proper file name for the real test later on.
24826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24827   if test "x$test_shortpath" = x; then
24828     # Short path failed, file does not exist as specified.
24829     # Try adding .exe or .cmd
24830     if test -f "${new_path}.exe"; then
24831       input_to_shortpath="${new_path}.exe"
24832     elif test -f "${new_path}.cmd"; then
24833       input_to_shortpath="${new_path}.cmd"
24834     else
24835       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24836 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24837       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24838 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24839       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24840     fi
24841   else
24842     input_to_shortpath="$new_path"
24843   fi
24844 
24845   # Call helper function which possibly converts this using DOS-style short mode.
24846   # If so, the updated path is stored in $new_path.
24847   new_path="$input_to_shortpath"
24848 
24849   input_path="$input_to_shortpath"
24850   # Check if we need to convert this using DOS-style short mode. If the path
24851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24852   # take no chances and rewrite it.
24853   # Note: m4 eats our [], so we need to use [ and ] instead.
24854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24855   if test "x$has_forbidden_chars" != x; then
24856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24860       # Going to short mode and back again did indeed matter. Since short mode is
24861       # case insensitive, let's make it lowercase to improve readability.
24862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24863       # Now convert it back to Unix-stile (cygpath)
24864       input_path=`$CYGPATH -u "$shortmode_path"`
24865       new_path="$input_path"
24866     fi
24867   fi
24868 
24869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24870   if test "x$test_cygdrive_prefix" = x; then
24871     # As a simple fix, exclude /usr/bin since it's not a real path.
24872     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24874       # a path prefixed by /cygdrive for fixpath to work.
24875       new_path="$CYGWIN_ROOT_PATH$input_path"
24876     fi
24877   fi
24878 
24879   # remove trailing .exe if any
24880   new_path="${new_path/%.exe/}"
24881 
24882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24883 
24884   # First separate the path from the arguments. This will split at the first
24885   # space.
24886   complete="$CPP"
24887   path="${complete%% *}"
24888   tmp="$complete EOL"
24889   arguments="${tmp#* }"
24890 
24891   # Input might be given as Windows format, start by converting to
24892   # unix format.
24893   new_path="$path"
24894 
24895   windows_path="$new_path"
24896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24897     unix_path=`$CYGPATH -u "$windows_path"`
24898     new_path="$unix_path"
24899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24901     new_path="$unix_path"
24902   fi
24903 
24904 
24905   # Now try to locate executable using which
24906   new_path=`$WHICH "$new_path" 2> /dev/null`
24907 
24908   if test "x$new_path" = x; then
24909     # Oops. Which didn't find the executable.
24910     # The splitting of arguments from the executable at a space might have been incorrect,
24911     # since paths with space are more likely in Windows. Give it another try with the whole
24912     # argument.
24913     path="$complete"
24914     arguments="EOL"
24915     new_path="$path"
24916 
24917   windows_path="$new_path"
24918   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24919     unix_path=`$CYGPATH -u "$windows_path"`
24920     new_path="$unix_path"
24921   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24922     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24923     new_path="$unix_path"
24924   fi
24925 
24926 
24927     new_path=`$WHICH "$new_path" 2> /dev/null`
24928 
24929     if test "x$new_path" = x; then
24930       # It's still not found. Now this is an unrecoverable error.
24931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24932 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24933       has_space=`$ECHO "$complete" | $GREP " "`
24934       if test "x$has_space" != x; then
24935         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24936 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24937       fi
24938       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24939     fi
24940   fi
24941 
24942   # Now new_path has a complete unix path to the binary
24943   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24944     # Keep paths in /bin as-is, but remove trailing .exe if any
24945     new_path="${new_path/%.exe/}"
24946     # Do not save /bin paths to all_fixpath_prefixes!
24947   else
24948     # Not in mixed or Windows style, start by that.
24949     new_path=`cmd //c echo $new_path`
24950 
24951   input_path="$new_path"
24952   # Check if we need to convert this using DOS-style short mode. If the path
24953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24954   # take no chances and rewrite it.
24955   # Note: m4 eats our [], so we need to use [ and ] instead.
24956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24957   if test "x$has_forbidden_chars" != x; then
24958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24959     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24960   fi
24961 
24962     # Output is in $new_path
24963 
24964   windows_path="$new_path"
24965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24966     unix_path=`$CYGPATH -u "$windows_path"`
24967     new_path="$unix_path"
24968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24970     new_path="$unix_path"
24971   fi
24972 
24973     # remove trailing .exe if any
24974     new_path="${new_path/%.exe/}"
24975 
24976     # Save the first 10 bytes of this path to the storage, so fixpath can work.
24977     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24978   fi
24979 
24980   else
24981     # We're on a posix platform. Hooray! :)
24982     # First separate the path from the arguments. This will split at the first
24983     # space.
24984     complete="$CPP"
24985     path="${complete%% *}"
24986     tmp="$complete EOL"
24987     arguments="${tmp#* }"
24988 
24989     # Cannot rely on the command "which" here since it doesn't always work.
24990     is_absolute_path=`$ECHO "$path" | $GREP ^/`
24991     if test -z "$is_absolute_path"; then
24992       # Path to executable is not absolute. Find it.
24993       IFS_save="$IFS"
24994       IFS=:
24995       for p in $PATH; do
24996         if test -f "$p/$path" && test -x "$p/$path"; then
24997           new_path="$p/$path"
24998           break
24999         fi
25000       done
25001       IFS="$IFS_save"
25002     else
25003       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
25004 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
25005       new_path="$path"
25006     fi
25007 
25008     if test "x$new_path" = x; then
25009       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
25010 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
25011       has_space=`$ECHO "$complete" | $GREP " "`
25012       if test "x$has_space" != x; then
25013         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25014 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25015       fi
25016       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
25017     fi
25018   fi
25019 
25020   # Now join together the path and the arguments once again
25021   if test "x$arguments" != xEOL; then
25022     new_complete="$new_path ${arguments% *}"
25023   else
25024     new_complete="$new_path"
25025   fi
25026 
25027   if test "x$complete" != "x$new_complete"; then
25028     CPP="$new_complete"
25029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
25030 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
25031   fi
25032 
25033 
25034   ac_ext=cpp
25035 ac_cpp='$CXXCPP $CPPFLAGS'
25036 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25037 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25038 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
25040 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
25041 if test -z "$CXXCPP"; then
25042   if ${ac_cv_prog_CXXCPP+:} false; then :
25043   $as_echo_n "(cached) " >&6
25044 else
25045       # Double quotes because CXXCPP needs to be expanded
25046     for CXXCPP in "$CXX -E" "/lib/cpp"
25047     do
25048       ac_preproc_ok=false
25049 for ac_cxx_preproc_warn_flag in '' yes
25050 do
25051   # Use a header file that comes with gcc, so configuring glibc
25052   # with a fresh cross-compiler works.
25053   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25054   # <limits.h> exists even on freestanding compilers.
25055   # On the NeXT, cc -E runs the code through the compiler's parser,
25056   # not just through cpp. "Syntax error" is here to catch this case.
25057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25058 /* end confdefs.h.  */
25059 #ifdef __STDC__
25060 # include <limits.h>
25061 #else
25062 # include <assert.h>
25063 #endif
25064                      Syntax error
25065 _ACEOF
25066 if ac_fn_cxx_try_cpp "$LINENO"; then :
25067 
25068 else
25069   # Broken: fails on valid input.
25070 continue
25071 fi
25072 rm -f conftest.err conftest.i conftest.$ac_ext
25073 
25074   # OK, works on sane cases.  Now check whether nonexistent headers
25075   # can be detected and how.
25076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25077 /* end confdefs.h.  */
25078 #include <ac_nonexistent.h>
25079 _ACEOF
25080 if ac_fn_cxx_try_cpp "$LINENO"; then :
25081   # Broken: success on invalid input.
25082 continue
25083 else
25084   # Passes both tests.
25085 ac_preproc_ok=:
25086 break
25087 fi
25088 rm -f conftest.err conftest.i conftest.$ac_ext
25089 
25090 done
25091 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25092 rm -f conftest.i conftest.err conftest.$ac_ext
25093 if $ac_preproc_ok; then :
25094   break
25095 fi
25096 
25097     done
25098     ac_cv_prog_CXXCPP=$CXXCPP
25099 
25100 fi
25101   CXXCPP=$ac_cv_prog_CXXCPP
25102 else
25103   ac_cv_prog_CXXCPP=$CXXCPP
25104 fi
25105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
25106 $as_echo "$CXXCPP" >&6; }
25107 ac_preproc_ok=false
25108 for ac_cxx_preproc_warn_flag in '' yes
25109 do
25110   # Use a header file that comes with gcc, so configuring glibc
25111   # with a fresh cross-compiler works.
25112   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
25113   # <limits.h> exists even on freestanding compilers.
25114   # On the NeXT, cc -E runs the code through the compiler's parser,
25115   # not just through cpp. "Syntax error" is here to catch this case.
25116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25117 /* end confdefs.h.  */
25118 #ifdef __STDC__
25119 # include <limits.h>
25120 #else
25121 # include <assert.h>
25122 #endif
25123                      Syntax error
25124 _ACEOF
25125 if ac_fn_cxx_try_cpp "$LINENO"; then :
25126 
25127 else
25128   # Broken: fails on valid input.
25129 continue
25130 fi
25131 rm -f conftest.err conftest.i conftest.$ac_ext
25132 
25133   # OK, works on sane cases.  Now check whether nonexistent headers
25134   # can be detected and how.
25135   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25136 /* end confdefs.h.  */
25137 #include <ac_nonexistent.h>
25138 _ACEOF
25139 if ac_fn_cxx_try_cpp "$LINENO"; then :
25140   # Broken: success on invalid input.
25141 continue
25142 else
25143   # Passes both tests.
25144 ac_preproc_ok=:
25145 break
25146 fi
25147 rm -f conftest.err conftest.i conftest.$ac_ext
25148 
25149 done
25150 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25151 rm -f conftest.i conftest.err conftest.$ac_ext
25152 if $ac_preproc_ok; then :
25153 
25154 else
25155   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25157 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
25158 See \`config.log' for more details" "$LINENO" 5; }
25159 fi
25160 
25161 ac_ext=cpp
25162 ac_cpp='$CXXCPP $CPPFLAGS'
25163 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25164 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25165 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25166 
25167 
25168   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25169 
25170   # First separate the path from the arguments. This will split at the first
25171   # space.
25172   complete="$CXXCPP"
25173   path="${complete%% *}"
25174   tmp="$complete EOL"
25175   arguments="${tmp#* }"
25176 
25177   # Input might be given as Windows format, start by converting to
25178   # unix format.
25179   new_path=`$CYGPATH -u "$path"`
25180 
25181   # Now try to locate executable using which
25182   new_path=`$WHICH "$new_path" 2> /dev/null`
25183   # bat and cmd files are not always considered executable in cygwin causing which
25184   # to not find them
25185   if test "x$new_path" = x \
25186       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25187       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25188     new_path=`$CYGPATH -u "$path"`
25189   fi
25190   if test "x$new_path" = x; then
25191     # Oops. Which didn't find the executable.
25192     # The splitting of arguments from the executable at a space might have been incorrect,
25193     # since paths with space are more likely in Windows. Give it another try with the whole
25194     # argument.
25195     path="$complete"
25196     arguments="EOL"
25197     new_path=`$CYGPATH -u "$path"`
25198     new_path=`$WHICH "$new_path" 2> /dev/null`
25199     # bat and cmd files are not always considered executable in cygwin causing which
25200     # to not find them
25201     if test "x$new_path" = x \
25202         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25203         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25204       new_path=`$CYGPATH -u "$path"`
25205     fi
25206     if test "x$new_path" = x; then
25207       # It's still not found. Now this is an unrecoverable error.
25208       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25209 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25210       has_space=`$ECHO "$complete" | $GREP " "`
25211       if test "x$has_space" != x; then
25212         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25213 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25214       fi
25215       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25216     fi
25217   fi
25218 
25219   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25220   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25221   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25222   # "foo.exe" is OK but "foo" is an error.
25223   #
25224   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25225   # It is also a way to make sure we got the proper file name for the real test later on.
25226   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25227   if test "x$test_shortpath" = x; then
25228     # Short path failed, file does not exist as specified.
25229     # Try adding .exe or .cmd
25230     if test -f "${new_path}.exe"; then
25231       input_to_shortpath="${new_path}.exe"
25232     elif test -f "${new_path}.cmd"; then
25233       input_to_shortpath="${new_path}.cmd"
25234     else
25235       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
25236 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
25237       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25238 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25239       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25240     fi
25241   else
25242     input_to_shortpath="$new_path"
25243   fi
25244 
25245   # Call helper function which possibly converts this using DOS-style short mode.
25246   # If so, the updated path is stored in $new_path.
25247   new_path="$input_to_shortpath"
25248 
25249   input_path="$input_to_shortpath"
25250   # Check if we need to convert this using DOS-style short mode. If the path
25251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25252   # take no chances and rewrite it.
25253   # Note: m4 eats our [], so we need to use [ and ] instead.
25254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25255   if test "x$has_forbidden_chars" != x; then
25256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25257     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25258     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25259     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25260       # Going to short mode and back again did indeed matter. Since short mode is
25261       # case insensitive, let's make it lowercase to improve readability.
25262       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25263       # Now convert it back to Unix-stile (cygpath)
25264       input_path=`$CYGPATH -u "$shortmode_path"`
25265       new_path="$input_path"
25266     fi
25267   fi
25268 
25269   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25270   if test "x$test_cygdrive_prefix" = x; then
25271     # As a simple fix, exclude /usr/bin since it's not a real path.
25272     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25273       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25274       # a path prefixed by /cygdrive for fixpath to work.
25275       new_path="$CYGWIN_ROOT_PATH$input_path"
25276     fi
25277   fi
25278 
25279   # remove trailing .exe if any
25280   new_path="${new_path/%.exe/}"
25281 
25282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25283 
25284   # First separate the path from the arguments. This will split at the first
25285   # space.
25286   complete="$CXXCPP"
25287   path="${complete%% *}"
25288   tmp="$complete EOL"
25289   arguments="${tmp#* }"
25290 
25291   # Input might be given as Windows format, start by converting to
25292   # unix format.
25293   new_path="$path"
25294 
25295   windows_path="$new_path"
25296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25297     unix_path=`$CYGPATH -u "$windows_path"`
25298     new_path="$unix_path"
25299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25301     new_path="$unix_path"
25302   fi
25303 
25304 
25305   # Now try to locate executable using which
25306   new_path=`$WHICH "$new_path" 2> /dev/null`
25307 
25308   if test "x$new_path" = x; then
25309     # Oops. Which didn't find the executable.
25310     # The splitting of arguments from the executable at a space might have been incorrect,
25311     # since paths with space are more likely in Windows. Give it another try with the whole
25312     # argument.
25313     path="$complete"
25314     arguments="EOL"
25315     new_path="$path"
25316 
25317   windows_path="$new_path"
25318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25319     unix_path=`$CYGPATH -u "$windows_path"`
25320     new_path="$unix_path"
25321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25323     new_path="$unix_path"
25324   fi
25325 
25326 
25327     new_path=`$WHICH "$new_path" 2> /dev/null`
25328 
25329     if test "x$new_path" = x; then
25330       # It's still not found. Now this is an unrecoverable error.
25331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25332 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25333       has_space=`$ECHO "$complete" | $GREP " "`
25334       if test "x$has_space" != x; then
25335         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25336 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25337       fi
25338       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25339     fi
25340   fi
25341 
25342   # Now new_path has a complete unix path to the binary
25343   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25344     # Keep paths in /bin as-is, but remove trailing .exe if any
25345     new_path="${new_path/%.exe/}"
25346     # Do not save /bin paths to all_fixpath_prefixes!
25347   else
25348     # Not in mixed or Windows style, start by that.
25349     new_path=`cmd //c echo $new_path`
25350 
25351   input_path="$new_path"
25352   # Check if we need to convert this using DOS-style short mode. If the path
25353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25354   # take no chances and rewrite it.
25355   # Note: m4 eats our [], so we need to use [ and ] instead.
25356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25357   if test "x$has_forbidden_chars" != x; then
25358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25359     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25360   fi
25361 
25362     # Output is in $new_path
25363 
25364   windows_path="$new_path"
25365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25366     unix_path=`$CYGPATH -u "$windows_path"`
25367     new_path="$unix_path"
25368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25370     new_path="$unix_path"
25371   fi
25372 
25373     # remove trailing .exe if any
25374     new_path="${new_path/%.exe/}"
25375 
25376     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25377     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25378   fi
25379 
25380   else
25381     # We're on a posix platform. Hooray! :)
25382     # First separate the path from the arguments. This will split at the first
25383     # space.
25384     complete="$CXXCPP"
25385     path="${complete%% *}"
25386     tmp="$complete EOL"
25387     arguments="${tmp#* }"
25388 
25389     # Cannot rely on the command "which" here since it doesn't always work.
25390     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25391     if test -z "$is_absolute_path"; then
25392       # Path to executable is not absolute. Find it.
25393       IFS_save="$IFS"
25394       IFS=:
25395       for p in $PATH; do
25396         if test -f "$p/$path" && test -x "$p/$path"; then
25397           new_path="$p/$path"
25398           break
25399         fi
25400       done
25401       IFS="$IFS_save"
25402     else
25403       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25404 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25405       new_path="$path"
25406     fi
25407 
25408     if test "x$new_path" = x; then
25409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25410 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25411       has_space=`$ECHO "$complete" | $GREP " "`
25412       if test "x$has_space" != x; then
25413         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25414 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25415       fi
25416       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25417     fi
25418   fi
25419 
25420   # Now join together the path and the arguments once again
25421   if test "x$arguments" != xEOL; then
25422     new_complete="$new_path ${arguments% *}"
25423   else
25424     new_complete="$new_path"
25425   fi
25426 
25427   if test "x$complete" != "x$new_complete"; then
25428     CXXCPP="$new_complete"
25429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25430 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25431   fi
25432 
25433 
25434   if test "x$COMPILE_TYPE" != "xcross"; then
25435     # If we are not cross compiling, use the same compilers for
25436     # building the build platform executables. The cross-compilation
25437     # case needed to be done earlier, but this can only be done after
25438     # the native tools have been localized.
25439     BUILD_CC="$CC"
25440     BUILD_CXX="$CXX"
25441     BUILD_LD="$LD"
25442   fi
25443 
25444   # for solaris we really need solaris tools, and not gnu equivalent
25445   #   these seems to normally reside in /usr/ccs/bin so add that to path before
25446   #   starting to probe
25447   #
25448   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25449   #         so that it can be overriden --with-tools-dir
25450   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25451     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25452   fi
25453 
25454   # Find the right assembler.
25455   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25456     # Extract the first word of "as", so it can be a program name with args.
25457 set dummy as; ac_word=$2
25458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25459 $as_echo_n "checking for $ac_word... " >&6; }
25460 if ${ac_cv_path_AS+:} false; then :
25461   $as_echo_n "(cached) " >&6
25462 else
25463   case $AS in
25464   [\\/]* | ?:[\\/]*)
25465   ac_cv_path_AS="$AS" # Let the user override the test with a path.
25466   ;;
25467   *)
25468   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25469 for as_dir in $PATH
25470 do
25471   IFS=$as_save_IFS
25472   test -z "$as_dir" && as_dir=.
25473     for ac_exec_ext in '' $ac_executable_extensions; do
25474   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25475     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25476     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25477     break 2
25478   fi
25479 done
25480   done
25481 IFS=$as_save_IFS
25482 
25483   ;;
25484 esac
25485 fi
25486 AS=$ac_cv_path_AS
25487 if test -n "$AS"; then
25488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25489 $as_echo "$AS" >&6; }
25490 else
25491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25492 $as_echo "no" >&6; }
25493 fi
25494 
25495 
25496 
25497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25498 
25499   # First separate the path from the arguments. This will split at the first
25500   # space.
25501   complete="$AS"
25502   path="${complete%% *}"
25503   tmp="$complete EOL"
25504   arguments="${tmp#* }"
25505 
25506   # Input might be given as Windows format, start by converting to
25507   # unix format.
25508   new_path=`$CYGPATH -u "$path"`
25509 
25510   # Now try to locate executable using which
25511   new_path=`$WHICH "$new_path" 2> /dev/null`
25512   # bat and cmd files are not always considered executable in cygwin causing which
25513   # to not find them
25514   if test "x$new_path" = x \
25515       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25516       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25517     new_path=`$CYGPATH -u "$path"`
25518   fi
25519   if test "x$new_path" = x; then
25520     # Oops. Which didn't find the executable.
25521     # The splitting of arguments from the executable at a space might have been incorrect,
25522     # since paths with space are more likely in Windows. Give it another try with the whole
25523     # argument.
25524     path="$complete"
25525     arguments="EOL"
25526     new_path=`$CYGPATH -u "$path"`
25527     new_path=`$WHICH "$new_path" 2> /dev/null`
25528     # bat and cmd files are not always considered executable in cygwin causing which
25529     # to not find them
25530     if test "x$new_path" = x \
25531         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25532         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25533       new_path=`$CYGPATH -u "$path"`
25534     fi
25535     if test "x$new_path" = x; then
25536       # It's still not found. Now this is an unrecoverable error.
25537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25538 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25539       has_space=`$ECHO "$complete" | $GREP " "`
25540       if test "x$has_space" != x; then
25541         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25542 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25543       fi
25544       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25545     fi
25546   fi
25547 
25548   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25549   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25550   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25551   # "foo.exe" is OK but "foo" is an error.
25552   #
25553   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25554   # It is also a way to make sure we got the proper file name for the real test later on.
25555   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25556   if test "x$test_shortpath" = x; then
25557     # Short path failed, file does not exist as specified.
25558     # Try adding .exe or .cmd
25559     if test -f "${new_path}.exe"; then
25560       input_to_shortpath="${new_path}.exe"
25561     elif test -f "${new_path}.cmd"; then
25562       input_to_shortpath="${new_path}.cmd"
25563     else
25564       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25565 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25566       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25567 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25568       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25569     fi
25570   else
25571     input_to_shortpath="$new_path"
25572   fi
25573 
25574   # Call helper function which possibly converts this using DOS-style short mode.
25575   # If so, the updated path is stored in $new_path.
25576   new_path="$input_to_shortpath"
25577 
25578   input_path="$input_to_shortpath"
25579   # Check if we need to convert this using DOS-style short mode. If the path
25580   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25581   # take no chances and rewrite it.
25582   # Note: m4 eats our [], so we need to use [ and ] instead.
25583   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25584   if test "x$has_forbidden_chars" != x; then
25585     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25586     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25587     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25588     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25589       # Going to short mode and back again did indeed matter. Since short mode is
25590       # case insensitive, let's make it lowercase to improve readability.
25591       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25592       # Now convert it back to Unix-stile (cygpath)
25593       input_path=`$CYGPATH -u "$shortmode_path"`
25594       new_path="$input_path"
25595     fi
25596   fi
25597 
25598   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25599   if test "x$test_cygdrive_prefix" = x; then
25600     # As a simple fix, exclude /usr/bin since it's not a real path.
25601     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25602       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25603       # a path prefixed by /cygdrive for fixpath to work.
25604       new_path="$CYGWIN_ROOT_PATH$input_path"
25605     fi
25606   fi
25607 
25608   # remove trailing .exe if any
25609   new_path="${new_path/%.exe/}"
25610 
25611   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25612 
25613   # First separate the path from the arguments. This will split at the first
25614   # space.
25615   complete="$AS"
25616   path="${complete%% *}"
25617   tmp="$complete EOL"
25618   arguments="${tmp#* }"
25619 
25620   # Input might be given as Windows format, start by converting to
25621   # unix format.
25622   new_path="$path"
25623 
25624   windows_path="$new_path"
25625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25626     unix_path=`$CYGPATH -u "$windows_path"`
25627     new_path="$unix_path"
25628   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25629     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25630     new_path="$unix_path"
25631   fi
25632 
25633 
25634   # Now try to locate executable using which
25635   new_path=`$WHICH "$new_path" 2> /dev/null`
25636 
25637   if test "x$new_path" = x; then
25638     # Oops. Which didn't find the executable.
25639     # The splitting of arguments from the executable at a space might have been incorrect,
25640     # since paths with space are more likely in Windows. Give it another try with the whole
25641     # argument.
25642     path="$complete"
25643     arguments="EOL"
25644     new_path="$path"
25645 
25646   windows_path="$new_path"
25647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25648     unix_path=`$CYGPATH -u "$windows_path"`
25649     new_path="$unix_path"
25650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25652     new_path="$unix_path"
25653   fi
25654 
25655 
25656     new_path=`$WHICH "$new_path" 2> /dev/null`
25657 
25658     if test "x$new_path" = x; then
25659       # It's still not found. Now this is an unrecoverable error.
25660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25661 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25662       has_space=`$ECHO "$complete" | $GREP " "`
25663       if test "x$has_space" != x; then
25664         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25665 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25666       fi
25667       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25668     fi
25669   fi
25670 
25671   # Now new_path has a complete unix path to the binary
25672   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25673     # Keep paths in /bin as-is, but remove trailing .exe if any
25674     new_path="${new_path/%.exe/}"
25675     # Do not save /bin paths to all_fixpath_prefixes!
25676   else
25677     # Not in mixed or Windows style, start by that.
25678     new_path=`cmd //c echo $new_path`
25679 
25680   input_path="$new_path"
25681   # Check if we need to convert this using DOS-style short mode. If the path
25682   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25683   # take no chances and rewrite it.
25684   # Note: m4 eats our [], so we need to use [ and ] instead.
25685   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25686   if test "x$has_forbidden_chars" != x; then
25687     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25688     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25689   fi
25690 
25691     # Output is in $new_path
25692 
25693   windows_path="$new_path"
25694   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25695     unix_path=`$CYGPATH -u "$windows_path"`
25696     new_path="$unix_path"
25697   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25698     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25699     new_path="$unix_path"
25700   fi
25701 
25702     # remove trailing .exe if any
25703     new_path="${new_path/%.exe/}"
25704 
25705     # Save the first 10 bytes of this path to the storage, so fixpath can work.
25706     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25707   fi
25708 
25709   else
25710     # We're on a posix platform. Hooray! :)
25711     # First separate the path from the arguments. This will split at the first
25712     # space.
25713     complete="$AS"
25714     path="${complete%% *}"
25715     tmp="$complete EOL"
25716     arguments="${tmp#* }"
25717 
25718     # Cannot rely on the command "which" here since it doesn't always work.
25719     is_absolute_path=`$ECHO "$path" | $GREP ^/`
25720     if test -z "$is_absolute_path"; then
25721       # Path to executable is not absolute. Find it.
25722       IFS_save="$IFS"
25723       IFS=:
25724       for p in $PATH; do
25725         if test -f "$p/$path" && test -x "$p/$path"; then
25726           new_path="$p/$path"
25727           break
25728         fi
25729       done
25730       IFS="$IFS_save"
25731     else
25732       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25733 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25734       new_path="$path"
25735     fi
25736 
25737     if test "x$new_path" = x; then
25738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25739 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25740       has_space=`$ECHO "$complete" | $GREP " "`
25741       if test "x$has_space" != x; then
25742         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25743 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25744       fi
25745       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25746     fi
25747   fi
25748 
25749   # Now join together the path and the arguments once again
25750   if test "x$arguments" != xEOL; then
25751     new_complete="$new_path ${arguments% *}"
25752   else
25753     new_complete="$new_path"
25754   fi
25755 
25756   if test "x$complete" != "x$new_complete"; then
25757     AS="$new_complete"
25758     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25759 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25760   fi
25761 
25762   else
25763     AS="$CC -c"
25764   fi
25765 
25766 
25767   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25768     # Extract the first word of "nm", so it can be a program name with args.
25769 set dummy nm; ac_word=$2
25770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25771 $as_echo_n "checking for $ac_word... " >&6; }
25772 if ${ac_cv_path_NM+:} false; then :
25773   $as_echo_n "(cached) " >&6
25774 else
25775   case $NM in
25776   [\\/]* | ?:[\\/]*)
25777   ac_cv_path_NM="$NM" # Let the user override the test with a path.
25778   ;;
25779   *)
25780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25781 for as_dir in $PATH
25782 do
25783   IFS=$as_save_IFS
25784   test -z "$as_dir" && as_dir=.
25785     for ac_exec_ext in '' $ac_executable_extensions; do
25786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25787     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25789     break 2
25790   fi
25791 done
25792   done
25793 IFS=$as_save_IFS
25794 
25795   ;;
25796 esac
25797 fi
25798 NM=$ac_cv_path_NM
25799 if test -n "$NM"; then
25800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25801 $as_echo "$NM" >&6; }
25802 else
25803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25804 $as_echo "no" >&6; }
25805 fi
25806 
25807 
25808 
25809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25810 
25811   # First separate the path from the arguments. This will split at the first
25812   # space.
25813   complete="$NM"
25814   path="${complete%% *}"
25815   tmp="$complete EOL"
25816   arguments="${tmp#* }"
25817 
25818   # Input might be given as Windows format, start by converting to
25819   # unix format.
25820   new_path=`$CYGPATH -u "$path"`
25821 
25822   # Now try to locate executable using which
25823   new_path=`$WHICH "$new_path" 2> /dev/null`
25824   # bat and cmd files are not always considered executable in cygwin causing which
25825   # to not find them
25826   if test "x$new_path" = x \
25827       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25828       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25829     new_path=`$CYGPATH -u "$path"`
25830   fi
25831   if test "x$new_path" = x; then
25832     # Oops. Which didn't find the executable.
25833     # The splitting of arguments from the executable at a space might have been incorrect,
25834     # since paths with space are more likely in Windows. Give it another try with the whole
25835     # argument.
25836     path="$complete"
25837     arguments="EOL"
25838     new_path=`$CYGPATH -u "$path"`
25839     new_path=`$WHICH "$new_path" 2> /dev/null`
25840     # bat and cmd files are not always considered executable in cygwin causing which
25841     # to not find them
25842     if test "x$new_path" = x \
25843         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25844         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25845       new_path=`$CYGPATH -u "$path"`
25846     fi
25847     if test "x$new_path" = x; then
25848       # It's still not found. Now this is an unrecoverable error.
25849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25850 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25851       has_space=`$ECHO "$complete" | $GREP " "`
25852       if test "x$has_space" != x; then
25853         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25854 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25855       fi
25856       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25857     fi
25858   fi
25859 
25860   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25861   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25862   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25863   # "foo.exe" is OK but "foo" is an error.
25864   #
25865   # This test is therefore slightly more accurate than "test -f" to check for file presence.
25866   # It is also a way to make sure we got the proper file name for the real test later on.
25867   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25868   if test "x$test_shortpath" = x; then
25869     # Short path failed, file does not exist as specified.
25870     # Try adding .exe or .cmd
25871     if test -f "${new_path}.exe"; then
25872       input_to_shortpath="${new_path}.exe"
25873     elif test -f "${new_path}.cmd"; then
25874       input_to_shortpath="${new_path}.cmd"
25875     else
25876       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25877 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25878       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25879 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25880       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25881     fi
25882   else
25883     input_to_shortpath="$new_path"
25884   fi
25885 
25886   # Call helper function which possibly converts this using DOS-style short mode.
25887   # If so, the updated path is stored in $new_path.
25888   new_path="$input_to_shortpath"
25889 
25890   input_path="$input_to_shortpath"
25891   # Check if we need to convert this using DOS-style short mode. If the path
25892   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25893   # take no chances and rewrite it.
25894   # Note: m4 eats our [], so we need to use [ and ] instead.
25895   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25896   if test "x$has_forbidden_chars" != x; then
25897     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25898     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25899     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25900     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25901       # Going to short mode and back again did indeed matter. Since short mode is
25902       # case insensitive, let's make it lowercase to improve readability.
25903       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25904       # Now convert it back to Unix-stile (cygpath)
25905       input_path=`$CYGPATH -u "$shortmode_path"`
25906       new_path="$input_path"
25907     fi
25908   fi
25909 
25910   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25911   if test "x$test_cygdrive_prefix" = x; then
25912     # As a simple fix, exclude /usr/bin since it's not a real path.
25913     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25914       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25915       # a path prefixed by /cygdrive for fixpath to work.
25916       new_path="$CYGWIN_ROOT_PATH$input_path"
25917     fi
25918   fi
25919 
25920   # remove trailing .exe if any
25921   new_path="${new_path/%.exe/}"
25922 
25923   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25924 
25925   # First separate the path from the arguments. This will split at the first
25926   # space.
25927   complete="$NM"
25928   path="${complete%% *}"
25929   tmp="$complete EOL"
25930   arguments="${tmp#* }"
25931 
25932   # Input might be given as Windows format, start by converting to
25933   # unix format.
25934   new_path="$path"
25935 
25936   windows_path="$new_path"
25937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25938     unix_path=`$CYGPATH -u "$windows_path"`
25939     new_path="$unix_path"
25940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25942     new_path="$unix_path"
25943   fi
25944 
25945 
25946   # Now try to locate executable using which
25947   new_path=`$WHICH "$new_path" 2> /dev/null`
25948 
25949   if test "x$new_path" = x; then
25950     # Oops. Which didn't find the executable.
25951     # The splitting of arguments from the executable at a space might have been incorrect,
25952     # since paths with space are more likely in Windows. Give it another try with the whole
25953     # argument.
25954     path="$complete"
25955     arguments="EOL"
25956     new_path="$path"
25957 
25958   windows_path="$new_path"
25959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25960     unix_path=`$CYGPATH -u "$windows_path"`
25961     new_path="$unix_path"
25962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25964     new_path="$unix_path"
25965   fi
25966 
25967 
25968     new_path=`$WHICH "$new_path" 2> /dev/null`
25969 
25970     if test "x$new_path" = x; then
25971       # It's still not found. Now this is an unrecoverable error.
25972       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25973 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25974       has_space=`$ECHO "$complete" | $GREP " "`
25975       if test "x$has_space" != x; then
25976         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25977 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25978       fi
25979       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25980     fi
25981   fi
25982 
25983   # Now new_path has a complete unix path to the binary
25984   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25985     # Keep paths in /bin as-is, but remove trailing .exe if any
25986     new_path="${new_path/%.exe/}"
25987     # Do not save /bin paths to all_fixpath_prefixes!
25988   else
25989     # Not in mixed or Windows style, start by that.
25990     new_path=`cmd //c echo $new_path`
25991 
25992   input_path="$new_path"
25993   # Check if we need to convert this using DOS-style short mode. If the path
25994   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25995   # take no chances and rewrite it.
25996   # Note: m4 eats our [], so we need to use [ and ] instead.
25997   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25998   if test "x$has_forbidden_chars" != x; then
25999     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26000     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26001   fi
26002 
26003     # Output is in $new_path
26004 
26005   windows_path="$new_path"
26006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007     unix_path=`$CYGPATH -u "$windows_path"`
26008     new_path="$unix_path"
26009   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26010     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26011     new_path="$unix_path"
26012   fi
26013 
26014     # remove trailing .exe if any
26015     new_path="${new_path/%.exe/}"
26016 
26017     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26018     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26019   fi
26020 
26021   else
26022     # We're on a posix platform. Hooray! :)
26023     # First separate the path from the arguments. This will split at the first
26024     # space.
26025     complete="$NM"
26026     path="${complete%% *}"
26027     tmp="$complete EOL"
26028     arguments="${tmp#* }"
26029 
26030     # Cannot rely on the command "which" here since it doesn't always work.
26031     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26032     if test -z "$is_absolute_path"; then
26033       # Path to executable is not absolute. Find it.
26034       IFS_save="$IFS"
26035       IFS=:
26036       for p in $PATH; do
26037         if test -f "$p/$path" && test -x "$p/$path"; then
26038           new_path="$p/$path"
26039           break
26040         fi
26041       done
26042       IFS="$IFS_save"
26043     else
26044       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
26045 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
26046       new_path="$path"
26047     fi
26048 
26049     if test "x$new_path" = x; then
26050       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26051 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26052       has_space=`$ECHO "$complete" | $GREP " "`
26053       if test "x$has_space" != x; then
26054         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26055 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26056       fi
26057       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26058     fi
26059   fi
26060 
26061   # Now join together the path and the arguments once again
26062   if test "x$arguments" != xEOL; then
26063     new_complete="$new_path ${arguments% *}"
26064   else
26065     new_complete="$new_path"
26066   fi
26067 
26068   if test "x$complete" != "x$new_complete"; then
26069     NM="$new_complete"
26070     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
26071 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
26072   fi
26073 
26074     # Extract the first word of "gnm", so it can be a program name with args.
26075 set dummy gnm; ac_word=$2
26076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26077 $as_echo_n "checking for $ac_word... " >&6; }
26078 if ${ac_cv_path_GNM+:} false; then :
26079   $as_echo_n "(cached) " >&6
26080 else
26081   case $GNM in
26082   [\\/]* | ?:[\\/]*)
26083   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
26084   ;;
26085   *)
26086   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26087 for as_dir in $PATH
26088 do
26089   IFS=$as_save_IFS
26090   test -z "$as_dir" && as_dir=.
26091     for ac_exec_ext in '' $ac_executable_extensions; do
26092   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26093     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
26094     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26095     break 2
26096   fi
26097 done
26098   done
26099 IFS=$as_save_IFS
26100 
26101   ;;
26102 esac
26103 fi
26104 GNM=$ac_cv_path_GNM
26105 if test -n "$GNM"; then
26106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
26107 $as_echo "$GNM" >&6; }
26108 else
26109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26110 $as_echo "no" >&6; }
26111 fi
26112 
26113 
26114 
26115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26116 
26117   # First separate the path from the arguments. This will split at the first
26118   # space.
26119   complete="$GNM"
26120   path="${complete%% *}"
26121   tmp="$complete EOL"
26122   arguments="${tmp#* }"
26123 
26124   # Input might be given as Windows format, start by converting to
26125   # unix format.
26126   new_path=`$CYGPATH -u "$path"`
26127 
26128   # Now try to locate executable using which
26129   new_path=`$WHICH "$new_path" 2> /dev/null`
26130   # bat and cmd files are not always considered executable in cygwin causing which
26131   # to not find them
26132   if test "x$new_path" = x \
26133       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26134       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26135     new_path=`$CYGPATH -u "$path"`
26136   fi
26137   if test "x$new_path" = x; then
26138     # Oops. Which didn't find the executable.
26139     # The splitting of arguments from the executable at a space might have been incorrect,
26140     # since paths with space are more likely in Windows. Give it another try with the whole
26141     # argument.
26142     path="$complete"
26143     arguments="EOL"
26144     new_path=`$CYGPATH -u "$path"`
26145     new_path=`$WHICH "$new_path" 2> /dev/null`
26146     # bat and cmd files are not always considered executable in cygwin causing which
26147     # to not find them
26148     if test "x$new_path" = x \
26149         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26150         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26151       new_path=`$CYGPATH -u "$path"`
26152     fi
26153     if test "x$new_path" = x; then
26154       # It's still not found. Now this is an unrecoverable error.
26155       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26156 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26157       has_space=`$ECHO "$complete" | $GREP " "`
26158       if test "x$has_space" != x; then
26159         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26160 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26161       fi
26162       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26163     fi
26164   fi
26165 
26166   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26167   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26168   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26169   # "foo.exe" is OK but "foo" is an error.
26170   #
26171   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26172   # It is also a way to make sure we got the proper file name for the real test later on.
26173   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26174   if test "x$test_shortpath" = x; then
26175     # Short path failed, file does not exist as specified.
26176     # Try adding .exe or .cmd
26177     if test -f "${new_path}.exe"; then
26178       input_to_shortpath="${new_path}.exe"
26179     elif test -f "${new_path}.cmd"; then
26180       input_to_shortpath="${new_path}.cmd"
26181     else
26182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
26183 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
26184       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26185 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26186       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26187     fi
26188   else
26189     input_to_shortpath="$new_path"
26190   fi
26191 
26192   # Call helper function which possibly converts this using DOS-style short mode.
26193   # If so, the updated path is stored in $new_path.
26194   new_path="$input_to_shortpath"
26195 
26196   input_path="$input_to_shortpath"
26197   # Check if we need to convert this using DOS-style short mode. If the path
26198   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26199   # take no chances and rewrite it.
26200   # Note: m4 eats our [], so we need to use [ and ] instead.
26201   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26202   if test "x$has_forbidden_chars" != x; then
26203     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26204     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26205     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26206     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26207       # Going to short mode and back again did indeed matter. Since short mode is
26208       # case insensitive, let's make it lowercase to improve readability.
26209       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26210       # Now convert it back to Unix-stile (cygpath)
26211       input_path=`$CYGPATH -u "$shortmode_path"`
26212       new_path="$input_path"
26213     fi
26214   fi
26215 
26216   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26217   if test "x$test_cygdrive_prefix" = x; then
26218     # As a simple fix, exclude /usr/bin since it's not a real path.
26219     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26220       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26221       # a path prefixed by /cygdrive for fixpath to work.
26222       new_path="$CYGWIN_ROOT_PATH$input_path"
26223     fi
26224   fi
26225 
26226   # remove trailing .exe if any
26227   new_path="${new_path/%.exe/}"
26228 
26229   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26230 
26231   # First separate the path from the arguments. This will split at the first
26232   # space.
26233   complete="$GNM"
26234   path="${complete%% *}"
26235   tmp="$complete EOL"
26236   arguments="${tmp#* }"
26237 
26238   # Input might be given as Windows format, start by converting to
26239   # unix format.
26240   new_path="$path"
26241 
26242   windows_path="$new_path"
26243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26244     unix_path=`$CYGPATH -u "$windows_path"`
26245     new_path="$unix_path"
26246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26248     new_path="$unix_path"
26249   fi
26250 
26251 
26252   # Now try to locate executable using which
26253   new_path=`$WHICH "$new_path" 2> /dev/null`
26254 
26255   if test "x$new_path" = x; then
26256     # Oops. Which didn't find the executable.
26257     # The splitting of arguments from the executable at a space might have been incorrect,
26258     # since paths with space are more likely in Windows. Give it another try with the whole
26259     # argument.
26260     path="$complete"
26261     arguments="EOL"
26262     new_path="$path"
26263 
26264   windows_path="$new_path"
26265   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26266     unix_path=`$CYGPATH -u "$windows_path"`
26267     new_path="$unix_path"
26268   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26269     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26270     new_path="$unix_path"
26271   fi
26272 
26273 
26274     new_path=`$WHICH "$new_path" 2> /dev/null`
26275 
26276     if test "x$new_path" = x; then
26277       # It's still not found. Now this is an unrecoverable error.
26278       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26279 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26280       has_space=`$ECHO "$complete" | $GREP " "`
26281       if test "x$has_space" != x; then
26282         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26284       fi
26285       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26286     fi
26287   fi
26288 
26289   # Now new_path has a complete unix path to the binary
26290   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26291     # Keep paths in /bin as-is, but remove trailing .exe if any
26292     new_path="${new_path/%.exe/}"
26293     # Do not save /bin paths to all_fixpath_prefixes!
26294   else
26295     # Not in mixed or Windows style, start by that.
26296     new_path=`cmd //c echo $new_path`
26297 
26298   input_path="$new_path"
26299   # Check if we need to convert this using DOS-style short mode. If the path
26300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26301   # take no chances and rewrite it.
26302   # Note: m4 eats our [], so we need to use [ and ] instead.
26303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26304   if test "x$has_forbidden_chars" != x; then
26305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26306     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26307   fi
26308 
26309     # Output is in $new_path
26310 
26311   windows_path="$new_path"
26312   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26313     unix_path=`$CYGPATH -u "$windows_path"`
26314     new_path="$unix_path"
26315   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26316     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26317     new_path="$unix_path"
26318   fi
26319 
26320     # remove trailing .exe if any
26321     new_path="${new_path/%.exe/}"
26322 
26323     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26324     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26325   fi
26326 
26327   else
26328     # We're on a posix platform. Hooray! :)
26329     # First separate the path from the arguments. This will split at the first
26330     # space.
26331     complete="$GNM"
26332     path="${complete%% *}"
26333     tmp="$complete EOL"
26334     arguments="${tmp#* }"
26335 
26336     # Cannot rely on the command "which" here since it doesn't always work.
26337     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26338     if test -z "$is_absolute_path"; then
26339       # Path to executable is not absolute. Find it.
26340       IFS_save="$IFS"
26341       IFS=:
26342       for p in $PATH; do
26343         if test -f "$p/$path" && test -x "$p/$path"; then
26344           new_path="$p/$path"
26345           break
26346         fi
26347       done
26348       IFS="$IFS_save"
26349     else
26350       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26351 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26352       new_path="$path"
26353     fi
26354 
26355     if test "x$new_path" = x; then
26356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26357 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26358       has_space=`$ECHO "$complete" | $GREP " "`
26359       if test "x$has_space" != x; then
26360         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26361 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26362       fi
26363       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26364     fi
26365   fi
26366 
26367   # Now join together the path and the arguments once again
26368   if test "x$arguments" != xEOL; then
26369     new_complete="$new_path ${arguments% *}"
26370   else
26371     new_complete="$new_path"
26372   fi
26373 
26374   if test "x$complete" != "x$new_complete"; then
26375     GNM="$new_complete"
26376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26377 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26378   fi
26379 
26380     # Extract the first word of "strip", so it can be a program name with args.
26381 set dummy strip; ac_word=$2
26382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26383 $as_echo_n "checking for $ac_word... " >&6; }
26384 if ${ac_cv_path_STRIP+:} false; then :
26385   $as_echo_n "(cached) " >&6
26386 else
26387   case $STRIP in
26388   [\\/]* | ?:[\\/]*)
26389   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26390   ;;
26391   *)
26392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26393 for as_dir in $PATH
26394 do
26395   IFS=$as_save_IFS
26396   test -z "$as_dir" && as_dir=.
26397     for ac_exec_ext in '' $ac_executable_extensions; do
26398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26399     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26401     break 2
26402   fi
26403 done
26404   done
26405 IFS=$as_save_IFS
26406 
26407   ;;
26408 esac
26409 fi
26410 STRIP=$ac_cv_path_STRIP
26411 if test -n "$STRIP"; then
26412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26413 $as_echo "$STRIP" >&6; }
26414 else
26415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26416 $as_echo "no" >&6; }
26417 fi
26418 
26419 
26420 
26421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26422 
26423   # First separate the path from the arguments. This will split at the first
26424   # space.
26425   complete="$STRIP"
26426   path="${complete%% *}"
26427   tmp="$complete EOL"
26428   arguments="${tmp#* }"
26429 
26430   # Input might be given as Windows format, start by converting to
26431   # unix format.
26432   new_path=`$CYGPATH -u "$path"`
26433 
26434   # Now try to locate executable using which
26435   new_path=`$WHICH "$new_path" 2> /dev/null`
26436   # bat and cmd files are not always considered executable in cygwin causing which
26437   # to not find them
26438   if test "x$new_path" = x \
26439       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26440       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26441     new_path=`$CYGPATH -u "$path"`
26442   fi
26443   if test "x$new_path" = x; then
26444     # Oops. Which didn't find the executable.
26445     # The splitting of arguments from the executable at a space might have been incorrect,
26446     # since paths with space are more likely in Windows. Give it another try with the whole
26447     # argument.
26448     path="$complete"
26449     arguments="EOL"
26450     new_path=`$CYGPATH -u "$path"`
26451     new_path=`$WHICH "$new_path" 2> /dev/null`
26452     # bat and cmd files are not always considered executable in cygwin causing which
26453     # to not find them
26454     if test "x$new_path" = x \
26455         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26456         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26457       new_path=`$CYGPATH -u "$path"`
26458     fi
26459     if test "x$new_path" = x; then
26460       # It's still not found. Now this is an unrecoverable error.
26461       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26462 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26463       has_space=`$ECHO "$complete" | $GREP " "`
26464       if test "x$has_space" != x; then
26465         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26466 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26467       fi
26468       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26469     fi
26470   fi
26471 
26472   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26473   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26474   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26475   # "foo.exe" is OK but "foo" is an error.
26476   #
26477   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26478   # It is also a way to make sure we got the proper file name for the real test later on.
26479   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26480   if test "x$test_shortpath" = x; then
26481     # Short path failed, file does not exist as specified.
26482     # Try adding .exe or .cmd
26483     if test -f "${new_path}.exe"; then
26484       input_to_shortpath="${new_path}.exe"
26485     elif test -f "${new_path}.cmd"; then
26486       input_to_shortpath="${new_path}.cmd"
26487     else
26488       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26489 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26490       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26491 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26492       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26493     fi
26494   else
26495     input_to_shortpath="$new_path"
26496   fi
26497 
26498   # Call helper function which possibly converts this using DOS-style short mode.
26499   # If so, the updated path is stored in $new_path.
26500   new_path="$input_to_shortpath"
26501 
26502   input_path="$input_to_shortpath"
26503   # Check if we need to convert this using DOS-style short mode. If the path
26504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26505   # take no chances and rewrite it.
26506   # Note: m4 eats our [], so we need to use [ and ] instead.
26507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26508   if test "x$has_forbidden_chars" != x; then
26509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26513       # Going to short mode and back again did indeed matter. Since short mode is
26514       # case insensitive, let's make it lowercase to improve readability.
26515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26516       # Now convert it back to Unix-stile (cygpath)
26517       input_path=`$CYGPATH -u "$shortmode_path"`
26518       new_path="$input_path"
26519     fi
26520   fi
26521 
26522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26523   if test "x$test_cygdrive_prefix" = x; then
26524     # As a simple fix, exclude /usr/bin since it's not a real path.
26525     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26527       # a path prefixed by /cygdrive for fixpath to work.
26528       new_path="$CYGWIN_ROOT_PATH$input_path"
26529     fi
26530   fi
26531 
26532   # remove trailing .exe if any
26533   new_path="${new_path/%.exe/}"
26534 
26535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26536 
26537   # First separate the path from the arguments. This will split at the first
26538   # space.
26539   complete="$STRIP"
26540   path="${complete%% *}"
26541   tmp="$complete EOL"
26542   arguments="${tmp#* }"
26543 
26544   # Input might be given as Windows format, start by converting to
26545   # unix format.
26546   new_path="$path"
26547 
26548   windows_path="$new_path"
26549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26550     unix_path=`$CYGPATH -u "$windows_path"`
26551     new_path="$unix_path"
26552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26554     new_path="$unix_path"
26555   fi
26556 
26557 
26558   # Now try to locate executable using which
26559   new_path=`$WHICH "$new_path" 2> /dev/null`
26560 
26561   if test "x$new_path" = x; then
26562     # Oops. Which didn't find the executable.
26563     # The splitting of arguments from the executable at a space might have been incorrect,
26564     # since paths with space are more likely in Windows. Give it another try with the whole
26565     # argument.
26566     path="$complete"
26567     arguments="EOL"
26568     new_path="$path"
26569 
26570   windows_path="$new_path"
26571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26572     unix_path=`$CYGPATH -u "$windows_path"`
26573     new_path="$unix_path"
26574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26576     new_path="$unix_path"
26577   fi
26578 
26579 
26580     new_path=`$WHICH "$new_path" 2> /dev/null`
26581 
26582     if test "x$new_path" = x; then
26583       # It's still not found. Now this is an unrecoverable error.
26584       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26585 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26586       has_space=`$ECHO "$complete" | $GREP " "`
26587       if test "x$has_space" != x; then
26588         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26589 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26590       fi
26591       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26592     fi
26593   fi
26594 
26595   # Now new_path has a complete unix path to the binary
26596   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26597     # Keep paths in /bin as-is, but remove trailing .exe if any
26598     new_path="${new_path/%.exe/}"
26599     # Do not save /bin paths to all_fixpath_prefixes!
26600   else
26601     # Not in mixed or Windows style, start by that.
26602     new_path=`cmd //c echo $new_path`
26603 
26604   input_path="$new_path"
26605   # Check if we need to convert this using DOS-style short mode. If the path
26606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26607   # take no chances and rewrite it.
26608   # Note: m4 eats our [], so we need to use [ and ] instead.
26609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26610   if test "x$has_forbidden_chars" != x; then
26611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26612     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26613   fi
26614 
26615     # Output is in $new_path
26616 
26617   windows_path="$new_path"
26618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26619     unix_path=`$CYGPATH -u "$windows_path"`
26620     new_path="$unix_path"
26621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26623     new_path="$unix_path"
26624   fi
26625 
26626     # remove trailing .exe if any
26627     new_path="${new_path/%.exe/}"
26628 
26629     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26630     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26631   fi
26632 
26633   else
26634     # We're on a posix platform. Hooray! :)
26635     # First separate the path from the arguments. This will split at the first
26636     # space.
26637     complete="$STRIP"
26638     path="${complete%% *}"
26639     tmp="$complete EOL"
26640     arguments="${tmp#* }"
26641 
26642     # Cannot rely on the command "which" here since it doesn't always work.
26643     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26644     if test -z "$is_absolute_path"; then
26645       # Path to executable is not absolute. Find it.
26646       IFS_save="$IFS"
26647       IFS=:
26648       for p in $PATH; do
26649         if test -f "$p/$path" && test -x "$p/$path"; then
26650           new_path="$p/$path"
26651           break
26652         fi
26653       done
26654       IFS="$IFS_save"
26655     else
26656       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26657 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26658       new_path="$path"
26659     fi
26660 
26661     if test "x$new_path" = x; then
26662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26663 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26664       has_space=`$ECHO "$complete" | $GREP " "`
26665       if test "x$has_space" != x; then
26666         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26667 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26668       fi
26669       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26670     fi
26671   fi
26672 
26673   # Now join together the path and the arguments once again
26674   if test "x$arguments" != xEOL; then
26675     new_complete="$new_path ${arguments% *}"
26676   else
26677     new_complete="$new_path"
26678   fi
26679 
26680   if test "x$complete" != "x$new_complete"; then
26681     STRIP="$new_complete"
26682     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26683 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26684   fi
26685 
26686     # Extract the first word of "mcs", so it can be a program name with args.
26687 set dummy mcs; ac_word=$2
26688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26689 $as_echo_n "checking for $ac_word... " >&6; }
26690 if ${ac_cv_path_MCS+:} false; then :
26691   $as_echo_n "(cached) " >&6
26692 else
26693   case $MCS in
26694   [\\/]* | ?:[\\/]*)
26695   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26696   ;;
26697   *)
26698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26699 for as_dir in $PATH
26700 do
26701   IFS=$as_save_IFS
26702   test -z "$as_dir" && as_dir=.
26703     for ac_exec_ext in '' $ac_executable_extensions; do
26704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26705     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26707     break 2
26708   fi
26709 done
26710   done
26711 IFS=$as_save_IFS
26712 
26713   ;;
26714 esac
26715 fi
26716 MCS=$ac_cv_path_MCS
26717 if test -n "$MCS"; then
26718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26719 $as_echo "$MCS" >&6; }
26720 else
26721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26722 $as_echo "no" >&6; }
26723 fi
26724 
26725 
26726 
26727   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26728 
26729   # First separate the path from the arguments. This will split at the first
26730   # space.
26731   complete="$MCS"
26732   path="${complete%% *}"
26733   tmp="$complete EOL"
26734   arguments="${tmp#* }"
26735 
26736   # Input might be given as Windows format, start by converting to
26737   # unix format.
26738   new_path=`$CYGPATH -u "$path"`
26739 
26740   # Now try to locate executable using which
26741   new_path=`$WHICH "$new_path" 2> /dev/null`
26742   # bat and cmd files are not always considered executable in cygwin causing which
26743   # to not find them
26744   if test "x$new_path" = x \
26745       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26746       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26747     new_path=`$CYGPATH -u "$path"`
26748   fi
26749   if test "x$new_path" = x; then
26750     # Oops. Which didn't find the executable.
26751     # The splitting of arguments from the executable at a space might have been incorrect,
26752     # since paths with space are more likely in Windows. Give it another try with the whole
26753     # argument.
26754     path="$complete"
26755     arguments="EOL"
26756     new_path=`$CYGPATH -u "$path"`
26757     new_path=`$WHICH "$new_path" 2> /dev/null`
26758     # bat and cmd files are not always considered executable in cygwin causing which
26759     # to not find them
26760     if test "x$new_path" = x \
26761         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26762         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26763       new_path=`$CYGPATH -u "$path"`
26764     fi
26765     if test "x$new_path" = x; then
26766       # It's still not found. Now this is an unrecoverable error.
26767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26768 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26769       has_space=`$ECHO "$complete" | $GREP " "`
26770       if test "x$has_space" != x; then
26771         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26773       fi
26774       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26775     fi
26776   fi
26777 
26778   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26779   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26780   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26781   # "foo.exe" is OK but "foo" is an error.
26782   #
26783   # This test is therefore slightly more accurate than "test -f" to check for file presence.
26784   # It is also a way to make sure we got the proper file name for the real test later on.
26785   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26786   if test "x$test_shortpath" = x; then
26787     # Short path failed, file does not exist as specified.
26788     # Try adding .exe or .cmd
26789     if test -f "${new_path}.exe"; then
26790       input_to_shortpath="${new_path}.exe"
26791     elif test -f "${new_path}.cmd"; then
26792       input_to_shortpath="${new_path}.cmd"
26793     else
26794       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26795 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26796       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26797 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26798       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26799     fi
26800   else
26801     input_to_shortpath="$new_path"
26802   fi
26803 
26804   # Call helper function which possibly converts this using DOS-style short mode.
26805   # If so, the updated path is stored in $new_path.
26806   new_path="$input_to_shortpath"
26807 
26808   input_path="$input_to_shortpath"
26809   # Check if we need to convert this using DOS-style short mode. If the path
26810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26811   # take no chances and rewrite it.
26812   # Note: m4 eats our [], so we need to use [ and ] instead.
26813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26814   if test "x$has_forbidden_chars" != x; then
26815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26816     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26817     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26818     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26819       # Going to short mode and back again did indeed matter. Since short mode is
26820       # case insensitive, let's make it lowercase to improve readability.
26821       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26822       # Now convert it back to Unix-stile (cygpath)
26823       input_path=`$CYGPATH -u "$shortmode_path"`
26824       new_path="$input_path"
26825     fi
26826   fi
26827 
26828   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26829   if test "x$test_cygdrive_prefix" = x; then
26830     # As a simple fix, exclude /usr/bin since it's not a real path.
26831     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26832       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26833       # a path prefixed by /cygdrive for fixpath to work.
26834       new_path="$CYGWIN_ROOT_PATH$input_path"
26835     fi
26836   fi
26837 
26838   # remove trailing .exe if any
26839   new_path="${new_path/%.exe/}"
26840 
26841   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26842 
26843   # First separate the path from the arguments. This will split at the first
26844   # space.
26845   complete="$MCS"
26846   path="${complete%% *}"
26847   tmp="$complete EOL"
26848   arguments="${tmp#* }"
26849 
26850   # Input might be given as Windows format, start by converting to
26851   # unix format.
26852   new_path="$path"
26853 
26854   windows_path="$new_path"
26855   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26856     unix_path=`$CYGPATH -u "$windows_path"`
26857     new_path="$unix_path"
26858   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26859     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26860     new_path="$unix_path"
26861   fi
26862 
26863 
26864   # Now try to locate executable using which
26865   new_path=`$WHICH "$new_path" 2> /dev/null`
26866 
26867   if test "x$new_path" = x; then
26868     # Oops. Which didn't find the executable.
26869     # The splitting of arguments from the executable at a space might have been incorrect,
26870     # since paths with space are more likely in Windows. Give it another try with the whole
26871     # argument.
26872     path="$complete"
26873     arguments="EOL"
26874     new_path="$path"
26875 
26876   windows_path="$new_path"
26877   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26878     unix_path=`$CYGPATH -u "$windows_path"`
26879     new_path="$unix_path"
26880   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26881     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26882     new_path="$unix_path"
26883   fi
26884 
26885 
26886     new_path=`$WHICH "$new_path" 2> /dev/null`
26887 
26888     if test "x$new_path" = x; then
26889       # It's still not found. Now this is an unrecoverable error.
26890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26891 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26892       has_space=`$ECHO "$complete" | $GREP " "`
26893       if test "x$has_space" != x; then
26894         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26896       fi
26897       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26898     fi
26899   fi
26900 
26901   # Now new_path has a complete unix path to the binary
26902   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26903     # Keep paths in /bin as-is, but remove trailing .exe if any
26904     new_path="${new_path/%.exe/}"
26905     # Do not save /bin paths to all_fixpath_prefixes!
26906   else
26907     # Not in mixed or Windows style, start by that.
26908     new_path=`cmd //c echo $new_path`
26909 
26910   input_path="$new_path"
26911   # Check if we need to convert this using DOS-style short mode. If the path
26912   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26913   # take no chances and rewrite it.
26914   # Note: m4 eats our [], so we need to use [ and ] instead.
26915   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26916   if test "x$has_forbidden_chars" != x; then
26917     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26918     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26919   fi
26920 
26921     # Output is in $new_path
26922 
26923   windows_path="$new_path"
26924   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26925     unix_path=`$CYGPATH -u "$windows_path"`
26926     new_path="$unix_path"
26927   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26928     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26929     new_path="$unix_path"
26930   fi
26931 
26932     # remove trailing .exe if any
26933     new_path="${new_path/%.exe/}"
26934 
26935     # Save the first 10 bytes of this path to the storage, so fixpath can work.
26936     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26937   fi
26938 
26939   else
26940     # We're on a posix platform. Hooray! :)
26941     # First separate the path from the arguments. This will split at the first
26942     # space.
26943     complete="$MCS"
26944     path="${complete%% *}"
26945     tmp="$complete EOL"
26946     arguments="${tmp#* }"
26947 
26948     # Cannot rely on the command "which" here since it doesn't always work.
26949     is_absolute_path=`$ECHO "$path" | $GREP ^/`
26950     if test -z "$is_absolute_path"; then
26951       # Path to executable is not absolute. Find it.
26952       IFS_save="$IFS"
26953       IFS=:
26954       for p in $PATH; do
26955         if test -f "$p/$path" && test -x "$p/$path"; then
26956           new_path="$p/$path"
26957           break
26958         fi
26959       done
26960       IFS="$IFS_save"
26961     else
26962       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26963 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26964       new_path="$path"
26965     fi
26966 
26967     if test "x$new_path" = x; then
26968       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26969 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26970       has_space=`$ECHO "$complete" | $GREP " "`
26971       if test "x$has_space" != x; then
26972         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26973 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26974       fi
26975       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26976     fi
26977   fi
26978 
26979   # Now join together the path and the arguments once again
26980   if test "x$arguments" != xEOL; then
26981     new_complete="$new_path ${arguments% *}"
26982   else
26983     new_complete="$new_path"
26984   fi
26985 
26986   if test "x$complete" != "x$new_complete"; then
26987     MCS="$new_complete"
26988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26989 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26990   fi
26991 
26992   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26993     if test -n "$ac_tool_prefix"; then
26994   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26995 set dummy ${ac_tool_prefix}nm; ac_word=$2
26996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26997 $as_echo_n "checking for $ac_word... " >&6; }
26998 if ${ac_cv_prog_NM+:} false; then :
26999   $as_echo_n "(cached) " >&6
27000 else
27001   if test -n "$NM"; then
27002   ac_cv_prog_NM="$NM" # Let the user override the test.
27003 else
27004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27005 for as_dir in $PATH
27006 do
27007   IFS=$as_save_IFS
27008   test -z "$as_dir" && as_dir=.
27009     for ac_exec_ext in '' $ac_executable_extensions; do
27010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27011     ac_cv_prog_NM="${ac_tool_prefix}nm"
27012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27013     break 2
27014   fi
27015 done
27016   done
27017 IFS=$as_save_IFS
27018 
27019 fi
27020 fi
27021 NM=$ac_cv_prog_NM
27022 if test -n "$NM"; then
27023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
27024 $as_echo "$NM" >&6; }
27025 else
27026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27027 $as_echo "no" >&6; }
27028 fi
27029 
27030 
27031 fi
27032 if test -z "$ac_cv_prog_NM"; then
27033   ac_ct_NM=$NM
27034   # Extract the first word of "nm", so it can be a program name with args.
27035 set dummy nm; ac_word=$2
27036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27037 $as_echo_n "checking for $ac_word... " >&6; }
27038 if ${ac_cv_prog_ac_ct_NM+:} false; then :
27039   $as_echo_n "(cached) " >&6
27040 else
27041   if test -n "$ac_ct_NM"; then
27042   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
27043 else
27044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27045 for as_dir in $PATH
27046 do
27047   IFS=$as_save_IFS
27048   test -z "$as_dir" && as_dir=.
27049     for ac_exec_ext in '' $ac_executable_extensions; do
27050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27051     ac_cv_prog_ac_ct_NM="nm"
27052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27053     break 2
27054   fi
27055 done
27056   done
27057 IFS=$as_save_IFS
27058 
27059 fi
27060 fi
27061 ac_ct_NM=$ac_cv_prog_ac_ct_NM
27062 if test -n "$ac_ct_NM"; then
27063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
27064 $as_echo "$ac_ct_NM" >&6; }
27065 else
27066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27067 $as_echo "no" >&6; }
27068 fi
27069 
27070   if test "x$ac_ct_NM" = x; then
27071     NM=""
27072   else
27073     case $cross_compiling:$ac_tool_warned in
27074 yes:)
27075 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27076 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27077 ac_tool_warned=yes ;;
27078 esac
27079     NM=$ac_ct_NM
27080   fi
27081 else
27082   NM="$ac_cv_prog_NM"
27083 fi
27084 
27085 
27086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27087 
27088   # First separate the path from the arguments. This will split at the first
27089   # space.
27090   complete="$NM"
27091   path="${complete%% *}"
27092   tmp="$complete EOL"
27093   arguments="${tmp#* }"
27094 
27095   # Input might be given as Windows format, start by converting to
27096   # unix format.
27097   new_path=`$CYGPATH -u "$path"`
27098 
27099   # Now try to locate executable using which
27100   new_path=`$WHICH "$new_path" 2> /dev/null`
27101   # bat and cmd files are not always considered executable in cygwin causing which
27102   # to not find them
27103   if test "x$new_path" = x \
27104       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27105       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27106     new_path=`$CYGPATH -u "$path"`
27107   fi
27108   if test "x$new_path" = x; then
27109     # Oops. Which didn't find the executable.
27110     # The splitting of arguments from the executable at a space might have been incorrect,
27111     # since paths with space are more likely in Windows. Give it another try with the whole
27112     # argument.
27113     path="$complete"
27114     arguments="EOL"
27115     new_path=`$CYGPATH -u "$path"`
27116     new_path=`$WHICH "$new_path" 2> /dev/null`
27117     # bat and cmd files are not always considered executable in cygwin causing which
27118     # to not find them
27119     if test "x$new_path" = x \
27120         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27121         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27122       new_path=`$CYGPATH -u "$path"`
27123     fi
27124     if test "x$new_path" = x; then
27125       # It's still not found. Now this is an unrecoverable error.
27126       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27127 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27128       has_space=`$ECHO "$complete" | $GREP " "`
27129       if test "x$has_space" != x; then
27130         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27131 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27132       fi
27133       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27134     fi
27135   fi
27136 
27137   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27138   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27139   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27140   # "foo.exe" is OK but "foo" is an error.
27141   #
27142   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27143   # It is also a way to make sure we got the proper file name for the real test later on.
27144   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27145   if test "x$test_shortpath" = x; then
27146     # Short path failed, file does not exist as specified.
27147     # Try adding .exe or .cmd
27148     if test -f "${new_path}.exe"; then
27149       input_to_shortpath="${new_path}.exe"
27150     elif test -f "${new_path}.cmd"; then
27151       input_to_shortpath="${new_path}.cmd"
27152     else
27153       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
27154 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
27155       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27156 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27157       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27158     fi
27159   else
27160     input_to_shortpath="$new_path"
27161   fi
27162 
27163   # Call helper function which possibly converts this using DOS-style short mode.
27164   # If so, the updated path is stored in $new_path.
27165   new_path="$input_to_shortpath"
27166 
27167   input_path="$input_to_shortpath"
27168   # Check if we need to convert this using DOS-style short mode. If the path
27169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27170   # take no chances and rewrite it.
27171   # Note: m4 eats our [], so we need to use [ and ] instead.
27172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27173   if test "x$has_forbidden_chars" != x; then
27174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27175     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27176     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27177     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27178       # Going to short mode and back again did indeed matter. Since short mode is
27179       # case insensitive, let's make it lowercase to improve readability.
27180       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27181       # Now convert it back to Unix-stile (cygpath)
27182       input_path=`$CYGPATH -u "$shortmode_path"`
27183       new_path="$input_path"
27184     fi
27185   fi
27186 
27187   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27188   if test "x$test_cygdrive_prefix" = x; then
27189     # As a simple fix, exclude /usr/bin since it's not a real path.
27190     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27191       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27192       # a path prefixed by /cygdrive for fixpath to work.
27193       new_path="$CYGWIN_ROOT_PATH$input_path"
27194     fi
27195   fi
27196 
27197   # remove trailing .exe if any
27198   new_path="${new_path/%.exe/}"
27199 
27200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27201 
27202   # First separate the path from the arguments. This will split at the first
27203   # space.
27204   complete="$NM"
27205   path="${complete%% *}"
27206   tmp="$complete EOL"
27207   arguments="${tmp#* }"
27208 
27209   # Input might be given as Windows format, start by converting to
27210   # unix format.
27211   new_path="$path"
27212 
27213   windows_path="$new_path"
27214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27215     unix_path=`$CYGPATH -u "$windows_path"`
27216     new_path="$unix_path"
27217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27219     new_path="$unix_path"
27220   fi
27221 
27222 
27223   # Now try to locate executable using which
27224   new_path=`$WHICH "$new_path" 2> /dev/null`
27225 
27226   if test "x$new_path" = x; then
27227     # Oops. Which didn't find the executable.
27228     # The splitting of arguments from the executable at a space might have been incorrect,
27229     # since paths with space are more likely in Windows. Give it another try with the whole
27230     # argument.
27231     path="$complete"
27232     arguments="EOL"
27233     new_path="$path"
27234 
27235   windows_path="$new_path"
27236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27237     unix_path=`$CYGPATH -u "$windows_path"`
27238     new_path="$unix_path"
27239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27241     new_path="$unix_path"
27242   fi
27243 
27244 
27245     new_path=`$WHICH "$new_path" 2> /dev/null`
27246 
27247     if test "x$new_path" = x; then
27248       # It's still not found. Now this is an unrecoverable error.
27249       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27250 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27251       has_space=`$ECHO "$complete" | $GREP " "`
27252       if test "x$has_space" != x; then
27253         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27254 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27255       fi
27256       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27257     fi
27258   fi
27259 
27260   # Now new_path has a complete unix path to the binary
27261   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27262     # Keep paths in /bin as-is, but remove trailing .exe if any
27263     new_path="${new_path/%.exe/}"
27264     # Do not save /bin paths to all_fixpath_prefixes!
27265   else
27266     # Not in mixed or Windows style, start by that.
27267     new_path=`cmd //c echo $new_path`
27268 
27269   input_path="$new_path"
27270   # Check if we need to convert this using DOS-style short mode. If the path
27271   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27272   # take no chances and rewrite it.
27273   # Note: m4 eats our [], so we need to use [ and ] instead.
27274   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27275   if test "x$has_forbidden_chars" != x; then
27276     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27277     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27278   fi
27279 
27280     # Output is in $new_path
27281 
27282   windows_path="$new_path"
27283   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27284     unix_path=`$CYGPATH -u "$windows_path"`
27285     new_path="$unix_path"
27286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27287     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27288     new_path="$unix_path"
27289   fi
27290 
27291     # remove trailing .exe if any
27292     new_path="${new_path/%.exe/}"
27293 
27294     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27295     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27296   fi
27297 
27298   else
27299     # We're on a posix platform. Hooray! :)
27300     # First separate the path from the arguments. This will split at the first
27301     # space.
27302     complete="$NM"
27303     path="${complete%% *}"
27304     tmp="$complete EOL"
27305     arguments="${tmp#* }"
27306 
27307     # Cannot rely on the command "which" here since it doesn't always work.
27308     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27309     if test -z "$is_absolute_path"; then
27310       # Path to executable is not absolute. Find it.
27311       IFS_save="$IFS"
27312       IFS=:
27313       for p in $PATH; do
27314         if test -f "$p/$path" && test -x "$p/$path"; then
27315           new_path="$p/$path"
27316           break
27317         fi
27318       done
27319       IFS="$IFS_save"
27320     else
27321       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27322 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27323       new_path="$path"
27324     fi
27325 
27326     if test "x$new_path" = x; then
27327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27328 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27329       has_space=`$ECHO "$complete" | $GREP " "`
27330       if test "x$has_space" != x; then
27331         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27332 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27333       fi
27334       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27335     fi
27336   fi
27337 
27338   # Now join together the path and the arguments once again
27339   if test "x$arguments" != xEOL; then
27340     new_complete="$new_path ${arguments% *}"
27341   else
27342     new_complete="$new_path"
27343   fi
27344 
27345   if test "x$complete" != "x$new_complete"; then
27346     NM="$new_complete"
27347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27348 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27349   fi
27350 
27351     GNM="$NM"
27352 
27353     if test -n "$ac_tool_prefix"; then
27354   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27355 set dummy ${ac_tool_prefix}strip; ac_word=$2
27356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27357 $as_echo_n "checking for $ac_word... " >&6; }
27358 if ${ac_cv_prog_STRIP+:} false; then :
27359   $as_echo_n "(cached) " >&6
27360 else
27361   if test -n "$STRIP"; then
27362   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27363 else
27364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27365 for as_dir in $PATH
27366 do
27367   IFS=$as_save_IFS
27368   test -z "$as_dir" && as_dir=.
27369     for ac_exec_ext in '' $ac_executable_extensions; do
27370   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27371     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27372     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27373     break 2
27374   fi
27375 done
27376   done
27377 IFS=$as_save_IFS
27378 
27379 fi
27380 fi
27381 STRIP=$ac_cv_prog_STRIP
27382 if test -n "$STRIP"; then
27383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27384 $as_echo "$STRIP" >&6; }
27385 else
27386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27387 $as_echo "no" >&6; }
27388 fi
27389 
27390 
27391 fi
27392 if test -z "$ac_cv_prog_STRIP"; then
27393   ac_ct_STRIP=$STRIP
27394   # Extract the first word of "strip", so it can be a program name with args.
27395 set dummy strip; ac_word=$2
27396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27397 $as_echo_n "checking for $ac_word... " >&6; }
27398 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
27399   $as_echo_n "(cached) " >&6
27400 else
27401   if test -n "$ac_ct_STRIP"; then
27402   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27403 else
27404 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27405 for as_dir in $PATH
27406 do
27407   IFS=$as_save_IFS
27408   test -z "$as_dir" && as_dir=.
27409     for ac_exec_ext in '' $ac_executable_extensions; do
27410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27411     ac_cv_prog_ac_ct_STRIP="strip"
27412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27413     break 2
27414   fi
27415 done
27416   done
27417 IFS=$as_save_IFS
27418 
27419 fi
27420 fi
27421 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27422 if test -n "$ac_ct_STRIP"; then
27423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27424 $as_echo "$ac_ct_STRIP" >&6; }
27425 else
27426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27427 $as_echo "no" >&6; }
27428 fi
27429 
27430   if test "x$ac_ct_STRIP" = x; then
27431     STRIP=""
27432   else
27433     case $cross_compiling:$ac_tool_warned in
27434 yes:)
27435 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27436 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27437 ac_tool_warned=yes ;;
27438 esac
27439     STRIP=$ac_ct_STRIP
27440   fi
27441 else
27442   STRIP="$ac_cv_prog_STRIP"
27443 fi
27444 
27445 
27446   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447 
27448   # First separate the path from the arguments. This will split at the first
27449   # space.
27450   complete="$STRIP"
27451   path="${complete%% *}"
27452   tmp="$complete EOL"
27453   arguments="${tmp#* }"
27454 
27455   # Input might be given as Windows format, start by converting to
27456   # unix format.
27457   new_path=`$CYGPATH -u "$path"`
27458 
27459   # Now try to locate executable using which
27460   new_path=`$WHICH "$new_path" 2> /dev/null`
27461   # bat and cmd files are not always considered executable in cygwin causing which
27462   # to not find them
27463   if test "x$new_path" = x \
27464       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27465       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27466     new_path=`$CYGPATH -u "$path"`
27467   fi
27468   if test "x$new_path" = x; then
27469     # Oops. Which didn't find the executable.
27470     # The splitting of arguments from the executable at a space might have been incorrect,
27471     # since paths with space are more likely in Windows. Give it another try with the whole
27472     # argument.
27473     path="$complete"
27474     arguments="EOL"
27475     new_path=`$CYGPATH -u "$path"`
27476     new_path=`$WHICH "$new_path" 2> /dev/null`
27477     # bat and cmd files are not always considered executable in cygwin causing which
27478     # to not find them
27479     if test "x$new_path" = x \
27480         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27481         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27482       new_path=`$CYGPATH -u "$path"`
27483     fi
27484     if test "x$new_path" = x; then
27485       # It's still not found. Now this is an unrecoverable error.
27486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27487 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27488       has_space=`$ECHO "$complete" | $GREP " "`
27489       if test "x$has_space" != x; then
27490         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27491 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27492       fi
27493       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27494     fi
27495   fi
27496 
27497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27500   # "foo.exe" is OK but "foo" is an error.
27501   #
27502   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27503   # It is also a way to make sure we got the proper file name for the real test later on.
27504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27505   if test "x$test_shortpath" = x; then
27506     # Short path failed, file does not exist as specified.
27507     # Try adding .exe or .cmd
27508     if test -f "${new_path}.exe"; then
27509       input_to_shortpath="${new_path}.exe"
27510     elif test -f "${new_path}.cmd"; then
27511       input_to_shortpath="${new_path}.cmd"
27512     else
27513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27514 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27515       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27516 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27517       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27518     fi
27519   else
27520     input_to_shortpath="$new_path"
27521   fi
27522 
27523   # Call helper function which possibly converts this using DOS-style short mode.
27524   # If so, the updated path is stored in $new_path.
27525   new_path="$input_to_shortpath"
27526 
27527   input_path="$input_to_shortpath"
27528   # Check if we need to convert this using DOS-style short mode. If the path
27529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27530   # take no chances and rewrite it.
27531   # Note: m4 eats our [], so we need to use [ and ] instead.
27532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27533   if test "x$has_forbidden_chars" != x; then
27534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27535     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27536     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27537     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27538       # Going to short mode and back again did indeed matter. Since short mode is
27539       # case insensitive, let's make it lowercase to improve readability.
27540       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27541       # Now convert it back to Unix-stile (cygpath)
27542       input_path=`$CYGPATH -u "$shortmode_path"`
27543       new_path="$input_path"
27544     fi
27545   fi
27546 
27547   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27548   if test "x$test_cygdrive_prefix" = x; then
27549     # As a simple fix, exclude /usr/bin since it's not a real path.
27550     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27551       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27552       # a path prefixed by /cygdrive for fixpath to work.
27553       new_path="$CYGWIN_ROOT_PATH$input_path"
27554     fi
27555   fi
27556 
27557   # remove trailing .exe if any
27558   new_path="${new_path/%.exe/}"
27559 
27560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27561 
27562   # First separate the path from the arguments. This will split at the first
27563   # space.
27564   complete="$STRIP"
27565   path="${complete%% *}"
27566   tmp="$complete EOL"
27567   arguments="${tmp#* }"
27568 
27569   # Input might be given as Windows format, start by converting to
27570   # unix format.
27571   new_path="$path"
27572 
27573   windows_path="$new_path"
27574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27575     unix_path=`$CYGPATH -u "$windows_path"`
27576     new_path="$unix_path"
27577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27579     new_path="$unix_path"
27580   fi
27581 
27582 
27583   # Now try to locate executable using which
27584   new_path=`$WHICH "$new_path" 2> /dev/null`
27585 
27586   if test "x$new_path" = x; then
27587     # Oops. Which didn't find the executable.
27588     # The splitting of arguments from the executable at a space might have been incorrect,
27589     # since paths with space are more likely in Windows. Give it another try with the whole
27590     # argument.
27591     path="$complete"
27592     arguments="EOL"
27593     new_path="$path"
27594 
27595   windows_path="$new_path"
27596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27597     unix_path=`$CYGPATH -u "$windows_path"`
27598     new_path="$unix_path"
27599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27601     new_path="$unix_path"
27602   fi
27603 
27604 
27605     new_path=`$WHICH "$new_path" 2> /dev/null`
27606 
27607     if test "x$new_path" = x; then
27608       # It's still not found. Now this is an unrecoverable error.
27609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27610 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27611       has_space=`$ECHO "$complete" | $GREP " "`
27612       if test "x$has_space" != x; then
27613         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27614 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27615       fi
27616       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27617     fi
27618   fi
27619 
27620   # Now new_path has a complete unix path to the binary
27621   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27622     # Keep paths in /bin as-is, but remove trailing .exe if any
27623     new_path="${new_path/%.exe/}"
27624     # Do not save /bin paths to all_fixpath_prefixes!
27625   else
27626     # Not in mixed or Windows style, start by that.
27627     new_path=`cmd //c echo $new_path`
27628 
27629   input_path="$new_path"
27630   # Check if we need to convert this using DOS-style short mode. If the path
27631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27632   # take no chances and rewrite it.
27633   # Note: m4 eats our [], so we need to use [ and ] instead.
27634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27635   if test "x$has_forbidden_chars" != x; then
27636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27637     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27638   fi
27639 
27640     # Output is in $new_path
27641 
27642   windows_path="$new_path"
27643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27644     unix_path=`$CYGPATH -u "$windows_path"`
27645     new_path="$unix_path"
27646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27648     new_path="$unix_path"
27649   fi
27650 
27651     # remove trailing .exe if any
27652     new_path="${new_path/%.exe/}"
27653 
27654     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27655     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27656   fi
27657 
27658   else
27659     # We're on a posix platform. Hooray! :)
27660     # First separate the path from the arguments. This will split at the first
27661     # space.
27662     complete="$STRIP"
27663     path="${complete%% *}"
27664     tmp="$complete EOL"
27665     arguments="${tmp#* }"
27666 
27667     # Cannot rely on the command "which" here since it doesn't always work.
27668     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27669     if test -z "$is_absolute_path"; then
27670       # Path to executable is not absolute. Find it.
27671       IFS_save="$IFS"
27672       IFS=:
27673       for p in $PATH; do
27674         if test -f "$p/$path" && test -x "$p/$path"; then
27675           new_path="$p/$path"
27676           break
27677         fi
27678       done
27679       IFS="$IFS_save"
27680     else
27681       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27682 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27683       new_path="$path"
27684     fi
27685 
27686     if test "x$new_path" = x; then
27687       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27688 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27689       has_space=`$ECHO "$complete" | $GREP " "`
27690       if test "x$has_space" != x; then
27691         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27692 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27693       fi
27694       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27695     fi
27696   fi
27697 
27698   # Now join together the path and the arguments once again
27699   if test "x$arguments" != xEOL; then
27700     new_complete="$new_path ${arguments% *}"
27701   else
27702     new_complete="$new_path"
27703   fi
27704 
27705   if test "x$complete" != "x$new_complete"; then
27706     STRIP="$new_complete"
27707     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27708 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27709   fi
27710 
27711   fi
27712 
27713   # objcopy is used for moving debug symbols to separate files when
27714   # full debug symbols are enabled.
27715   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27716     if test -n "$ac_tool_prefix"; then
27717   for ac_prog in gobjcopy objcopy
27718   do
27719     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27720 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27722 $as_echo_n "checking for $ac_word... " >&6; }
27723 if ${ac_cv_prog_OBJCOPY+:} false; then :
27724   $as_echo_n "(cached) " >&6
27725 else
27726   if test -n "$OBJCOPY"; then
27727   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27728 else
27729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27730 for as_dir in $PATH
27731 do
27732   IFS=$as_save_IFS
27733   test -z "$as_dir" && as_dir=.
27734     for ac_exec_ext in '' $ac_executable_extensions; do
27735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27736     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27738     break 2
27739   fi
27740 done
27741   done
27742 IFS=$as_save_IFS
27743 
27744 fi
27745 fi
27746 OBJCOPY=$ac_cv_prog_OBJCOPY
27747 if test -n "$OBJCOPY"; then
27748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27749 $as_echo "$OBJCOPY" >&6; }
27750 else
27751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27752 $as_echo "no" >&6; }
27753 fi
27754 
27755 
27756     test -n "$OBJCOPY" && break
27757   done
27758 fi
27759 if test -z "$OBJCOPY"; then
27760   ac_ct_OBJCOPY=$OBJCOPY
27761   for ac_prog in gobjcopy objcopy
27762 do
27763   # Extract the first word of "$ac_prog", so it can be a program name with args.
27764 set dummy $ac_prog; ac_word=$2
27765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27766 $as_echo_n "checking for $ac_word... " >&6; }
27767 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
27768   $as_echo_n "(cached) " >&6
27769 else
27770   if test -n "$ac_ct_OBJCOPY"; then
27771   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27772 else
27773 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27774 for as_dir in $PATH
27775 do
27776   IFS=$as_save_IFS
27777   test -z "$as_dir" && as_dir=.
27778     for ac_exec_ext in '' $ac_executable_extensions; do
27779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27780     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27782     break 2
27783   fi
27784 done
27785   done
27786 IFS=$as_save_IFS
27787 
27788 fi
27789 fi
27790 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27791 if test -n "$ac_ct_OBJCOPY"; then
27792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27793 $as_echo "$ac_ct_OBJCOPY" >&6; }
27794 else
27795   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27796 $as_echo "no" >&6; }
27797 fi
27798 
27799 
27800   test -n "$ac_ct_OBJCOPY" && break
27801 done
27802 
27803   if test "x$ac_ct_OBJCOPY" = x; then
27804     OBJCOPY=""
27805   else
27806     case $cross_compiling:$ac_tool_warned in
27807 yes:)
27808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27809 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27810 ac_tool_warned=yes ;;
27811 esac
27812     OBJCOPY=$ac_ct_OBJCOPY
27813   fi
27814 fi
27815 
27816     # Only call fixup if objcopy was found.
27817     if test -n "$OBJCOPY"; then
27818 
27819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27820 
27821   # First separate the path from the arguments. This will split at the first
27822   # space.
27823   complete="$OBJCOPY"
27824   path="${complete%% *}"
27825   tmp="$complete EOL"
27826   arguments="${tmp#* }"
27827 
27828   # Input might be given as Windows format, start by converting to
27829   # unix format.
27830   new_path=`$CYGPATH -u "$path"`
27831 
27832   # Now try to locate executable using which
27833   new_path=`$WHICH "$new_path" 2> /dev/null`
27834   # bat and cmd files are not always considered executable in cygwin causing which
27835   # to not find them
27836   if test "x$new_path" = x \
27837       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27838       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27839     new_path=`$CYGPATH -u "$path"`
27840   fi
27841   if test "x$new_path" = x; then
27842     # Oops. Which didn't find the executable.
27843     # The splitting of arguments from the executable at a space might have been incorrect,
27844     # since paths with space are more likely in Windows. Give it another try with the whole
27845     # argument.
27846     path="$complete"
27847     arguments="EOL"
27848     new_path=`$CYGPATH -u "$path"`
27849     new_path=`$WHICH "$new_path" 2> /dev/null`
27850     # bat and cmd files are not always considered executable in cygwin causing which
27851     # to not find them
27852     if test "x$new_path" = x \
27853         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27854         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27855       new_path=`$CYGPATH -u "$path"`
27856     fi
27857     if test "x$new_path" = x; then
27858       # It's still not found. Now this is an unrecoverable error.
27859       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27860 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27861       has_space=`$ECHO "$complete" | $GREP " "`
27862       if test "x$has_space" != x; then
27863         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27864 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27865       fi
27866       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27867     fi
27868   fi
27869 
27870   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27871   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27872   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27873   # "foo.exe" is OK but "foo" is an error.
27874   #
27875   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27876   # It is also a way to make sure we got the proper file name for the real test later on.
27877   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27878   if test "x$test_shortpath" = x; then
27879     # Short path failed, file does not exist as specified.
27880     # Try adding .exe or .cmd
27881     if test -f "${new_path}.exe"; then
27882       input_to_shortpath="${new_path}.exe"
27883     elif test -f "${new_path}.cmd"; then
27884       input_to_shortpath="${new_path}.cmd"
27885     else
27886       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27887 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27888       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27889 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27890       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27891     fi
27892   else
27893     input_to_shortpath="$new_path"
27894   fi
27895 
27896   # Call helper function which possibly converts this using DOS-style short mode.
27897   # If so, the updated path is stored in $new_path.
27898   new_path="$input_to_shortpath"
27899 
27900   input_path="$input_to_shortpath"
27901   # Check if we need to convert this using DOS-style short mode. If the path
27902   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27903   # take no chances and rewrite it.
27904   # Note: m4 eats our [], so we need to use [ and ] instead.
27905   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27906   if test "x$has_forbidden_chars" != x; then
27907     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27908     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27909     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27910     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27911       # Going to short mode and back again did indeed matter. Since short mode is
27912       # case insensitive, let's make it lowercase to improve readability.
27913       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27914       # Now convert it back to Unix-stile (cygpath)
27915       input_path=`$CYGPATH -u "$shortmode_path"`
27916       new_path="$input_path"
27917     fi
27918   fi
27919 
27920   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27921   if test "x$test_cygdrive_prefix" = x; then
27922     # As a simple fix, exclude /usr/bin since it's not a real path.
27923     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27924       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27925       # a path prefixed by /cygdrive for fixpath to work.
27926       new_path="$CYGWIN_ROOT_PATH$input_path"
27927     fi
27928   fi
27929 
27930   # remove trailing .exe if any
27931   new_path="${new_path/%.exe/}"
27932 
27933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27934 
27935   # First separate the path from the arguments. This will split at the first
27936   # space.
27937   complete="$OBJCOPY"
27938   path="${complete%% *}"
27939   tmp="$complete EOL"
27940   arguments="${tmp#* }"
27941 
27942   # Input might be given as Windows format, start by converting to
27943   # unix format.
27944   new_path="$path"
27945 
27946   windows_path="$new_path"
27947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27948     unix_path=`$CYGPATH -u "$windows_path"`
27949     new_path="$unix_path"
27950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27952     new_path="$unix_path"
27953   fi
27954 
27955 
27956   # Now try to locate executable using which
27957   new_path=`$WHICH "$new_path" 2> /dev/null`
27958 
27959   if test "x$new_path" = x; then
27960     # Oops. Which didn't find the executable.
27961     # The splitting of arguments from the executable at a space might have been incorrect,
27962     # since paths with space are more likely in Windows. Give it another try with the whole
27963     # argument.
27964     path="$complete"
27965     arguments="EOL"
27966     new_path="$path"
27967 
27968   windows_path="$new_path"
27969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27970     unix_path=`$CYGPATH -u "$windows_path"`
27971     new_path="$unix_path"
27972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27974     new_path="$unix_path"
27975   fi
27976 
27977 
27978     new_path=`$WHICH "$new_path" 2> /dev/null`
27979 
27980     if test "x$new_path" = x; then
27981       # It's still not found. Now this is an unrecoverable error.
27982       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27983 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27984       has_space=`$ECHO "$complete" | $GREP " "`
27985       if test "x$has_space" != x; then
27986         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27987 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27988       fi
27989       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27990     fi
27991   fi
27992 
27993   # Now new_path has a complete unix path to the binary
27994   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27995     # Keep paths in /bin as-is, but remove trailing .exe if any
27996     new_path="${new_path/%.exe/}"
27997     # Do not save /bin paths to all_fixpath_prefixes!
27998   else
27999     # Not in mixed or Windows style, start by that.
28000     new_path=`cmd //c echo $new_path`
28001 
28002   input_path="$new_path"
28003   # Check if we need to convert this using DOS-style short mode. If the path
28004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28005   # take no chances and rewrite it.
28006   # Note: m4 eats our [], so we need to use [ and ] instead.
28007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28008   if test "x$has_forbidden_chars" != x; then
28009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28010     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28011   fi
28012 
28013     # Output is in $new_path
28014 
28015   windows_path="$new_path"
28016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28017     unix_path=`$CYGPATH -u "$windows_path"`
28018     new_path="$unix_path"
28019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28021     new_path="$unix_path"
28022   fi
28023 
28024     # remove trailing .exe if any
28025     new_path="${new_path/%.exe/}"
28026 
28027     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28028     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28029   fi
28030 
28031   else
28032     # We're on a posix platform. Hooray! :)
28033     # First separate the path from the arguments. This will split at the first
28034     # space.
28035     complete="$OBJCOPY"
28036     path="${complete%% *}"
28037     tmp="$complete EOL"
28038     arguments="${tmp#* }"
28039 
28040     # Cannot rely on the command "which" here since it doesn't always work.
28041     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28042     if test -z "$is_absolute_path"; then
28043       # Path to executable is not absolute. Find it.
28044       IFS_save="$IFS"
28045       IFS=:
28046       for p in $PATH; do
28047         if test -f "$p/$path" && test -x "$p/$path"; then
28048           new_path="$p/$path"
28049           break
28050         fi
28051       done
28052       IFS="$IFS_save"
28053     else
28054       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
28055 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
28056       new_path="$path"
28057     fi
28058 
28059     if test "x$new_path" = x; then
28060       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
28061 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
28062       has_space=`$ECHO "$complete" | $GREP " "`
28063       if test "x$has_space" != x; then
28064         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28065 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28066       fi
28067       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
28068     fi
28069   fi
28070 
28071   # Now join together the path and the arguments once again
28072   if test "x$arguments" != xEOL; then
28073     new_complete="$new_path ${arguments% *}"
28074   else
28075     new_complete="$new_path"
28076   fi
28077 
28078   if test "x$complete" != "x$new_complete"; then
28079     OBJCOPY="$new_complete"
28080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
28081 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
28082   fi
28083 
28084     fi
28085   fi
28086 
28087   if test -n "$ac_tool_prefix"; then
28088   for ac_prog in gobjdump objdump
28089   do
28090     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28091 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28093 $as_echo_n "checking for $ac_word... " >&6; }
28094 if ${ac_cv_prog_OBJDUMP+:} false; then :
28095   $as_echo_n "(cached) " >&6
28096 else
28097   if test -n "$OBJDUMP"; then
28098   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
28099 else
28100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28101 for as_dir in $PATH
28102 do
28103   IFS=$as_save_IFS
28104   test -z "$as_dir" && as_dir=.
28105     for ac_exec_ext in '' $ac_executable_extensions; do
28106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28107     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
28108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28109     break 2
28110   fi
28111 done
28112   done
28113 IFS=$as_save_IFS
28114 
28115 fi
28116 fi
28117 OBJDUMP=$ac_cv_prog_OBJDUMP
28118 if test -n "$OBJDUMP"; then
28119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
28120 $as_echo "$OBJDUMP" >&6; }
28121 else
28122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28123 $as_echo "no" >&6; }
28124 fi
28125 
28126 
28127     test -n "$OBJDUMP" && break
28128   done
28129 fi
28130 if test -z "$OBJDUMP"; then
28131   ac_ct_OBJDUMP=$OBJDUMP
28132   for ac_prog in gobjdump objdump
28133 do
28134   # Extract the first word of "$ac_prog", so it can be a program name with args.
28135 set dummy $ac_prog; ac_word=$2
28136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28137 $as_echo_n "checking for $ac_word... " >&6; }
28138 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
28139   $as_echo_n "(cached) " >&6
28140 else
28141   if test -n "$ac_ct_OBJDUMP"; then
28142   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
28143 else
28144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28145 for as_dir in $PATH
28146 do
28147   IFS=$as_save_IFS
28148   test -z "$as_dir" && as_dir=.
28149     for ac_exec_ext in '' $ac_executable_extensions; do
28150   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28151     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
28152     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28153     break 2
28154   fi
28155 done
28156   done
28157 IFS=$as_save_IFS
28158 
28159 fi
28160 fi
28161 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
28162 if test -n "$ac_ct_OBJDUMP"; then
28163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
28164 $as_echo "$ac_ct_OBJDUMP" >&6; }
28165 else
28166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28167 $as_echo "no" >&6; }
28168 fi
28169 
28170 
28171   test -n "$ac_ct_OBJDUMP" && break
28172 done
28173 
28174   if test "x$ac_ct_OBJDUMP" = x; then
28175     OBJDUMP=""
28176   else
28177     case $cross_compiling:$ac_tool_warned in
28178 yes:)
28179 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28180 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28181 ac_tool_warned=yes ;;
28182 esac
28183     OBJDUMP=$ac_ct_OBJDUMP
28184   fi
28185 fi
28186 
28187   if test "x$OBJDUMP" != x; then
28188     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
28189 
28190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28191 
28192   # First separate the path from the arguments. This will split at the first
28193   # space.
28194   complete="$OBJDUMP"
28195   path="${complete%% *}"
28196   tmp="$complete EOL"
28197   arguments="${tmp#* }"
28198 
28199   # Input might be given as Windows format, start by converting to
28200   # unix format.
28201   new_path=`$CYGPATH -u "$path"`
28202 
28203   # Now try to locate executable using which
28204   new_path=`$WHICH "$new_path" 2> /dev/null`
28205   # bat and cmd files are not always considered executable in cygwin causing which
28206   # to not find them
28207   if test "x$new_path" = x \
28208       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28209       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28210     new_path=`$CYGPATH -u "$path"`
28211   fi
28212   if test "x$new_path" = x; then
28213     # Oops. Which didn't find the executable.
28214     # The splitting of arguments from the executable at a space might have been incorrect,
28215     # since paths with space are more likely in Windows. Give it another try with the whole
28216     # argument.
28217     path="$complete"
28218     arguments="EOL"
28219     new_path=`$CYGPATH -u "$path"`
28220     new_path=`$WHICH "$new_path" 2> /dev/null`
28221     # bat and cmd files are not always considered executable in cygwin causing which
28222     # to not find them
28223     if test "x$new_path" = x \
28224         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28225         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28226       new_path=`$CYGPATH -u "$path"`
28227     fi
28228     if test "x$new_path" = x; then
28229       # It's still not found. Now this is an unrecoverable error.
28230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28231 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28232       has_space=`$ECHO "$complete" | $GREP " "`
28233       if test "x$has_space" != x; then
28234         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28235 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28236       fi
28237       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28238     fi
28239   fi
28240 
28241   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28242   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28243   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28244   # "foo.exe" is OK but "foo" is an error.
28245   #
28246   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28247   # It is also a way to make sure we got the proper file name for the real test later on.
28248   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28249   if test "x$test_shortpath" = x; then
28250     # Short path failed, file does not exist as specified.
28251     # Try adding .exe or .cmd
28252     if test -f "${new_path}.exe"; then
28253       input_to_shortpath="${new_path}.exe"
28254     elif test -f "${new_path}.cmd"; then
28255       input_to_shortpath="${new_path}.cmd"
28256     else
28257       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
28258 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
28259       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28260 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28261       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28262     fi
28263   else
28264     input_to_shortpath="$new_path"
28265   fi
28266 
28267   # Call helper function which possibly converts this using DOS-style short mode.
28268   # If so, the updated path is stored in $new_path.
28269   new_path="$input_to_shortpath"
28270 
28271   input_path="$input_to_shortpath"
28272   # Check if we need to convert this using DOS-style short mode. If the path
28273   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28274   # take no chances and rewrite it.
28275   # Note: m4 eats our [], so we need to use [ and ] instead.
28276   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28277   if test "x$has_forbidden_chars" != x; then
28278     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28279     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28280     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28281     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28282       # Going to short mode and back again did indeed matter. Since short mode is
28283       # case insensitive, let's make it lowercase to improve readability.
28284       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28285       # Now convert it back to Unix-stile (cygpath)
28286       input_path=`$CYGPATH -u "$shortmode_path"`
28287       new_path="$input_path"
28288     fi
28289   fi
28290 
28291   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28292   if test "x$test_cygdrive_prefix" = x; then
28293     # As a simple fix, exclude /usr/bin since it's not a real path.
28294     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28295       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28296       # a path prefixed by /cygdrive for fixpath to work.
28297       new_path="$CYGWIN_ROOT_PATH$input_path"
28298     fi
28299   fi
28300 
28301   # remove trailing .exe if any
28302   new_path="${new_path/%.exe/}"
28303 
28304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28305 
28306   # First separate the path from the arguments. This will split at the first
28307   # space.
28308   complete="$OBJDUMP"
28309   path="${complete%% *}"
28310   tmp="$complete EOL"
28311   arguments="${tmp#* }"
28312 
28313   # Input might be given as Windows format, start by converting to
28314   # unix format.
28315   new_path="$path"
28316 
28317   windows_path="$new_path"
28318   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28319     unix_path=`$CYGPATH -u "$windows_path"`
28320     new_path="$unix_path"
28321   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28322     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28323     new_path="$unix_path"
28324   fi
28325 
28326 
28327   # Now try to locate executable using which
28328   new_path=`$WHICH "$new_path" 2> /dev/null`
28329 
28330   if test "x$new_path" = x; then
28331     # Oops. Which didn't find the executable.
28332     # The splitting of arguments from the executable at a space might have been incorrect,
28333     # since paths with space are more likely in Windows. Give it another try with the whole
28334     # argument.
28335     path="$complete"
28336     arguments="EOL"
28337     new_path="$path"
28338 
28339   windows_path="$new_path"
28340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28341     unix_path=`$CYGPATH -u "$windows_path"`
28342     new_path="$unix_path"
28343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28345     new_path="$unix_path"
28346   fi
28347 
28348 
28349     new_path=`$WHICH "$new_path" 2> /dev/null`
28350 
28351     if test "x$new_path" = x; then
28352       # It's still not found. Now this is an unrecoverable error.
28353       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28354 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28355       has_space=`$ECHO "$complete" | $GREP " "`
28356       if test "x$has_space" != x; then
28357         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28358 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28359       fi
28360       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28361     fi
28362   fi
28363 
28364   # Now new_path has a complete unix path to the binary
28365   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28366     # Keep paths in /bin as-is, but remove trailing .exe if any
28367     new_path="${new_path/%.exe/}"
28368     # Do not save /bin paths to all_fixpath_prefixes!
28369   else
28370     # Not in mixed or Windows style, start by that.
28371     new_path=`cmd //c echo $new_path`
28372 
28373   input_path="$new_path"
28374   # Check if we need to convert this using DOS-style short mode. If the path
28375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28376   # take no chances and rewrite it.
28377   # Note: m4 eats our [], so we need to use [ and ] instead.
28378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28379   if test "x$has_forbidden_chars" != x; then
28380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28381     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28382   fi
28383 
28384     # Output is in $new_path
28385 
28386   windows_path="$new_path"
28387   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388     unix_path=`$CYGPATH -u "$windows_path"`
28389     new_path="$unix_path"
28390   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28391     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28392     new_path="$unix_path"
28393   fi
28394 
28395     # remove trailing .exe if any
28396     new_path="${new_path/%.exe/}"
28397 
28398     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28399     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28400   fi
28401 
28402   else
28403     # We're on a posix platform. Hooray! :)
28404     # First separate the path from the arguments. This will split at the first
28405     # space.
28406     complete="$OBJDUMP"
28407     path="${complete%% *}"
28408     tmp="$complete EOL"
28409     arguments="${tmp#* }"
28410 
28411     # Cannot rely on the command "which" here since it doesn't always work.
28412     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28413     if test -z "$is_absolute_path"; then
28414       # Path to executable is not absolute. Find it.
28415       IFS_save="$IFS"
28416       IFS=:
28417       for p in $PATH; do
28418         if test -f "$p/$path" && test -x "$p/$path"; then
28419           new_path="$p/$path"
28420           break
28421         fi
28422       done
28423       IFS="$IFS_save"
28424     else
28425       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28426 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28427       new_path="$path"
28428     fi
28429 
28430     if test "x$new_path" = x; then
28431       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28432 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28433       has_space=`$ECHO "$complete" | $GREP " "`
28434       if test "x$has_space" != x; then
28435         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28436 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28437       fi
28438       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28439     fi
28440   fi
28441 
28442   # Now join together the path and the arguments once again
28443   if test "x$arguments" != xEOL; then
28444     new_complete="$new_path ${arguments% *}"
28445   else
28446     new_complete="$new_path"
28447   fi
28448 
28449   if test "x$complete" != "x$new_complete"; then
28450     OBJDUMP="$new_complete"
28451     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28452 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28453   fi
28454 
28455   fi
28456 
28457   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28458     # Extract the first word of "lipo", so it can be a program name with args.
28459 set dummy lipo; ac_word=$2
28460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28461 $as_echo_n "checking for $ac_word... " >&6; }
28462 if ${ac_cv_path_LIPO+:} false; then :
28463   $as_echo_n "(cached) " >&6
28464 else
28465   case $LIPO in
28466   [\\/]* | ?:[\\/]*)
28467   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28468   ;;
28469   *)
28470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28471 for as_dir in $PATH
28472 do
28473   IFS=$as_save_IFS
28474   test -z "$as_dir" && as_dir=.
28475     for ac_exec_ext in '' $ac_executable_extensions; do
28476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28477     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28479     break 2
28480   fi
28481 done
28482   done
28483 IFS=$as_save_IFS
28484 
28485   ;;
28486 esac
28487 fi
28488 LIPO=$ac_cv_path_LIPO
28489 if test -n "$LIPO"; then
28490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28491 $as_echo "$LIPO" >&6; }
28492 else
28493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28494 $as_echo "no" >&6; }
28495 fi
28496 
28497 
28498 
28499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28500 
28501   # First separate the path from the arguments. This will split at the first
28502   # space.
28503   complete="$LIPO"
28504   path="${complete%% *}"
28505   tmp="$complete EOL"
28506   arguments="${tmp#* }"
28507 
28508   # Input might be given as Windows format, start by converting to
28509   # unix format.
28510   new_path=`$CYGPATH -u "$path"`
28511 
28512   # Now try to locate executable using which
28513   new_path=`$WHICH "$new_path" 2> /dev/null`
28514   # bat and cmd files are not always considered executable in cygwin causing which
28515   # to not find them
28516   if test "x$new_path" = x \
28517       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28518       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28519     new_path=`$CYGPATH -u "$path"`
28520   fi
28521   if test "x$new_path" = x; then
28522     # Oops. Which didn't find the executable.
28523     # The splitting of arguments from the executable at a space might have been incorrect,
28524     # since paths with space are more likely in Windows. Give it another try with the whole
28525     # argument.
28526     path="$complete"
28527     arguments="EOL"
28528     new_path=`$CYGPATH -u "$path"`
28529     new_path=`$WHICH "$new_path" 2> /dev/null`
28530     # bat and cmd files are not always considered executable in cygwin causing which
28531     # to not find them
28532     if test "x$new_path" = x \
28533         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28534         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28535       new_path=`$CYGPATH -u "$path"`
28536     fi
28537     if test "x$new_path" = x; then
28538       # It's still not found. Now this is an unrecoverable error.
28539       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28540 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28541       has_space=`$ECHO "$complete" | $GREP " "`
28542       if test "x$has_space" != x; then
28543         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28544 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28545       fi
28546       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28547     fi
28548   fi
28549 
28550   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28551   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28552   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28553   # "foo.exe" is OK but "foo" is an error.
28554   #
28555   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28556   # It is also a way to make sure we got the proper file name for the real test later on.
28557   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28558   if test "x$test_shortpath" = x; then
28559     # Short path failed, file does not exist as specified.
28560     # Try adding .exe or .cmd
28561     if test -f "${new_path}.exe"; then
28562       input_to_shortpath="${new_path}.exe"
28563     elif test -f "${new_path}.cmd"; then
28564       input_to_shortpath="${new_path}.cmd"
28565     else
28566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28567 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28568       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28569 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28570       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28571     fi
28572   else
28573     input_to_shortpath="$new_path"
28574   fi
28575 
28576   # Call helper function which possibly converts this using DOS-style short mode.
28577   # If so, the updated path is stored in $new_path.
28578   new_path="$input_to_shortpath"
28579 
28580   input_path="$input_to_shortpath"
28581   # Check if we need to convert this using DOS-style short mode. If the path
28582   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28583   # take no chances and rewrite it.
28584   # Note: m4 eats our [], so we need to use [ and ] instead.
28585   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28586   if test "x$has_forbidden_chars" != x; then
28587     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28588     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28589     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28590     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28591       # Going to short mode and back again did indeed matter. Since short mode is
28592       # case insensitive, let's make it lowercase to improve readability.
28593       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28594       # Now convert it back to Unix-stile (cygpath)
28595       input_path=`$CYGPATH -u "$shortmode_path"`
28596       new_path="$input_path"
28597     fi
28598   fi
28599 
28600   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28601   if test "x$test_cygdrive_prefix" = x; then
28602     # As a simple fix, exclude /usr/bin since it's not a real path.
28603     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28604       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28605       # a path prefixed by /cygdrive for fixpath to work.
28606       new_path="$CYGWIN_ROOT_PATH$input_path"
28607     fi
28608   fi
28609 
28610   # remove trailing .exe if any
28611   new_path="${new_path/%.exe/}"
28612 
28613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28614 
28615   # First separate the path from the arguments. This will split at the first
28616   # space.
28617   complete="$LIPO"
28618   path="${complete%% *}"
28619   tmp="$complete EOL"
28620   arguments="${tmp#* }"
28621 
28622   # Input might be given as Windows format, start by converting to
28623   # unix format.
28624   new_path="$path"
28625 
28626   windows_path="$new_path"
28627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28628     unix_path=`$CYGPATH -u "$windows_path"`
28629     new_path="$unix_path"
28630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28632     new_path="$unix_path"
28633   fi
28634 
28635 
28636   # Now try to locate executable using which
28637   new_path=`$WHICH "$new_path" 2> /dev/null`
28638 
28639   if test "x$new_path" = x; then
28640     # Oops. Which didn't find the executable.
28641     # The splitting of arguments from the executable at a space might have been incorrect,
28642     # since paths with space are more likely in Windows. Give it another try with the whole
28643     # argument.
28644     path="$complete"
28645     arguments="EOL"
28646     new_path="$path"
28647 
28648   windows_path="$new_path"
28649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28650     unix_path=`$CYGPATH -u "$windows_path"`
28651     new_path="$unix_path"
28652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28654     new_path="$unix_path"
28655   fi
28656 
28657 
28658     new_path=`$WHICH "$new_path" 2> /dev/null`
28659 
28660     if test "x$new_path" = x; then
28661       # It's still not found. Now this is an unrecoverable error.
28662       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28663 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28664       has_space=`$ECHO "$complete" | $GREP " "`
28665       if test "x$has_space" != x; then
28666         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28667 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28668       fi
28669       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28670     fi
28671   fi
28672 
28673   # Now new_path has a complete unix path to the binary
28674   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28675     # Keep paths in /bin as-is, but remove trailing .exe if any
28676     new_path="${new_path/%.exe/}"
28677     # Do not save /bin paths to all_fixpath_prefixes!
28678   else
28679     # Not in mixed or Windows style, start by that.
28680     new_path=`cmd //c echo $new_path`
28681 
28682   input_path="$new_path"
28683   # Check if we need to convert this using DOS-style short mode. If the path
28684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28685   # take no chances and rewrite it.
28686   # Note: m4 eats our [], so we need to use [ and ] instead.
28687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28688   if test "x$has_forbidden_chars" != x; then
28689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28690     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28691   fi
28692 
28693     # Output is in $new_path
28694 
28695   windows_path="$new_path"
28696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28697     unix_path=`$CYGPATH -u "$windows_path"`
28698     new_path="$unix_path"
28699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28701     new_path="$unix_path"
28702   fi
28703 
28704     # remove trailing .exe if any
28705     new_path="${new_path/%.exe/}"
28706 
28707     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28708     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28709   fi
28710 
28711   else
28712     # We're on a posix platform. Hooray! :)
28713     # First separate the path from the arguments. This will split at the first
28714     # space.
28715     complete="$LIPO"
28716     path="${complete%% *}"
28717     tmp="$complete EOL"
28718     arguments="${tmp#* }"
28719 
28720     # Cannot rely on the command "which" here since it doesn't always work.
28721     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28722     if test -z "$is_absolute_path"; then
28723       # Path to executable is not absolute. Find it.
28724       IFS_save="$IFS"
28725       IFS=:
28726       for p in $PATH; do
28727         if test -f "$p/$path" && test -x "$p/$path"; then
28728           new_path="$p/$path"
28729           break
28730         fi
28731       done
28732       IFS="$IFS_save"
28733     else
28734       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28735 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28736       new_path="$path"
28737     fi
28738 
28739     if test "x$new_path" = x; then
28740       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28741 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28742       has_space=`$ECHO "$complete" | $GREP " "`
28743       if test "x$has_space" != x; then
28744         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28745 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28746       fi
28747       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28748     fi
28749   fi
28750 
28751   # Now join together the path and the arguments once again
28752   if test "x$arguments" != xEOL; then
28753     new_complete="$new_path ${arguments% *}"
28754   else
28755     new_complete="$new_path"
28756   fi
28757 
28758   if test "x$complete" != "x$new_complete"; then
28759     LIPO="$new_complete"
28760     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28761 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28762   fi
28763 
28764   fi
28765 
28766 
28767 
28768   # Restore old path without tools dir
28769   PATH="$OLD_PATH"
28770 
28771 
28772 # FIXME: Currently we must test this after paths but before flags. Fix!
28773 
28774 # And we can test some aspects on the target using configure macros.
28775 
28776 
28777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28778 $as_echo_n "checking for ANSI C header files... " >&6; }
28779 if ${ac_cv_header_stdc+:} false; then :
28780   $as_echo_n "(cached) " >&6
28781 else
28782   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28783 /* end confdefs.h.  */
28784 #include <stdlib.h>
28785 #include <stdarg.h>
28786 #include <string.h>
28787 #include <float.h>
28788 
28789 int
28790 main ()
28791 {
28792 
28793   ;
28794   return 0;
28795 }
28796 _ACEOF
28797 if ac_fn_cxx_try_compile "$LINENO"; then :
28798   ac_cv_header_stdc=yes
28799 else
28800   ac_cv_header_stdc=no
28801 fi
28802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28803 
28804 if test $ac_cv_header_stdc = yes; then
28805   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28807 /* end confdefs.h.  */
28808 #include <string.h>
28809 
28810 _ACEOF
28811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28812   $EGREP "memchr" >/dev/null 2>&1; then :
28813 
28814 else
28815   ac_cv_header_stdc=no
28816 fi
28817 rm -f conftest*
28818 
28819 fi
28820 
28821 if test $ac_cv_header_stdc = yes; then
28822   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28824 /* end confdefs.h.  */
28825 #include <stdlib.h>
28826 
28827 _ACEOF
28828 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28829   $EGREP "free" >/dev/null 2>&1; then :
28830 
28831 else
28832   ac_cv_header_stdc=no
28833 fi
28834 rm -f conftest*
28835 
28836 fi
28837 
28838 if test $ac_cv_header_stdc = yes; then
28839   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28840   if test "$cross_compiling" = yes; then :
28841   :
28842 else
28843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28844 /* end confdefs.h.  */
28845 #include <ctype.h>
28846 #include <stdlib.h>
28847 #if ((' ' & 0x0FF) == 0x020)
28848 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28849 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28850 #else
28851 # define ISLOWER(c) \
28852                    (('a' <= (c) && (c) <= 'i') \
28853                      || ('j' <= (c) && (c) <= 'r') \
28854                      || ('s' <= (c) && (c) <= 'z'))
28855 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28856 #endif
28857 
28858 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28859 int
28860 main ()
28861 {
28862   int i;
28863   for (i = 0; i < 256; i++)
28864     if (XOR (islower (i), ISLOWER (i))
28865         || toupper (i) != TOUPPER (i))
28866       return 2;
28867   return 0;
28868 }
28869 _ACEOF
28870 if ac_fn_cxx_try_run "$LINENO"; then :
28871 
28872 else
28873   ac_cv_header_stdc=no
28874 fi
28875 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28876   conftest.$ac_objext conftest.beam conftest.$ac_ext
28877 fi
28878 
28879 fi
28880 fi
28881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28882 $as_echo "$ac_cv_header_stdc" >&6; }
28883 if test $ac_cv_header_stdc = yes; then
28884 
28885 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
28886 
28887 fi
28888 
28889 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
28890 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28891                   inttypes.h stdint.h unistd.h
28892 do :
28893   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28894 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28895 "
28896 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28897   cat >>confdefs.h <<_ACEOF
28898 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28899 _ACEOF
28900 
28901 fi
28902 
28903 done
28904 
28905 
28906 
28907   ###############################################################################
28908   #
28909   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28910   # (The JVM can use 32 or 64 bit Java pointers but that decision
28911   # is made at runtime.)
28912   #
28913 
28914   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
28915     # Always specify -m flag on Solaris
28916     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
28917 
28918   # When we add flags to the "official" CFLAGS etc, we need to
28919   # keep track of these additions in ADDED_CFLAGS etc. These
28920   # will later be checked to make sure only controlled additions
28921   # have been made to CFLAGS etc.
28922   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28923   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28924   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28925 
28926   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28927   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28928   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28929 
28930   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28931   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28932   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28933 
28934   elif test "x$COMPILE_TYPE" = xreduced; then
28935     if test "x$OPENJDK_TARGET_OS" != xwindows; then
28936       # Specify -m if running reduced on other Posix platforms
28937 
28938   # When we add flags to the "official" CFLAGS etc, we need to
28939   # keep track of these additions in ADDED_CFLAGS etc. These
28940   # will later be checked to make sure only controlled additions
28941   # have been made to CFLAGS etc.
28942   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28943   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28944   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
28945 
28946   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28947   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28948   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28949 
28950   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28951   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28952   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28953 
28954     fi
28955   fi
28956 
28957   # Make compilation sanity check
28958   for ac_header in stdio.h
28959 do :
28960   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28961 if test "x$ac_cv_header_stdio_h" = xyes; then :
28962   cat >>confdefs.h <<_ACEOF
28963 #define HAVE_STDIO_H 1
28964 _ACEOF
28965 
28966 else
28967 
28968     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28969 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28970     if test "x$COMPILE_TYPE" = xreduced; then
28971       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28972 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28973     elif test "x$COMPILE_TYPE" = xcross; then
28974       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28975 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28976     fi
28977     as_fn_error $? "Cannot continue." "$LINENO" 5
28978 
28979 fi
28980 
28981 done
28982 
28983 
28984   # The cast to long int works around a bug in the HP C Compiler
28985 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28986 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28987 # This bug is HP SR number 8606223364.
28988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28989 $as_echo_n "checking size of int *... " >&6; }
28990 if ${ac_cv_sizeof_int_p+:} false; then :
28991   $as_echo_n "(cached) " >&6
28992 else
28993   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28994 
28995 else
28996   if test "$ac_cv_type_int_p" = yes; then
28997      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28999 as_fn_error 77 "cannot compute sizeof (int *)
29000 See \`config.log' for more details" "$LINENO" 5; }
29001    else
29002      ac_cv_sizeof_int_p=0
29003    fi
29004 fi
29005 
29006 fi
29007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29008 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29009 
29010 
29011 
29012 cat >>confdefs.h <<_ACEOF
29013 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29014 _ACEOF
29015 
29016 
29017 
29018   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
29019   if test "x$ac_cv_sizeof_int_p" = x; then
29020     # The test failed, lets stick to the assumed value.
29021     { $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
29022 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
29023   else
29024     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29025 
29026     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29027       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
29028       # Let's try to implicitely set the compilers target architecture and retry the test
29029       { $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
29030 $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;}
29031       { $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
29032 $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;}
29033 
29034   # When we add flags to the "official" CFLAGS etc, we need to
29035   # keep track of these additions in ADDED_CFLAGS etc. These
29036   # will later be checked to make sure only controlled additions
29037   # have been made to CFLAGS etc.
29038   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29039   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29040   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29041 
29042   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
29043   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
29044   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
29045 
29046   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
29047   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
29048   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
29049 
29050 
29051       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
29052       unset ac_cv_sizeof_int_p
29053       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
29054       cat >>confdefs.h <<_ACEOF
29055 #undef SIZEOF_INT_P
29056 _ACEOF
29057 
29058       # The cast to long int works around a bug in the HP C Compiler
29059 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
29060 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
29061 # This bug is HP SR number 8606223364.
29062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
29063 $as_echo_n "checking size of int *... " >&6; }
29064 if ${ac_cv_sizeof_int_p+:} false; then :
29065   $as_echo_n "(cached) " >&6
29066 else
29067   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
29068 
29069 else
29070   if test "$ac_cv_type_int_p" = yes; then
29071      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29072 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29073 as_fn_error 77 "cannot compute sizeof (int *)
29074 See \`config.log' for more details" "$LINENO" 5; }
29075    else
29076      ac_cv_sizeof_int_p=0
29077    fi
29078 fi
29079 
29080 fi
29081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
29082 $as_echo "$ac_cv_sizeof_int_p" >&6; }
29083 
29084 
29085 
29086 cat >>confdefs.h <<_ACEOF
29087 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
29088 _ACEOF
29089 
29090 
29091 
29092       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
29093 
29094       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
29095         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
29096       fi
29097     fi
29098   fi
29099 
29100   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
29101 $as_echo_n "checking for target address size... " >&6; }
29102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
29103 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
29104 
29105 
29106   ###############################################################################
29107   #
29108   # Is the target little of big endian?
29109   #
29110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
29111 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
29112 if ${ac_cv_c_bigendian+:} false; then :
29113   $as_echo_n "(cached) " >&6
29114 else
29115   ac_cv_c_bigendian=unknown
29116     # See if we're dealing with a universal compiler.
29117     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29118 /* end confdefs.h.  */
29119 #ifndef __APPLE_CC__
29120                not a universal capable compiler
29121              #endif
29122              typedef int dummy;
29123 
29124 _ACEOF
29125 if ac_fn_cxx_try_compile "$LINENO"; then :
29126 
29127         # Check for potential -arch flags.  It is not universal unless
29128         # there are at least two -arch flags with different values.
29129         ac_arch=
29130         ac_prev=
29131         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
29132          if test -n "$ac_prev"; then
29133            case $ac_word in
29134              i?86 | x86_64 | ppc | ppc64)
29135                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
29136                  ac_arch=$ac_word
29137                else
29138                  ac_cv_c_bigendian=universal
29139                  break
29140                fi
29141                ;;
29142            esac
29143            ac_prev=
29144          elif test "x$ac_word" = "x-arch"; then
29145            ac_prev=arch
29146          fi
29147        done
29148 fi
29149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29150     if test $ac_cv_c_bigendian = unknown; then
29151       # See if sys/param.h defines the BYTE_ORDER macro.
29152       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29153 /* end confdefs.h.  */
29154 #include <sys/types.h>
29155              #include <sys/param.h>
29156 
29157 int
29158 main ()
29159 {
29160 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
29161                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
29162                      && LITTLE_ENDIAN)
29163               bogus endian macros
29164              #endif
29165 
29166   ;
29167   return 0;
29168 }
29169 _ACEOF
29170 if ac_fn_cxx_try_compile "$LINENO"; then :
29171   # It does; now see whether it defined to BIG_ENDIAN or not.
29172          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29173 /* end confdefs.h.  */
29174 #include <sys/types.h>
29175                 #include <sys/param.h>
29176 
29177 int
29178 main ()
29179 {
29180 #if BYTE_ORDER != BIG_ENDIAN
29181                  not big endian
29182                 #endif
29183 
29184   ;
29185   return 0;
29186 }
29187 _ACEOF
29188 if ac_fn_cxx_try_compile "$LINENO"; then :
29189   ac_cv_c_bigendian=yes
29190 else
29191   ac_cv_c_bigendian=no
29192 fi
29193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29194 fi
29195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29196     fi
29197     if test $ac_cv_c_bigendian = unknown; then
29198       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
29199       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29200 /* end confdefs.h.  */
29201 #include <limits.h>
29202 
29203 int
29204 main ()
29205 {
29206 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
29207               bogus endian macros
29208              #endif
29209 
29210   ;
29211   return 0;
29212 }
29213 _ACEOF
29214 if ac_fn_cxx_try_compile "$LINENO"; then :
29215   # It does; now see whether it defined to _BIG_ENDIAN or not.
29216          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29217 /* end confdefs.h.  */
29218 #include <limits.h>
29219 
29220 int
29221 main ()
29222 {
29223 #ifndef _BIG_ENDIAN
29224                  not big endian
29225                 #endif
29226 
29227   ;
29228   return 0;
29229 }
29230 _ACEOF
29231 if ac_fn_cxx_try_compile "$LINENO"; then :
29232   ac_cv_c_bigendian=yes
29233 else
29234   ac_cv_c_bigendian=no
29235 fi
29236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29237 fi
29238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29239     fi
29240     if test $ac_cv_c_bigendian = unknown; then
29241       # Compile a test program.
29242       if test "$cross_compiling" = yes; then :
29243   # Try to guess by grepping values from an object file.
29244          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29245 /* end confdefs.h.  */
29246 short int ascii_mm[] =
29247                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
29248                 short int ascii_ii[] =
29249                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
29250                 int use_ascii (int i) {
29251                   return ascii_mm[i] + ascii_ii[i];
29252                 }
29253                 short int ebcdic_ii[] =
29254                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
29255                 short int ebcdic_mm[] =
29256                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
29257                 int use_ebcdic (int i) {
29258                   return ebcdic_mm[i] + ebcdic_ii[i];
29259                 }
29260                 extern int foo;
29261 
29262 int
29263 main ()
29264 {
29265 return use_ascii (foo) == use_ebcdic (foo);
29266   ;
29267   return 0;
29268 }
29269 _ACEOF
29270 if ac_fn_cxx_try_compile "$LINENO"; then :
29271   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
29272               ac_cv_c_bigendian=yes
29273             fi
29274             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
29275               if test "$ac_cv_c_bigendian" = unknown; then
29276                 ac_cv_c_bigendian=no
29277               else
29278                 # finding both strings is unlikely to happen, but who knows?
29279                 ac_cv_c_bigendian=unknown
29280               fi
29281             fi
29282 fi
29283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29284 else
29285   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29286 /* end confdefs.h.  */
29287 $ac_includes_default
29288 int
29289 main ()
29290 {
29291 
29292              /* Are we little or big endian?  From Harbison&Steele.  */
29293              union
29294              {
29295                long int l;
29296                char c[sizeof (long int)];
29297              } u;
29298              u.l = 1;
29299              return u.c[sizeof (long int) - 1] == 1;
29300 
29301   ;
29302   return 0;
29303 }
29304 _ACEOF
29305 if ac_fn_cxx_try_run "$LINENO"; then :
29306   ac_cv_c_bigendian=no
29307 else
29308   ac_cv_c_bigendian=yes
29309 fi
29310 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29311   conftest.$ac_objext conftest.beam conftest.$ac_ext
29312 fi
29313 
29314     fi
29315 fi
29316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
29317 $as_echo "$ac_cv_c_bigendian" >&6; }
29318  case $ac_cv_c_bigendian in #(
29319    yes)
29320      ENDIAN="big";; #(
29321    no)
29322      ENDIAN="little" ;; #(
29323    universal)
29324      ENDIAN="universal_endianness"
29325      ;; #(
29326    *)
29327      ENDIAN="unknown" ;;
29328  esac
29329 
29330 
29331   if test "x$ENDIAN" = xuniversal_endianness; then
29332     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
29333   fi
29334   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
29335     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
29336   fi
29337 
29338 
29339 # Configure flags for the tools
29340 
29341 
29342   ###############################################################################
29343   #
29344   # How to compile shared libraries.
29345   #
29346 
29347   if test "x$GCC" = xyes; then
29348     COMPILER_NAME=gcc
29349     PICFLAG="-fPIC"
29350     LIBRARY_PREFIX=lib
29351     SHARED_LIBRARY='lib$1.so'
29352     STATIC_LIBRARY='lib$1.a'
29353     SHARED_LIBRARY_FLAGS="-shared"
29354     SHARED_LIBRARY_SUFFIX='.so'
29355     STATIC_LIBRARY_SUFFIX='.a'
29356     OBJ_SUFFIX='.o'
29357     EXE_SUFFIX=''
29358     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29359     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29360     C_FLAG_REORDER=''
29361     CXX_FLAG_REORDER=''
29362     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29363     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29364     LD="$CC"
29365     LDEXE="$CC"
29366     LDCXX="$CXX"
29367     LDEXECXX="$CXX"
29368     POST_STRIP_CMD="$STRIP -g"
29369 
29370     # Linking is different on MacOSX
29371     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29372       # Might change in the future to clang.
29373       COMPILER_NAME=gcc
29374       SHARED_LIBRARY='lib$1.dylib'
29375       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29376       SHARED_LIBRARY_SUFFIX='.dylib'
29377       EXE_SUFFIX=''
29378       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29379       SET_SHARED_LIBRARY_MAPFILE=''
29380       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29381       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29382       POST_STRIP_CMD="$STRIP -S"
29383     fi
29384   else
29385     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29386       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29387       COMPILER_NAME=ossc
29388       PICFLAG="-KPIC"
29389       LIBRARY_PREFIX=lib
29390       SHARED_LIBRARY='lib$1.so'
29391       STATIC_LIBRARY='lib$1.a'
29392       SHARED_LIBRARY_FLAGS="-G"
29393       SHARED_LIBRARY_SUFFIX='.so'
29394       STATIC_LIBRARY_SUFFIX='.a'
29395       OBJ_SUFFIX='.o'
29396       EXE_SUFFIX=''
29397       SET_SHARED_LIBRARY_NAME=''
29398       SET_SHARED_LIBRARY_MAPFILE='-M$1'
29399       C_FLAG_REORDER='-xF'
29400       CXX_FLAG_REORDER='-xF'
29401       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29402       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29403       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29404       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29405       CFLAGS_JDKLIB_EXTRA='-xstrconst'
29406       POST_STRIP_CMD="$STRIP -x"
29407       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29408     fi
29409     if test "x$OPENJDK_TARGET_OS" = xaix; then
29410         COMPILER_NAME=xlc
29411         PICFLAG="-qpic=large"
29412         LIBRARY_PREFIX=lib
29413         SHARED_LIBRARY='lib$1.so'
29414         STATIC_LIBRARY='lib$1.a'
29415         SHARED_LIBRARY_FLAGS="-qmkshrobj"
29416         SHARED_LIBRARY_SUFFIX='.so'
29417         STATIC_LIBRARY_SUFFIX='.a'
29418         OBJ_SUFFIX='.o'
29419         EXE_SUFFIX=''
29420         SET_SHARED_LIBRARY_NAME=''
29421         SET_SHARED_LIBRARY_MAPFILE=''
29422         C_FLAG_REORDER=''
29423         CXX_FLAG_REORDER=''
29424         SET_SHARED_LIBRARY_ORIGIN=''
29425         SET_EXECUTABLE_ORIGIN=""
29426         CFLAGS_JDK=""
29427         CXXFLAGS_JDK=""
29428         CFLAGS_JDKLIB_EXTRA=''
29429         POST_STRIP_CMD="$STRIP -X32_64"
29430         POST_MCS_CMD=""
29431     fi
29432     if test "x$OPENJDK_TARGET_OS" = xwindows; then
29433       # If it is not gcc, then assume it is the MS Visual Studio compiler
29434       COMPILER_NAME=cl
29435       PICFLAG=""
29436       LIBRARY_PREFIX=
29437       SHARED_LIBRARY='$1.dll'
29438       STATIC_LIBRARY='$1.lib'
29439       SHARED_LIBRARY_FLAGS="-LD"
29440       SHARED_LIBRARY_SUFFIX='.dll'
29441       STATIC_LIBRARY_SUFFIX='.lib'
29442       OBJ_SUFFIX='.obj'
29443       EXE_SUFFIX='.exe'
29444       SET_SHARED_LIBRARY_NAME=''
29445       SET_SHARED_LIBRARY_MAPFILE=''
29446       SET_SHARED_LIBRARY_ORIGIN=''
29447       SET_EXECUTABLE_ORIGIN=''
29448     fi
29449   fi
29450 
29451 
29452 
29453 
29454 
29455 
29456 
29457 
29458 
29459 
29460 
29461 
29462 
29463 
29464 
29465 
29466 
29467 
29468 
29469   # The (cross) compiler is now configured, we can now test capabilities
29470   # of the target platform.
29471 
29472 
29473 
29474   ###############################################################################
29475   #
29476   # Setup the opt flags for different compilers
29477   # and different operating systems.
29478   #
29479 
29480   #
29481   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
29482   #
29483   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29484     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29485     # While waiting for a better solution, the current workaround is to use -mstackrealign.
29486     CFLAGS="$CFLAGS -mstackrealign"
29487     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29488 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29489     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29490 /* end confdefs.h.  */
29491 int main() { return 0; }
29492 _ACEOF
29493 if ac_fn_cxx_try_link "$LINENO"; then :
29494 
29495           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29496 $as_echo "yes" >&6; }
29497 
29498 else
29499 
29500           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29501 $as_echo "no" >&6; }
29502           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29503 
29504 
29505 fi
29506 rm -f core conftest.err conftest.$ac_objext \
29507     conftest$ac_exeext conftest.$ac_ext
29508   fi
29509 
29510   C_FLAG_DEPS="-MMD -MF"
29511   CXX_FLAG_DEPS="-MMD -MF"
29512 
29513   case $COMPILER_TYPE in
29514     CC )
29515       case $COMPILER_NAME in
29516         gcc )
29517           case $OPENJDK_TARGET_OS in
29518             macosx )
29519               # On MacOSX we optimize for size, something
29520               # we should do for all platforms?
29521               C_O_FLAG_HI="-Os"
29522               C_O_FLAG_NORM="-Os"
29523               C_O_FLAG_NONE=""
29524               ;;
29525             *)
29526               C_O_FLAG_HI="-O3"
29527               C_O_FLAG_NORM="-O2"
29528               C_O_FLAG_NONE="-O0"
29529               ;;
29530           esac
29531           CXX_O_FLAG_HI="$C_O_FLAG_HI"
29532           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29533           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29534           CFLAGS_DEBUG_SYMBOLS="-g"
29535           CXXFLAGS_DEBUG_SYMBOLS="-g"
29536           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29537             CFLAGS_DEBUG_SYMBOLS="-g1"
29538             CXXFLAGS_DEBUG_SYMBOLS="-g1"
29539           fi
29540           ;;
29541         ossc )
29542           #
29543           # Forte has different names for this with their C++ compiler...
29544           #
29545           C_FLAG_DEPS="-xMMD -xMF"
29546           CXX_FLAG_DEPS="-xMMD -xMF"
29547 
29548           # Extra options used with HIGHEST
29549           #
29550           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29551           #          done with care, there are some assumptions below that need to
29552           #          be understood about the use of pointers, and IEEE behavior.
29553           #
29554           # Use non-standard floating point mode (not IEEE 754)
29555           CC_HIGHEST="$CC_HIGHEST -fns"
29556           # Do some simplification of floating point arithmetic (not IEEE 754)
29557           CC_HIGHEST="$CC_HIGHEST -fsimple"
29558           # Use single precision floating point with 'float'
29559           CC_HIGHEST="$CC_HIGHEST -fsingle"
29560           # Assume memory references via basic pointer types do not alias
29561           #   (Source with excessing pointer casting and data access with mixed
29562           #    pointer types are not recommended)
29563           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29564           # Use intrinsic or inline versions for math/std functions
29565           #   (If you expect perfect errno behavior, do not use this)
29566           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29567           # Loop data dependency optimizations (need -xO3 or higher)
29568           CC_HIGHEST="$CC_HIGHEST -xdepend"
29569           # Pointer parameters to functions do not overlap
29570           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29571           #    If you pass in multiple pointers to the same data, do not use this)
29572           CC_HIGHEST="$CC_HIGHEST -xrestrict"
29573           # Inline some library routines
29574           #   (If you expect perfect errno behavior, do not use this)
29575           CC_HIGHEST="$CC_HIGHEST -xlibmil"
29576           # Use optimized math routines
29577           #   (If you expect perfect errno behavior, do not use this)
29578           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29579           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29580 
29581           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29582             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29583             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29584           fi
29585 
29586           case $OPENJDK_TARGET_CPU_ARCH in
29587             x86)
29588               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29589               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29590               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29591               C_O_FLAG_NONE="-xregs=no%frameptr"
29592               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29593               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29594               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29595               CXX_O_FLAG_NONE="-xregs=no%frameptr"
29596               if test "x$OPENJDK_TARGET_CPU" = xx86; then
29597                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29598                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29599               fi
29600               ;;
29601             sparc)
29602               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29603               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29604               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29605               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29606               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29607               C_O_FLAG_NONE=""
29608               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29609               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29610               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29611               CXX_O_FLAG_NONE=""
29612               ;;
29613           esac
29614 
29615           CFLAGS_DEBUG_SYMBOLS="-g -xs"
29616           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29617           ;;
29618         xlc )
29619           C_FLAG_DEPS="-qmakedep=gcc -MF"
29620           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
29621           C_O_FLAG_HIGHEST="-O3"
29622           C_O_FLAG_HI="-O3 -qstrict"
29623           C_O_FLAG_NORM="-O2"
29624           C_O_FLAG_NONE=""
29625           CXX_O_FLAG_HIGHEST="-O3"
29626           CXX_O_FLAG_HI="-O3 -qstrict"
29627           CXX_O_FLAG_NORM="-O2"
29628           CXX_O_FLAG_NONE=""
29629           CFLAGS_DEBUG_SYMBOLS="-g"
29630           CXXFLAGS_DEBUG_SYMBOLS="-g"
29631           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
29632           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29633           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
29634           ;;
29635       esac
29636       ;;
29637     CL )
29638       C_O_FLAG_HIGHEST="-O2"
29639       C_O_FLAG_HI="-O1"
29640       C_O_FLAG_NORM="-O1"
29641       C_O_FLAG_NONE="-Od"
29642       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29643       CXX_O_FLAG_HI="$C_O_FLAG_HI"
29644       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29645       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29646       ;;
29647   esac
29648 
29649   if test -z "$C_O_FLAG_HIGHEST"; then
29650     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29651   fi
29652 
29653   if test -z "$CXX_O_FLAG_HIGHEST"; then
29654     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29655   fi
29656 
29657 
29658 
29659 
29660 
29661 
29662 
29663 
29664 
29665 
29666 
29667 
29668 
29669 
29670   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29671     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29672 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29673   fi
29674 
29675   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29676     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29677 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29678   fi
29679 
29680   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29681     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29682 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29683   fi
29684 
29685 
29686 # Check whether --with-extra-cflags was given.
29687 if test "${with_extra_cflags+set}" = set; then :
29688   withval=$with_extra_cflags;
29689 fi
29690 
29691 
29692 
29693 # Check whether --with-extra-cxxflags was given.
29694 if test "${with_extra_cxxflags+set}" = set; then :
29695   withval=$with_extra_cxxflags;
29696 fi
29697 
29698 
29699 
29700 # Check whether --with-extra-ldflags was given.
29701 if test "${with_extra_ldflags+set}" = set; then :
29702   withval=$with_extra_ldflags;
29703 fi
29704 
29705 
29706   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29707   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29708   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29709 
29710   # Hotspot needs these set in their legacy form
29711   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29712   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29713   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29714 
29715 
29716 
29717 
29718 
29719   ###############################################################################
29720   #
29721   # Now setup the CFLAGS and LDFLAGS for the JDK build.
29722   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29723   #
29724   case $COMPILER_NAME in
29725     gcc )
29726       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29727       -pipe \
29728       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29729       case $OPENJDK_TARGET_CPU_ARCH in
29730         arm )
29731           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29732           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29733           ;;
29734         ppc )
29735           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29736           ;;
29737         * )
29738           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29739           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29740           ;;
29741       esac
29742       ;;
29743     ossc )
29744       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29745       case $OPENJDK_TARGET_CPU_ARCH in
29746         x86 )
29747           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29748           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29749           ;;
29750       esac
29751 
29752       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29753       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29754 
29755       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29756       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29757       ;;
29758     xlc )
29759       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29760       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
29761 
29762       LDFLAGS_JDK="$LDFLAGS_JDK"
29763       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
29764       ;;
29765     cl )
29766       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29767       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29768       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29769       -DWIN32 -DIAL"
29770       case $OPENJDK_TARGET_CPU in
29771         x86 )
29772           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29773           ;;
29774         x86_64 )
29775           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29776           ;;
29777       esac
29778       ;;
29779   esac
29780 
29781   ###############################################################################
29782 
29783   # Adjust flags according to debug level.
29784   case $DEBUG_LEVEL in
29785     fastdebug )
29786       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29787       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29788       C_O_FLAG_HI="$C_O_FLAG_NORM"
29789       C_O_FLAG_NORM="$C_O_FLAG_NORM"
29790       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
29791       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
29792       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29793       ;;
29794     slowdebug )
29795       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
29796       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
29797       C_O_FLAG_HI="$C_O_FLAG_NONE"
29798       C_O_FLAG_NORM="$C_O_FLAG_NONE"
29799       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29800       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29801       JAVAC_FLAGS="$JAVAC_FLAGS -g"
29802       ;;
29803   esac
29804 
29805   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29806 
29807   # The package path is used only on macosx?
29808   PACKAGE_PATH=/opt/local
29809 
29810 
29811   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29812     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29813     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29814     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29815     #   Note: -Dmacro         is the same as    #define macro 1
29816     #         -Dmacro=        is the same as    #define macro
29817     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29818       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29819     else
29820       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29821     fi
29822   else
29823     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29824   fi
29825   if test "x$OPENJDK_TARGET_OS" = xlinux; then
29826     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29827   fi
29828   if test "x$OPENJDK_TARGET_OS" = xwindows; then
29829     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29830   fi
29831   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29832     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29833   fi
29834   if test "x$OPENJDK_TARGET_OS" = xaix; then
29835     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
29836   fi
29837   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29838     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
29839     # Setting these parameters makes it an error to link to macosx APIs that are
29840     # newer than the given OS version and makes the linked binaries compatible even
29841     # if built on a newer version of the OS.
29842     # The expected format is X.Y.Z
29843     MACOSX_VERSION_MIN=10.7.0
29844 
29845     # The macro takes the version with no dots, ex: 1070
29846     # Let the flags variables get resolved in make for easier override on make
29847     # command line.
29848     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29849     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29850   fi
29851   if test "x$OPENJDK_TARGET_OS" = xbsd; then
29852     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29853   fi
29854   if test "x$DEBUG_LEVEL" = xrelease; then
29855     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29856   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29857     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29858   fi
29859   else
29860     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29861   fi
29862 
29863   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29864   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29865 
29866   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29867       -I${JDK_OUTPUTDIR}/include \
29868       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29869       -I${JDK_TOPDIR}/src/share/javavm/export \
29870       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
29871       -I${JDK_TOPDIR}/src/share/native/common \
29872       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29873 
29874   # The shared libraries are compiled using the picflag.
29875   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29876   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29877 
29878   # Executable flags
29879   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29880   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29881 
29882   # Now this is odd. The JDK native libraries have to link against libjvm.so
29883   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29884   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29885   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
29886   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29887   # libraries will link to whatever is in memory. Yuck.
29888   #
29889   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29890   if test "x$COMPILER_NAME" = xcl; then
29891     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29892     if test "x$OPENJDK_TARGET_CPU" = xx86; then
29893       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29894     fi
29895     # TODO: make -debug optional "--disable-full-debug-symbols"
29896     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29897     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29898     LDFLAGS_JDKLIB_SUFFIX=""
29899     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29900       LDFLAGS_STACK_SIZE=1048576
29901     else
29902       LDFLAGS_STACK_SIZE=327680
29903     fi
29904     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29905   else
29906     if test "x$COMPILER_NAME" = xgcc; then
29907       # If this is a --hash-style=gnu system, use --hash-style=both, why?
29908       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29909       if test -n "$HAS_GNU_HASH"; then
29910         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29911       fi
29912       if test "x$OPENJDK_TARGET_OS" = xlinux; then
29913         # And since we now know that the linker is gnu, then add -z defs, to forbid
29914         # undefined symbols in object files.
29915         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29916         if test "x$DEBUG_LEVEL" = "xrelease"; then
29917           # When building release libraries, tell the linker optimize them.
29918           # Should this be supplied to the OSS linker as well?
29919           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29920         fi
29921       fi
29922     fi
29923     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29924         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29925 
29926     # On some platforms (mac) the linker warns about non existing -L dirs.
29927     # Add server first if available. Linking aginst client does not always produce the same results.
29928     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29929     # Default to server for other variants.
29930     if test "x$JVM_VARIANT_SERVER" = xtrue; then
29931       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29932     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29933       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29934     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29935       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29936     else
29937       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29938     fi
29939 
29940     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29941     if test "x$COMPILER_NAME" = xossc; then
29942       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29943     fi
29944 
29945     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29946     if test "x$OPENJDK_TARGET_OS" = xlinux; then
29947       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29948     fi
29949   fi
29950 
29951 
29952 
29953 
29954 
29955 
29956 
29957 
29958 
29959 
29960 
29961 
29962 
29963 
29964 
29965   # Some Zero and Shark settings.
29966   # ZERO_ARCHFLAG tells the compiler which mode to build for
29967   case "${OPENJDK_TARGET_CPU}" in
29968     s390)
29969       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
29970       ;;
29971     *)
29972       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
29973   esac
29974 
29975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29976 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29977   supports=yes
29978 
29979   saved_cflags="$CFLAGS"
29980   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29981   ac_ext=c
29982 ac_cpp='$CPP $CPPFLAGS'
29983 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29984 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29985 ac_compiler_gnu=$ac_cv_c_compiler_gnu
29986 
29987   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29988 /* end confdefs.h.  */
29989 int i;
29990 _ACEOF
29991 if ac_fn_c_try_compile "$LINENO"; then :
29992 
29993 else
29994   supports=no
29995 fi
29996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29997   ac_ext=cpp
29998 ac_cpp='$CXXCPP $CPPFLAGS'
29999 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30000 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30001 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30002 
30003   CFLAGS="$saved_cflags"
30004 
30005   saved_cxxflags="$CXXFLAGS"
30006   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
30007   ac_ext=cpp
30008 ac_cpp='$CXXCPP $CPPFLAGS'
30009 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30010 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30011 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30012 
30013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30014 /* end confdefs.h.  */
30015 int i;
30016 _ACEOF
30017 if ac_fn_cxx_try_compile "$LINENO"; then :
30018 
30019 else
30020   supports=no
30021 fi
30022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30023   ac_ext=cpp
30024 ac_cpp='$CXXCPP $CPPFLAGS'
30025 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30026 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30027 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30028 
30029   CXXFLAGS="$saved_cxxflags"
30030 
30031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30032 $as_echo "$supports" >&6; }
30033   if test "x$supports" = "xyes" ; then
30034     :
30035   else
30036     ZERO_ARCHFLAG=""
30037   fi
30038 
30039 
30040 
30041   # Check that the compiler supports -mX (or -qX on AIX) flags
30042   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
30043 
30044   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
30045 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
30046   supports=yes
30047 
30048   saved_cflags="$CFLAGS"
30049   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30050   ac_ext=c
30051 ac_cpp='$CPP $CPPFLAGS'
30052 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30053 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30054 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30055 
30056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30057 /* end confdefs.h.  */
30058 int i;
30059 _ACEOF
30060 if ac_fn_c_try_compile "$LINENO"; then :
30061 
30062 else
30063   supports=no
30064 fi
30065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30066   ac_ext=cpp
30067 ac_cpp='$CXXCPP $CPPFLAGS'
30068 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30069 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30070 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30071 
30072   CFLAGS="$saved_cflags"
30073 
30074   saved_cxxflags="$CXXFLAGS"
30075   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
30076   ac_ext=cpp
30077 ac_cpp='$CXXCPP $CPPFLAGS'
30078 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30079 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30080 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30081 
30082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30083 /* end confdefs.h.  */
30084 int i;
30085 _ACEOF
30086 if ac_fn_cxx_try_compile "$LINENO"; then :
30087 
30088 else
30089   supports=no
30090 fi
30091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30092   ac_ext=cpp
30093 ac_cpp='$CXXCPP $CPPFLAGS'
30094 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30095 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30096 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30097 
30098   CXXFLAGS="$saved_cxxflags"
30099 
30100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
30101 $as_echo "$supports" >&6; }
30102   if test "x$supports" = "xyes" ; then
30103     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
30104   else
30105     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
30106   fi
30107 
30108 
30109 
30110 
30111   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
30112   USING_BROKEN_SUSE_LD=no
30113   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
30114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
30115 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
30116     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
30117     echo "int main() { }" > main.c
30118     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
30119       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30120 $as_echo "no" >&6; }
30121       USING_BROKEN_SUSE_LD=no
30122     else
30123       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30124 $as_echo "yes" >&6; }
30125       USING_BROKEN_SUSE_LD=yes
30126     fi
30127     rm -rf version-script.map main.c
30128   fi
30129 
30130 
30131 
30132 # Setup debug symbols (need objcopy from the toolchain for that)
30133 
30134   #
30135   # ENABLE_DEBUG_SYMBOLS
30136   # This must be done after the toolchain is setup, since we're looking at objcopy.
30137   #
30138   # Check whether --enable-debug-symbols was given.
30139 if test "${enable_debug_symbols+set}" = set; then :
30140   enableval=$enable_debug_symbols;
30141 fi
30142 
30143 
30144   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
30145 $as_echo_n "checking if we should generate debug symbols... " >&6; }
30146 
30147   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
30148     # explicit enabling of enable-debug-symbols and can't find objcopy
30149     #   this is an error
30150     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
30151   fi
30152 
30153   if test "x$enable_debug_symbols" = "xyes"; then
30154     ENABLE_DEBUG_SYMBOLS=true
30155   elif test "x$enable_debug_symbols" = "xno"; then
30156     ENABLE_DEBUG_SYMBOLS=false
30157   else
30158     # Default is on if objcopy is found
30159     if test "x$OBJCOPY" != x; then
30160       ENABLE_DEBUG_SYMBOLS=true
30161     # MacOS X and Windows don't use objcopy but default is on for those OSes
30162     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
30163       ENABLE_DEBUG_SYMBOLS=true
30164     else
30165       ENABLE_DEBUG_SYMBOLS=false
30166     fi
30167   fi
30168 
30169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
30170 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
30171 
30172   #
30173   # ZIP_DEBUGINFO_FILES
30174   #
30175   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
30176 $as_echo_n "checking if we should zip debug-info files... " >&6; }
30177   # Check whether --enable-zip-debug-info was given.
30178 if test "${enable_zip_debug_info+set}" = set; then :
30179   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
30180 else
30181   enable_zip_debug_info="yes"
30182 fi
30183 
30184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
30185 $as_echo "${enable_zip_debug_info}" >&6; }
30186 
30187   if test "x${enable_zip_debug_info}" = "xno"; then
30188     ZIP_DEBUGINFO_FILES=false
30189   else
30190     ZIP_DEBUGINFO_FILES=true
30191   fi
30192 
30193 
30194 
30195 
30196 
30197 
30198 
30199 ###############################################################################
30200 #
30201 # Check dependencies for external and internal libraries.
30202 #
30203 ###############################################################################
30204 
30205 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
30206 
30207   # When using cygwin or msys, we need a wrapper binary that renames
30208   # /cygdrive/c/ arguments into c:/ arguments and peeks into
30209   # @files and rewrites these too! This wrapper binary is
30210   # called fixpath.
30211   FIXPATH=
30212   if test "x$OPENJDK_BUILD_OS" = xwindows; then
30213     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30214 $as_echo_n "checking if fixpath can be created... " >&6; }
30215     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30216     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30217     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30218       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30219       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30220       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30221       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30222     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30223       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30224       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30225 
30226       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30227       # @ was chosen as separator to minimize risk of other tools messing around with it
30228       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30229       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30230 
30231       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30232     fi
30233     rm -f $OUTPUT_ROOT/fixpath*
30234     cd $OUTPUT_ROOT
30235     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30236     cd $CURDIR
30237 
30238     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30239       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30240 $as_echo "no" >&6; }
30241       cat $OUTPUT_ROOT/fixpath1.log
30242       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30243     fi
30244     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30245 $as_echo "yes" >&6; }
30246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30247 $as_echo_n "checking if fixpath.exe works... " >&6; }
30248     cd $OUTPUT_ROOT
30249     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30250     cd $CURDIR
30251     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30252       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30253 $as_echo "no" >&6; }
30254       cat $OUTPUT_ROOT/fixpath2.log
30255       as_fn_error $? "fixpath did not work!" "$LINENO" 5
30256     fi
30257     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30258 $as_echo "yes" >&6; }
30259     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30260   fi
30261 
30262 
30263 
30264 
30265 
30266 
30267   ###############################################################################
30268   #
30269   # OS specific settings that we never will need to probe.
30270   #
30271   if test "x$OPENJDK_TARGET_OS" = xlinux; then
30272     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
30273 $as_echo_n "checking what is not needed on Linux?... " >&6; }
30274     PULSE_NOT_NEEDED=yes
30275     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
30276 $as_echo "pulse" >&6; }
30277   fi
30278 
30279   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30280     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
30281 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
30282     ALSA_NOT_NEEDED=yes
30283     PULSE_NOT_NEEDED=yes
30284     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30285 $as_echo "alsa pulse" >&6; }
30286   fi
30287 
30288   if test "x$OPENJDK_TARGET_OS" = xaix; then
30289     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
30290 $as_echo_n "checking what is not needed on AIX?... " >&6; }
30291     ALSA_NOT_NEEDED=yes
30292     PULSE_NOT_NEEDED=yes
30293     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
30294 $as_echo "alsa pulse" >&6; }
30295   fi
30296 
30297 
30298   if test "x$OPENJDK_TARGET_OS" = xwindows; then
30299     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
30300 $as_echo_n "checking what is not needed on Windows?... " >&6; }
30301     CUPS_NOT_NEEDED=yes
30302     ALSA_NOT_NEEDED=yes
30303     PULSE_NOT_NEEDED=yes
30304     X11_NOT_NEEDED=yes
30305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
30306 $as_echo "alsa cups pulse x11" >&6; }
30307   fi
30308 
30309   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30310     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
30311 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
30312     ALSA_NOT_NEEDED=yes
30313     PULSE_NOT_NEEDED=yes
30314     X11_NOT_NEEDED=yes
30315     # If the java runtime framework is disabled, then we need X11.
30316     # This will be adjusted below.
30317     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
30318 $as_echo "alsa pulse x11" >&6; }
30319   fi
30320 
30321   if test "x$OPENJDK_TARGET_OS" = xbsd; then
30322     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
30323 $as_echo_n "checking what is not needed on bsd?... " >&6; }
30324     ALSA_NOT_NEEDED=yes
30325     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
30326 $as_echo "alsa" >&6; }
30327   fi
30328 
30329   if test "x$OPENJDK" = "xfalse"; then
30330     FREETYPE_NOT_NEEDED=yes
30331   fi
30332 
30333   if test "x$SUPPORT_HEADFUL" = xno; then
30334     X11_NOT_NEEDED=yes
30335   fi
30336 
30337   ###############################################################################
30338   #
30339   # Check for MacOSX support for OpenJDK.
30340   #
30341 
30342 
30343   # Check whether --enable-macosx-runtime-support was given.
30344 if test "${enable_macosx_runtime_support+set}" = set; then :
30345   enableval=$enable_macosx_runtime_support;
30346 fi
30347 
30348   if test "x$enable_macosx_runtime_support" != x; then
30349     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
30350 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
30351   fi
30352 
30353 
30354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
30355 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
30356   if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
30357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
30358 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
30359   else
30360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30361 $as_echo "no" >&6; }
30362   fi
30363 
30364 
30365 
30366   ###############################################################################
30367   #
30368   # Check for X Windows
30369   #
30370 
30371   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
30372   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
30373   # --x-libraries for the sysroot, if that seems to be correct.
30374   if test "x$SYS_ROOT" != "x/"; then
30375     if test "x$x_includes" = xNONE; then
30376       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
30377         x_includes="$SYS_ROOT/usr/X11R6/include"
30378       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
30379         x_includes="$SYS_ROOT/usr/include"
30380       fi
30381     fi
30382     if test "x$x_libraries" = xNONE; then
30383       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
30384         x_libraries="$SYS_ROOT/usr/X11R6/lib"
30385       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
30386         x_libraries="$SYS_ROOT/usr/lib64"
30387       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
30388         x_libraries="$SYS_ROOT/usr/lib"
30389       fi
30390     fi
30391   fi
30392 
30393   # Now let autoconf do it's magic
30394   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
30395 $as_echo_n "checking for X... " >&6; }
30396 
30397 
30398 # Check whether --with-x was given.
30399 if test "${with_x+set}" = set; then :
30400   withval=$with_x;
30401 fi
30402 
30403 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
30404 if test "x$with_x" = xno; then
30405   # The user explicitly disabled X.
30406   have_x=disabled
30407 else
30408   case $x_includes,$x_libraries in #(
30409     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
30410     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
30411   $as_echo_n "(cached) " >&6
30412 else
30413   # One or both of the vars are not set, and there is no cached value.
30414 ac_x_includes=no ac_x_libraries=no
30415 rm -f -r conftest.dir
30416 if mkdir conftest.dir; then
30417   cd conftest.dir
30418   cat >Imakefile <<'_ACEOF'
30419 incroot:
30420         @echo incroot='${INCROOT}'
30421 usrlibdir:
30422         @echo usrlibdir='${USRLIBDIR}'
30423 libdir:
30424         @echo libdir='${LIBDIR}'
30425 _ACEOF
30426   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
30427     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
30428     for ac_var in incroot usrlibdir libdir; do
30429       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
30430     done
30431     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
30432     for ac_extension in a so sl dylib la dll; do
30433       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
30434          test -f "$ac_im_libdir/libX11.$ac_extension"; then
30435         ac_im_usrlibdir=$ac_im_libdir; break
30436       fi
30437     done
30438     # Screen out bogus values from the imake configuration.  They are
30439     # bogus both because they are the default anyway, and because
30440     # using them would break gcc on systems where it needs fixed includes.
30441     case $ac_im_incroot in
30442         /usr/include) ac_x_includes= ;;
30443         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
30444     esac
30445     case $ac_im_usrlibdir in
30446         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
30447         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
30448     esac
30449   fi
30450   cd ..
30451   rm -f -r conftest.dir
30452 fi
30453 
30454 # Standard set of common directories for X headers.
30455 # Check X11 before X11Rn because it is often a symlink to the current release.
30456 ac_x_header_dirs='
30457 /usr/X11/include
30458 /usr/X11R7/include
30459 /usr/X11R6/include
30460 /usr/X11R5/include
30461 /usr/X11R4/include
30462 
30463 /usr/include/X11
30464 /usr/include/X11R7
30465 /usr/include/X11R6
30466 /usr/include/X11R5
30467 /usr/include/X11R4
30468 
30469 /usr/local/X11/include
30470 /usr/local/X11R7/include
30471 /usr/local/X11R6/include
30472 /usr/local/X11R5/include
30473 /usr/local/X11R4/include
30474 
30475 /usr/local/include/X11
30476 /usr/local/include/X11R7
30477 /usr/local/include/X11R6
30478 /usr/local/include/X11R5
30479 /usr/local/include/X11R4
30480 
30481 /usr/X386/include
30482 /usr/x386/include
30483 /usr/XFree86/include/X11
30484 
30485 /usr/include
30486 /usr/local/include
30487 /usr/unsupported/include
30488 /usr/athena/include
30489 /usr/local/x11r5/include
30490 /usr/lpp/Xamples/include
30491 
30492 /usr/openwin/include
30493 /usr/openwin/share/include'
30494 
30495 if test "$ac_x_includes" = no; then
30496   # Guess where to find include files, by looking for Xlib.h.
30497   # First, try using that file with no special directory specified.
30498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30499 /* end confdefs.h.  */
30500 #include <X11/Xlib.h>
30501 _ACEOF
30502 if ac_fn_cxx_try_cpp "$LINENO"; then :
30503   # We can compile using X headers with no special include directory.
30504 ac_x_includes=
30505 else
30506   for ac_dir in $ac_x_header_dirs; do
30507   if test -r "$ac_dir/X11/Xlib.h"; then
30508     ac_x_includes=$ac_dir
30509     break
30510   fi
30511 done
30512 fi
30513 rm -f conftest.err conftest.i conftest.$ac_ext
30514 fi # $ac_x_includes = no
30515 
30516 if test "$ac_x_libraries" = no; then
30517   # Check for the libraries.
30518   # See if we find them without any special options.
30519   # Don't add to $LIBS permanently.
30520   ac_save_LIBS=$LIBS
30521   LIBS="-lX11 $LIBS"
30522   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30523 /* end confdefs.h.  */
30524 #include <X11/Xlib.h>
30525 int
30526 main ()
30527 {
30528 XrmInitialize ()
30529   ;
30530   return 0;
30531 }
30532 _ACEOF
30533 if ac_fn_cxx_try_link "$LINENO"; then :
30534   LIBS=$ac_save_LIBS
30535 # We can link X programs with no special library path.
30536 ac_x_libraries=
30537 else
30538   LIBS=$ac_save_LIBS
30539 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30540 do
30541   # Don't even attempt the hair of trying to link an X program!
30542   for ac_extension in a so sl dylib la dll; do
30543     if test -r "$ac_dir/libX11.$ac_extension"; then
30544       ac_x_libraries=$ac_dir
30545       break 2
30546     fi
30547   done
30548 done
30549 fi
30550 rm -f core conftest.err conftest.$ac_objext \
30551     conftest$ac_exeext conftest.$ac_ext
30552 fi # $ac_x_libraries = no
30553 
30554 case $ac_x_includes,$ac_x_libraries in #(
30555   no,* | *,no | *\'*)
30556     # Didn't find X, or a directory has "'" in its name.
30557     ac_cv_have_x="have_x=no";; #(
30558   *)
30559     # Record where we found X for the cache.
30560     ac_cv_have_x="have_x=yes\
30561         ac_x_includes='$ac_x_includes'\
30562         ac_x_libraries='$ac_x_libraries'"
30563 esac
30564 fi
30565 ;; #(
30566     *) have_x=yes;;
30567   esac
30568   eval "$ac_cv_have_x"
30569 fi # $with_x != no
30570 
30571 if test "$have_x" != yes; then
30572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30573 $as_echo "$have_x" >&6; }
30574   no_x=yes
30575 else
30576   # If each of the values was on the command line, it overrides each guess.
30577   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30578   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30579   # Update the cache value to reflect the command line values.
30580   ac_cv_have_x="have_x=yes\
30581         ac_x_includes='$x_includes'\
30582         ac_x_libraries='$x_libraries'"
30583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30584 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30585 fi
30586 
30587   if test "$no_x" = yes; then
30588   # Not all programs may use this symbol, but it does not hurt to define it.
30589 
30590 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30591 
30592   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30593 else
30594   if test -n "$x_includes"; then
30595     X_CFLAGS="$X_CFLAGS -I$x_includes"
30596   fi
30597 
30598   # It would also be nice to do this for all -L options, not just this one.
30599   if test -n "$x_libraries"; then
30600     X_LIBS="$X_LIBS -L$x_libraries"
30601     # For Solaris; some versions of Sun CC require a space after -R and
30602     # others require no space.  Words are not sufficient . . . .
30603     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30604 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
30605     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30606     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30607     ac_cxx_werror_flag=yes
30608     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30609 /* end confdefs.h.  */
30610 
30611 int
30612 main ()
30613 {
30614 
30615   ;
30616   return 0;
30617 }
30618 _ACEOF
30619 if ac_fn_cxx_try_link "$LINENO"; then :
30620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30621 $as_echo "no" >&6; }
30622        X_LIBS="$X_LIBS -R$x_libraries"
30623 else
30624   LIBS="$ac_xsave_LIBS -R $x_libraries"
30625        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30626 /* end confdefs.h.  */
30627 
30628 int
30629 main ()
30630 {
30631 
30632   ;
30633   return 0;
30634 }
30635 _ACEOF
30636 if ac_fn_cxx_try_link "$LINENO"; then :
30637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30638 $as_echo "yes" >&6; }
30639           X_LIBS="$X_LIBS -R $x_libraries"
30640 else
30641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30642 $as_echo "neither works" >&6; }
30643 fi
30644 rm -f core conftest.err conftest.$ac_objext \
30645     conftest$ac_exeext conftest.$ac_ext
30646 fi
30647 rm -f core conftest.err conftest.$ac_objext \
30648     conftest$ac_exeext conftest.$ac_ext
30649     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30650     LIBS=$ac_xsave_LIBS
30651   fi
30652 
30653   # Check for system-dependent libraries X programs must link with.
30654   # Do this before checking for the system-independent R6 libraries
30655   # (-lICE), since we may need -lsocket or whatever for X linking.
30656 
30657   if test "$ISC" = yes; then
30658     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30659   else
30660     # Martyn Johnson says this is needed for Ultrix, if the X
30661     # libraries were built with DECnet support.  And Karl Berry says
30662     # the Alpha needs dnet_stub (dnet does not exist).
30663     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30664     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30665 /* end confdefs.h.  */
30666 
30667 /* Override any GCC internal prototype to avoid an error.
30668    Use char because int might match the return type of a GCC
30669    builtin and then its argument prototype would still apply.  */
30670 #ifdef __cplusplus
30671 extern "C"
30672 #endif
30673 char XOpenDisplay ();
30674 int
30675 main ()
30676 {
30677 return XOpenDisplay ();
30678   ;
30679   return 0;
30680 }
30681 _ACEOF
30682 if ac_fn_cxx_try_link "$LINENO"; then :
30683 
30684 else
30685   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30686 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30687 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
30688   $as_echo_n "(cached) " >&6
30689 else
30690   ac_check_lib_save_LIBS=$LIBS
30691 LIBS="-ldnet  $LIBS"
30692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30693 /* end confdefs.h.  */
30694 
30695 /* Override any GCC internal prototype to avoid an error.
30696    Use char because int might match the return type of a GCC
30697    builtin and then its argument prototype would still apply.  */
30698 #ifdef __cplusplus
30699 extern "C"
30700 #endif
30701 char dnet_ntoa ();
30702 int
30703 main ()
30704 {
30705 return dnet_ntoa ();
30706   ;
30707   return 0;
30708 }
30709 _ACEOF
30710 if ac_fn_cxx_try_link "$LINENO"; then :
30711   ac_cv_lib_dnet_dnet_ntoa=yes
30712 else
30713   ac_cv_lib_dnet_dnet_ntoa=no
30714 fi
30715 rm -f core conftest.err conftest.$ac_objext \
30716     conftest$ac_exeext conftest.$ac_ext
30717 LIBS=$ac_check_lib_save_LIBS
30718 fi
30719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30720 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30721 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
30722   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30723 fi
30724 
30725     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30726       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30727 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30728 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
30729   $as_echo_n "(cached) " >&6
30730 else
30731   ac_check_lib_save_LIBS=$LIBS
30732 LIBS="-ldnet_stub  $LIBS"
30733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30734 /* end confdefs.h.  */
30735 
30736 /* Override any GCC internal prototype to avoid an error.
30737    Use char because int might match the return type of a GCC
30738    builtin and then its argument prototype would still apply.  */
30739 #ifdef __cplusplus
30740 extern "C"
30741 #endif
30742 char dnet_ntoa ();
30743 int
30744 main ()
30745 {
30746 return dnet_ntoa ();
30747   ;
30748   return 0;
30749 }
30750 _ACEOF
30751 if ac_fn_cxx_try_link "$LINENO"; then :
30752   ac_cv_lib_dnet_stub_dnet_ntoa=yes
30753 else
30754   ac_cv_lib_dnet_stub_dnet_ntoa=no
30755 fi
30756 rm -f core conftest.err conftest.$ac_objext \
30757     conftest$ac_exeext conftest.$ac_ext
30758 LIBS=$ac_check_lib_save_LIBS
30759 fi
30760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30761 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30762 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
30763   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30764 fi
30765 
30766     fi
30767 fi
30768 rm -f core conftest.err conftest.$ac_objext \
30769     conftest$ac_exeext conftest.$ac_ext
30770     LIBS="$ac_xsave_LIBS"
30771 
30772     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30773     # to get the SysV transport functions.
30774     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30775     # needs -lnsl.
30776     # The nsl library prevents programs from opening the X display
30777     # on Irix 5.2, according to T.E. Dickey.
30778     # The functions gethostbyname, getservbyname, and inet_addr are
30779     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30780     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30781 if test "x$ac_cv_func_gethostbyname" = xyes; then :
30782 
30783 fi
30784 
30785     if test $ac_cv_func_gethostbyname = no; then
30786       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30787 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30788 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
30789   $as_echo_n "(cached) " >&6
30790 else
30791   ac_check_lib_save_LIBS=$LIBS
30792 LIBS="-lnsl  $LIBS"
30793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30794 /* end confdefs.h.  */
30795 
30796 /* Override any GCC internal prototype to avoid an error.
30797    Use char because int might match the return type of a GCC
30798    builtin and then its argument prototype would still apply.  */
30799 #ifdef __cplusplus
30800 extern "C"
30801 #endif
30802 char gethostbyname ();
30803 int
30804 main ()
30805 {
30806 return gethostbyname ();
30807   ;
30808   return 0;
30809 }
30810 _ACEOF
30811 if ac_fn_cxx_try_link "$LINENO"; then :
30812   ac_cv_lib_nsl_gethostbyname=yes
30813 else
30814   ac_cv_lib_nsl_gethostbyname=no
30815 fi
30816 rm -f core conftest.err conftest.$ac_objext \
30817     conftest$ac_exeext conftest.$ac_ext
30818 LIBS=$ac_check_lib_save_LIBS
30819 fi
30820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30821 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30822 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
30823   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30824 fi
30825 
30826       if test $ac_cv_lib_nsl_gethostbyname = no; then
30827         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30828 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30829 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
30830   $as_echo_n "(cached) " >&6
30831 else
30832   ac_check_lib_save_LIBS=$LIBS
30833 LIBS="-lbsd  $LIBS"
30834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30835 /* end confdefs.h.  */
30836 
30837 /* Override any GCC internal prototype to avoid an error.
30838    Use char because int might match the return type of a GCC
30839    builtin and then its argument prototype would still apply.  */
30840 #ifdef __cplusplus
30841 extern "C"
30842 #endif
30843 char gethostbyname ();
30844 int
30845 main ()
30846 {
30847 return gethostbyname ();
30848   ;
30849   return 0;
30850 }
30851 _ACEOF
30852 if ac_fn_cxx_try_link "$LINENO"; then :
30853   ac_cv_lib_bsd_gethostbyname=yes
30854 else
30855   ac_cv_lib_bsd_gethostbyname=no
30856 fi
30857 rm -f core conftest.err conftest.$ac_objext \
30858     conftest$ac_exeext conftest.$ac_ext
30859 LIBS=$ac_check_lib_save_LIBS
30860 fi
30861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30862 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30863 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
30864   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30865 fi
30866 
30867       fi
30868     fi
30869 
30870     # lieder@skyler.mavd.honeywell.com says without -lsocket,
30871     # socket/setsockopt and other routines are undefined under SCO ODT
30872     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30873     # on later versions), says Simon Leinen: it contains gethostby*
30874     # variants that don't use the name server (or something).  -lsocket
30875     # must be given before -lnsl if both are needed.  We assume that
30876     # if connect needs -lnsl, so does gethostbyname.
30877     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30878 if test "x$ac_cv_func_connect" = xyes; then :
30879 
30880 fi
30881 
30882     if test $ac_cv_func_connect = no; then
30883       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30884 $as_echo_n "checking for connect in -lsocket... " >&6; }
30885 if ${ac_cv_lib_socket_connect+:} false; then :
30886   $as_echo_n "(cached) " >&6
30887 else
30888   ac_check_lib_save_LIBS=$LIBS
30889 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30891 /* end confdefs.h.  */
30892 
30893 /* Override any GCC internal prototype to avoid an error.
30894    Use char because int might match the return type of a GCC
30895    builtin and then its argument prototype would still apply.  */
30896 #ifdef __cplusplus
30897 extern "C"
30898 #endif
30899 char connect ();
30900 int
30901 main ()
30902 {
30903 return connect ();
30904   ;
30905   return 0;
30906 }
30907 _ACEOF
30908 if ac_fn_cxx_try_link "$LINENO"; then :
30909   ac_cv_lib_socket_connect=yes
30910 else
30911   ac_cv_lib_socket_connect=no
30912 fi
30913 rm -f core conftest.err conftest.$ac_objext \
30914     conftest$ac_exeext conftest.$ac_ext
30915 LIBS=$ac_check_lib_save_LIBS
30916 fi
30917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30918 $as_echo "$ac_cv_lib_socket_connect" >&6; }
30919 if test "x$ac_cv_lib_socket_connect" = xyes; then :
30920   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30921 fi
30922 
30923     fi
30924 
30925     # Guillermo Gomez says -lposix is necessary on A/UX.
30926     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30927 if test "x$ac_cv_func_remove" = xyes; then :
30928 
30929 fi
30930 
30931     if test $ac_cv_func_remove = no; then
30932       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30933 $as_echo_n "checking for remove in -lposix... " >&6; }
30934 if ${ac_cv_lib_posix_remove+:} false; then :
30935   $as_echo_n "(cached) " >&6
30936 else
30937   ac_check_lib_save_LIBS=$LIBS
30938 LIBS="-lposix  $LIBS"
30939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30940 /* end confdefs.h.  */
30941 
30942 /* Override any GCC internal prototype to avoid an error.
30943    Use char because int might match the return type of a GCC
30944    builtin and then its argument prototype would still apply.  */
30945 #ifdef __cplusplus
30946 extern "C"
30947 #endif
30948 char remove ();
30949 int
30950 main ()
30951 {
30952 return remove ();
30953   ;
30954   return 0;
30955 }
30956 _ACEOF
30957 if ac_fn_cxx_try_link "$LINENO"; then :
30958   ac_cv_lib_posix_remove=yes
30959 else
30960   ac_cv_lib_posix_remove=no
30961 fi
30962 rm -f core conftest.err conftest.$ac_objext \
30963     conftest$ac_exeext conftest.$ac_ext
30964 LIBS=$ac_check_lib_save_LIBS
30965 fi
30966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30967 $as_echo "$ac_cv_lib_posix_remove" >&6; }
30968 if test "x$ac_cv_lib_posix_remove" = xyes; then :
30969   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30970 fi
30971 
30972     fi
30973 
30974     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30975     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30976 if test "x$ac_cv_func_shmat" = xyes; then :
30977 
30978 fi
30979 
30980     if test $ac_cv_func_shmat = no; then
30981       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30982 $as_echo_n "checking for shmat in -lipc... " >&6; }
30983 if ${ac_cv_lib_ipc_shmat+:} false; then :
30984   $as_echo_n "(cached) " >&6
30985 else
30986   ac_check_lib_save_LIBS=$LIBS
30987 LIBS="-lipc  $LIBS"
30988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30989 /* end confdefs.h.  */
30990 
30991 /* Override any GCC internal prototype to avoid an error.
30992    Use char because int might match the return type of a GCC
30993    builtin and then its argument prototype would still apply.  */
30994 #ifdef __cplusplus
30995 extern "C"
30996 #endif
30997 char shmat ();
30998 int
30999 main ()
31000 {
31001 return shmat ();
31002   ;
31003   return 0;
31004 }
31005 _ACEOF
31006 if ac_fn_cxx_try_link "$LINENO"; then :
31007   ac_cv_lib_ipc_shmat=yes
31008 else
31009   ac_cv_lib_ipc_shmat=no
31010 fi
31011 rm -f core conftest.err conftest.$ac_objext \
31012     conftest$ac_exeext conftest.$ac_ext
31013 LIBS=$ac_check_lib_save_LIBS
31014 fi
31015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
31016 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
31017 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
31018   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
31019 fi
31020 
31021     fi
31022   fi
31023 
31024   # Check for libraries that X11R6 Xt/Xaw programs need.
31025   ac_save_LDFLAGS=$LDFLAGS
31026   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
31027   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
31028   # check for ICE first), but we must link in the order -lSM -lICE or
31029   # we get undefined symbols.  So assume we have SM if we have ICE.
31030   # These have to be linked with before -lX11, unlike the other
31031   # libraries we check for below, so use a different variable.
31032   # John Interrante, Karl Berry
31033   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
31034 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
31035 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
31036   $as_echo_n "(cached) " >&6
31037 else
31038   ac_check_lib_save_LIBS=$LIBS
31039 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
31040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31041 /* end confdefs.h.  */
31042 
31043 /* Override any GCC internal prototype to avoid an error.
31044    Use char because int might match the return type of a GCC
31045    builtin and then its argument prototype would still apply.  */
31046 #ifdef __cplusplus
31047 extern "C"
31048 #endif
31049 char IceConnectionNumber ();
31050 int
31051 main ()
31052 {
31053 return IceConnectionNumber ();
31054   ;
31055   return 0;
31056 }
31057 _ACEOF
31058 if ac_fn_cxx_try_link "$LINENO"; then :
31059   ac_cv_lib_ICE_IceConnectionNumber=yes
31060 else
31061   ac_cv_lib_ICE_IceConnectionNumber=no
31062 fi
31063 rm -f core conftest.err conftest.$ac_objext \
31064     conftest$ac_exeext conftest.$ac_ext
31065 LIBS=$ac_check_lib_save_LIBS
31066 fi
31067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
31068 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
31069 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
31070   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
31071 fi
31072 
31073   LDFLAGS=$ac_save_LDFLAGS
31074 
31075 fi
31076 
31077 
31078   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
31079   # this doesn't make sense so we remove it.
31080   if test "x$COMPILE_TYPE" = xcross; then
31081     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
31082   fi
31083 
31084   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
31085 
31086   # Print a helpful message on how to acquire the necessary build dependency.
31087   # x11 is the help tag: freetype, cups, pulse, alsa etc
31088   MISSING_DEPENDENCY=x11
31089 
31090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31091     cygwin_help $MISSING_DEPENDENCY
31092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31093     msys_help $MISSING_DEPENDENCY
31094   else
31095     PKGHANDLER_COMMAND=
31096 
31097     case $PKGHANDLER in
31098       apt-get)
31099         apt_help     $MISSING_DEPENDENCY ;;
31100       yum)
31101         yum_help     $MISSING_DEPENDENCY ;;
31102       port)
31103         port_help    $MISSING_DEPENDENCY ;;
31104       pkgutil)
31105         pkgutil_help $MISSING_DEPENDENCY ;;
31106       pkgadd)
31107         pkgadd_help  $MISSING_DEPENDENCY ;;
31108     esac
31109 
31110     if test "x$PKGHANDLER_COMMAND" != x; then
31111       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31112     fi
31113   fi
31114 
31115     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
31116   fi
31117 
31118   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31119     OPENWIN_HOME="/usr/openwin"
31120   fi
31121 
31122 
31123 
31124   #
31125   # Weird Sol10 something check...TODO change to try compile
31126   #
31127   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
31128     if test "`uname -r`" = "5.10"; then
31129       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
31130         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
31131       fi
31132     fi
31133   fi
31134 
31135   ac_ext=c
31136 ac_cpp='$CPP $CPPFLAGS'
31137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
31140 
31141   OLD_CFLAGS="$CFLAGS"
31142   CFLAGS="$CFLAGS $X_CFLAGS"
31143 
31144   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
31145   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
31146 do :
31147   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31148 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
31149         # include <X11/Xlib.h>
31150         # include <X11/Xutil.h>
31151 
31152 
31153 "
31154 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31155   cat >>confdefs.h <<_ACEOF
31156 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31157 _ACEOF
31158  X11_A_OK=yes
31159 else
31160   X11_A_OK=no; break
31161 fi
31162 
31163 done
31164 
31165 
31166   CFLAGS="$OLD_CFLAGS"
31167   ac_ext=cpp
31168 ac_cpp='$CXXCPP $CPPFLAGS'
31169 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31170 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31171 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31172 
31173 
31174   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
31175 
31176   # Print a helpful message on how to acquire the necessary build dependency.
31177   # x11 is the help tag: freetype, cups, pulse, alsa etc
31178   MISSING_DEPENDENCY=x11
31179 
31180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31181     cygwin_help $MISSING_DEPENDENCY
31182   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31183     msys_help $MISSING_DEPENDENCY
31184   else
31185     PKGHANDLER_COMMAND=
31186 
31187     case $PKGHANDLER in
31188       apt-get)
31189         apt_help     $MISSING_DEPENDENCY ;;
31190       yum)
31191         yum_help     $MISSING_DEPENDENCY ;;
31192       port)
31193         port_help    $MISSING_DEPENDENCY ;;
31194       pkgutil)
31195         pkgutil_help $MISSING_DEPENDENCY ;;
31196       pkgadd)
31197         pkgadd_help  $MISSING_DEPENDENCY ;;
31198     esac
31199 
31200     if test "x$PKGHANDLER_COMMAND" != x; then
31201       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31202     fi
31203   fi
31204 
31205     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
31206   fi
31207 
31208 
31209 
31210 
31211 
31212 
31213   ###############################################################################
31214   #
31215   # The common unix printing system cups is used to print from java.
31216   #
31217 
31218 # Check whether --with-cups was given.
31219 if test "${with_cups+set}" = set; then :
31220   withval=$with_cups;
31221 fi
31222 
31223 
31224 # Check whether --with-cups-include was given.
31225 if test "${with_cups_include+set}" = set; then :
31226   withval=$with_cups_include;
31227 fi
31228 
31229 
31230   if test "x$CUPS_NOT_NEEDED" = xyes; then
31231     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
31232       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
31233 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
31234     fi
31235     CUPS_CFLAGS=
31236   else
31237     CUPS_FOUND=no
31238 
31239     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
31240       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
31241     fi
31242 
31243     if test "x${with_cups}" != x; then
31244       CUPS_CFLAGS="-I${with_cups}/include"
31245       CUPS_FOUND=yes
31246     fi
31247     if test "x${with_cups_include}" != x; then
31248       CUPS_CFLAGS="-I${with_cups_include}"
31249       CUPS_FOUND=yes
31250     fi
31251     if test "x$CUPS_FOUND" = xno; then
31252 
31253 
31254   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31255     # Source the builddeps file again, to make sure it uses the latest variables!
31256     . $builddepsfile
31257     # Look for a target and build machine specific resource!
31258     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31259     if test "x$resource" = x; then
31260       # Ok, lets instead look for a target specific resource
31261       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
31262     fi
31263     if test "x$resource" = x; then
31264       # Ok, lets instead look for a build specific resource
31265       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
31266     fi
31267     if test "x$resource" = x; then
31268       # Ok, lets instead look for a generic resource
31269       # (The cups comes from M4 and not the shell, thus no need for eval here.)
31270       resource=${builddep_cups}
31271     fi
31272     if test "x$resource" != x; then
31273       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
31274 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
31275       # If the resource in the builddeps.conf file is an existing directory,
31276       # for example /java/linux/cups
31277       if test -d ${resource}; then
31278         depdir=${resource}
31279       else
31280 
31281   # cups is for example mymodule
31282   # $resource is for example libs/general/libmymod_1_2_3.zip
31283   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31284   # $with_builddeps_dir is for example /localhome/builddeps
31285   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31286   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31287   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31288   filename=`basename $resource`
31289   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31290   filebase=${filename%%.*}
31291   extension=${filename#*.}
31292   installdir=$with_builddeps_dir/$filebase
31293   if test ! -f $installdir/$filename.unpacked; then
31294     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
31295 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31296     if test ! -d $installdir; then
31297       mkdir -p $installdir
31298     fi
31299     if test ! -d $installdir; then
31300       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31301     fi
31302     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
31303     touch $tmpfile
31304     if test ! -f $tmpfile; then
31305       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31306     fi
31307 
31308   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31309   # $tmpfile is the local file name for the downloaded file.
31310   VALID_TOOL=no
31311   if test "x$BDEPS_FTP" = xwget; then
31312     VALID_TOOL=yes
31313     wget -O $tmpfile $with_builddeps_server/$resource
31314   fi
31315   if test "x$BDEPS_FTP" = xlftp; then
31316     VALID_TOOL=yes
31317     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31318   fi
31319   if test "x$BDEPS_FTP" = xftp; then
31320     VALID_TOOL=yes
31321     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31322     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31323     FTPUSERPWD=${FTPSERVER%%@*}
31324     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31325       FTPUSER=${userpwd%%:*}
31326       FTPPWD=${userpwd#*@}
31327       FTPSERVER=${FTPSERVER#*@}
31328     else
31329       FTPUSER=ftp
31330       FTPPWD=ftp
31331     fi
31332     # the "pass" command does not work on some
31333     # ftp clients (read ftp.exe) but if it works,
31334     # passive mode is better!
31335     ( \
31336         echo "user $FTPUSER $FTPPWD"        ; \
31337         echo "pass"                         ; \
31338         echo "bin"                          ; \
31339         echo "get $FTPPATH $tmpfile"              ; \
31340     ) | ftp -in $FTPSERVER
31341   fi
31342   if test "x$VALID_TOOL" != xyes; then
31343     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31344   fi
31345 
31346     mv $tmpfile $installdir/$filename
31347     if test ! -s $installdir/$filename; then
31348       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31349     fi
31350     case "$extension" in
31351       zip)  echo "Unzipping $installdir/$filename..."
31352         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31353         ;;
31354       tar.gz) echo "Untaring $installdir/$filename..."
31355         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31356         ;;
31357       tgz) echo "Untaring $installdir/$filename..."
31358         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31359         ;;
31360       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31361         ;;
31362     esac
31363   fi
31364   if test -f $installdir/$filename.unpacked; then
31365     depdir=$installdir
31366   fi
31367 
31368       fi
31369       # Source the builddeps file again, because in the previous command, the depdir
31370       # was updated to point at the current build dependency install directory.
31371       . $builddepsfile
31372       # Now extract variables from the builddeps.conf files.
31373       theroot=${builddep_cups_ROOT}
31374       thecflags=${builddep_cups_CFLAGS}
31375       thelibs=${builddep_cups_LIBS}
31376       if test "x$depdir" = x; then
31377         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
31378       fi
31379       CUPS=$depdir
31380       if test "x$theroot" != x; then
31381         CUPS="$theroot"
31382       fi
31383       if test "x$thecflags" != x; then
31384         CUPS_CFLAGS="$thecflags"
31385       fi
31386       if test "x$thelibs" != x; then
31387         CUPS_LIBS="$thelibs"
31388       fi
31389       CUPS_FOUND=yes
31390 
31391     fi
31392 
31393   fi
31394 
31395     fi
31396     if test "x$CUPS_FOUND" = xno; then
31397       # Are the cups headers installed in the default /usr/include location?
31398       for ac_header in cups/cups.h cups/ppd.h
31399 do :
31400   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31401 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31402 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31403   cat >>confdefs.h <<_ACEOF
31404 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31405 _ACEOF
31406 
31407             CUPS_FOUND=yes
31408             CUPS_CFLAGS=
31409             DEFAULT_CUPS=yes
31410 
31411 
31412 fi
31413 
31414 done
31415 
31416     fi
31417     if test "x$CUPS_FOUND" = xno; then
31418       # Getting nervous now? Lets poke around for standard Solaris third-party
31419       # package installation locations.
31420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
31421 $as_echo_n "checking for cups headers... " >&6; }
31422       if test -s /opt/sfw/cups/include/cups/cups.h; then
31423         # An SFW package seems to be installed!
31424         CUPS_FOUND=yes
31425         CUPS_CFLAGS="-I/opt/sfw/cups/include"
31426       elif test -s /opt/csw/include/cups/cups.h; then
31427         # A CSW package seems to be installed!
31428         CUPS_FOUND=yes
31429         CUPS_CFLAGS="-I/opt/csw/include"
31430       fi
31431       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
31432 $as_echo "$CUPS_FOUND" >&6; }
31433     fi
31434     if test "x$CUPS_FOUND" = xno; then
31435 
31436   # Print a helpful message on how to acquire the necessary build dependency.
31437   # cups is the help tag: freetype, cups, pulse, alsa etc
31438   MISSING_DEPENDENCY=cups
31439 
31440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31441     cygwin_help $MISSING_DEPENDENCY
31442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31443     msys_help $MISSING_DEPENDENCY
31444   else
31445     PKGHANDLER_COMMAND=
31446 
31447     case $PKGHANDLER in
31448       apt-get)
31449         apt_help     $MISSING_DEPENDENCY ;;
31450       yum)
31451         yum_help     $MISSING_DEPENDENCY ;;
31452       port)
31453         port_help    $MISSING_DEPENDENCY ;;
31454       pkgutil)
31455         pkgutil_help $MISSING_DEPENDENCY ;;
31456       pkgadd)
31457         pkgadd_help  $MISSING_DEPENDENCY ;;
31458     esac
31459 
31460     if test "x$PKGHANDLER_COMMAND" != x; then
31461       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31462     fi
31463   fi
31464 
31465       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
31466     fi
31467   fi
31468 
31469 
31470 
31471 
31472 
31473 
31474   ###############################################################################
31475   #
31476   # The ubiquitous freetype library is used to render fonts.
31477   #
31478 
31479 # Check whether --with-freetype was given.
31480 if test "${with_freetype+set}" = set; then :
31481   withval=$with_freetype;
31482 fi
31483 
31484 
31485 # Check whether --with-freetype-include was given.
31486 if test "${with_freetype_include+set}" = set; then :
31487   withval=$with_freetype_include;
31488 fi
31489 
31490 
31491 # Check whether --with-freetype-lib was given.
31492 if test "${with_freetype_lib+set}" = set; then :
31493   withval=$with_freetype_lib;
31494 fi
31495 
31496   # Check whether --enable-freetype-bundling was given.
31497 if test "${enable_freetype_bundling+set}" = set; then :
31498   enableval=$enable_freetype_bundling;
31499 fi
31500 
31501 
31502   FREETYPE_CFLAGS=
31503   FREETYPE_LIBS=
31504   FREETYPE_BUNDLE_LIB_PATH=
31505 
31506   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
31507     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31508       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31509 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31510     fi
31511     if test "x$enable_freetype_bundling" != x; then
31512       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
31513 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
31514     fi
31515   else
31516     # freetype is needed to build; go get it!
31517 
31518     BUNDLE_FREETYPE="$enable_freetype_bundling"
31519 
31520     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31521       # User has specified settings
31522 
31523       if test "x$BUNDLE_FREETYPE" = x; then
31524         # If not specified, default is to bundle freetype
31525         BUNDLE_FREETYPE=yes
31526       fi
31527 
31528       if test "x$with_freetype" != x; then
31529         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
31530         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
31531       fi
31532 
31533       # Allow --with-freetype-lib and --with-freetype-include to override
31534       if test "x$with_freetype_include" != x; then
31535         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
31536       fi
31537       if test "x$with_freetype_lib" != x; then
31538         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
31539       fi
31540 
31541       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
31542         # Okay, we got it. Check that it works.
31543 
31544   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31545   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31546   METHOD="--with-freetype"
31547 
31548   # First check if the files exists.
31549   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
31550     # We found an arbitrary include file. That's a good sign.
31551     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
31552 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
31553     FOUND_FREETYPE=yes
31554 
31555     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
31556     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
31557       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
31558 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
31559       FOUND_FREETYPE=no
31560     else
31561       if test "x$OPENJDK_TARGET_OS" = xwindows; then
31562         # On Windows, we will need both .lib and .dll file.
31563         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
31564           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
31565 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
31566           FOUND_FREETYPE=no
31567         fi
31568       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
31569         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
31570         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
31571       fi
31572     fi
31573   fi
31574 
31575   if test "x$FOUND_FREETYPE" = xyes; then
31576 
31577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31578 
31579   # Input might be given as Windows format, start by converting to
31580   # unix format.
31581   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31582   new_path=`$CYGPATH -u "$path"`
31583 
31584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31587   # "foo.exe" is OK but "foo" is an error.
31588   #
31589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31590   # It is also a way to make sure we got the proper file name for the real test later on.
31591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31592   if test "x$test_shortpath" = x; then
31593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31594 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31595     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
31596   fi
31597 
31598   # Call helper function which possibly converts this using DOS-style short mode.
31599   # If so, the updated path is stored in $new_path.
31600 
31601   input_path="$new_path"
31602   # Check if we need to convert this using DOS-style short mode. If the path
31603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31604   # take no chances and rewrite it.
31605   # Note: m4 eats our [], so we need to use [ and ] instead.
31606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31607   if test "x$has_forbidden_chars" != x; then
31608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31612       # Going to short mode and back again did indeed matter. Since short mode is
31613       # case insensitive, let's make it lowercase to improve readability.
31614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31615       # Now convert it back to Unix-stile (cygpath)
31616       input_path=`$CYGPATH -u "$shortmode_path"`
31617       new_path="$input_path"
31618     fi
31619   fi
31620 
31621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31622   if test "x$test_cygdrive_prefix" = x; then
31623     # As a simple fix, exclude /usr/bin since it's not a real path.
31624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31626       # a path prefixed by /cygdrive for fixpath to work.
31627       new_path="$CYGWIN_ROOT_PATH$input_path"
31628     fi
31629   fi
31630 
31631 
31632   if test "x$path" != "x$new_path"; then
31633     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31635 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31636   fi
31637 
31638   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639 
31640   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31641   has_colon=`$ECHO $path | $GREP ^.:`
31642   new_path="$path"
31643   if test "x$has_colon" = x; then
31644     # Not in mixed or Windows style, start by that.
31645     new_path=`cmd //c echo $path`
31646   fi
31647 
31648 
31649   input_path="$new_path"
31650   # Check if we need to convert this using DOS-style short mode. If the path
31651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31652   # take no chances and rewrite it.
31653   # Note: m4 eats our [], so we need to use [ and ] instead.
31654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31655   if test "x$has_forbidden_chars" != x; then
31656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31658   fi
31659 
31660 
31661   windows_path="$new_path"
31662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31663     unix_path=`$CYGPATH -u "$windows_path"`
31664     new_path="$unix_path"
31665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31667     new_path="$unix_path"
31668   fi
31669 
31670   if test "x$path" != "x$new_path"; then
31671     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
31672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
31673 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
31674   fi
31675 
31676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31678 
31679   else
31680     # We're on a posix platform. Hooray! :)
31681     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31682     has_space=`$ECHO "$path" | $GREP " "`
31683     if test "x$has_space" != x; then
31684       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
31685 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
31686       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31687     fi
31688 
31689     # Use eval to expand a potential ~
31690     eval path="$path"
31691     if test ! -f "$path" && test ! -d "$path"; then
31692       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31693     fi
31694 
31695     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
31696   fi
31697 
31698 
31699   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700 
31701   # Input might be given as Windows format, start by converting to
31702   # unix format.
31703   path="$POTENTIAL_FREETYPE_LIB_PATH"
31704   new_path=`$CYGPATH -u "$path"`
31705 
31706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31709   # "foo.exe" is OK but "foo" is an error.
31710   #
31711   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31712   # It is also a way to make sure we got the proper file name for the real test later on.
31713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31714   if test "x$test_shortpath" = x; then
31715     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31716 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31717     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
31718   fi
31719 
31720   # Call helper function which possibly converts this using DOS-style short mode.
31721   # If so, the updated path is stored in $new_path.
31722 
31723   input_path="$new_path"
31724   # Check if we need to convert this using DOS-style short mode. If the path
31725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31726   # take no chances and rewrite it.
31727   # Note: m4 eats our [], so we need to use [ and ] instead.
31728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31729   if test "x$has_forbidden_chars" != x; then
31730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31731     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31732     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31733     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31734       # Going to short mode and back again did indeed matter. Since short mode is
31735       # case insensitive, let's make it lowercase to improve readability.
31736       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31737       # Now convert it back to Unix-stile (cygpath)
31738       input_path=`$CYGPATH -u "$shortmode_path"`
31739       new_path="$input_path"
31740     fi
31741   fi
31742 
31743   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31744   if test "x$test_cygdrive_prefix" = x; then
31745     # As a simple fix, exclude /usr/bin since it's not a real path.
31746     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31747       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31748       # a path prefixed by /cygdrive for fixpath to work.
31749       new_path="$CYGWIN_ROOT_PATH$input_path"
31750     fi
31751   fi
31752 
31753 
31754   if test "x$path" != "x$new_path"; then
31755     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31757 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31758   fi
31759 
31760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31761 
31762   path="$POTENTIAL_FREETYPE_LIB_PATH"
31763   has_colon=`$ECHO $path | $GREP ^.:`
31764   new_path="$path"
31765   if test "x$has_colon" = x; then
31766     # Not in mixed or Windows style, start by that.
31767     new_path=`cmd //c echo $path`
31768   fi
31769 
31770 
31771   input_path="$new_path"
31772   # Check if we need to convert this using DOS-style short mode. If the path
31773   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31774   # take no chances and rewrite it.
31775   # Note: m4 eats our [], so we need to use [ and ] instead.
31776   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31777   if test "x$has_forbidden_chars" != x; then
31778     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31779     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31780   fi
31781 
31782 
31783   windows_path="$new_path"
31784   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31785     unix_path=`$CYGPATH -u "$windows_path"`
31786     new_path="$unix_path"
31787   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31788     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31789     new_path="$unix_path"
31790   fi
31791 
31792   if test "x$path" != "x$new_path"; then
31793     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
31794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
31795 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
31796   fi
31797 
31798   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31799   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31800 
31801   else
31802     # We're on a posix platform. Hooray! :)
31803     path="$POTENTIAL_FREETYPE_LIB_PATH"
31804     has_space=`$ECHO "$path" | $GREP " "`
31805     if test "x$has_space" != x; then
31806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
31807 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
31808       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31809     fi
31810 
31811     # Use eval to expand a potential ~
31812     eval path="$path"
31813     if test ! -f "$path" && test ! -d "$path"; then
31814       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
31815     fi
31816 
31817     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
31818   fi
31819 
31820 
31821     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
31822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
31823 $as_echo_n "checking for freetype includes... " >&6; }
31824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
31825 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
31826     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
31827     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
31828 $as_echo_n "checking for freetype libraries... " >&6; }
31829     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
31830 $as_echo "$FREETYPE_LIB_PATH" >&6; }
31831   fi
31832 
31833         if test "x$FOUND_FREETYPE" != xyes; then
31834           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
31835         fi
31836       else
31837         # User specified only one of lib or include. This is an error.
31838         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
31839           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
31840 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
31841           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31842         else
31843           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
31844 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
31845           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
31846         fi
31847       fi
31848     else
31849       # User did not specify settings, but we need freetype. Try to locate it.
31850 
31851       if test "x$BUNDLE_FREETYPE" = x; then
31852         # If not specified, default is to bundle freetype only on windows
31853         if test "x$OPENJDK_TARGET_OS" = xwindows; then
31854           BUNDLE_FREETYPE=yes
31855         else
31856           BUNDLE_FREETYPE=no
31857         fi
31858       fi
31859 
31860       if test "x$FOUND_FREETYPE" != xyes; then
31861         # Check builddeps
31862 
31863 
31864   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31865     # Source the builddeps file again, to make sure it uses the latest variables!
31866     . $builddepsfile
31867     # Look for a target and build machine specific resource!
31868     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31869     if test "x$resource" = x; then
31870       # Ok, lets instead look for a target specific resource
31871       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31872     fi
31873     if test "x$resource" = x; then
31874       # Ok, lets instead look for a build specific resource
31875       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31876     fi
31877     if test "x$resource" = x; then
31878       # Ok, lets instead look for a generic resource
31879       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31880       resource=${builddep_freetype2}
31881     fi
31882     if test "x$resource" != x; then
31883       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31884 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31885       # If the resource in the builddeps.conf file is an existing directory,
31886       # for example /java/linux/cups
31887       if test -d ${resource}; then
31888         depdir=${resource}
31889       else
31890 
31891   # freetype2 is for example mymodule
31892   # $resource is for example libs/general/libmymod_1_2_3.zip
31893   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31894   # $with_builddeps_dir is for example /localhome/builddeps
31895   # depdir is the name of the variable into which we store the depdir, eg MYMOD
31896   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31897   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31898   filename=`basename $resource`
31899   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31900   filebase=${filename%%.*}
31901   extension=${filename#*.}
31902   installdir=$with_builddeps_dir/$filebase
31903   if test ! -f $installdir/$filename.unpacked; then
31904     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31905 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31906     if test ! -d $installdir; then
31907       mkdir -p $installdir
31908     fi
31909     if test ! -d $installdir; then
31910       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31911     fi
31912     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31913     touch $tmpfile
31914     if test ! -f $tmpfile; then
31915       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31916     fi
31917 
31918   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31919   # $tmpfile is the local file name for the downloaded file.
31920   VALID_TOOL=no
31921   if test "x$BDEPS_FTP" = xwget; then
31922     VALID_TOOL=yes
31923     wget -O $tmpfile $with_builddeps_server/$resource
31924   fi
31925   if test "x$BDEPS_FTP" = xlftp; then
31926     VALID_TOOL=yes
31927     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31928   fi
31929   if test "x$BDEPS_FTP" = xftp; then
31930     VALID_TOOL=yes
31931     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31932     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31933     FTPUSERPWD=${FTPSERVER%%@*}
31934     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31935       FTPUSER=${userpwd%%:*}
31936       FTPPWD=${userpwd#*@}
31937       FTPSERVER=${FTPSERVER#*@}
31938     else
31939       FTPUSER=ftp
31940       FTPPWD=ftp
31941     fi
31942     # the "pass" command does not work on some
31943     # ftp clients (read ftp.exe) but if it works,
31944     # passive mode is better!
31945     ( \
31946         echo "user $FTPUSER $FTPPWD"        ; \
31947         echo "pass"                         ; \
31948         echo "bin"                          ; \
31949         echo "get $FTPPATH $tmpfile"              ; \
31950     ) | ftp -in $FTPSERVER
31951   fi
31952   if test "x$VALID_TOOL" != xyes; then
31953     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31954   fi
31955 
31956     mv $tmpfile $installdir/$filename
31957     if test ! -s $installdir/$filename; then
31958       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31959     fi
31960     case "$extension" in
31961       zip)  echo "Unzipping $installdir/$filename..."
31962         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31963         ;;
31964       tar.gz) echo "Untaring $installdir/$filename..."
31965         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31966         ;;
31967       tgz) echo "Untaring $installdir/$filename..."
31968         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31969         ;;
31970       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31971         ;;
31972     esac
31973   fi
31974   if test -f $installdir/$filename.unpacked; then
31975     depdir=$installdir
31976   fi
31977 
31978       fi
31979       # Source the builddeps file again, because in the previous command, the depdir
31980       # was updated to point at the current build dependency install directory.
31981       . $builddepsfile
31982       # Now extract variables from the builddeps.conf files.
31983       theroot=${builddep_freetype2_ROOT}
31984       thecflags=${builddep_freetype2_CFLAGS}
31985       thelibs=${builddep_freetype2_LIBS}
31986       if test "x$depdir" = x; then
31987         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31988       fi
31989       FREETYPE=$depdir
31990       if test "x$theroot" != x; then
31991         FREETYPE="$theroot"
31992       fi
31993       if test "x$thecflags" != x; then
31994         FREETYPE_CFLAGS="$thecflags"
31995       fi
31996       if test "x$thelibs" != x; then
31997         FREETYPE_LIBS="$thelibs"
31998       fi
31999       FOUND_FREETYPE=yes
32000       else FOUND_FREETYPE=no
32001 
32002     fi
32003     else FOUND_FREETYPE=no
32004 
32005   fi
32006 
32007         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32008         if test "x$FOUND_FREETYPE" = xyes; then
32009           if test "x$BUNDLE_FREETYPE" = xyes; then
32010             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
32011 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
32012             FOUND_FREETYPE=no
32013           else
32014             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32015 $as_echo_n "checking for freetype... " >&6; }
32016             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
32017 $as_echo "yes (using builddeps)" >&6; }
32018           fi
32019         fi
32020       fi
32021 
32022       if test "x$FOUND_FREETYPE" != xyes; then
32023         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
32024         if test "x$PKG_CONFIG" != x; then
32025 
32026 pkg_failed=no
32027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
32028 $as_echo_n "checking for FREETYPE... " >&6; }
32029 
32030 if test -n "$FREETYPE_CFLAGS"; then
32031     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
32032  elif test -n "$PKG_CONFIG"; then
32033     if test -n "$PKG_CONFIG" && \
32034     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32035   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32036   ac_status=$?
32037   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32038   test $ac_status = 0; }; then
32039   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
32040 else
32041   pkg_failed=yes
32042 fi
32043  else
32044     pkg_failed=untried
32045 fi
32046 if test -n "$FREETYPE_LIBS"; then
32047     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
32048  elif test -n "$PKG_CONFIG"; then
32049     if test -n "$PKG_CONFIG" && \
32050     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
32051   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
32052   ac_status=$?
32053   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32054   test $ac_status = 0; }; then
32055   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
32056 else
32057   pkg_failed=yes
32058 fi
32059  else
32060     pkg_failed=untried
32061 fi
32062 
32063 
32064 
32065 if test $pkg_failed = yes; then
32066 
32067 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32068         _pkg_short_errors_supported=yes
32069 else
32070         _pkg_short_errors_supported=no
32071 fi
32072         if test $_pkg_short_errors_supported = yes; then
32073                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
32074         else
32075                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
32076         fi
32077         # Put the nasty error message in config.log where it belongs
32078         echo "$FREETYPE_PKG_ERRORS" >&5
32079 
32080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32081 $as_echo "no" >&6; }
32082                 FOUND_FREETYPE=no
32083 elif test $pkg_failed = untried; then
32084         FOUND_FREETYPE=no
32085 else
32086         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
32087         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
32088         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32089 $as_echo "yes" >&6; }
32090         FOUND_FREETYPE=yes
32091 fi
32092           if test "x$FOUND_FREETYPE" = xyes; then
32093             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
32094             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
32095             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
32096             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
32097               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
32098             fi
32099             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
32100             if test "x$BUNDLE_FREETYPE" = xyes; then
32101               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
32102 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
32103               FOUND_FREETYPE=no
32104             else
32105               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
32106 $as_echo_n "checking for freetype... " >&6; }
32107               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
32108 $as_echo "yes (using pkg-config)" >&6; }
32109             fi
32110           fi
32111         fi
32112       fi
32113 
32114       if test "x$FOUND_FREETYPE" != xyes; then
32115         # Check in well-known locations
32116         if test "x$OPENJDK_TARGET_OS" = xwindows; then
32117           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
32118 
32119   windows_path="$FREETYPE_BASE_DIR"
32120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32121     unix_path=`$CYGPATH -u "$windows_path"`
32122     FREETYPE_BASE_DIR="$unix_path"
32123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32125     FREETYPE_BASE_DIR="$unix_path"
32126   fi
32127 
32128 
32129   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32130   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32131   METHOD="well-known location"
32132 
32133   # First check if the files exists.
32134   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32135     # We found an arbitrary include file. That's a good sign.
32136     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32137 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32138     FOUND_FREETYPE=yes
32139 
32140     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32141     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32142       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32143 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32144       FOUND_FREETYPE=no
32145     else
32146       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32147         # On Windows, we will need both .lib and .dll file.
32148         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32149           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32150 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32151           FOUND_FREETYPE=no
32152         fi
32153       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
32154         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32155         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32156       fi
32157     fi
32158   fi
32159 
32160   if test "x$FOUND_FREETYPE" = xyes; then
32161 
32162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32163 
32164   # Input might be given as Windows format, start by converting to
32165   # unix format.
32166   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32167   new_path=`$CYGPATH -u "$path"`
32168 
32169   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32170   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32171   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32172   # "foo.exe" is OK but "foo" is an error.
32173   #
32174   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32175   # It is also a way to make sure we got the proper file name for the real test later on.
32176   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32177   if test "x$test_shortpath" = x; then
32178     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32179 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32180     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32181   fi
32182 
32183   # Call helper function which possibly converts this using DOS-style short mode.
32184   # If so, the updated path is stored in $new_path.
32185 
32186   input_path="$new_path"
32187   # Check if we need to convert this using DOS-style short mode. If the path
32188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32189   # take no chances and rewrite it.
32190   # Note: m4 eats our [], so we need to use [ and ] instead.
32191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32192   if test "x$has_forbidden_chars" != x; then
32193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32194     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32195     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32196     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32197       # Going to short mode and back again did indeed matter. Since short mode is
32198       # case insensitive, let's make it lowercase to improve readability.
32199       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32200       # Now convert it back to Unix-stile (cygpath)
32201       input_path=`$CYGPATH -u "$shortmode_path"`
32202       new_path="$input_path"
32203     fi
32204   fi
32205 
32206   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32207   if test "x$test_cygdrive_prefix" = x; then
32208     # As a simple fix, exclude /usr/bin since it's not a real path.
32209     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32210       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32211       # a path prefixed by /cygdrive for fixpath to work.
32212       new_path="$CYGWIN_ROOT_PATH$input_path"
32213     fi
32214   fi
32215 
32216 
32217   if test "x$path" != "x$new_path"; then
32218     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32219     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32220 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32221   fi
32222 
32223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32224 
32225   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32226   has_colon=`$ECHO $path | $GREP ^.:`
32227   new_path="$path"
32228   if test "x$has_colon" = x; then
32229     # Not in mixed or Windows style, start by that.
32230     new_path=`cmd //c echo $path`
32231   fi
32232 
32233 
32234   input_path="$new_path"
32235   # Check if we need to convert this using DOS-style short mode. If the path
32236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32237   # take no chances and rewrite it.
32238   # Note: m4 eats our [], so we need to use [ and ] instead.
32239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32240   if test "x$has_forbidden_chars" != x; then
32241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32242     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32243   fi
32244 
32245 
32246   windows_path="$new_path"
32247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32248     unix_path=`$CYGPATH -u "$windows_path"`
32249     new_path="$unix_path"
32250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32252     new_path="$unix_path"
32253   fi
32254 
32255   if test "x$path" != "x$new_path"; then
32256     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32257     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32258 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32259   fi
32260 
32261   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32262   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32263 
32264   else
32265     # We're on a posix platform. Hooray! :)
32266     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32267     has_space=`$ECHO "$path" | $GREP " "`
32268     if test "x$has_space" != x; then
32269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32270 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32271       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32272     fi
32273 
32274     # Use eval to expand a potential ~
32275     eval path="$path"
32276     if test ! -f "$path" && test ! -d "$path"; then
32277       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32278     fi
32279 
32280     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32281   fi
32282 
32283 
32284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32285 
32286   # Input might be given as Windows format, start by converting to
32287   # unix format.
32288   path="$POTENTIAL_FREETYPE_LIB_PATH"
32289   new_path=`$CYGPATH -u "$path"`
32290 
32291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32294   # "foo.exe" is OK but "foo" is an error.
32295   #
32296   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32297   # It is also a way to make sure we got the proper file name for the real test later on.
32298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32299   if test "x$test_shortpath" = x; then
32300     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32301 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32302     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32303   fi
32304 
32305   # Call helper function which possibly converts this using DOS-style short mode.
32306   # If so, the updated path is stored in $new_path.
32307 
32308   input_path="$new_path"
32309   # Check if we need to convert this using DOS-style short mode. If the path
32310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32311   # take no chances and rewrite it.
32312   # Note: m4 eats our [], so we need to use [ and ] instead.
32313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32314   if test "x$has_forbidden_chars" != x; then
32315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32316     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32317     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32318     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32319       # Going to short mode and back again did indeed matter. Since short mode is
32320       # case insensitive, let's make it lowercase to improve readability.
32321       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32322       # Now convert it back to Unix-stile (cygpath)
32323       input_path=`$CYGPATH -u "$shortmode_path"`
32324       new_path="$input_path"
32325     fi
32326   fi
32327 
32328   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32329   if test "x$test_cygdrive_prefix" = x; then
32330     # As a simple fix, exclude /usr/bin since it's not a real path.
32331     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32332       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32333       # a path prefixed by /cygdrive for fixpath to work.
32334       new_path="$CYGWIN_ROOT_PATH$input_path"
32335     fi
32336   fi
32337 
32338 
32339   if test "x$path" != "x$new_path"; then
32340     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32342 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32343   fi
32344 
32345   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32346 
32347   path="$POTENTIAL_FREETYPE_LIB_PATH"
32348   has_colon=`$ECHO $path | $GREP ^.:`
32349   new_path="$path"
32350   if test "x$has_colon" = x; then
32351     # Not in mixed or Windows style, start by that.
32352     new_path=`cmd //c echo $path`
32353   fi
32354 
32355 
32356   input_path="$new_path"
32357   # Check if we need to convert this using DOS-style short mode. If the path
32358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32359   # take no chances and rewrite it.
32360   # Note: m4 eats our [], so we need to use [ and ] instead.
32361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32362   if test "x$has_forbidden_chars" != x; then
32363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32364     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32365   fi
32366 
32367 
32368   windows_path="$new_path"
32369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32370     unix_path=`$CYGPATH -u "$windows_path"`
32371     new_path="$unix_path"
32372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32374     new_path="$unix_path"
32375   fi
32376 
32377   if test "x$path" != "x$new_path"; then
32378     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32380 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32381   fi
32382 
32383   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32384   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32385 
32386   else
32387     # We're on a posix platform. Hooray! :)
32388     path="$POTENTIAL_FREETYPE_LIB_PATH"
32389     has_space=`$ECHO "$path" | $GREP " "`
32390     if test "x$has_space" != x; then
32391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32392 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32393       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32394     fi
32395 
32396     # Use eval to expand a potential ~
32397     eval path="$path"
32398     if test ! -f "$path" && test ! -d "$path"; then
32399       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32400     fi
32401 
32402     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32403   fi
32404 
32405 
32406     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32408 $as_echo_n "checking for freetype includes... " >&6; }
32409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32410 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32411     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32412     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32413 $as_echo_n "checking for freetype libraries... " >&6; }
32414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32415 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32416   fi
32417 
32418           if test "x$FOUND_FREETYPE" != xyes; then
32419             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
32420 
32421   windows_path="$FREETYPE_BASE_DIR"
32422   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32423     unix_path=`$CYGPATH -u "$windows_path"`
32424     FREETYPE_BASE_DIR="$unix_path"
32425   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32426     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32427     FREETYPE_BASE_DIR="$unix_path"
32428   fi
32429 
32430 
32431   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32432   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32433   METHOD="well-known location"
32434 
32435   # First check if the files exists.
32436   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32437     # We found an arbitrary include file. That's a good sign.
32438     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32439 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32440     FOUND_FREETYPE=yes
32441 
32442     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32443     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32444       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32445 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32446       FOUND_FREETYPE=no
32447     else
32448       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32449         # On Windows, we will need both .lib and .dll file.
32450         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32451           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32452 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32453           FOUND_FREETYPE=no
32454         fi
32455       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
32456         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32457         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32458       fi
32459     fi
32460   fi
32461 
32462   if test "x$FOUND_FREETYPE" = xyes; then
32463 
32464   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32465 
32466   # Input might be given as Windows format, start by converting to
32467   # unix format.
32468   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32469   new_path=`$CYGPATH -u "$path"`
32470 
32471   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32472   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32473   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32474   # "foo.exe" is OK but "foo" is an error.
32475   #
32476   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32477   # It is also a way to make sure we got the proper file name for the real test later on.
32478   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32479   if test "x$test_shortpath" = x; then
32480     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32481 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32482     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32483   fi
32484 
32485   # Call helper function which possibly converts this using DOS-style short mode.
32486   # If so, the updated path is stored in $new_path.
32487 
32488   input_path="$new_path"
32489   # Check if we need to convert this using DOS-style short mode. If the path
32490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32491   # take no chances and rewrite it.
32492   # Note: m4 eats our [], so we need to use [ and ] instead.
32493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32494   if test "x$has_forbidden_chars" != x; then
32495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32496     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32497     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32498     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32499       # Going to short mode and back again did indeed matter. Since short mode is
32500       # case insensitive, let's make it lowercase to improve readability.
32501       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32502       # Now convert it back to Unix-stile (cygpath)
32503       input_path=`$CYGPATH -u "$shortmode_path"`
32504       new_path="$input_path"
32505     fi
32506   fi
32507 
32508   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32509   if test "x$test_cygdrive_prefix" = x; then
32510     # As a simple fix, exclude /usr/bin since it's not a real path.
32511     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32512       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32513       # a path prefixed by /cygdrive for fixpath to work.
32514       new_path="$CYGWIN_ROOT_PATH$input_path"
32515     fi
32516   fi
32517 
32518 
32519   if test "x$path" != "x$new_path"; then
32520     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32521     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32522 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32523   fi
32524 
32525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32526 
32527   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32528   has_colon=`$ECHO $path | $GREP ^.:`
32529   new_path="$path"
32530   if test "x$has_colon" = x; then
32531     # Not in mixed or Windows style, start by that.
32532     new_path=`cmd //c echo $path`
32533   fi
32534 
32535 
32536   input_path="$new_path"
32537   # Check if we need to convert this using DOS-style short mode. If the path
32538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32539   # take no chances and rewrite it.
32540   # Note: m4 eats our [], so we need to use [ and ] instead.
32541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32542   if test "x$has_forbidden_chars" != x; then
32543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32544     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32545   fi
32546 
32547 
32548   windows_path="$new_path"
32549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32550     unix_path=`$CYGPATH -u "$windows_path"`
32551     new_path="$unix_path"
32552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32554     new_path="$unix_path"
32555   fi
32556 
32557   if test "x$path" != "x$new_path"; then
32558     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32559     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32560 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32561   fi
32562 
32563   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32564   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32565 
32566   else
32567     # We're on a posix platform. Hooray! :)
32568     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32569     has_space=`$ECHO "$path" | $GREP " "`
32570     if test "x$has_space" != x; then
32571       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32572 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32573       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32574     fi
32575 
32576     # Use eval to expand a potential ~
32577     eval path="$path"
32578     if test ! -f "$path" && test ! -d "$path"; then
32579       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32580     fi
32581 
32582     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32583   fi
32584 
32585 
32586   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32587 
32588   # Input might be given as Windows format, start by converting to
32589   # unix format.
32590   path="$POTENTIAL_FREETYPE_LIB_PATH"
32591   new_path=`$CYGPATH -u "$path"`
32592 
32593   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32594   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32595   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32596   # "foo.exe" is OK but "foo" is an error.
32597   #
32598   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32599   # It is also a way to make sure we got the proper file name for the real test later on.
32600   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32601   if test "x$test_shortpath" = x; then
32602     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32603 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32604     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32605   fi
32606 
32607   # Call helper function which possibly converts this using DOS-style short mode.
32608   # If so, the updated path is stored in $new_path.
32609 
32610   input_path="$new_path"
32611   # Check if we need to convert this using DOS-style short mode. If the path
32612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32613   # take no chances and rewrite it.
32614   # Note: m4 eats our [], so we need to use [ and ] instead.
32615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32616   if test "x$has_forbidden_chars" != x; then
32617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32618     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32619     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32620     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32621       # Going to short mode and back again did indeed matter. Since short mode is
32622       # case insensitive, let's make it lowercase to improve readability.
32623       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32624       # Now convert it back to Unix-stile (cygpath)
32625       input_path=`$CYGPATH -u "$shortmode_path"`
32626       new_path="$input_path"
32627     fi
32628   fi
32629 
32630   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32631   if test "x$test_cygdrive_prefix" = x; then
32632     # As a simple fix, exclude /usr/bin since it's not a real path.
32633     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32634       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32635       # a path prefixed by /cygdrive for fixpath to work.
32636       new_path="$CYGWIN_ROOT_PATH$input_path"
32637     fi
32638   fi
32639 
32640 
32641   if test "x$path" != "x$new_path"; then
32642     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32644 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32645   fi
32646 
32647   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32648 
32649   path="$POTENTIAL_FREETYPE_LIB_PATH"
32650   has_colon=`$ECHO $path | $GREP ^.:`
32651   new_path="$path"
32652   if test "x$has_colon" = x; then
32653     # Not in mixed or Windows style, start by that.
32654     new_path=`cmd //c echo $path`
32655   fi
32656 
32657 
32658   input_path="$new_path"
32659   # Check if we need to convert this using DOS-style short mode. If the path
32660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32661   # take no chances and rewrite it.
32662   # Note: m4 eats our [], so we need to use [ and ] instead.
32663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32664   if test "x$has_forbidden_chars" != x; then
32665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32667   fi
32668 
32669 
32670   windows_path="$new_path"
32671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32672     unix_path=`$CYGPATH -u "$windows_path"`
32673     new_path="$unix_path"
32674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32676     new_path="$unix_path"
32677   fi
32678 
32679   if test "x$path" != "x$new_path"; then
32680     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32681     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32682 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32683   fi
32684 
32685   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32686   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32687 
32688   else
32689     # We're on a posix platform. Hooray! :)
32690     path="$POTENTIAL_FREETYPE_LIB_PATH"
32691     has_space=`$ECHO "$path" | $GREP " "`
32692     if test "x$has_space" != x; then
32693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32694 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32695       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32696     fi
32697 
32698     # Use eval to expand a potential ~
32699     eval path="$path"
32700     if test ! -f "$path" && test ! -d "$path"; then
32701       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32702     fi
32703 
32704     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
32705   fi
32706 
32707 
32708     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32709     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
32710 $as_echo_n "checking for freetype includes... " >&6; }
32711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
32712 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
32713     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
32714     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
32715 $as_echo_n "checking for freetype libraries... " >&6; }
32716     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
32717 $as_echo "$FREETYPE_LIB_PATH" >&6; }
32718   fi
32719 
32720           fi
32721         else
32722           if test "x$SYS_ROOT" = "x/"; then
32723             FREETYPE_ROOT=
32724           else
32725             FREETYPE_ROOT="$SYS_ROOT"
32726           fi
32727           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
32728 
32729   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
32730   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
32731   METHOD="well-known location"
32732 
32733   # First check if the files exists.
32734   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
32735     # We found an arbitrary include file. That's a good sign.
32736     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
32737 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
32738     FOUND_FREETYPE=yes
32739 
32740     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
32741     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
32742       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
32743 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
32744       FOUND_FREETYPE=no
32745     else
32746       if test "x$OPENJDK_TARGET_OS" = xwindows; then
32747         # On Windows, we will need both .lib and .dll file.
32748         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
32749           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
32750 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
32751           FOUND_FREETYPE=no
32752         fi
32753       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
32754         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
32755         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
32756       fi
32757     fi
32758   fi
32759 
32760   if test "x$FOUND_FREETYPE" = xyes; then
32761 
32762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32763 
32764   # Input might be given as Windows format, start by converting to
32765   # unix format.
32766   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32767   new_path=`$CYGPATH -u "$path"`
32768 
32769   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32770   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32771   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32772   # "foo.exe" is OK but "foo" is an error.
32773   #
32774   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32775   # It is also a way to make sure we got the proper file name for the real test later on.
32776   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32777   if test "x$test_shortpath" = x; then
32778     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32779 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32780     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
32781   fi
32782 
32783   # Call helper function which possibly converts this using DOS-style short mode.
32784   # If so, the updated path is stored in $new_path.
32785 
32786   input_path="$new_path"
32787   # Check if we need to convert this using DOS-style short mode. If the path
32788   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32789   # take no chances and rewrite it.
32790   # Note: m4 eats our [], so we need to use [ and ] instead.
32791   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32792   if test "x$has_forbidden_chars" != x; then
32793     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32794     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32795     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32796     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32797       # Going to short mode and back again did indeed matter. Since short mode is
32798       # case insensitive, let's make it lowercase to improve readability.
32799       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32800       # Now convert it back to Unix-stile (cygpath)
32801       input_path=`$CYGPATH -u "$shortmode_path"`
32802       new_path="$input_path"
32803     fi
32804   fi
32805 
32806   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32807   if test "x$test_cygdrive_prefix" = x; then
32808     # As a simple fix, exclude /usr/bin since it's not a real path.
32809     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32810       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32811       # a path prefixed by /cygdrive for fixpath to work.
32812       new_path="$CYGWIN_ROOT_PATH$input_path"
32813     fi
32814   fi
32815 
32816 
32817   if test "x$path" != "x$new_path"; then
32818     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32819     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32820 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32821   fi
32822 
32823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32824 
32825   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32826   has_colon=`$ECHO $path | $GREP ^.:`
32827   new_path="$path"
32828   if test "x$has_colon" = x; then
32829     # Not in mixed or Windows style, start by that.
32830     new_path=`cmd //c echo $path`
32831   fi
32832 
32833 
32834   input_path="$new_path"
32835   # Check if we need to convert this using DOS-style short mode. If the path
32836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32837   # take no chances and rewrite it.
32838   # Note: m4 eats our [], so we need to use [ and ] instead.
32839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32840   if test "x$has_forbidden_chars" != x; then
32841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32842     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32843   fi
32844 
32845 
32846   windows_path="$new_path"
32847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32848     unix_path=`$CYGPATH -u "$windows_path"`
32849     new_path="$unix_path"
32850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32851     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32852     new_path="$unix_path"
32853   fi
32854 
32855   if test "x$path" != "x$new_path"; then
32856     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
32857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
32858 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
32859   fi
32860 
32861   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32862   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32863 
32864   else
32865     # We're on a posix platform. Hooray! :)
32866     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
32867     has_space=`$ECHO "$path" | $GREP " "`
32868     if test "x$has_space" != x; then
32869       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
32870 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
32871       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32872     fi
32873 
32874     # Use eval to expand a potential ~
32875     eval path="$path"
32876     if test ! -f "$path" && test ! -d "$path"; then
32877       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
32878     fi
32879 
32880     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
32881   fi
32882 
32883 
32884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32885 
32886   # Input might be given as Windows format, start by converting to
32887   # unix format.
32888   path="$POTENTIAL_FREETYPE_LIB_PATH"
32889   new_path=`$CYGPATH -u "$path"`
32890 
32891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32894   # "foo.exe" is OK but "foo" is an error.
32895   #
32896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
32897   # It is also a way to make sure we got the proper file name for the real test later on.
32898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32899   if test "x$test_shortpath" = x; then
32900     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32901 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32902     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
32903   fi
32904 
32905   # Call helper function which possibly converts this using DOS-style short mode.
32906   # If so, the updated path is stored in $new_path.
32907 
32908   input_path="$new_path"
32909   # Check if we need to convert this using DOS-style short mode. If the path
32910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32911   # take no chances and rewrite it.
32912   # Note: m4 eats our [], so we need to use [ and ] instead.
32913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32914   if test "x$has_forbidden_chars" != x; then
32915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32916     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32917     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32918     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32919       # Going to short mode and back again did indeed matter. Since short mode is
32920       # case insensitive, let's make it lowercase to improve readability.
32921       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32922       # Now convert it back to Unix-stile (cygpath)
32923       input_path=`$CYGPATH -u "$shortmode_path"`
32924       new_path="$input_path"
32925     fi
32926   fi
32927 
32928   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32929   if test "x$test_cygdrive_prefix" = x; then
32930     # As a simple fix, exclude /usr/bin since it's not a real path.
32931     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32932       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32933       # a path prefixed by /cygdrive for fixpath to work.
32934       new_path="$CYGWIN_ROOT_PATH$input_path"
32935     fi
32936   fi
32937 
32938 
32939   if test "x$path" != "x$new_path"; then
32940     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32942 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32943   fi
32944 
32945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32946 
32947   path="$POTENTIAL_FREETYPE_LIB_PATH"
32948   has_colon=`$ECHO $path | $GREP ^.:`
32949   new_path="$path"
32950   if test "x$has_colon" = x; then
32951     # Not in mixed or Windows style, start by that.
32952     new_path=`cmd //c echo $path`
32953   fi
32954 
32955 
32956   input_path="$new_path"
32957   # Check if we need to convert this using DOS-style short mode. If the path
32958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32959   # take no chances and rewrite it.
32960   # Note: m4 eats our [], so we need to use [ and ] instead.
32961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32962   if test "x$has_forbidden_chars" != x; then
32963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32964     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32965   fi
32966 
32967 
32968   windows_path="$new_path"
32969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32970     unix_path=`$CYGPATH -u "$windows_path"`
32971     new_path="$unix_path"
32972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32974     new_path="$unix_path"
32975   fi
32976 
32977   if test "x$path" != "x$new_path"; then
32978     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
32979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
32980 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
32981   fi
32982 
32983   # Save the first 10 bytes of this path to the storage, so fixpath can work.
32984   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32985 
32986   else
32987     # We're on a posix platform. Hooray! :)
32988     path="$POTENTIAL_FREETYPE_LIB_PATH"
32989     has_space=`$ECHO "$path" | $GREP " "`
32990     if test "x$has_space" != x; then
32991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
32992 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
32993       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32994     fi
32995 
32996     # Use eval to expand a potential ~
32997     eval path="$path"
32998     if test ! -f "$path" && test ! -d "$path"; then
32999       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33000     fi
33001 
33002     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33003   fi
33004 
33005 
33006     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33007     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33008 $as_echo_n "checking for freetype includes... " >&6; }
33009     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33010 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33011     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33013 $as_echo_n "checking for freetype libraries... " >&6; }
33014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33015 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33016   fi
33017 
33018 
33019           if test "x$FOUND_FREETYPE" != xyes; then
33020             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
33021 
33022   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33023   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
33024   METHOD="well-known location"
33025 
33026   # First check if the files exists.
33027   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33028     # We found an arbitrary include file. That's a good sign.
33029     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33030 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33031     FOUND_FREETYPE=yes
33032 
33033     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33034     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33035       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33036 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33037       FOUND_FREETYPE=no
33038     else
33039       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33040         # On Windows, we will need both .lib and .dll file.
33041         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33042           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33043 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33044           FOUND_FREETYPE=no
33045         fi
33046       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
33047         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33048         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33049       fi
33050     fi
33051   fi
33052 
33053   if test "x$FOUND_FREETYPE" = xyes; then
33054 
33055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33056 
33057   # Input might be given as Windows format, start by converting to
33058   # unix format.
33059   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33060   new_path=`$CYGPATH -u "$path"`
33061 
33062   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33063   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33064   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33065   # "foo.exe" is OK but "foo" is an error.
33066   #
33067   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33068   # It is also a way to make sure we got the proper file name for the real test later on.
33069   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33070   if test "x$test_shortpath" = x; then
33071     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33072 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33073     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33074   fi
33075 
33076   # Call helper function which possibly converts this using DOS-style short mode.
33077   # If so, the updated path is stored in $new_path.
33078 
33079   input_path="$new_path"
33080   # Check if we need to convert this using DOS-style short mode. If the path
33081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33082   # take no chances and rewrite it.
33083   # Note: m4 eats our [], so we need to use [ and ] instead.
33084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33085   if test "x$has_forbidden_chars" != x; then
33086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33090       # Going to short mode and back again did indeed matter. Since short mode is
33091       # case insensitive, let's make it lowercase to improve readability.
33092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33093       # Now convert it back to Unix-stile (cygpath)
33094       input_path=`$CYGPATH -u "$shortmode_path"`
33095       new_path="$input_path"
33096     fi
33097   fi
33098 
33099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33100   if test "x$test_cygdrive_prefix" = x; then
33101     # As a simple fix, exclude /usr/bin since it's not a real path.
33102     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33104       # a path prefixed by /cygdrive for fixpath to work.
33105       new_path="$CYGWIN_ROOT_PATH$input_path"
33106     fi
33107   fi
33108 
33109 
33110   if test "x$path" != "x$new_path"; then
33111     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33114   fi
33115 
33116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33117 
33118   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33119   has_colon=`$ECHO $path | $GREP ^.:`
33120   new_path="$path"
33121   if test "x$has_colon" = x; then
33122     # Not in mixed or Windows style, start by that.
33123     new_path=`cmd //c echo $path`
33124   fi
33125 
33126 
33127   input_path="$new_path"
33128   # Check if we need to convert this using DOS-style short mode. If the path
33129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33130   # take no chances and rewrite it.
33131   # Note: m4 eats our [], so we need to use [ and ] instead.
33132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33133   if test "x$has_forbidden_chars" != x; then
33134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33136   fi
33137 
33138 
33139   windows_path="$new_path"
33140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33141     unix_path=`$CYGPATH -u "$windows_path"`
33142     new_path="$unix_path"
33143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33145     new_path="$unix_path"
33146   fi
33147 
33148   if test "x$path" != "x$new_path"; then
33149     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33151 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33152   fi
33153 
33154   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33155   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33156 
33157   else
33158     # We're on a posix platform. Hooray! :)
33159     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33160     has_space=`$ECHO "$path" | $GREP " "`
33161     if test "x$has_space" != x; then
33162       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33163 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33164       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33165     fi
33166 
33167     # Use eval to expand a potential ~
33168     eval path="$path"
33169     if test ! -f "$path" && test ! -d "$path"; then
33170       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33171     fi
33172 
33173     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33174   fi
33175 
33176 
33177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33178 
33179   # Input might be given as Windows format, start by converting to
33180   # unix format.
33181   path="$POTENTIAL_FREETYPE_LIB_PATH"
33182   new_path=`$CYGPATH -u "$path"`
33183 
33184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33187   # "foo.exe" is OK but "foo" is an error.
33188   #
33189   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33190   # It is also a way to make sure we got the proper file name for the real test later on.
33191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33192   if test "x$test_shortpath" = x; then
33193     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33194 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33195     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33196   fi
33197 
33198   # Call helper function which possibly converts this using DOS-style short mode.
33199   # If so, the updated path is stored in $new_path.
33200 
33201   input_path="$new_path"
33202   # Check if we need to convert this using DOS-style short mode. If the path
33203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33204   # take no chances and rewrite it.
33205   # Note: m4 eats our [], so we need to use [ and ] instead.
33206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33207   if test "x$has_forbidden_chars" != x; then
33208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33209     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33210     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33211     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33212       # Going to short mode and back again did indeed matter. Since short mode is
33213       # case insensitive, let's make it lowercase to improve readability.
33214       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33215       # Now convert it back to Unix-stile (cygpath)
33216       input_path=`$CYGPATH -u "$shortmode_path"`
33217       new_path="$input_path"
33218     fi
33219   fi
33220 
33221   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33222   if test "x$test_cygdrive_prefix" = x; then
33223     # As a simple fix, exclude /usr/bin since it's not a real path.
33224     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33225       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33226       # a path prefixed by /cygdrive for fixpath to work.
33227       new_path="$CYGWIN_ROOT_PATH$input_path"
33228     fi
33229   fi
33230 
33231 
33232   if test "x$path" != "x$new_path"; then
33233     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33235 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33236   fi
33237 
33238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33239 
33240   path="$POTENTIAL_FREETYPE_LIB_PATH"
33241   has_colon=`$ECHO $path | $GREP ^.:`
33242   new_path="$path"
33243   if test "x$has_colon" = x; then
33244     # Not in mixed or Windows style, start by that.
33245     new_path=`cmd //c echo $path`
33246   fi
33247 
33248 
33249   input_path="$new_path"
33250   # Check if we need to convert this using DOS-style short mode. If the path
33251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33252   # take no chances and rewrite it.
33253   # Note: m4 eats our [], so we need to use [ and ] instead.
33254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33255   if test "x$has_forbidden_chars" != x; then
33256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33257     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33258   fi
33259 
33260 
33261   windows_path="$new_path"
33262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33263     unix_path=`$CYGPATH -u "$windows_path"`
33264     new_path="$unix_path"
33265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33267     new_path="$unix_path"
33268   fi
33269 
33270   if test "x$path" != "x$new_path"; then
33271     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33273 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33274   fi
33275 
33276   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33277   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33278 
33279   else
33280     # We're on a posix platform. Hooray! :)
33281     path="$POTENTIAL_FREETYPE_LIB_PATH"
33282     has_space=`$ECHO "$path" | $GREP " "`
33283     if test "x$has_space" != x; then
33284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33285 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33286       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33287     fi
33288 
33289     # Use eval to expand a potential ~
33290     eval path="$path"
33291     if test ! -f "$path" && test ! -d "$path"; then
33292       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33293     fi
33294 
33295     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33296   fi
33297 
33298 
33299     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33300     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33301 $as_echo_n "checking for freetype includes... " >&6; }
33302     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33303 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33304     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33305     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33306 $as_echo_n "checking for freetype libraries... " >&6; }
33307     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33308 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33309   fi
33310 
33311           fi
33312 
33313           if test "x$FOUND_FREETYPE" != xyes; then
33314             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
33315             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
33316 
33317   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33318   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
33319   METHOD="well-known location"
33320 
33321   # First check if the files exists.
33322   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33323     # We found an arbitrary include file. That's a good sign.
33324     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33325 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33326     FOUND_FREETYPE=yes
33327 
33328     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33329     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33330       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33331 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33332       FOUND_FREETYPE=no
33333     else
33334       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33335         # On Windows, we will need both .lib and .dll file.
33336         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33337           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33338 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33339           FOUND_FREETYPE=no
33340         fi
33341       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
33342         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33343         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33344       fi
33345     fi
33346   fi
33347 
33348   if test "x$FOUND_FREETYPE" = xyes; then
33349 
33350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33351 
33352   # Input might be given as Windows format, start by converting to
33353   # unix format.
33354   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33355   new_path=`$CYGPATH -u "$path"`
33356 
33357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33360   # "foo.exe" is OK but "foo" is an error.
33361   #
33362   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33363   # It is also a way to make sure we got the proper file name for the real test later on.
33364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33365   if test "x$test_shortpath" = x; then
33366     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33367 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33368     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33369   fi
33370 
33371   # Call helper function which possibly converts this using DOS-style short mode.
33372   # If so, the updated path is stored in $new_path.
33373 
33374   input_path="$new_path"
33375   # Check if we need to convert this using DOS-style short mode. If the path
33376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33377   # take no chances and rewrite it.
33378   # Note: m4 eats our [], so we need to use [ and ] instead.
33379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33380   if test "x$has_forbidden_chars" != x; then
33381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33385       # Going to short mode and back again did indeed matter. Since short mode is
33386       # case insensitive, let's make it lowercase to improve readability.
33387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33388       # Now convert it back to Unix-stile (cygpath)
33389       input_path=`$CYGPATH -u "$shortmode_path"`
33390       new_path="$input_path"
33391     fi
33392   fi
33393 
33394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33395   if test "x$test_cygdrive_prefix" = x; then
33396     # As a simple fix, exclude /usr/bin since it's not a real path.
33397     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33399       # a path prefixed by /cygdrive for fixpath to work.
33400       new_path="$CYGWIN_ROOT_PATH$input_path"
33401     fi
33402   fi
33403 
33404 
33405   if test "x$path" != "x$new_path"; then
33406     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33408 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33409   fi
33410 
33411   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33412 
33413   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33414   has_colon=`$ECHO $path | $GREP ^.:`
33415   new_path="$path"
33416   if test "x$has_colon" = x; then
33417     # Not in mixed or Windows style, start by that.
33418     new_path=`cmd //c echo $path`
33419   fi
33420 
33421 
33422   input_path="$new_path"
33423   # Check if we need to convert this using DOS-style short mode. If the path
33424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33425   # take no chances and rewrite it.
33426   # Note: m4 eats our [], so we need to use [ and ] instead.
33427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33428   if test "x$has_forbidden_chars" != x; then
33429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33431   fi
33432 
33433 
33434   windows_path="$new_path"
33435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33436     unix_path=`$CYGPATH -u "$windows_path"`
33437     new_path="$unix_path"
33438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33440     new_path="$unix_path"
33441   fi
33442 
33443   if test "x$path" != "x$new_path"; then
33444     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33446 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33447   fi
33448 
33449   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33450   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33451 
33452   else
33453     # We're on a posix platform. Hooray! :)
33454     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33455     has_space=`$ECHO "$path" | $GREP " "`
33456     if test "x$has_space" != x; then
33457       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33458 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33459       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33460     fi
33461 
33462     # Use eval to expand a potential ~
33463     eval path="$path"
33464     if test ! -f "$path" && test ! -d "$path"; then
33465       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33466     fi
33467 
33468     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33469   fi
33470 
33471 
33472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33473 
33474   # Input might be given as Windows format, start by converting to
33475   # unix format.
33476   path="$POTENTIAL_FREETYPE_LIB_PATH"
33477   new_path=`$CYGPATH -u "$path"`
33478 
33479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33482   # "foo.exe" is OK but "foo" is an error.
33483   #
33484   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33485   # It is also a way to make sure we got the proper file name for the real test later on.
33486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33487   if test "x$test_shortpath" = x; then
33488     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33489 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33490     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33491   fi
33492 
33493   # Call helper function which possibly converts this using DOS-style short mode.
33494   # If so, the updated path is stored in $new_path.
33495 
33496   input_path="$new_path"
33497   # Check if we need to convert this using DOS-style short mode. If the path
33498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33499   # take no chances and rewrite it.
33500   # Note: m4 eats our [], so we need to use [ and ] instead.
33501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33502   if test "x$has_forbidden_chars" != x; then
33503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33507       # Going to short mode and back again did indeed matter. Since short mode is
33508       # case insensitive, let's make it lowercase to improve readability.
33509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33510       # Now convert it back to Unix-stile (cygpath)
33511       input_path=`$CYGPATH -u "$shortmode_path"`
33512       new_path="$input_path"
33513     fi
33514   fi
33515 
33516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33517   if test "x$test_cygdrive_prefix" = x; then
33518     # As a simple fix, exclude /usr/bin since it's not a real path.
33519     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33521       # a path prefixed by /cygdrive for fixpath to work.
33522       new_path="$CYGWIN_ROOT_PATH$input_path"
33523     fi
33524   fi
33525 
33526 
33527   if test "x$path" != "x$new_path"; then
33528     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33530 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33531   fi
33532 
33533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33534 
33535   path="$POTENTIAL_FREETYPE_LIB_PATH"
33536   has_colon=`$ECHO $path | $GREP ^.:`
33537   new_path="$path"
33538   if test "x$has_colon" = x; then
33539     # Not in mixed or Windows style, start by that.
33540     new_path=`cmd //c echo $path`
33541   fi
33542 
33543 
33544   input_path="$new_path"
33545   # Check if we need to convert this using DOS-style short mode. If the path
33546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33547   # take no chances and rewrite it.
33548   # Note: m4 eats our [], so we need to use [ and ] instead.
33549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33550   if test "x$has_forbidden_chars" != x; then
33551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33553   fi
33554 
33555 
33556   windows_path="$new_path"
33557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33558     unix_path=`$CYGPATH -u "$windows_path"`
33559     new_path="$unix_path"
33560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33562     new_path="$unix_path"
33563   fi
33564 
33565   if test "x$path" != "x$new_path"; then
33566     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33568 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33569   fi
33570 
33571   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33572   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33573 
33574   else
33575     # We're on a posix platform. Hooray! :)
33576     path="$POTENTIAL_FREETYPE_LIB_PATH"
33577     has_space=`$ECHO "$path" | $GREP " "`
33578     if test "x$has_space" != x; then
33579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33580 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33581       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33582     fi
33583 
33584     # Use eval to expand a potential ~
33585     eval path="$path"
33586     if test ! -f "$path" && test ! -d "$path"; then
33587       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33588     fi
33589 
33590     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33591   fi
33592 
33593 
33594     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33596 $as_echo_n "checking for freetype includes... " >&6; }
33597     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33598 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33599     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33600     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33601 $as_echo_n "checking for freetype libraries... " >&6; }
33602     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33603 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33604   fi
33605 
33606             else
33607 
33608   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33609   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
33610   METHOD="well-known location"
33611 
33612   # First check if the files exists.
33613   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33614     # We found an arbitrary include file. That's a good sign.
33615     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33616 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33617     FOUND_FREETYPE=yes
33618 
33619     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33620     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33621       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33622 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33623       FOUND_FREETYPE=no
33624     else
33625       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33626         # On Windows, we will need both .lib and .dll file.
33627         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33628           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33629 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33630           FOUND_FREETYPE=no
33631         fi
33632       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
33633         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33634         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33635       fi
33636     fi
33637   fi
33638 
33639   if test "x$FOUND_FREETYPE" = xyes; then
33640 
33641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33642 
33643   # Input might be given as Windows format, start by converting to
33644   # unix format.
33645   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33646   new_path=`$CYGPATH -u "$path"`
33647 
33648   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33649   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33650   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33651   # "foo.exe" is OK but "foo" is an error.
33652   #
33653   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33654   # It is also a way to make sure we got the proper file name for the real test later on.
33655   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33656   if test "x$test_shortpath" = x; then
33657     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33658 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33659     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33660   fi
33661 
33662   # Call helper function which possibly converts this using DOS-style short mode.
33663   # If so, the updated path is stored in $new_path.
33664 
33665   input_path="$new_path"
33666   # Check if we need to convert this using DOS-style short mode. If the path
33667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33668   # take no chances and rewrite it.
33669   # Note: m4 eats our [], so we need to use [ and ] instead.
33670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33671   if test "x$has_forbidden_chars" != x; then
33672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33676       # Going to short mode and back again did indeed matter. Since short mode is
33677       # case insensitive, let's make it lowercase to improve readability.
33678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33679       # Now convert it back to Unix-stile (cygpath)
33680       input_path=`$CYGPATH -u "$shortmode_path"`
33681       new_path="$input_path"
33682     fi
33683   fi
33684 
33685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33686   if test "x$test_cygdrive_prefix" = x; then
33687     # As a simple fix, exclude /usr/bin since it's not a real path.
33688     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33690       # a path prefixed by /cygdrive for fixpath to work.
33691       new_path="$CYGWIN_ROOT_PATH$input_path"
33692     fi
33693   fi
33694 
33695 
33696   if test "x$path" != "x$new_path"; then
33697     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33699 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33700   fi
33701 
33702   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33703 
33704   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33705   has_colon=`$ECHO $path | $GREP ^.:`
33706   new_path="$path"
33707   if test "x$has_colon" = x; then
33708     # Not in mixed or Windows style, start by that.
33709     new_path=`cmd //c echo $path`
33710   fi
33711 
33712 
33713   input_path="$new_path"
33714   # Check if we need to convert this using DOS-style short mode. If the path
33715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33716   # take no chances and rewrite it.
33717   # Note: m4 eats our [], so we need to use [ and ] instead.
33718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33719   if test "x$has_forbidden_chars" != x; then
33720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33722   fi
33723 
33724 
33725   windows_path="$new_path"
33726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33727     unix_path=`$CYGPATH -u "$windows_path"`
33728     new_path="$unix_path"
33729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33731     new_path="$unix_path"
33732   fi
33733 
33734   if test "x$path" != "x$new_path"; then
33735     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33737 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33738   fi
33739 
33740   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33741   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33742 
33743   else
33744     # We're on a posix platform. Hooray! :)
33745     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33746     has_space=`$ECHO "$path" | $GREP " "`
33747     if test "x$has_space" != x; then
33748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33749 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33750       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33751     fi
33752 
33753     # Use eval to expand a potential ~
33754     eval path="$path"
33755     if test ! -f "$path" && test ! -d "$path"; then
33756       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33757     fi
33758 
33759     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
33760   fi
33761 
33762 
33763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33764 
33765   # Input might be given as Windows format, start by converting to
33766   # unix format.
33767   path="$POTENTIAL_FREETYPE_LIB_PATH"
33768   new_path=`$CYGPATH -u "$path"`
33769 
33770   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33771   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33772   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33773   # "foo.exe" is OK but "foo" is an error.
33774   #
33775   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33776   # It is also a way to make sure we got the proper file name for the real test later on.
33777   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33778   if test "x$test_shortpath" = x; then
33779     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33780 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33781     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
33782   fi
33783 
33784   # Call helper function which possibly converts this using DOS-style short mode.
33785   # If so, the updated path is stored in $new_path.
33786 
33787   input_path="$new_path"
33788   # Check if we need to convert this using DOS-style short mode. If the path
33789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33790   # take no chances and rewrite it.
33791   # Note: m4 eats our [], so we need to use [ and ] instead.
33792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33793   if test "x$has_forbidden_chars" != x; then
33794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33795     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33796     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33797     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33798       # Going to short mode and back again did indeed matter. Since short mode is
33799       # case insensitive, let's make it lowercase to improve readability.
33800       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33801       # Now convert it back to Unix-stile (cygpath)
33802       input_path=`$CYGPATH -u "$shortmode_path"`
33803       new_path="$input_path"
33804     fi
33805   fi
33806 
33807   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33808   if test "x$test_cygdrive_prefix" = x; then
33809     # As a simple fix, exclude /usr/bin since it's not a real path.
33810     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33811       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33812       # a path prefixed by /cygdrive for fixpath to work.
33813       new_path="$CYGWIN_ROOT_PATH$input_path"
33814     fi
33815   fi
33816 
33817 
33818   if test "x$path" != "x$new_path"; then
33819     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33820     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33821 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33822   fi
33823 
33824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33825 
33826   path="$POTENTIAL_FREETYPE_LIB_PATH"
33827   has_colon=`$ECHO $path | $GREP ^.:`
33828   new_path="$path"
33829   if test "x$has_colon" = x; then
33830     # Not in mixed or Windows style, start by that.
33831     new_path=`cmd //c echo $path`
33832   fi
33833 
33834 
33835   input_path="$new_path"
33836   # Check if we need to convert this using DOS-style short mode. If the path
33837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33838   # take no chances and rewrite it.
33839   # Note: m4 eats our [], so we need to use [ and ] instead.
33840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33841   if test "x$has_forbidden_chars" != x; then
33842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33843     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33844   fi
33845 
33846 
33847   windows_path="$new_path"
33848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33849     unix_path=`$CYGPATH -u "$windows_path"`
33850     new_path="$unix_path"
33851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33853     new_path="$unix_path"
33854   fi
33855 
33856   if test "x$path" != "x$new_path"; then
33857     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
33858     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
33859 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
33860   fi
33861 
33862   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33863   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33864 
33865   else
33866     # We're on a posix platform. Hooray! :)
33867     path="$POTENTIAL_FREETYPE_LIB_PATH"
33868     has_space=`$ECHO "$path" | $GREP " "`
33869     if test "x$has_space" != x; then
33870       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
33871 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
33872       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33873     fi
33874 
33875     # Use eval to expand a potential ~
33876     eval path="$path"
33877     if test ! -f "$path" && test ! -d "$path"; then
33878       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
33879     fi
33880 
33881     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
33882   fi
33883 
33884 
33885     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33886     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
33887 $as_echo_n "checking for freetype includes... " >&6; }
33888     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
33889 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
33890     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
33891     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
33892 $as_echo_n "checking for freetype libraries... " >&6; }
33893     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
33894 $as_echo "$FREETYPE_LIB_PATH" >&6; }
33895   fi
33896 
33897               if test "x$FOUND_FREETYPE" != xyes; then
33898 
33899   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
33900   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
33901   METHOD="well-known location"
33902 
33903   # First check if the files exists.
33904   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
33905     # We found an arbitrary include file. That's a good sign.
33906     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
33907 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
33908     FOUND_FREETYPE=yes
33909 
33910     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
33911     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
33912       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
33913 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
33914       FOUND_FREETYPE=no
33915     else
33916       if test "x$OPENJDK_TARGET_OS" = xwindows; then
33917         # On Windows, we will need both .lib and .dll file.
33918         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
33919           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
33920 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
33921           FOUND_FREETYPE=no
33922         fi
33923       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
33924         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
33925         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
33926       fi
33927     fi
33928   fi
33929 
33930   if test "x$FOUND_FREETYPE" = xyes; then
33931 
33932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33933 
33934   # Input might be given as Windows format, start by converting to
33935   # unix format.
33936   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33937   new_path=`$CYGPATH -u "$path"`
33938 
33939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33942   # "foo.exe" is OK but "foo" is an error.
33943   #
33944   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33945   # It is also a way to make sure we got the proper file name for the real test later on.
33946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33947   if test "x$test_shortpath" = x; then
33948     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
33949 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
33950     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
33951   fi
33952 
33953   # Call helper function which possibly converts this using DOS-style short mode.
33954   # If so, the updated path is stored in $new_path.
33955 
33956   input_path="$new_path"
33957   # Check if we need to convert this using DOS-style short mode. If the path
33958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33959   # take no chances and rewrite it.
33960   # Note: m4 eats our [], so we need to use [ and ] instead.
33961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33962   if test "x$has_forbidden_chars" != x; then
33963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33964     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33965     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33966     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33967       # Going to short mode and back again did indeed matter. Since short mode is
33968       # case insensitive, let's make it lowercase to improve readability.
33969       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33970       # Now convert it back to Unix-stile (cygpath)
33971       input_path=`$CYGPATH -u "$shortmode_path"`
33972       new_path="$input_path"
33973     fi
33974   fi
33975 
33976   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33977   if test "x$test_cygdrive_prefix" = x; then
33978     # As a simple fix, exclude /usr/bin since it's not a real path.
33979     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33980       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33981       # a path prefixed by /cygdrive for fixpath to work.
33982       new_path="$CYGWIN_ROOT_PATH$input_path"
33983     fi
33984   fi
33985 
33986 
33987   if test "x$path" != "x$new_path"; then
33988     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
33989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
33990 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
33991   fi
33992 
33993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33994 
33995   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
33996   has_colon=`$ECHO $path | $GREP ^.:`
33997   new_path="$path"
33998   if test "x$has_colon" = x; then
33999     # Not in mixed or Windows style, start by that.
34000     new_path=`cmd //c echo $path`
34001   fi
34002 
34003 
34004   input_path="$new_path"
34005   # Check if we need to convert this using DOS-style short mode. If the path
34006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34007   # take no chances and rewrite it.
34008   # Note: m4 eats our [], so we need to use [ and ] instead.
34009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34010   if test "x$has_forbidden_chars" != x; then
34011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34012     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34013   fi
34014 
34015 
34016   windows_path="$new_path"
34017   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34018     unix_path=`$CYGPATH -u "$windows_path"`
34019     new_path="$unix_path"
34020   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34021     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34022     new_path="$unix_path"
34023   fi
34024 
34025   if test "x$path" != "x$new_path"; then
34026     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
34027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34028 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34029   fi
34030 
34031   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34032   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34033 
34034   else
34035     # We're on a posix platform. Hooray! :)
34036     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34037     has_space=`$ECHO "$path" | $GREP " "`
34038     if test "x$has_space" != x; then
34039       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34040 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34041       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34042     fi
34043 
34044     # Use eval to expand a potential ~
34045     eval path="$path"
34046     if test ! -f "$path" && test ! -d "$path"; then
34047       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34048     fi
34049 
34050     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34051   fi
34052 
34053 
34054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34055 
34056   # Input might be given as Windows format, start by converting to
34057   # unix format.
34058   path="$POTENTIAL_FREETYPE_LIB_PATH"
34059   new_path=`$CYGPATH -u "$path"`
34060 
34061   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34062   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34063   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34064   # "foo.exe" is OK but "foo" is an error.
34065   #
34066   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34067   # It is also a way to make sure we got the proper file name for the real test later on.
34068   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34069   if test "x$test_shortpath" = x; then
34070     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34072     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
34073   fi
34074 
34075   # Call helper function which possibly converts this using DOS-style short mode.
34076   # If so, the updated path is stored in $new_path.
34077 
34078   input_path="$new_path"
34079   # Check if we need to convert this using DOS-style short mode. If the path
34080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34081   # take no chances and rewrite it.
34082   # Note: m4 eats our [], so we need to use [ and ] instead.
34083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34084   if test "x$has_forbidden_chars" != x; then
34085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34086     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34087     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34088     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34089       # Going to short mode and back again did indeed matter. Since short mode is
34090       # case insensitive, let's make it lowercase to improve readability.
34091       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34092       # Now convert it back to Unix-stile (cygpath)
34093       input_path=`$CYGPATH -u "$shortmode_path"`
34094       new_path="$input_path"
34095     fi
34096   fi
34097 
34098   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34099   if test "x$test_cygdrive_prefix" = x; then
34100     # As a simple fix, exclude /usr/bin since it's not a real path.
34101     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34102       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34103       # a path prefixed by /cygdrive for fixpath to work.
34104       new_path="$CYGWIN_ROOT_PATH$input_path"
34105     fi
34106   fi
34107 
34108 
34109   if test "x$path" != "x$new_path"; then
34110     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34112 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34113   fi
34114 
34115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34116 
34117   path="$POTENTIAL_FREETYPE_LIB_PATH"
34118   has_colon=`$ECHO $path | $GREP ^.:`
34119   new_path="$path"
34120   if test "x$has_colon" = x; then
34121     # Not in mixed or Windows style, start by that.
34122     new_path=`cmd //c echo $path`
34123   fi
34124 
34125 
34126   input_path="$new_path"
34127   # Check if we need to convert this using DOS-style short mode. If the path
34128   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34129   # take no chances and rewrite it.
34130   # Note: m4 eats our [], so we need to use [ and ] instead.
34131   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34132   if test "x$has_forbidden_chars" != x; then
34133     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34134     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34135   fi
34136 
34137 
34138   windows_path="$new_path"
34139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34140     unix_path=`$CYGPATH -u "$windows_path"`
34141     new_path="$unix_path"
34142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34144     new_path="$unix_path"
34145   fi
34146 
34147   if test "x$path" != "x$new_path"; then
34148     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
34149     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
34150 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34151   fi
34152 
34153   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34154   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34155 
34156   else
34157     # We're on a posix platform. Hooray! :)
34158     path="$POTENTIAL_FREETYPE_LIB_PATH"
34159     has_space=`$ECHO "$path" | $GREP " "`
34160     if test "x$has_space" != x; then
34161       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34162 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34163       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34164     fi
34165 
34166     # Use eval to expand a potential ~
34167     eval path="$path"
34168     if test ! -f "$path" && test ! -d "$path"; then
34169       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34170     fi
34171 
34172     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34173   fi
34174 
34175 
34176     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
34177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
34178 $as_echo_n "checking for freetype includes... " >&6; }
34179     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
34180 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
34181     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
34182     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
34183 $as_echo_n "checking for freetype libraries... " >&6; }
34184     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
34185 $as_echo "$FREETYPE_LIB_PATH" >&6; }
34186   fi
34187 
34188               fi
34189             fi
34190           fi
34191         fi
34192       fi # end check in well-known locations
34193 
34194       if test "x$FOUND_FREETYPE" != xyes; then
34195 
34196   # Print a helpful message on how to acquire the necessary build dependency.
34197   # freetype is the help tag: freetype, cups, pulse, alsa etc
34198   MISSING_DEPENDENCY=freetype
34199 
34200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34201     cygwin_help $MISSING_DEPENDENCY
34202   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34203     msys_help $MISSING_DEPENDENCY
34204   else
34205     PKGHANDLER_COMMAND=
34206 
34207     case $PKGHANDLER in
34208       apt-get)
34209         apt_help     $MISSING_DEPENDENCY ;;
34210       yum)
34211         yum_help     $MISSING_DEPENDENCY ;;
34212       port)
34213         port_help    $MISSING_DEPENDENCY ;;
34214       pkgutil)
34215         pkgutil_help $MISSING_DEPENDENCY ;;
34216       pkgadd)
34217         pkgadd_help  $MISSING_DEPENDENCY ;;
34218     esac
34219 
34220     if test "x$PKGHANDLER_COMMAND" != x; then
34221       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34222     fi
34223   fi
34224 
34225         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
34226       fi
34227     fi # end user specified settings
34228 
34229     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
34230     if test "x$FREETYPE_CFLAGS" = x; then
34231 
34232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34233 
34234   # Input might be given as Windows format, start by converting to
34235   # unix format.
34236   path="$FREETYPE_INCLUDE_PATH"
34237   new_path=`$CYGPATH -u "$path"`
34238 
34239   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34240   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34241   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34242   # "foo.exe" is OK but "foo" is an error.
34243   #
34244   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34245   # It is also a way to make sure we got the proper file name for the real test later on.
34246   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34247   if test "x$test_shortpath" = x; then
34248     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34249 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34250     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
34251   fi
34252 
34253   # Call helper function which possibly converts this using DOS-style short mode.
34254   # If so, the updated path is stored in $new_path.
34255 
34256   input_path="$new_path"
34257   # Check if we need to convert this using DOS-style short mode. If the path
34258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34259   # take no chances and rewrite it.
34260   # Note: m4 eats our [], so we need to use [ and ] instead.
34261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34262   if test "x$has_forbidden_chars" != x; then
34263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34264     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34265     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34266     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34267       # Going to short mode and back again did indeed matter. Since short mode is
34268       # case insensitive, let's make it lowercase to improve readability.
34269       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34270       # Now convert it back to Unix-stile (cygpath)
34271       input_path=`$CYGPATH -u "$shortmode_path"`
34272       new_path="$input_path"
34273     fi
34274   fi
34275 
34276   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34277   if test "x$test_cygdrive_prefix" = x; then
34278     # As a simple fix, exclude /usr/bin since it's not a real path.
34279     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34280       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34281       # a path prefixed by /cygdrive for fixpath to work.
34282       new_path="$CYGWIN_ROOT_PATH$input_path"
34283     fi
34284   fi
34285 
34286 
34287   if test "x$path" != "x$new_path"; then
34288     FREETYPE_INCLUDE_PATH="$new_path"
34289     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34290 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34291   fi
34292 
34293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34294 
34295   path="$FREETYPE_INCLUDE_PATH"
34296   has_colon=`$ECHO $path | $GREP ^.:`
34297   new_path="$path"
34298   if test "x$has_colon" = x; then
34299     # Not in mixed or Windows style, start by that.
34300     new_path=`cmd //c echo $path`
34301   fi
34302 
34303 
34304   input_path="$new_path"
34305   # Check if we need to convert this using DOS-style short mode. If the path
34306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34307   # take no chances and rewrite it.
34308   # Note: m4 eats our [], so we need to use [ and ] instead.
34309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34310   if test "x$has_forbidden_chars" != x; then
34311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34312     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34313   fi
34314 
34315 
34316   windows_path="$new_path"
34317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34318     unix_path=`$CYGPATH -u "$windows_path"`
34319     new_path="$unix_path"
34320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34322     new_path="$unix_path"
34323   fi
34324 
34325   if test "x$path" != "x$new_path"; then
34326     FREETYPE_INCLUDE_PATH="$new_path"
34327     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
34328 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
34329   fi
34330 
34331   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34332   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34333 
34334   else
34335     # We're on a posix platform. Hooray! :)
34336     path="$FREETYPE_INCLUDE_PATH"
34337     has_space=`$ECHO "$path" | $GREP " "`
34338     if test "x$has_space" != x; then
34339       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
34340 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
34341       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34342     fi
34343 
34344     # Use eval to expand a potential ~
34345     eval path="$path"
34346     if test ! -f "$path" && test ! -d "$path"; then
34347       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34348     fi
34349 
34350     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
34351   fi
34352 
34353       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
34354         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
34355       else
34356         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
34357       fi
34358     fi
34359 
34360     if test "x$FREETYPE_LIBS" = x; then
34361 
34362   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34363 
34364   # Input might be given as Windows format, start by converting to
34365   # unix format.
34366   path="$FREETYPE_LIB_PATH"
34367   new_path=`$CYGPATH -u "$path"`
34368 
34369   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34370   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34371   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34372   # "foo.exe" is OK but "foo" is an error.
34373   #
34374   # This test is therefore slightly more accurate than "test -f" to check for file precense.
34375   # It is also a way to make sure we got the proper file name for the real test later on.
34376   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34377   if test "x$test_shortpath" = x; then
34378     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34379 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34380     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
34381   fi
34382 
34383   # Call helper function which possibly converts this using DOS-style short mode.
34384   # If so, the updated path is stored in $new_path.
34385 
34386   input_path="$new_path"
34387   # Check if we need to convert this using DOS-style short mode. If the path
34388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34389   # take no chances and rewrite it.
34390   # Note: m4 eats our [], so we need to use [ and ] instead.
34391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34392   if test "x$has_forbidden_chars" != x; then
34393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34394     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34395     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34396     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34397       # Going to short mode and back again did indeed matter. Since short mode is
34398       # case insensitive, let's make it lowercase to improve readability.
34399       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34400       # Now convert it back to Unix-stile (cygpath)
34401       input_path=`$CYGPATH -u "$shortmode_path"`
34402       new_path="$input_path"
34403     fi
34404   fi
34405 
34406   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34407   if test "x$test_cygdrive_prefix" = x; then
34408     # As a simple fix, exclude /usr/bin since it's not a real path.
34409     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
34410       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34411       # a path prefixed by /cygdrive for fixpath to work.
34412       new_path="$CYGWIN_ROOT_PATH$input_path"
34413     fi
34414   fi
34415 
34416 
34417   if test "x$path" != "x$new_path"; then
34418     FREETYPE_LIB_PATH="$new_path"
34419     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34420 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34421   fi
34422 
34423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34424 
34425   path="$FREETYPE_LIB_PATH"
34426   has_colon=`$ECHO $path | $GREP ^.:`
34427   new_path="$path"
34428   if test "x$has_colon" = x; then
34429     # Not in mixed or Windows style, start by that.
34430     new_path=`cmd //c echo $path`
34431   fi
34432 
34433 
34434   input_path="$new_path"
34435   # Check if we need to convert this using DOS-style short mode. If the path
34436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34437   # take no chances and rewrite it.
34438   # Note: m4 eats our [], so we need to use [ and ] instead.
34439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34440   if test "x$has_forbidden_chars" != x; then
34441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34442     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34443   fi
34444 
34445 
34446   windows_path="$new_path"
34447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34448     unix_path=`$CYGPATH -u "$windows_path"`
34449     new_path="$unix_path"
34450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34452     new_path="$unix_path"
34453   fi
34454 
34455   if test "x$path" != "x$new_path"; then
34456     FREETYPE_LIB_PATH="$new_path"
34457     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
34458 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
34459   fi
34460 
34461   # Save the first 10 bytes of this path to the storage, so fixpath can work.
34462   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34463 
34464   else
34465     # We're on a posix platform. Hooray! :)
34466     path="$FREETYPE_LIB_PATH"
34467     has_space=`$ECHO "$path" | $GREP " "`
34468     if test "x$has_space" != x; then
34469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
34470 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
34471       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
34472     fi
34473 
34474     # Use eval to expand a potential ~
34475     eval path="$path"
34476     if test ! -f "$path" && test ! -d "$path"; then
34477       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
34478     fi
34479 
34480     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
34481   fi
34482 
34483       if test "x$OPENJDK_TARGET_OS" = xwindows; then
34484         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
34485       else
34486         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
34487       fi
34488     fi
34489 
34490     # Try to compile it
34491     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
34492 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
34493     ac_ext=cpp
34494 ac_cpp='$CXXCPP $CPPFLAGS'
34495 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34496 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34497 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34498 
34499     PREV_CXXCFLAGS="$CXXFLAGS"
34500     PREV_LIBS="$LIBS"
34501     PREV_CXX="$CXX"
34502     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
34503     LIBS="$LIBS $FREETYPE_LIBS"
34504     CXX="$FIXPATH $CXX"
34505     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34506 /* end confdefs.h.  */
34507 
34508           #include<ft2build.h>
34509           #include FT_FREETYPE_H
34510           int main () {
34511             FT_Init_FreeType(NULL);
34512             return 0;
34513           }
34514 
34515 _ACEOF
34516 if ac_fn_cxx_try_link "$LINENO"; then :
34517 
34518           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34519 $as_echo "yes" >&6; }
34520 
34521 else
34522 
34523           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34524 $as_echo "no" >&6; }
34525           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
34526 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
34527           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
34528 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
34529 
34530 
34531   # Print a helpful message on how to acquire the necessary build dependency.
34532   # freetype is the help tag: freetype, cups, pulse, alsa etc
34533   MISSING_DEPENDENCY=freetype
34534 
34535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34536     cygwin_help $MISSING_DEPENDENCY
34537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34538     msys_help $MISSING_DEPENDENCY
34539   else
34540     PKGHANDLER_COMMAND=
34541 
34542     case $PKGHANDLER in
34543       apt-get)
34544         apt_help     $MISSING_DEPENDENCY ;;
34545       yum)
34546         yum_help     $MISSING_DEPENDENCY ;;
34547       port)
34548         port_help    $MISSING_DEPENDENCY ;;
34549       pkgutil)
34550         pkgutil_help $MISSING_DEPENDENCY ;;
34551       pkgadd)
34552         pkgadd_help  $MISSING_DEPENDENCY ;;
34553     esac
34554 
34555     if test "x$PKGHANDLER_COMMAND" != x; then
34556       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34557     fi
34558   fi
34559 
34560 
34561           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
34562 
34563 
34564 fi
34565 rm -f core conftest.err conftest.$ac_objext \
34566     conftest$ac_exeext conftest.$ac_ext
34567     CXXCFLAGS="$PREV_CXXFLAGS"
34568     LIBS="$PREV_LIBS"
34569     CXX="$PREV_CXX"
34570     ac_ext=cpp
34571 ac_cpp='$CXXCPP $CPPFLAGS'
34572 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34573 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34574 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34575 
34576 
34577     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
34578 $as_echo_n "checking if we should bundle freetype... " >&6; }
34579     if test "x$BUNDLE_FREETYPE" = xyes; then
34580       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
34581     fi
34582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
34583 $as_echo "$BUNDLE_FREETYPE" >&6; }
34584 
34585   fi # end freetype needed
34586 
34587 
34588 
34589 
34590 
34591 
34592 
34593   ###############################################################################
34594   #
34595   # Check for alsa headers and libraries. Used on Linux/GNU systems.
34596   #
34597 
34598 # Check whether --with-alsa was given.
34599 if test "${with_alsa+set}" = set; then :
34600   withval=$with_alsa;
34601 fi
34602 
34603 
34604 # Check whether --with-alsa-include was given.
34605 if test "${with_alsa_include+set}" = set; then :
34606   withval=$with_alsa_include;
34607 fi
34608 
34609 
34610 # Check whether --with-alsa-lib was given.
34611 if test "${with_alsa_lib+set}" = set; then :
34612   withval=$with_alsa_lib;
34613 fi
34614 
34615 
34616   if test "x$ALSA_NOT_NEEDED" = xyes; then
34617     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
34618       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
34619 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
34620     fi
34621     ALSA_CFLAGS=
34622     ALSA_LIBS=
34623   else
34624     ALSA_FOUND=no
34625 
34626     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
34627       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
34628     fi
34629 
34630     if test "x${with_alsa}" != x; then
34631       ALSA_LIBS="-L${with_alsa}/lib -lalsa"
34632       ALSA_CFLAGS="-I${with_alsa}/include"
34633       ALSA_FOUND=yes
34634     fi
34635     if test "x${with_alsa_include}" != x; then
34636       ALSA_CFLAGS="-I${with_alsa_include}"
34637       ALSA_FOUND=yes
34638     fi
34639     if test "x${with_alsa_lib}" != x; then
34640       ALSA_LIBS="-L${with_alsa_lib} -lalsa"
34641       ALSA_FOUND=yes
34642     fi
34643     if test "x$ALSA_FOUND" = xno; then
34644 
34645 
34646   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
34647     # Source the builddeps file again, to make sure it uses the latest variables!
34648     . $builddepsfile
34649     # Look for a target and build machine specific resource!
34650     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
34651     if test "x$resource" = x; then
34652       # Ok, lets instead look for a target specific resource
34653       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
34654     fi
34655     if test "x$resource" = x; then
34656       # Ok, lets instead look for a build specific resource
34657       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
34658     fi
34659     if test "x$resource" = x; then
34660       # Ok, lets instead look for a generic resource
34661       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
34662       resource=${builddep_alsa}
34663     fi
34664     if test "x$resource" != x; then
34665       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
34666 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
34667       # If the resource in the builddeps.conf file is an existing directory,
34668       # for example /java/linux/cups
34669       if test -d ${resource}; then
34670         depdir=${resource}
34671       else
34672 
34673   # alsa is for example mymodule
34674   # $resource is for example libs/general/libmymod_1_2_3.zip
34675   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
34676   # $with_builddeps_dir is for example /localhome/builddeps
34677   # depdir is the name of the variable into which we store the depdir, eg MYMOD
34678   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
34679   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
34680   filename=`basename $resource`
34681   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
34682   filebase=${filename%%.*}
34683   extension=${filename#*.}
34684   installdir=$with_builddeps_dir/$filebase
34685   if test ! -f $installdir/$filename.unpacked; then
34686     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
34687 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
34688     if test ! -d $installdir; then
34689       mkdir -p $installdir
34690     fi
34691     if test ! -d $installdir; then
34692       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
34693     fi
34694     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
34695     touch $tmpfile
34696     if test ! -f $tmpfile; then
34697       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
34698     fi
34699 
34700   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
34701   # $tmpfile is the local file name for the downloaded file.
34702   VALID_TOOL=no
34703   if test "x$BDEPS_FTP" = xwget; then
34704     VALID_TOOL=yes
34705     wget -O $tmpfile $with_builddeps_server/$resource
34706   fi
34707   if test "x$BDEPS_FTP" = xlftp; then
34708     VALID_TOOL=yes
34709     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
34710   fi
34711   if test "x$BDEPS_FTP" = xftp; then
34712     VALID_TOOL=yes
34713     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
34714     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
34715     FTPUSERPWD=${FTPSERVER%%@*}
34716     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
34717       FTPUSER=${userpwd%%:*}
34718       FTPPWD=${userpwd#*@}
34719       FTPSERVER=${FTPSERVER#*@}
34720     else
34721       FTPUSER=ftp
34722       FTPPWD=ftp
34723     fi
34724     # the "pass" command does not work on some
34725     # ftp clients (read ftp.exe) but if it works,
34726     # passive mode is better!
34727     ( \
34728         echo "user $FTPUSER $FTPPWD"        ; \
34729         echo "pass"                         ; \
34730         echo "bin"                          ; \
34731         echo "get $FTPPATH $tmpfile"              ; \
34732     ) | ftp -in $FTPSERVER
34733   fi
34734   if test "x$VALID_TOOL" != xyes; then
34735     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
34736   fi
34737 
34738     mv $tmpfile $installdir/$filename
34739     if test ! -s $installdir/$filename; then
34740       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
34741     fi
34742     case "$extension" in
34743       zip)  echo "Unzipping $installdir/$filename..."
34744         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
34745         ;;
34746       tar.gz) echo "Untaring $installdir/$filename..."
34747         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34748         ;;
34749       tgz) echo "Untaring $installdir/$filename..."
34750         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
34751         ;;
34752       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
34753         ;;
34754     esac
34755   fi
34756   if test -f $installdir/$filename.unpacked; then
34757     depdir=$installdir
34758   fi
34759 
34760       fi
34761       # Source the builddeps file again, because in the previous command, the depdir
34762       # was updated to point at the current build dependency install directory.
34763       . $builddepsfile
34764       # Now extract variables from the builddeps.conf files.
34765       theroot=${builddep_alsa_ROOT}
34766       thecflags=${builddep_alsa_CFLAGS}
34767       thelibs=${builddep_alsa_LIBS}
34768       if test "x$depdir" = x; then
34769         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
34770       fi
34771       ALSA=$depdir
34772       if test "x$theroot" != x; then
34773         ALSA="$theroot"
34774       fi
34775       if test "x$thecflags" != x; then
34776         ALSA_CFLAGS="$thecflags"
34777       fi
34778       if test "x$thelibs" != x; then
34779         ALSA_LIBS="$thelibs"
34780       fi
34781       ALSA_FOUND=yes
34782       else ALSA_FOUND=no
34783 
34784     fi
34785     else ALSA_FOUND=no
34786 
34787   fi
34788 
34789     fi
34790     if test "x$ALSA_FOUND" = xno; then
34791 
34792 pkg_failed=no
34793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
34794 $as_echo_n "checking for ALSA... " >&6; }
34795 
34796 if test -n "$ALSA_CFLAGS"; then
34797     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
34798  elif test -n "$PKG_CONFIG"; then
34799     if test -n "$PKG_CONFIG" && \
34800     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34801   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34802   ac_status=$?
34803   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34804   test $ac_status = 0; }; then
34805   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
34806 else
34807   pkg_failed=yes
34808 fi
34809  else
34810     pkg_failed=untried
34811 fi
34812 if test -n "$ALSA_LIBS"; then
34813     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
34814  elif test -n "$PKG_CONFIG"; then
34815     if test -n "$PKG_CONFIG" && \
34816     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
34817   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
34818   ac_status=$?
34819   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34820   test $ac_status = 0; }; then
34821   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
34822 else
34823   pkg_failed=yes
34824 fi
34825  else
34826     pkg_failed=untried
34827 fi
34828 
34829 
34830 
34831 if test $pkg_failed = yes; then
34832 
34833 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
34834         _pkg_short_errors_supported=yes
34835 else
34836         _pkg_short_errors_supported=no
34837 fi
34838         if test $_pkg_short_errors_supported = yes; then
34839                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
34840         else
34841                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
34842         fi
34843         # Put the nasty error message in config.log where it belongs
34844         echo "$ALSA_PKG_ERRORS" >&5
34845 
34846         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34847 $as_echo "no" >&6; }
34848                 ALSA_FOUND=no
34849 elif test $pkg_failed = untried; then
34850         ALSA_FOUND=no
34851 else
34852         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
34853         ALSA_LIBS=$pkg_cv_ALSA_LIBS
34854         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34855 $as_echo "yes" >&6; }
34856         ALSA_FOUND=yes
34857 fi
34858     fi
34859     if test "x$ALSA_FOUND" = xno; then
34860       for ac_header in alsa/asoundlib.h
34861 do :
34862   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
34863 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
34864   cat >>confdefs.h <<_ACEOF
34865 #define HAVE_ALSA_ASOUNDLIB_H 1
34866 _ACEOF
34867 
34868             ALSA_FOUND=yes
34869             ALSA_CFLAGS=-Iignoreme
34870             ALSA_LIBS=-lasound
34871             DEFAULT_ALSA=yes
34872 
34873 else
34874   ALSA_FOUND=no
34875 fi
34876 
34877 done
34878 
34879     fi
34880     if test "x$ALSA_FOUND" = xno; then
34881 
34882   # Print a helpful message on how to acquire the necessary build dependency.
34883   # alsa is the help tag: freetype, cups, pulse, alsa etc
34884   MISSING_DEPENDENCY=alsa
34885 
34886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34887     cygwin_help $MISSING_DEPENDENCY
34888   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34889     msys_help $MISSING_DEPENDENCY
34890   else
34891     PKGHANDLER_COMMAND=
34892 
34893     case $PKGHANDLER in
34894       apt-get)
34895         apt_help     $MISSING_DEPENDENCY ;;
34896       yum)
34897         yum_help     $MISSING_DEPENDENCY ;;
34898       port)
34899         port_help    $MISSING_DEPENDENCY ;;
34900       pkgutil)
34901         pkgutil_help $MISSING_DEPENDENCY ;;
34902       pkgadd)
34903         pkgadd_help  $MISSING_DEPENDENCY ;;
34904     esac
34905 
34906     if test "x$PKGHANDLER_COMMAND" != x; then
34907       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34908     fi
34909   fi
34910 
34911       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
34912     fi
34913   fi
34914 
34915 
34916 
34917 
34918 
34919 
34920   ###############################################################################
34921   #
34922   # Check for the jpeg library
34923   #
34924 
34925   USE_EXTERNAL_LIBJPEG=true
34926   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
34927 $as_echo_n "checking for main in -ljpeg... " >&6; }
34928 if ${ac_cv_lib_jpeg_main+:} false; then :
34929   $as_echo_n "(cached) " >&6
34930 else
34931   ac_check_lib_save_LIBS=$LIBS
34932 LIBS="-ljpeg  $LIBS"
34933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34934 /* end confdefs.h.  */
34935 
34936 
34937 int
34938 main ()
34939 {
34940 return main ();
34941   ;
34942   return 0;
34943 }
34944 _ACEOF
34945 if ac_fn_cxx_try_link "$LINENO"; then :
34946   ac_cv_lib_jpeg_main=yes
34947 else
34948   ac_cv_lib_jpeg_main=no
34949 fi
34950 rm -f core conftest.err conftest.$ac_objext \
34951     conftest$ac_exeext conftest.$ac_ext
34952 LIBS=$ac_check_lib_save_LIBS
34953 fi
34954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
34955 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
34956 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
34957   cat >>confdefs.h <<_ACEOF
34958 #define HAVE_LIBJPEG 1
34959 _ACEOF
34960 
34961   LIBS="-ljpeg $LIBS"
34962 
34963 else
34964    USE_EXTERNAL_LIBJPEG=false
34965       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
34966 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
34967 
34968 fi
34969 
34970 
34971 
34972   ###############################################################################
34973   #
34974   # Check for the gif library
34975   #
34976 
34977 
34978 # Check whether --with-giflib was given.
34979 if test "${with_giflib+set}" = set; then :
34980   withval=$with_giflib;
34981 fi
34982 
34983 
34984 
34985   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
34986 $as_echo_n "checking for which giflib to use... " >&6; }
34987 
34988   # default is bundled
34989   DEFAULT_GIFLIB=bundled
34990 
34991   #
34992   # if user didn't specify, use DEFAULT_GIFLIB
34993   #
34994   if test "x${with_giflib}" = "x"; then
34995     with_giflib=${DEFAULT_GIFLIB}
34996   fi
34997 
34998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
34999 $as_echo "${with_giflib}" >&6; }
35000 
35001   if test "x${with_giflib}" = "xbundled"; then
35002     USE_EXTERNAL_LIBGIF=false
35003   elif test "x${with_giflib}" = "xsystem"; then
35004     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
35005 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
35006 
35007 else
35008    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
35009 fi
35010 
35011 
35012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
35013 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
35014 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
35015   $as_echo_n "(cached) " >&6
35016 else
35017   ac_check_lib_save_LIBS=$LIBS
35018 LIBS="-lgif  $LIBS"
35019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35020 /* end confdefs.h.  */
35021 
35022 /* Override any GCC internal prototype to avoid an error.
35023    Use char because int might match the return type of a GCC
35024    builtin and then its argument prototype would still apply.  */
35025 #ifdef __cplusplus
35026 extern "C"
35027 #endif
35028 char DGifGetCode ();
35029 int
35030 main ()
35031 {
35032 return DGifGetCode ();
35033   ;
35034   return 0;
35035 }
35036 _ACEOF
35037 if ac_fn_cxx_try_link "$LINENO"; then :
35038   ac_cv_lib_gif_DGifGetCode=yes
35039 else
35040   ac_cv_lib_gif_DGifGetCode=no
35041 fi
35042 rm -f core conftest.err conftest.$ac_objext \
35043     conftest$ac_exeext conftest.$ac_ext
35044 LIBS=$ac_check_lib_save_LIBS
35045 fi
35046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
35047 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
35048 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
35049   cat >>confdefs.h <<_ACEOF
35050 #define HAVE_LIBGIF 1
35051 _ACEOF
35052 
35053   LIBS="-lgif $LIBS"
35054 
35055 else
35056    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
35057 fi
35058 
35059 
35060     USE_EXTERNAL_LIBGIF=true
35061   else
35062     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
35063   fi
35064 
35065 
35066   ###############################################################################
35067   #
35068   # Check for the zlib library
35069   #
35070 
35071 
35072 # Check whether --with-zlib was given.
35073 if test "${with_zlib+set}" = set; then :
35074   withval=$with_zlib;
35075 fi
35076 
35077 
35078   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
35079 $as_echo_n "checking for compress in -lz... " >&6; }
35080 if ${ac_cv_lib_z_compress+:} false; then :
35081   $as_echo_n "(cached) " >&6
35082 else
35083   ac_check_lib_save_LIBS=$LIBS
35084 LIBS="-lz  $LIBS"
35085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35086 /* end confdefs.h.  */
35087 
35088 /* Override any GCC internal prototype to avoid an error.
35089    Use char because int might match the return type of a GCC
35090    builtin and then its argument prototype would still apply.  */
35091 #ifdef __cplusplus
35092 extern "C"
35093 #endif
35094 char compress ();
35095 int
35096 main ()
35097 {
35098 return compress ();
35099   ;
35100   return 0;
35101 }
35102 _ACEOF
35103 if ac_fn_cxx_try_link "$LINENO"; then :
35104   ac_cv_lib_z_compress=yes
35105 else
35106   ac_cv_lib_z_compress=no
35107 fi
35108 rm -f core conftest.err conftest.$ac_objext \
35109     conftest$ac_exeext conftest.$ac_ext
35110 LIBS=$ac_check_lib_save_LIBS
35111 fi
35112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
35113 $as_echo "$ac_cv_lib_z_compress" >&6; }
35114 if test "x$ac_cv_lib_z_compress" = xyes; then :
35115    ZLIB_FOUND=yes
35116 else
35117    ZLIB_FOUND=no
35118 fi
35119 
35120 
35121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
35122 $as_echo_n "checking for which zlib to use... " >&6; }
35123 
35124   DEFAULT_ZLIB=bundled
35125   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
35126     #
35127     # On macosx default is system...on others default is
35128     #
35129     DEFAULT_ZLIB=system
35130   fi
35131 
35132   if test "x${ZLIB_FOUND}" != "xyes"; then
35133     #
35134     # If we don't find any system...set default to bundled
35135     #
35136     DEFAULT_ZLIB=bundled
35137   fi
35138 
35139   #
35140   # If user didn't specify, use DEFAULT_ZLIB
35141   #
35142   if test "x${with_zlib}" = "x"; then
35143     with_zlib=${DEFAULT_ZLIB}
35144   fi
35145 
35146   if test "x${with_zlib}" = "xbundled"; then
35147     USE_EXTERNAL_LIBZ=false
35148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
35149 $as_echo "bundled" >&6; }
35150   elif test "x${with_zlib}" = "xsystem"; then
35151     if test "x${ZLIB_FOUND}" = "xyes"; then
35152       USE_EXTERNAL_LIBZ=true
35153       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
35154 $as_echo "system" >&6; }
35155     else
35156       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
35157 $as_echo "system not found" >&6; }
35158       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
35159     fi
35160   else
35161     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
35162   fi
35163 
35164 
35165 
35166   ###############################################################################
35167   LIBZIP_CAN_USE_MMAP=true
35168 
35169 
35170 
35171   ###############################################################################
35172   #
35173   # Check if altzone exists in time.h
35174   #
35175 
35176   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35177 /* end confdefs.h.  */
35178 #include <time.h>
35179 int
35180 main ()
35181 {
35182 return (int)altzone;
35183   ;
35184   return 0;
35185 }
35186 _ACEOF
35187 if ac_fn_cxx_try_link "$LINENO"; then :
35188   has_altzone=yes
35189 else
35190   has_altzone=no
35191 fi
35192 rm -f core conftest.err conftest.$ac_objext \
35193     conftest$ac_exeext conftest.$ac_ext
35194   if test "x$has_altzone" = xyes; then
35195 
35196 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
35197 
35198   fi
35199 
35200   ###############################################################################
35201   #
35202   # Check the maths library
35203   #
35204 
35205   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
35206 $as_echo_n "checking for cos in -lm... " >&6; }
35207 if ${ac_cv_lib_m_cos+:} false; then :
35208   $as_echo_n "(cached) " >&6
35209 else
35210   ac_check_lib_save_LIBS=$LIBS
35211 LIBS="-lm  $LIBS"
35212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35213 /* end confdefs.h.  */
35214 
35215 /* Override any GCC internal prototype to avoid an error.
35216    Use char because int might match the return type of a GCC
35217    builtin and then its argument prototype would still apply.  */
35218 #ifdef __cplusplus
35219 extern "C"
35220 #endif
35221 char cos ();
35222 int
35223 main ()
35224 {
35225 return cos ();
35226   ;
35227   return 0;
35228 }
35229 _ACEOF
35230 if ac_fn_cxx_try_link "$LINENO"; then :
35231   ac_cv_lib_m_cos=yes
35232 else
35233   ac_cv_lib_m_cos=no
35234 fi
35235 rm -f core conftest.err conftest.$ac_objext \
35236     conftest$ac_exeext conftest.$ac_ext
35237 LIBS=$ac_check_lib_save_LIBS
35238 fi
35239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
35240 $as_echo "$ac_cv_lib_m_cos" >&6; }
35241 if test "x$ac_cv_lib_m_cos" = xyes; then :
35242   cat >>confdefs.h <<_ACEOF
35243 #define HAVE_LIBM 1
35244 _ACEOF
35245 
35246   LIBS="-lm $LIBS"
35247 
35248 else
35249 
35250         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
35251 $as_echo "$as_me: Maths library was not found" >&6;}
35252 
35253 
35254 fi
35255 
35256 
35257 
35258   ###############################################################################
35259   #
35260   # Check for libdl.so
35261 
35262   save_LIBS="$LIBS"
35263   LIBS=""
35264   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
35265 $as_echo_n "checking for dlopen in -ldl... " >&6; }
35266 if ${ac_cv_lib_dl_dlopen+:} false; then :
35267   $as_echo_n "(cached) " >&6
35268 else
35269   ac_check_lib_save_LIBS=$LIBS
35270 LIBS="-ldl  $LIBS"
35271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35272 /* end confdefs.h.  */
35273 
35274 /* Override any GCC internal prototype to avoid an error.
35275    Use char because int might match the return type of a GCC
35276    builtin and then its argument prototype would still apply.  */
35277 #ifdef __cplusplus
35278 extern "C"
35279 #endif
35280 char dlopen ();
35281 int
35282 main ()
35283 {
35284 return dlopen ();
35285   ;
35286   return 0;
35287 }
35288 _ACEOF
35289 if ac_fn_cxx_try_link "$LINENO"; then :
35290   ac_cv_lib_dl_dlopen=yes
35291 else
35292   ac_cv_lib_dl_dlopen=no
35293 fi
35294 rm -f core conftest.err conftest.$ac_objext \
35295     conftest$ac_exeext conftest.$ac_ext
35296 LIBS=$ac_check_lib_save_LIBS
35297 fi
35298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
35299 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
35300 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
35301   cat >>confdefs.h <<_ACEOF
35302 #define HAVE_LIBDL 1
35303 _ACEOF
35304 
35305   LIBS="-ldl $LIBS"
35306 
35307 fi
35308 
35309   LIBDL="$LIBS"
35310 
35311   LIBS="$save_LIBS"
35312 
35313 
35314   ###############################################################################
35315   #
35316   # statically link libstdc++ before C++ ABI is stablized on Linux unless
35317   # dynamic build is configured on command line.
35318   #
35319 
35320 # Check whether --with-stdc++lib was given.
35321 if test "${with_stdc__lib+set}" = set; then :
35322   withval=$with_stdc__lib;
35323         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
35324                 && test "x$with_stdc__lib" != xdefault; then
35325           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
35326         fi
35327 
35328 else
35329   with_stdc__lib=default
35330 
35331 fi
35332 
35333 
35334   if test "x$OPENJDK_TARGET_OS" = xlinux; then
35335     # Test if -lstdc++ works.
35336     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
35337 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
35338     ac_ext=cpp
35339 ac_cpp='$CXXCPP $CPPFLAGS'
35340 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35341 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35342 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35343 
35344     OLD_CXXFLAGS="$CXXFLAGS"
35345     CXXFLAGS="$CXXFLAGS -lstdc++"
35346     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35347 /* end confdefs.h.  */
35348 
35349 int
35350 main ()
35351 {
35352 return 0;
35353   ;
35354   return 0;
35355 }
35356 _ACEOF
35357 if ac_fn_cxx_try_link "$LINENO"; then :
35358   has_dynamic_libstdcxx=yes
35359 else
35360   has_dynamic_libstdcxx=no
35361 fi
35362 rm -f core conftest.err conftest.$ac_objext \
35363     conftest$ac_exeext conftest.$ac_ext
35364     CXXFLAGS="$OLD_CXXFLAGS"
35365     ac_ext=cpp
35366 ac_cpp='$CXXCPP $CPPFLAGS'
35367 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35368 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35369 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35370 
35371     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
35372 $as_echo "$has_dynamic_libstdcxx" >&6; }
35373 
35374     # Test if stdc++ can be linked statically.
35375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
35376 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
35377     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
35378     ac_ext=cpp
35379 ac_cpp='$CXXCPP $CPPFLAGS'
35380 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35381 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35382 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35383 
35384     OLD_LIBS="$LIBS"
35385     OLD_CXX="$CXX"
35386     LIBS="$STATIC_STDCXX_FLAGS"
35387     CXX="$CC"
35388     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35389 /* end confdefs.h.  */
35390 
35391 int
35392 main ()
35393 {
35394 return 0;
35395   ;
35396   return 0;
35397 }
35398 _ACEOF
35399 if ac_fn_cxx_try_link "$LINENO"; then :
35400   has_static_libstdcxx=yes
35401 else
35402   has_static_libstdcxx=no
35403 fi
35404 rm -f core conftest.err conftest.$ac_objext \
35405     conftest$ac_exeext conftest.$ac_ext
35406     LIBS="$OLD_LIBS"
35407     CXX="$OLD_CXX"
35408     ac_ext=cpp
35409 ac_cpp='$CXXCPP $CPPFLAGS'
35410 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35411 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35412 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35413 
35414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
35415 $as_echo "$has_static_libstdcxx" >&6; }
35416 
35417     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
35418       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
35419     fi
35420 
35421     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
35422       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
35423     fi
35424 
35425     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
35426       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
35427     fi
35428 
35429     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
35430 $as_echo_n "checking how to link with libstdc++... " >&6; }
35431     # If dynamic was requested, it's available since it would fail above otherwise.
35432     # If dynamic wasn't requested, go with static unless it isn't available.
35433     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35434       LIBCXX="$LIBCXX -lstdc++"
35435       LDCXX="$CXX"
35436       STATIC_CXX_SETTING="STATIC_CXX=false"
35437       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
35438 $as_echo "dynamic" >&6; }
35439     else
35440       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
35441       LDCXX="$CC"
35442       STATIC_CXX_SETTING="STATIC_CXX=true"
35443       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
35444 $as_echo "static" >&6; }
35445     fi
35446   fi
35447 
35448 
35449   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35450     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
35451 
35452 pkg_failed=no
35453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
35454 $as_echo_n "checking for LIBFFI... " >&6; }
35455 
35456 if test -n "$LIBFFI_CFLAGS"; then
35457     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
35458  elif test -n "$PKG_CONFIG"; then
35459     if test -n "$PKG_CONFIG" && \
35460     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35461   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35462   ac_status=$?
35463   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35464   test $ac_status = 0; }; then
35465   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
35466 else
35467   pkg_failed=yes
35468 fi
35469  else
35470     pkg_failed=untried
35471 fi
35472 if test -n "$LIBFFI_LIBS"; then
35473     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
35474  elif test -n "$PKG_CONFIG"; then
35475     if test -n "$PKG_CONFIG" && \
35476     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
35477   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
35478   ac_status=$?
35479   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35480   test $ac_status = 0; }; then
35481   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
35482 else
35483   pkg_failed=yes
35484 fi
35485  else
35486     pkg_failed=untried
35487 fi
35488 
35489 
35490 
35491 if test $pkg_failed = yes; then
35492 
35493 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
35494         _pkg_short_errors_supported=yes
35495 else
35496         _pkg_short_errors_supported=no
35497 fi
35498         if test $_pkg_short_errors_supported = yes; then
35499                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
35500         else
35501                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
35502         fi
35503         # Put the nasty error message in config.log where it belongs
35504         echo "$LIBFFI_PKG_ERRORS" >&5
35505 
35506         as_fn_error $? "Package requirements (libffi) were not met:
35507 
35508 $LIBFFI_PKG_ERRORS
35509 
35510 Consider adjusting the PKG_CONFIG_PATH environment variable if you
35511 installed software in a non-standard prefix.
35512 
35513 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35514 and LIBFFI_LIBS to avoid the need to call pkg-config.
35515 See the pkg-config man page for more details.
35516 " "$LINENO" 5
35517 elif test $pkg_failed = untried; then
35518         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35519 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35520 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
35521 is in your PATH or set the PKG_CONFIG environment variable to the full
35522 path to pkg-config.
35523 
35524 Alternatively, you may set the environment variables LIBFFI_CFLAGS
35525 and LIBFFI_LIBS to avoid the need to call pkg-config.
35526 See the pkg-config man page for more details.
35527 
35528 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
35529 See \`config.log' for more details" "$LINENO" 5; }
35530 else
35531         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
35532         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
35533         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35534 $as_echo "yes" >&6; }
35535         :
35536 fi
35537 
35538   fi
35539 
35540   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
35541     # Extract the first word of "llvm-config", so it can be a program name with args.
35542 set dummy llvm-config; ac_word=$2
35543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35544 $as_echo_n "checking for $ac_word... " >&6; }
35545 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
35546   $as_echo_n "(cached) " >&6
35547 else
35548   if test -n "$LLVM_CONFIG"; then
35549   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
35550 else
35551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35552 for as_dir in $PATH
35553 do
35554   IFS=$as_save_IFS
35555   test -z "$as_dir" && as_dir=.
35556     for ac_exec_ext in '' $ac_executable_extensions; do
35557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35558     ac_cv_prog_LLVM_CONFIG="llvm-config"
35559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35560     break 2
35561   fi
35562 done
35563   done
35564 IFS=$as_save_IFS
35565 
35566 fi
35567 fi
35568 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
35569 if test -n "$LLVM_CONFIG"; then
35570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
35571 $as_echo "$LLVM_CONFIG" >&6; }
35572 else
35573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35574 $as_echo "no" >&6; }
35575 fi
35576 
35577 
35578 
35579     if test "x$LLVM_CONFIG" != xllvm-config; then
35580       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
35581     fi
35582 
35583     llvm_components="jit mcjit engine nativecodegen native"
35584     unset LLVM_CFLAGS
35585     for flag in $("$LLVM_CONFIG" --cxxflags); do
35586       if echo "${flag}" | grep -q '^-[ID]'; then
35587         if test "${flag}" != "-D_DEBUG" ; then
35588           if test "${LLVM_CFLAGS}" != "" ; then
35589             LLVM_CFLAGS="${LLVM_CFLAGS} "
35590           fi
35591           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
35592         fi
35593       fi
35594     done
35595     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
35596     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
35597 
35598     unset LLVM_LDFLAGS
35599     for flag in $("${LLVM_CONFIG}" --ldflags); do
35600       if echo "${flag}" | grep -q '^-L'; then
35601         if test "${LLVM_LDFLAGS}" != ""; then
35602           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
35603         fi
35604         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
35605       fi
35606     done
35607 
35608     unset LLVM_LIBS
35609     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
35610       if echo "${flag}" | grep -q '^-l'; then
35611         if test "${LLVM_LIBS}" != ""; then
35612           LLVM_LIBS="${LLVM_LIBS} "
35613         fi
35614         LLVM_LIBS="${LLVM_LIBS}${flag}"
35615       fi
35616     done
35617 
35618 
35619 
35620 
35621   fi
35622 
35623   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
35624   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
35625     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
35626   fi
35627 
35628   # TODO better (platform agnostic) test
35629   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
35630     LIBCXX="-lstdc++"
35631   fi
35632 
35633 
35634 
35635 
35636 
35637 ###############################################################################
35638 #
35639 # We need to do some final tweaking, when everything else is done.
35640 #
35641 ###############################################################################
35642 
35643 
35644   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
35645 
35646 
35647   # The name of the Service Agent jar.
35648   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
35649   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
35650     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
35651   fi
35652 
35653 
35654 
35655     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
35656 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
35657 
35658     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
35659       ENABLE_INTREE_EC=yes
35660       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
35661 $as_echo "yes" >&6; }
35662     else
35663       ENABLE_INTREE_EC=no
35664       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35665 $as_echo "no" >&6; }
35666     fi
35667 
35668 
35669 
35670 
35671 ###############################################################################
35672 #
35673 # Configure parts of the build that only affect the build performance,
35674 # not the result.
35675 #
35676 ###############################################################################
35677 
35678 
35679   # How many cores do we have on this build system?
35680 
35681 # Check whether --with-num-cores was given.
35682 if test "${with_num_cores+set}" = set; then :
35683   withval=$with_num_cores;
35684 fi
35685 
35686   if test "x$with_num_cores" = x; then
35687     # The number of cores were not specified, try to probe them.
35688 
35689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
35690 $as_echo_n "checking for number of cores... " >&6; }
35691   NUM_CORES=1
35692   FOUND_CORES=no
35693 
35694   if test -f /proc/cpuinfo; then
35695     # Looks like a Linux (or cygwin) system
35696     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
35697     FOUND_CORES=yes
35698   elif test -x /usr/sbin/psrinfo; then
35699     # Looks like a Solaris system
35700     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
35701     FOUND_CORES=yes
35702   elif test -x /usr/sbin/system_profiler; then
35703     # Looks like a MacOSX system
35704     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
35705     FOUND_CORES=yes
35706   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
35707     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
35708     FOUND_CORES=yes
35709   elif test -n "$NUMBER_OF_PROCESSORS"; then
35710     # On windows, look in the env
35711     NUM_CORES=$NUMBER_OF_PROCESSORS
35712     FOUND_CORES=yes
35713   fi
35714 
35715   if test "x$FOUND_CORES" = xyes; then
35716     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
35717 $as_echo "$NUM_CORES" >&6; }
35718   else
35719     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
35720 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
35721     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
35722 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
35723   fi
35724 
35725   else
35726     NUM_CORES=$with_num_cores
35727   fi
35728 
35729 
35730 
35731   # How much memory do we have on this build system?
35732 
35733 # Check whether --with-memory-size was given.
35734 if test "${with_memory_size+set}" = set; then :
35735   withval=$with_memory_size;
35736 fi
35737 
35738   if test "x$with_memory_size" = x; then
35739     # The memory size was not specified, try to probe it.
35740 
35741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
35742 $as_echo_n "checking for memory size... " >&6; }
35743   # Default to 1024 MB
35744   MEMORY_SIZE=1024
35745   FOUND_MEM=no
35746 
35747   if test -f /proc/meminfo; then
35748     # Looks like a Linux (or cygwin) system
35749     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
35750     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
35751     FOUND_MEM=yes
35752   elif test -x /usr/sbin/prtconf; then
35753     # Looks like a Solaris or AIX system
35754     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
35755     FOUND_MEM=yes
35756   elif test -x /usr/sbin/system_profiler; then
35757     # Looks like a MacOSX system
35758     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
35759     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
35760     FOUND_MEM=yes
35761   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
35762     # Windows, but without cygwin
35763     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
35764     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
35765     FOUND_MEM=yes
35766   fi
35767 
35768   if test "x$FOUND_MEM" = xyes; then
35769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
35770 $as_echo "$MEMORY_SIZE MB" >&6; }
35771   else
35772     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
35773 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
35774     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
35775 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
35776   fi
35777 
35778   else
35779     MEMORY_SIZE=$with_memory_size
35780   fi
35781 
35782 
35783 
35784   # Provide a decent default number of parallel jobs for make depending on
35785   # number of cores, amount of memory and machine architecture.
35786 
35787 # Check whether --with-jobs was given.
35788 if test "${with_jobs+set}" = set; then :
35789   withval=$with_jobs;
35790 fi
35791 
35792   if test "x$with_jobs" = x; then
35793     # Number of jobs was not specified, calculate.
35794     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
35795 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
35796     # Approximate memory in GB, rounding up a bit.
35797     memory_gb=`expr $MEMORY_SIZE / 1100`
35798     # Pick the lowest of memory in gb and number of cores.
35799     if test "$memory_gb" -lt "$NUM_CORES"; then
35800       JOBS="$memory_gb"
35801     else
35802       JOBS="$NUM_CORES"
35803       # On bigger machines, leave some room for other processes to run
35804       if test "$JOBS" -gt "4"; then
35805         JOBS=`expr $JOBS '*' 90 / 100`
35806       fi
35807     fi
35808     # Cap number of jobs to 16
35809     if test "$JOBS" -gt "16"; then
35810       JOBS=16
35811     fi
35812     if test "$JOBS" -eq "0"; then
35813       JOBS=1
35814     fi
35815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
35816 $as_echo "$JOBS" >&6; }
35817   else
35818     JOBS=$with_jobs
35819   fi
35820 
35821 
35822 
35823 # Setup smart javac (after cores and memory have been setup)
35824 
35825 
35826 # Check whether --with-sjavac-server-java was given.
35827 if test "${with_sjavac_server_java+set}" = set; then :
35828   withval=$with_sjavac_server_java;
35829 fi
35830 
35831 
35832   if test "x$with_sjavac_server_java" != x; then
35833     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
35834     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
35835     if test "x$FOUND_VERSION" = x; then
35836       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
35837     fi
35838   else
35839     SJAVAC_SERVER_JAVA=""
35840     # Hotspot specific options.
35841 
35842   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
35843   $ECHO "Command: $JAVA -verbosegc -version" >&5
35844   OUTPUT=`$JAVA -verbosegc -version 2>&1`
35845   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35846   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35847   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35848     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
35849     JVM_ARG_OK=true
35850   else
35851     $ECHO "Arg failed:" >&5
35852     $ECHO "$OUTPUT" >&5
35853     JVM_ARG_OK=false
35854   fi
35855 
35856     # JRockit specific options.
35857 
35858   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
35859   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
35860   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
35861   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35862   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35863   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35864     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
35865     JVM_ARG_OK=true
35866   else
35867     $ECHO "Arg failed:" >&5
35868     $ECHO "$OUTPUT" >&5
35869     JVM_ARG_OK=false
35870   fi
35871 
35872     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
35873   fi
35874 
35875 
35876   if test "$MEMORY_SIZE" -gt "2500"; then
35877 
35878   $ECHO "Check if jvm arg is ok: -d64" >&5
35879   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
35880   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
35881   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35882   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35883   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35884     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
35885     JVM_ARG_OK=true
35886   else
35887     $ECHO "Arg failed:" >&5
35888     $ECHO "$OUTPUT" >&5
35889     JVM_ARG_OK=false
35890   fi
35891 
35892     if test "$JVM_ARG_OK" = true; then
35893       JVM_64BIT=true
35894       JVM_ARG_OK=false
35895     fi
35896   fi
35897 
35898   if test "$JVM_64BIT" = true; then
35899     if test "$MEMORY_SIZE" -gt "17000"; then
35900 
35901   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
35902   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
35903   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
35904   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35905   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35906   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35907     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
35908     JVM_ARG_OK=true
35909   else
35910     $ECHO "Arg failed:" >&5
35911     $ECHO "$OUTPUT" >&5
35912     JVM_ARG_OK=false
35913   fi
35914 
35915     fi
35916     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
35917 
35918   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
35919   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
35920   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
35921   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35922   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35923   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35924     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
35925     JVM_ARG_OK=true
35926   else
35927     $ECHO "Arg failed:" >&5
35928     $ECHO "$OUTPUT" >&5
35929     JVM_ARG_OK=false
35930   fi
35931 
35932     fi
35933     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
35934 
35935   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
35936   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
35937   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
35938   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35939   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35940   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35941     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
35942     JVM_ARG_OK=true
35943   else
35944     $ECHO "Arg failed:" >&5
35945     $ECHO "$OUTPUT" >&5
35946     JVM_ARG_OK=false
35947   fi
35948 
35949     fi
35950     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
35951 
35952   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
35953   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
35954   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
35955   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35956   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35957   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35958     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
35959     JVM_ARG_OK=true
35960   else
35961     $ECHO "Arg failed:" >&5
35962     $ECHO "$OUTPUT" >&5
35963     JVM_ARG_OK=false
35964   fi
35965 
35966     fi
35967   fi
35968   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
35969 
35970   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
35971   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
35972   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
35973   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35974   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35975   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35976     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
35977     JVM_ARG_OK=true
35978   else
35979     $ECHO "Arg failed:" >&5
35980     $ECHO "$OUTPUT" >&5
35981     JVM_ARG_OK=false
35982   fi
35983 
35984   fi
35985   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
35986 
35987   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
35988   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
35989   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
35990   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
35991   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
35992   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
35993     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
35994     JVM_ARG_OK=true
35995   else
35996     $ECHO "Arg failed:" >&5
35997     $ECHO "$OUTPUT" >&5
35998     JVM_ARG_OK=false
35999   fi
36000 
36001   fi
36002   if test "$JVM_ARG_OK" = false; then
36003 
36004   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
36005   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
36006   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
36007   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
36008   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
36009   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
36010     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
36011     JVM_ARG_OK=true
36012   else
36013     $ECHO "Arg failed:" >&5
36014     $ECHO "$OUTPUT" >&5
36015     JVM_ARG_OK=false
36016   fi
36017 
36018   fi
36019 
36020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
36021 $as_echo_n "checking whether to use sjavac... " >&6; }
36022   # Check whether --enable-sjavac was given.
36023 if test "${enable_sjavac+set}" = set; then :
36024   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
36025 else
36026   ENABLE_SJAVAC='no'
36027 fi
36028 
36029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
36030 $as_echo "$ENABLE_SJAVAC" >&6; }
36031 
36032 
36033   if test "x$ENABLE_SJAVAC" = xyes; then
36034     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
36035   else
36036     SJAVAC_SERVER_DIR=
36037   fi
36038 
36039 
36040 
36041 # Can the C/C++ compiler use precompiled headers?
36042 
36043 
36044   ###############################################################################
36045   #
36046   # Can the C/C++ compiler use precompiled headers?
36047   #
36048   # Check whether --enable-precompiled-headers was given.
36049 if test "${enable_precompiled_headers+set}" = set; then :
36050   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
36051 else
36052   ENABLE_PRECOMPH=yes
36053 fi
36054 
36055 
36056   USE_PRECOMPILED_HEADER=1
36057   if test "x$ENABLE_PRECOMPH" = xno; then
36058     USE_PRECOMPILED_HEADER=0
36059   fi
36060 
36061   if test "x$ENABLE_PRECOMPH" = xyes; then
36062     # Check that the compiler actually supports precomp headers.
36063     if test "x$GCC" = xyes; then
36064       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
36065 $as_echo_n "checking that precompiled headers work... " >&6; }
36066       echo "int alfa();" > conftest.h
36067       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
36068       if test ! -f conftest.hpp.gch; then
36069         USE_PRECOMPILED_HEADER=0
36070         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36071 $as_echo "no" >&6; }
36072       else
36073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36074 $as_echo "yes" >&6; }
36075       fi
36076       rm -f conftest.h conftest.hpp.gch
36077     fi
36078   fi
36079 
36080 
36081 
36082 
36083 # Setup use of ccache, if available
36084 
36085   # Check whether --enable-ccache was given.
36086 if test "${enable_ccache+set}" = set; then :
36087   enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
36088 else
36089   ENABLE_CCACHE=yes
36090 fi
36091 
36092   if test "x$ENABLE_CCACHE" = xyes; then
36093     OLD_PATH="$PATH"
36094     if test "x$TOOLS_DIR" != x; then
36095       PATH=$TOOLS_DIR:$PATH
36096     fi
36097     # Extract the first word of "ccache", so it can be a program name with args.
36098 set dummy ccache; ac_word=$2
36099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36100 $as_echo_n "checking for $ac_word... " >&6; }
36101 if ${ac_cv_path_CCACHE+:} false; then :
36102   $as_echo_n "(cached) " >&6
36103 else
36104   case $CCACHE in
36105   [\\/]* | ?:[\\/]*)
36106   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
36107   ;;
36108   *)
36109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36110 for as_dir in $PATH
36111 do
36112   IFS=$as_save_IFS
36113   test -z "$as_dir" && as_dir=.
36114     for ac_exec_ext in '' $ac_executable_extensions; do
36115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36116     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
36117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36118     break 2
36119   fi
36120 done
36121   done
36122 IFS=$as_save_IFS
36123 
36124   ;;
36125 esac
36126 fi
36127 CCACHE=$ac_cv_path_CCACHE
36128 if test -n "$CCACHE"; then
36129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
36130 $as_echo "$CCACHE" >&6; }
36131 else
36132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36133 $as_echo "no" >&6; }
36134 fi
36135 
36136 
36137     PATH="$OLD_PATH"
36138   else
36139     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
36140 $as_echo_n "checking for ccache... " >&6; }
36141     { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
36142 $as_echo "explicitly disabled" >&6; }
36143     CCACHE=
36144   fi
36145 
36146 
36147 
36148 # Check whether --with-ccache-dir was given.
36149 if test "${with_ccache_dir+set}" = set; then :
36150   withval=$with_ccache_dir;
36151 fi
36152 
36153 
36154   if test "x$with_ccache_dir" != x; then
36155     # When using a non home ccache directory, assume the use is to share ccache files
36156     # with other users. Thus change the umask.
36157     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
36158   fi
36159   CCACHE_FOUND=""
36160   if test "x$CCACHE" != x; then
36161 
36162   if test "x$CCACHE" != x; then
36163     CCACHE_FOUND="true"
36164     # Only use ccache if it is 3.1.4 or later, which supports
36165     # precompiled headers.
36166     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
36167 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
36168     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
36169     if test "x$HAS_GOOD_CCACHE" = x; then
36170       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
36171 $as_echo "no, disabling ccache" >&6; }
36172       CCACHE=
36173     else
36174       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36175 $as_echo "yes" >&6; }
36176       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
36177 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
36178       PUSHED_FLAGS="$CXXFLAGS"
36179       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
36180       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36181 /* end confdefs.h.  */
36182 
36183 int
36184 main ()
36185 {
36186 
36187   ;
36188   return 0;
36189 }
36190 _ACEOF
36191 if ac_fn_cxx_try_compile "$LINENO"; then :
36192   CC_KNOWS_CCACHE_TRICK=yes
36193 else
36194   CC_KNOWS_CCACHE_TRICK=no
36195 fi
36196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36197       CXXFLAGS="$PUSHED_FLAGS"
36198       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
36199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36200 $as_echo "yes" >&6; }
36201       else
36202         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
36203 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
36204         CCACHE=
36205       fi
36206     fi
36207   fi
36208 
36209   if test "x$CCACHE" != x; then
36210     CCACHE_SLOPPINESS=time_macros
36211     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
36212     CCACHE_FLAGS=-fpch-preprocess
36213 
36214     if test "x$SET_CCACHE_DIR" != x; then
36215       mkdir -p $CCACHE_DIR > /dev/null 2>&1
36216       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
36217     fi
36218   fi
36219 
36220   fi
36221 
36222 
36223 ###############################################################################
36224 #
36225 # And now the finish...
36226 #
36227 ###############################################################################
36228 
36229 # Check for some common pitfalls
36230 
36231   if test x"$OPENJDK_BUILD_OS" = xwindows; then
36232     file_to_test="$SRC_ROOT/LICENSE"
36233     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
36234       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
36235     fi
36236   fi
36237 
36238 
36239   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
36240 $as_echo_n "checking if build directory is on local disk... " >&6; }
36241 
36242   # df -l lists only local disks; if the given directory is not found then
36243   # a non-zero exit code is given
36244   if test "x$DF" = x; then
36245     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36246       # msys does not have df; use Windows "net use" instead.
36247       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
36248       if test "x$IS_NETWORK_DISK" = x; then
36249         OUTPUT_DIR_IS_LOCAL="yes"
36250       else
36251         OUTPUT_DIR_IS_LOCAL="no"
36252       fi
36253     else
36254       # No df here, say it's local
36255       OUTPUT_DIR_IS_LOCAL="yes"
36256     fi
36257   else
36258     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
36259       OUTPUT_DIR_IS_LOCAL="yes"
36260     else
36261       OUTPUT_DIR_IS_LOCAL="no"
36262     fi
36263   fi
36264 
36265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
36266 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
36267 
36268 
36269 
36270   # Check if the user has any old-style ALT_ variables set.
36271   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
36272 
36273   # Before generating output files, test if they exist. If they do, this is a reconfigure.
36274   # Since we can't properly handle the dependencies for this, warn the user about the situation
36275   if test -e $OUTPUT_ROOT/spec.gmk; then
36276     IS_RECONFIGURE=yes
36277   else
36278     IS_RECONFIGURE=no
36279   fi
36280 
36281   if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
36282     HIDE_PERFORMANCE_HINTS=yes
36283   else
36284     HIDE_PERFORMANCE_HINTS=no
36285     # Hide it the next time around...
36286     $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
36287   fi
36288 
36289 
36290 # At the end, call the custom hook. (Dummy macro if no custom sources available)
36291 
36292 
36293 # We're messing a bit with internal autoconf variables to put the config.status
36294 # in the output directory instead of the current directory.
36295 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
36296 
36297 # Create the actual output files. Now the main work of configure is done.
36298 cat >confcache <<\_ACEOF
36299 # This file is a shell script that caches the results of configure
36300 # tests run on this system so they can be shared between configure
36301 # scripts and configure runs, see configure's option --config-cache.
36302 # It is not useful on other systems.  If it contains results you don't
36303 # want to keep, you may remove or edit it.
36304 #
36305 # config.status only pays attention to the cache file if you give it
36306 # the --recheck option to rerun configure.
36307 #
36308 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36309 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36310 # following values.
36311 
36312 _ACEOF
36313 
36314 # The following way of writing the cache mishandles newlines in values,
36315 # but we know of no workaround that is simple, portable, and efficient.
36316 # So, we kill variables containing newlines.
36317 # Ultrix sh set writes to stderr and can't be redirected directly,
36318 # and sets the high bit in the cache file unless we assign to the vars.
36319 (
36320   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36321     eval ac_val=\$$ac_var
36322     case $ac_val in #(
36323     *${as_nl}*)
36324       case $ac_var in #(
36325       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36326 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36327       esac
36328       case $ac_var in #(
36329       _ | IFS | as_nl) ;; #(
36330       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36331       *) { eval $ac_var=; unset $ac_var;} ;;
36332       esac ;;
36333     esac
36334   done
36335 
36336   (set) 2>&1 |
36337     case $as_nl`(ac_space=' '; set) 2>&1` in #(
36338     *${as_nl}ac_space=\ *)
36339       # `set' does not quote correctly, so add quotes: double-quote
36340       # substitution turns \\\\ into \\, and sed turns \\ into \.
36341       sed -n \
36342         "s/'/'\\\\''/g;
36343           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36344       ;; #(
36345     *)
36346       # `set' quotes correctly as required by POSIX, so do not add quotes.
36347       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36348       ;;
36349     esac |
36350     sort
36351 ) |
36352   sed '
36353      /^ac_cv_env_/b end
36354      t clear
36355      :clear
36356      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36357      t end
36358      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36359      :end' >>confcache
36360 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36361   if test -w "$cache_file"; then
36362     if test "x$cache_file" != "x/dev/null"; then
36363       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36364 $as_echo "$as_me: updating cache $cache_file" >&6;}
36365       if test ! -f "$cache_file" || test -h "$cache_file"; then
36366         cat confcache >"$cache_file"
36367       else
36368         case $cache_file in #(
36369         */* | ?:*)
36370           mv -f confcache "$cache_file"$$ &&
36371           mv -f "$cache_file"$$ "$cache_file" ;; #(
36372         *)
36373           mv -f confcache "$cache_file" ;;
36374         esac
36375       fi
36376     fi
36377   else
36378     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36379 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36380   fi
36381 fi
36382 rm -f confcache
36383 
36384 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36385 # Let make expand exec_prefix.
36386 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36387 
36388 DEFS=-DHAVE_CONFIG_H
36389 
36390 ac_libobjs=
36391 ac_ltlibobjs=
36392 U=
36393 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36394   # 1. Remove the extension, and $U if already installed.
36395   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36396   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36397   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
36398   #    will be set to the directory where LIBOBJS objects are built.
36399   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36400   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36401 done
36402 LIBOBJS=$ac_libobjs
36403 
36404 LTLIBOBJS=$ac_ltlibobjs
36405 
36406 
36407 
36408 : "${CONFIG_STATUS=./config.status}"
36409 ac_write_fail=0
36410 ac_clean_files_save=$ac_clean_files
36411 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36412 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36413 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36414 as_write_fail=0
36415 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36416 #! $SHELL
36417 # Generated by $as_me.
36418 # Run this file to recreate the current configuration.
36419 # Compiler output produced by configure, useful for debugging
36420 # configure, is in config.log if it exists.
36421 
36422 debug=false
36423 ac_cs_recheck=false
36424 ac_cs_silent=false
36425 
36426 SHELL=\${CONFIG_SHELL-$SHELL}
36427 export SHELL
36428 _ASEOF
36429 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36430 ## -------------------- ##
36431 ## M4sh Initialization. ##
36432 ## -------------------- ##
36433 
36434 # Be more Bourne compatible
36435 DUALCASE=1; export DUALCASE # for MKS sh
36436 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36437   emulate sh
36438   NULLCMD=:
36439   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36440   # is contrary to our usage.  Disable this feature.
36441   alias -g '${1+"$@"}'='"$@"'
36442   setopt NO_GLOB_SUBST
36443 else
36444   case `(set -o) 2>/dev/null` in #(
36445   *posix*) :
36446     set -o posix ;; #(
36447   *) :
36448      ;;
36449 esac
36450 fi
36451 
36452 
36453 as_nl='
36454 '
36455 export as_nl
36456 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36457 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36458 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36459 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36460 # Prefer a ksh shell builtin over an external printf program on Solaris,
36461 # but without wasting forks for bash or zsh.
36462 if test -z "$BASH_VERSION$ZSH_VERSION" \
36463     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36464   as_echo='print -r --'
36465   as_echo_n='print -rn --'
36466 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36467   as_echo='printf %s\n'
36468   as_echo_n='printf %s'
36469 else
36470   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36471     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36472     as_echo_n='/usr/ucb/echo -n'
36473   else
36474     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36475     as_echo_n_body='eval
36476       arg=$1;
36477       case $arg in #(
36478       *"$as_nl"*)
36479         expr "X$arg" : "X\\(.*\\)$as_nl";
36480         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36481       esac;
36482       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36483     '
36484     export as_echo_n_body
36485     as_echo_n='sh -c $as_echo_n_body as_echo'
36486   fi
36487   export as_echo_body
36488   as_echo='sh -c $as_echo_body as_echo'
36489 fi
36490 
36491 # The user is always right.
36492 if test "${PATH_SEPARATOR+set}" != set; then
36493   PATH_SEPARATOR=:
36494   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36495     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36496       PATH_SEPARATOR=';'
36497   }
36498 fi
36499 
36500 
36501 # IFS
36502 # We need space, tab and new line, in precisely that order.  Quoting is
36503 # there to prevent editors from complaining about space-tab.
36504 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36505 # splitting by setting IFS to empty value.)
36506 IFS=" ""        $as_nl"
36507 
36508 # Find who we are.  Look in the path if we contain no directory separator.
36509 as_myself=
36510 case $0 in #((
36511   *[\\/]* ) as_myself=$0 ;;
36512   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36513 for as_dir in $PATH
36514 do
36515   IFS=$as_save_IFS
36516   test -z "$as_dir" && as_dir=.
36517     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36518   done
36519 IFS=$as_save_IFS
36520 
36521      ;;
36522 esac
36523 # We did not find ourselves, most probably we were run as `sh COMMAND'
36524 # in which case we are not to be found in the path.
36525 if test "x$as_myself" = x; then
36526   as_myself=$0
36527 fi
36528 if test ! -f "$as_myself"; then
36529   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36530   exit 1
36531 fi
36532 
36533 # Unset variables that we do not need and which cause bugs (e.g. in
36534 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
36535 # suppresses any "Segmentation fault" message there.  '((' could
36536 # trigger a bug in pdksh 5.2.14.
36537 for as_var in BASH_ENV ENV MAIL MAILPATH
36538 do eval test x\${$as_var+set} = xset \
36539   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36540 done
36541 PS1='$ '
36542 PS2='> '
36543 PS4='+ '
36544 
36545 # NLS nuisances.
36546 LC_ALL=C
36547 export LC_ALL
36548 LANGUAGE=C
36549 export LANGUAGE
36550 
36551 # CDPATH.
36552 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36553 
36554 
36555 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36556 # ----------------------------------------
36557 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36558 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36559 # script with STATUS, using 1 if that was 0.
36560 as_fn_error ()
36561 {
36562   as_status=$1; test $as_status -eq 0 && as_status=1
36563   if test "$4"; then
36564     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36565     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36566   fi
36567   $as_echo "$as_me: error: $2" >&2
36568   as_fn_exit $as_status
36569 } # as_fn_error
36570 
36571 
36572 # as_fn_set_status STATUS
36573 # -----------------------
36574 # Set $? to STATUS, without forking.
36575 as_fn_set_status ()
36576 {
36577   return $1
36578 } # as_fn_set_status
36579 
36580 # as_fn_exit STATUS
36581 # -----------------
36582 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36583 as_fn_exit ()
36584 {
36585   set +e
36586   as_fn_set_status $1
36587   exit $1
36588 } # as_fn_exit
36589 
36590 # as_fn_unset VAR
36591 # ---------------
36592 # Portably unset VAR.
36593 as_fn_unset ()
36594 {
36595   { eval $1=; unset $1;}
36596 }
36597 as_unset=as_fn_unset
36598 # as_fn_append VAR VALUE
36599 # ----------------------
36600 # Append the text in VALUE to the end of the definition contained in VAR. Take
36601 # advantage of any shell optimizations that allow amortized linear growth over
36602 # repeated appends, instead of the typical quadratic growth present in naive
36603 # implementations.
36604 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36605   eval 'as_fn_append ()
36606   {
36607     eval $1+=\$2
36608   }'
36609 else
36610   as_fn_append ()
36611   {
36612     eval $1=\$$1\$2
36613   }
36614 fi # as_fn_append
36615 
36616 # as_fn_arith ARG...
36617 # ------------------
36618 # Perform arithmetic evaluation on the ARGs, and store the result in the
36619 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36620 # must be portable across $(()) and expr.
36621 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36622   eval 'as_fn_arith ()
36623   {
36624     as_val=$(( $* ))
36625   }'
36626 else
36627   as_fn_arith ()
36628   {
36629     as_val=`expr "$@" || test $? -eq 1`
36630   }
36631 fi # as_fn_arith
36632 
36633 
36634 if expr a : '\(a\)' >/dev/null 2>&1 &&
36635    test "X`expr 00001 : '.*\(...\)'`" = X001; then
36636   as_expr=expr
36637 else
36638   as_expr=false
36639 fi
36640 
36641 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36642   as_basename=basename
36643 else
36644   as_basename=false
36645 fi
36646 
36647 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36648   as_dirname=dirname
36649 else
36650   as_dirname=false
36651 fi
36652 
36653 as_me=`$as_basename -- "$0" ||
36654 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36655          X"$0" : 'X\(//\)$' \| \
36656          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36657 $as_echo X/"$0" |
36658     sed '/^.*\/\([^/][^/]*\)\/*$/{
36659             s//\1/
36660             q
36661           }
36662           /^X\/\(\/\/\)$/{
36663             s//\1/
36664             q
36665           }
36666           /^X\/\(\/\).*/{
36667             s//\1/
36668             q
36669           }
36670           s/.*/./; q'`
36671 
36672 # Avoid depending upon Character Ranges.
36673 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36674 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36675 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36676 as_cr_digits='0123456789'
36677 as_cr_alnum=$as_cr_Letters$as_cr_digits
36678 
36679 ECHO_C= ECHO_N= ECHO_T=
36680 case `echo -n x` in #(((((
36681 -n*)
36682   case `echo 'xy\c'` in
36683   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
36684   xy)  ECHO_C='\c';;
36685   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
36686        ECHO_T=' ';;
36687   esac;;
36688 *)
36689   ECHO_N='-n';;
36690 esac
36691 
36692 rm -f conf$$ conf$$.exe conf$$.file
36693 if test -d conf$$.dir; then
36694   rm -f conf$$.dir/conf$$.file
36695 else
36696   rm -f conf$$.dir
36697   mkdir conf$$.dir 2>/dev/null
36698 fi
36699 if (echo >conf$$.file) 2>/dev/null; then
36700   if ln -s conf$$.file conf$$ 2>/dev/null; then
36701     as_ln_s='ln -s'
36702     # ... but there are two gotchas:
36703     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36704     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36705     # In both cases, we have to default to `cp -pR'.
36706     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36707       as_ln_s='cp -pR'
36708   elif ln conf$$.file conf$$ 2>/dev/null; then
36709     as_ln_s=ln
36710   else
36711     as_ln_s='cp -pR'
36712   fi
36713 else
36714   as_ln_s='cp -pR'
36715 fi
36716 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36717 rmdir conf$$.dir 2>/dev/null
36718 
36719 
36720 # as_fn_mkdir_p
36721 # -------------
36722 # Create "$as_dir" as a directory, including parents if necessary.
36723 as_fn_mkdir_p ()
36724 {
36725 
36726   case $as_dir in #(
36727   -*) as_dir=./$as_dir;;
36728   esac
36729   test -d "$as_dir" || eval $as_mkdir_p || {
36730     as_dirs=
36731     while :; do
36732       case $as_dir in #(
36733       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36734       *) as_qdir=$as_dir;;
36735       esac
36736       as_dirs="'$as_qdir' $as_dirs"
36737       as_dir=`$as_dirname -- "$as_dir" ||
36738 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36739          X"$as_dir" : 'X\(//\)[^/]' \| \
36740          X"$as_dir" : 'X\(//\)$' \| \
36741          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36742 $as_echo X"$as_dir" |
36743     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36744             s//\1/
36745             q
36746           }
36747           /^X\(\/\/\)[^/].*/{
36748             s//\1/
36749             q
36750           }
36751           /^X\(\/\/\)$/{
36752             s//\1/
36753             q
36754           }
36755           /^X\(\/\).*/{
36756             s//\1/
36757             q
36758           }
36759           s/.*/./; q'`
36760       test -d "$as_dir" && break
36761     done
36762     test -z "$as_dirs" || eval "mkdir $as_dirs"
36763   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36764 
36765 
36766 } # as_fn_mkdir_p
36767 if mkdir -p . 2>/dev/null; then
36768   as_mkdir_p='mkdir -p "$as_dir"'
36769 else
36770   test -d ./-p && rmdir ./-p
36771   as_mkdir_p=false
36772 fi
36773 
36774 
36775 # as_fn_executable_p FILE
36776 # -----------------------
36777 # Test if FILE is an executable regular file.
36778 as_fn_executable_p ()
36779 {
36780   test -f "$1" && test -x "$1"
36781 } # as_fn_executable_p
36782 as_test_x='test -x'
36783 as_executable_p=as_fn_executable_p
36784 
36785 # Sed expression to map a string onto a valid CPP name.
36786 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
36787 
36788 # Sed expression to map a string onto a valid variable name.
36789 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
36790 
36791 
36792 exec 6>&1
36793 ## ----------------------------------- ##
36794 ## Main body of $CONFIG_STATUS script. ##
36795 ## ----------------------------------- ##
36796 _ASEOF
36797 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
36798 
36799 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36800 # Save the log message, to keep $0 and so on meaningful, and to
36801 # report actual input values of CONFIG_FILES etc. instead of their
36802 # values after options handling.
36803 ac_log="
36804 This file was extended by OpenJDK $as_me jdk8, which was
36805 generated by GNU Autoconf 2.69.  Invocation command line was
36806 
36807   CONFIG_FILES    = $CONFIG_FILES
36808   CONFIG_HEADERS  = $CONFIG_HEADERS
36809   CONFIG_LINKS    = $CONFIG_LINKS
36810   CONFIG_COMMANDS = $CONFIG_COMMANDS
36811   $ $0 $@
36812 
36813 on `(hostname || uname -n) 2>/dev/null | sed 1q`
36814 "
36815 
36816 _ACEOF
36817 
36818 case $ac_config_files in *"
36819 "*) set x $ac_config_files; shift; ac_config_files=$*;;
36820 esac
36821 
36822 case $ac_config_headers in *"
36823 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
36824 esac
36825 
36826 
36827 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36828 # Files that config.status was made for.
36829 config_files="$ac_config_files"
36830 config_headers="$ac_config_headers"
36831 
36832 _ACEOF
36833 
36834 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36835 ac_cs_usage="\
36836 \`$as_me' instantiates files and other configuration actions
36837 from templates according to the current configuration.  Unless the files
36838 and actions are specified as TAGs, all are instantiated by default.
36839 
36840 Usage: $0 [OPTION]... [TAG]...
36841 
36842   -h, --help       print this help, then exit
36843   -V, --version    print version number and configuration settings, then exit
36844       --config     print configuration, then exit
36845   -q, --quiet, --silent
36846                    do not print progress messages
36847   -d, --debug      don't remove temporary files
36848       --recheck    update $as_me by reconfiguring in the same conditions
36849       --file=FILE[:TEMPLATE]
36850                    instantiate the configuration file FILE
36851       --header=FILE[:TEMPLATE]
36852                    instantiate the configuration header FILE
36853 
36854 Configuration files:
36855 $config_files
36856 
36857 Configuration headers:
36858 $config_headers
36859 
36860 Report bugs to <build-dev@openjdk.java.net>.
36861 OpenJDK home page: <http://openjdk.java.net>."
36862 
36863 _ACEOF
36864 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36865 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
36866 ac_cs_version="\\
36867 OpenJDK config.status jdk8
36868 configured by $0, generated by GNU Autoconf 2.69,
36869   with options \\"\$ac_cs_config\\"
36870 
36871 Copyright (C) 2012 Free Software Foundation, Inc.
36872 This config.status script is free software; the Free Software Foundation
36873 gives unlimited permission to copy, distribute and modify it."
36874 
36875 ac_pwd='$ac_pwd'
36876 srcdir='$srcdir'
36877 AWK='$AWK'
36878 test -n "\$AWK" || AWK=awk
36879 _ACEOF
36880 
36881 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36882 # The default lists apply if the user does not specify any file.
36883 ac_need_defaults=:
36884 while test $# != 0
36885 do
36886   case $1 in
36887   --*=?*)
36888     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36889     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
36890     ac_shift=:
36891     ;;
36892   --*=)
36893     ac_option=`expr "X$1" : 'X\([^=]*\)='`
36894     ac_optarg=
36895     ac_shift=:
36896     ;;
36897   *)
36898     ac_option=$1
36899     ac_optarg=$2
36900     ac_shift=shift
36901     ;;
36902   esac
36903 
36904   case $ac_option in
36905   # Handling of the options.
36906   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
36907     ac_cs_recheck=: ;;
36908   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
36909     $as_echo "$ac_cs_version"; exit ;;
36910   --config | --confi | --conf | --con | --co | --c )
36911     $as_echo "$ac_cs_config"; exit ;;
36912   --debug | --debu | --deb | --de | --d | -d )
36913     debug=: ;;
36914   --file | --fil | --fi | --f )
36915     $ac_shift
36916     case $ac_optarg in
36917     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36918     '') as_fn_error $? "missing file argument" ;;
36919     esac
36920     as_fn_append CONFIG_FILES " '$ac_optarg'"
36921     ac_need_defaults=false;;
36922   --header | --heade | --head | --hea )
36923     $ac_shift
36924     case $ac_optarg in
36925     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
36926     esac
36927     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
36928     ac_need_defaults=false;;
36929   --he | --h)
36930     # Conflict between --help and --header
36931     as_fn_error $? "ambiguous option: \`$1'
36932 Try \`$0 --help' for more information.";;
36933   --help | --hel | -h )
36934     $as_echo "$ac_cs_usage"; exit ;;
36935   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
36936   | -silent | --silent | --silen | --sile | --sil | --si | --s)
36937     ac_cs_silent=: ;;
36938 
36939   # This is an error.
36940   -*) as_fn_error $? "unrecognized option: \`$1'
36941 Try \`$0 --help' for more information." ;;
36942 
36943   *) as_fn_append ac_config_targets " $1"
36944      ac_need_defaults=false ;;
36945 
36946   esac
36947   shift
36948 done
36949 
36950 ac_configure_extra_args=
36951 
36952 if $ac_cs_silent; then
36953   exec 6>/dev/null
36954   ac_configure_extra_args="$ac_configure_extra_args --silent"
36955 fi
36956 
36957 _ACEOF
36958 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36959 if \$ac_cs_recheck; then
36960   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
36961   shift
36962   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
36963   CONFIG_SHELL='$SHELL'
36964   export CONFIG_SHELL
36965   exec "\$@"
36966 fi
36967 
36968 _ACEOF
36969 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36970 exec 5>>config.log
36971 {
36972   echo
36973   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
36974 ## Running $as_me. ##
36975 _ASBOX
36976   $as_echo "$ac_log"
36977 } >&5
36978 
36979 _ACEOF
36980 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36981 _ACEOF
36982 
36983 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36984 
36985 # Handling of arguments.
36986 for ac_config_target in $ac_config_targets
36987 do
36988   case $ac_config_target in
36989     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
36990     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
36991     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
36992     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
36993     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
36994     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
36995     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
36996 
36997   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36998   esac
36999 done
37000 
37001 
37002 # If the user did not use the arguments to specify the items to instantiate,
37003 # then the envvar interface is used.  Set only those that are not.
37004 # We use the long form for the default assignment because of an extremely
37005 # bizarre bug on SunOS 4.1.3.
37006 if $ac_need_defaults; then
37007   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37008   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37009 fi
37010 
37011 # Have a temporary directory for convenience.  Make it in the build tree
37012 # simply because there is no reason against having it here, and in addition,
37013 # creating and moving files from /tmp can sometimes cause problems.
37014 # Hook for its removal unless debugging.
37015 # Note that there is a small window in which the directory will not be cleaned:
37016 # after its creation but before its name has been assigned to `$tmp'.
37017 $debug ||
37018 {
37019   tmp= ac_tmp=
37020   trap 'exit_status=$?
37021   : "${ac_tmp:=$tmp}"
37022   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37023 ' 0
37024   trap 'as_fn_exit 1' 1 2 13 15
37025 }
37026 # Create a (secure) tmp directory for tmp files.
37027 
37028 {
37029   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37030   test -d "$tmp"
37031 }  ||
37032 {
37033   tmp=./conf$$-$RANDOM
37034   (umask 077 && mkdir "$tmp")
37035 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37036 ac_tmp=$tmp
37037 
37038 # Set up the scripts for CONFIG_FILES section.
37039 # No need to generate them if there are no CONFIG_FILES.
37040 # This happens for instance with `./config.status config.h'.
37041 if test -n "$CONFIG_FILES"; then
37042 
37043 
37044 ac_cr=`echo X | tr X '\015'`
37045 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37046 # But we know of no other shell where ac_cr would be empty at this
37047 # point, so we can use a bashism as a fallback.
37048 if test "x$ac_cr" = x; then
37049   eval ac_cr=\$\'\\r\'
37050 fi
37051 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37052 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37053   ac_cs_awk_cr='\\r'
37054 else
37055   ac_cs_awk_cr=$ac_cr
37056 fi
37057 
37058 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37059 _ACEOF
37060 
37061 
37062 {
37063   echo "cat >conf$$subs.awk <<_ACEOF" &&
37064   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37065   echo "_ACEOF"
37066 } >conf$$subs.sh ||
37067   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37068 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37069 ac_delim='%!_!# '
37070 for ac_last_try in false false false false false :; do
37071   . ./conf$$subs.sh ||
37072     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37073 
37074   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37075   if test $ac_delim_n = $ac_delim_num; then
37076     break
37077   elif $ac_last_try; then
37078     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37079   else
37080     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37081   fi
37082 done
37083 rm -f conf$$subs.sh
37084 
37085 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37086 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37087 _ACEOF
37088 sed -n '
37089 h
37090 s/^/S["/; s/!.*/"]=/
37091 p
37092 g
37093 s/^[^!]*!//
37094 :repl
37095 t repl
37096 s/'"$ac_delim"'$//
37097 t delim
37098 :nl
37099 h
37100 s/\(.\{148\}\)..*/\1/
37101 t more1
37102 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37103 p
37104 n
37105 b repl
37106 :more1
37107 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37108 p
37109 g
37110 s/.\{148\}//
37111 t nl
37112 :delim
37113 h
37114 s/\(.\{148\}\)..*/\1/
37115 t more2
37116 s/["\\]/\\&/g; s/^/"/; s/$/"/
37117 p
37118 b
37119 :more2
37120 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37121 p
37122 g
37123 s/.\{148\}//
37124 t delim
37125 ' <conf$$subs.awk | sed '
37126 /^[^""]/{
37127   N
37128   s/\n//
37129 }
37130 ' >>$CONFIG_STATUS || ac_write_fail=1
37131 rm -f conf$$subs.awk
37132 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37133 _ACAWK
37134 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37135   for (key in S) S_is_set[key] = 1
37136   FS = ""
37137 
37138 }
37139 {
37140   line = $ 0
37141   nfields = split(line, field, "@")
37142   substed = 0
37143   len = length(field[1])
37144   for (i = 2; i < nfields; i++) {
37145     key = field[i]
37146     keylen = length(key)
37147     if (S_is_set[key]) {
37148       value = S[key]
37149       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37150       len += length(value) + length(field[++i])
37151       substed = 1
37152     } else
37153       len += 1 + keylen
37154   }
37155 
37156   print line
37157 }
37158 
37159 _ACAWK
37160 _ACEOF
37161 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37162 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37163   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37164 else
37165   cat
37166 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37167   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37168 _ACEOF
37169 
37170 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37171 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37172 # trailing colons and then remove the whole line if VPATH becomes empty
37173 # (actually we leave an empty line to preserve line numbers).
37174 if test "x$srcdir" = x.; then
37175   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
37176 h
37177 s///
37178 s/^/:/
37179 s/[      ]*$/:/
37180 s/:\$(srcdir):/:/g
37181 s/:\${srcdir}:/:/g
37182 s/:@srcdir@:/:/g
37183 s/^:*//
37184 s/:*$//
37185 x
37186 s/\(=[   ]*\).*/\1/
37187 G
37188 s/\n//
37189 s/^[^=]*=[       ]*$//
37190 }'
37191 fi
37192 
37193 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37194 fi # test -n "$CONFIG_FILES"
37195 
37196 # Set up the scripts for CONFIG_HEADERS section.
37197 # No need to generate them if there are no CONFIG_HEADERS.
37198 # This happens for instance with `./config.status Makefile'.
37199 if test -n "$CONFIG_HEADERS"; then
37200 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37201 BEGIN {
37202 _ACEOF
37203 
37204 # Transform confdefs.h into an awk script `defines.awk', embedded as
37205 # here-document in config.status, that substitutes the proper values into
37206 # config.h.in to produce config.h.
37207 
37208 # Create a delimiter string that does not exist in confdefs.h, to ease
37209 # handling of long lines.
37210 ac_delim='%!_!# '
37211 for ac_last_try in false false :; do
37212   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37213   if test -z "$ac_tt"; then
37214     break
37215   elif $ac_last_try; then
37216     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37217   else
37218     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37219   fi
37220 done
37221 
37222 # For the awk script, D is an array of macro values keyed by name,
37223 # likewise P contains macro parameters if any.  Preserve backslash
37224 # newline sequences.
37225 
37226 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37227 sed -n '
37228 s/.\{148\}/&'"$ac_delim"'/g
37229 t rset
37230 :rset
37231 s/^[     ]*#[    ]*define[       ][      ]*/ /
37232 t def
37233 d
37234 :def
37235 s/\\$//
37236 t bsnl
37237 s/["\\]/\\&/g
37238 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37239 D["\1"]=" \3"/p
37240 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
37241 d
37242 :bsnl
37243 s/["\\]/\\&/g
37244 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
37245 D["\1"]=" \3\\\\\\n"\\/p
37246 t cont
37247 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37248 t cont
37249 d
37250 :cont
37251 n
37252 s/.\{148\}/&'"$ac_delim"'/g
37253 t clear
37254 :clear
37255 s/\\$//
37256 t bsnlc
37257 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37258 d
37259 :bsnlc
37260 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37261 b cont
37262 ' <confdefs.h | sed '
37263 s/'"$ac_delim"'/"\\\
37264 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37265 
37266 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37267   for (key in D) D_is_set[key] = 1
37268   FS = ""
37269 }
37270 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37271   line = \$ 0
37272   split(line, arg, " ")
37273   if (arg[1] == "#") {
37274     defundef = arg[2]
37275     mac1 = arg[3]
37276   } else {
37277     defundef = substr(arg[1], 2)
37278     mac1 = arg[2]
37279   }
37280   split(mac1, mac2, "(") #)
37281   macro = mac2[1]
37282   prefix = substr(line, 1, index(line, defundef) - 1)
37283   if (D_is_set[macro]) {
37284     # Preserve the white space surrounding the "#".
37285     print prefix "define", macro P[macro] D[macro]
37286     next
37287   } else {
37288     # Replace #undef with comments.  This is necessary, for example,
37289     # in the case of _POSIX_SOURCE, which is predefined and required
37290     # on some systems where configure will not decide to define it.
37291     if (defundef == "undef") {
37292       print "/*", prefix defundef, macro, "*/"
37293       next
37294     }
37295   }
37296 }
37297 { print }
37298 _ACAWK
37299 _ACEOF
37300 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37301   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37302 fi # test -n "$CONFIG_HEADERS"
37303 
37304 
37305 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
37306 shift
37307 for ac_tag
37308 do
37309   case $ac_tag in
37310   :[FHLC]) ac_mode=$ac_tag; continue;;
37311   esac
37312   case $ac_mode$ac_tag in
37313   :[FHL]*:*);;
37314   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37315   :[FH]-) ac_tag=-:-;;
37316   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37317   esac
37318   ac_save_IFS=$IFS
37319   IFS=:
37320   set x $ac_tag
37321   IFS=$ac_save_IFS
37322   shift
37323   ac_file=$1
37324   shift
37325 
37326   case $ac_mode in
37327   :L) ac_source=$1;;
37328   :[FH])
37329     ac_file_inputs=
37330     for ac_f
37331     do
37332       case $ac_f in
37333       -) ac_f="$ac_tmp/stdin";;
37334       *) # Look for the file first in the build tree, then in the source tree
37335          # (if the path is not absolute).  The absolute path cannot be DOS-style,
37336          # because $ac_f cannot contain `:'.
37337          test -f "$ac_f" ||
37338            case $ac_f in
37339            [\\/$]*) false;;
37340            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37341            esac ||
37342            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37343       esac
37344       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37345       as_fn_append ac_file_inputs " '$ac_f'"
37346     done
37347 
37348     # Let's still pretend it is `configure' which instantiates (i.e., don't
37349     # use $as_me), people would be surprised to read:
37350     #    /* config.h.  Generated by config.status.  */
37351     configure_input='Generated from '`
37352           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37353         `' by configure.'
37354     if test x"$ac_file" != x-; then
37355       configure_input="$ac_file.  $configure_input"
37356       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37357 $as_echo "$as_me: creating $ac_file" >&6;}
37358     fi
37359     # Neutralize special characters interpreted by sed in replacement strings.
37360     case $configure_input in #(
37361     *\&* | *\|* | *\\* )
37362        ac_sed_conf_input=`$as_echo "$configure_input" |
37363        sed 's/[\\\\&|]/\\\\&/g'`;; #(
37364     *) ac_sed_conf_input=$configure_input;;
37365     esac
37366 
37367     case $ac_tag in
37368     *:-:* | *:-) cat >"$ac_tmp/stdin" \
37369       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37370     esac
37371     ;;
37372   esac
37373 
37374   ac_dir=`$as_dirname -- "$ac_file" ||
37375 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37376          X"$ac_file" : 'X\(//\)[^/]' \| \
37377          X"$ac_file" : 'X\(//\)$' \| \
37378          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37379 $as_echo X"$ac_file" |
37380     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37381             s//\1/
37382             q
37383           }
37384           /^X\(\/\/\)[^/].*/{
37385             s//\1/
37386             q
37387           }
37388           /^X\(\/\/\)$/{
37389             s//\1/
37390             q
37391           }
37392           /^X\(\/\).*/{
37393             s//\1/
37394             q
37395           }
37396           s/.*/./; q'`
37397   as_dir="$ac_dir"; as_fn_mkdir_p
37398   ac_builddir=.
37399 
37400 case "$ac_dir" in
37401 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37402 *)
37403   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37404   # A ".." for each directory in $ac_dir_suffix.
37405   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37406   case $ac_top_builddir_sub in
37407   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37408   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37409   esac ;;
37410 esac
37411 ac_abs_top_builddir=$ac_pwd
37412 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37413 # for backward compatibility:
37414 ac_top_builddir=$ac_top_build_prefix
37415 
37416 case $srcdir in
37417   .)  # We are building in place.
37418     ac_srcdir=.
37419     ac_top_srcdir=$ac_top_builddir_sub
37420     ac_abs_top_srcdir=$ac_pwd ;;
37421   [\\/]* | ?:[\\/]* )  # Absolute name.
37422     ac_srcdir=$srcdir$ac_dir_suffix;
37423     ac_top_srcdir=$srcdir
37424     ac_abs_top_srcdir=$srcdir ;;
37425   *) # Relative name.
37426     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37427     ac_top_srcdir=$ac_top_build_prefix$srcdir
37428     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37429 esac
37430 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37431 
37432 
37433   case $ac_mode in
37434   :F)
37435   #
37436   # CONFIG_FILE
37437   #
37438 
37439 _ACEOF
37440 
37441 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37442 # If the template does not know about datarootdir, expand it.
37443 # FIXME: This hack should be removed a few years after 2.60.
37444 ac_datarootdir_hack=; ac_datarootdir_seen=
37445 ac_sed_dataroot='
37446 /datarootdir/ {
37447   p
37448   q
37449 }
37450 /@datadir@/p
37451 /@docdir@/p
37452 /@infodir@/p
37453 /@localedir@/p
37454 /@mandir@/p'
37455 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37456 *datarootdir*) ac_datarootdir_seen=yes;;
37457 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37458   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37459 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37460 _ACEOF
37461 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37462   ac_datarootdir_hack='
37463   s&@datadir@&$datadir&g
37464   s&@docdir@&$docdir&g
37465   s&@infodir@&$infodir&g
37466   s&@localedir@&$localedir&g
37467   s&@mandir@&$mandir&g
37468   s&\\\${datarootdir}&$datarootdir&g' ;;
37469 esac
37470 _ACEOF
37471 
37472 # Neutralize VPATH when `$srcdir' = `.'.
37473 # Shell code in configure.ac might set extrasub.
37474 # FIXME: do we really want to maintain this feature?
37475 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37476 ac_sed_extra="$ac_vpsub
37477 $extrasub
37478 _ACEOF
37479 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37480 :t
37481 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37482 s|@configure_input@|$ac_sed_conf_input|;t t
37483 s&@top_builddir@&$ac_top_builddir_sub&;t t
37484 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37485 s&@srcdir@&$ac_srcdir&;t t
37486 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37487 s&@top_srcdir@&$ac_top_srcdir&;t t
37488 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37489 s&@builddir@&$ac_builddir&;t t
37490 s&@abs_builddir@&$ac_abs_builddir&;t t
37491 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37492 $ac_datarootdir_hack
37493 "
37494 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37495   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37496 
37497 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37498   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37499   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
37500       "$ac_tmp/out"`; test -z "$ac_out"; } &&
37501   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37502 which seems to be undefined.  Please make sure it is defined" >&5
37503 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37504 which seems to be undefined.  Please make sure it is defined" >&2;}
37505 
37506   rm -f "$ac_tmp/stdin"
37507   case $ac_file in
37508   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37509   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37510   esac \
37511   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37512  ;;
37513   :H)
37514   #
37515   # CONFIG_HEADER
37516   #
37517   if test x"$ac_file" != x-; then
37518     {
37519       $as_echo "/* $configure_input  */" \
37520       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37521     } >"$ac_tmp/config.h" \
37522       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37523     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37524       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37525 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37526     else
37527       rm -f "$ac_file"
37528       mv "$ac_tmp/config.h" "$ac_file" \
37529         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37530     fi
37531   else
37532     $as_echo "/* $configure_input  */" \
37533       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37534       || as_fn_error $? "could not create -" "$LINENO" 5
37535   fi
37536  ;;
37537 
37538 
37539   esac
37540 
37541 done # for ac_tag
37542 
37543 
37544 as_fn_exit 0
37545 _ACEOF
37546 ac_clean_files=$ac_clean_files_save
37547 
37548 test $ac_write_fail = 0 ||
37549   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37550 
37551 
37552 # configure is writing to config.log, and then calls config.status.
37553 # config.status does its own redirection, appending to config.log.
37554 # Unfortunately, on DOS this fails, as config.log is still kept open
37555 # by configure, so config.status won't be able to write to it; its
37556 # output is simply discarded.  So we exec the FD to /dev/null,
37557 # effectively closing config.log, so it can be properly (re)opened and
37558 # appended to by config.status.  When coming back to configure, we
37559 # need to make the FD available again.
37560 if test "$no_create" != yes; then
37561   ac_cs_success=:
37562   ac_config_status_args=
37563   test "$silent" = yes &&
37564     ac_config_status_args="$ac_config_status_args --quiet"
37565   exec 5>/dev/null
37566   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37567   exec 5>>config.log
37568   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37569   # would make configure fail if this is the last instruction.
37570   $ac_cs_success || as_fn_exit 1
37571 fi
37572 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37573   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37574 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37575 fi
37576 
37577 
37578 # Try to move the config.log file to the output directory.
37579 if test -e ./config.log; then
37580   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
37581 fi
37582 
37583 # Make the compare script executable
37584 $CHMOD +x $OUTPUT_ROOT/compare.sh
37585 
37586 # Finally output some useful information to the user
37587 
37588   # Finally output some useful information to the user
37589 
37590   if test "x$CCACHE_FOUND" != x; then
37591     if  test "x$HAS_GOOD_CCACHE" = x; then
37592       CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
37593       CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
37594     else
37595       CCACHE_STATUS="installed and in use"
37596     fi
37597   else
37598     if test "x$GCC" = xyes; then
37599       CCACHE_STATUS="not installed (consider installing)"
37600       CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
37601     else
37602       CCACHE_STATUS="not available for your system"
37603     fi
37604   fi
37605 
37606   printf "\n"
37607   printf "====================================================\n"
37608   printf "A new configuration has been successfully created in\n"
37609   printf "$OUTPUT_ROOT\n"
37610   if test "x$CONFIGURE_COMMAND_LINE" != x; then
37611     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
37612   else
37613     printf "using default settings.\n"
37614   fi
37615 
37616   printf "\n"
37617   printf "Configuration summary:\n"
37618   printf "* Debug level:    $DEBUG_LEVEL\n"
37619   printf "* JDK variant:    $JDK_VARIANT\n"
37620   printf "* JVM variants:   $with_jvm_variants\n"
37621   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
37622 
37623   printf "\n"
37624   printf "Tools summary:\n"
37625   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
37626     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
37627   fi
37628   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
37629   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
37630   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
37631 
37632   printf "\n"
37633   printf "Build performance summary:\n"
37634   printf "* Cores to use:   $JOBS\n"
37635   printf "* Memory limit:   $MEMORY_SIZE MB\n"
37636   printf "* ccache status:  $CCACHE_STATUS\n"
37637   printf "\n"
37638 
37639   if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
37640     printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
37641     printf "$CCACHE_HELP_MSG\n"
37642 
37643   # Print a helpful message on how to acquire the necessary build dependency.
37644   # ccache is the help tag: freetype, cups, pulse, alsa etc
37645   MISSING_DEPENDENCY=ccache
37646 
37647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37648     cygwin_help $MISSING_DEPENDENCY
37649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37650     msys_help $MISSING_DEPENDENCY
37651   else
37652     PKGHANDLER_COMMAND=
37653 
37654     case $PKGHANDLER in
37655       apt-get)
37656         apt_help     $MISSING_DEPENDENCY ;;
37657       yum)
37658         yum_help     $MISSING_DEPENDENCY ;;
37659       port)
37660         port_help    $MISSING_DEPENDENCY ;;
37661       pkgutil)
37662         pkgutil_help $MISSING_DEPENDENCY ;;
37663       pkgadd)
37664         pkgadd_help  $MISSING_DEPENDENCY ;;
37665     esac
37666 
37667     if test "x$PKGHANDLER_COMMAND" != x; then
37668       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
37669     fi
37670   fi
37671 
37672     printf "$HELP_MSG\n"
37673     printf "\n"
37674   fi
37675 
37676   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
37677     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
37678     printf "will result in longer build times.\n"
37679     printf "\n"
37680   fi
37681 
37682   if test "x$FOUND_ALT_VARIABLES" != "x"; then
37683     printf "WARNING: You have old-style ALT_ environment variables set.\n"
37684     printf "These are not respected, and will be ignored. It is recommended\n"
37685     printf "that you clean your environment. The following variables are set:\n"
37686     printf "$FOUND_ALT_VARIABLES\n"
37687     printf "\n"
37688   fi
37689 
37690   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
37691     printf "WARNING: Your build output directory is not on a local disk.\n"
37692     printf "This will severely degrade build performance!\n"
37693     printf "It is recommended that you create an output directory on a local disk,\n"
37694     printf "and run the configure script again from that directory.\n"
37695     printf "\n"
37696   fi
37697 
37698   if test "x$IS_RECONFIGURE" = "xyes"; then
37699     printf "WARNING: The result of this configuration has overridden an older\n"
37700     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
37701     printf "proper build. Failure to do so might result in strange build problems.\n"
37702     printf "\n"
37703   fi
37704