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_LIBPNG
 650 PNG_LIBS
 651 PNG_CFLAGS
 652 USE_EXTERNAL_LCMS
 653 LCMS_LIBS
 654 LCMS_CFLAGS
 655 USE_EXTERNAL_LIBGIF
 656 USE_EXTERNAL_LIBJPEG
 657 ALSA_LIBS
 658 ALSA_CFLAGS
 659 FREETYPE_BUNDLE_LIB_PATH
 660 FREETYPE_LIBS
 661 FREETYPE_CFLAGS
 662 CUPS_CFLAGS
 663 OPENWIN_HOME
 664 X_EXTRA_LIBS
 665 X_LIBS
 666 X_PRE_LIBS
 667 X_CFLAGS
 668 XMKMF
 669 FIXPATH
 670 CXXFLAGS_DEBUG_SYMBOLS
 671 CFLAGS_DEBUG_SYMBOLS
 672 ZIP_DEBUGINFO_FILES
 673 ENABLE_DEBUG_SYMBOLS
 674 USING_BROKEN_SUSE_LD
 675 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 676 ZERO_ARCHFLAG
 677 LDFLAGS_CXX_JDK
 678 LDFLAGS_JDKEXE_SUFFIX
 679 LDFLAGS_JDKLIB_SUFFIX
 680 LDFLAGS_JDKEXE
 681 LDFLAGS_JDKLIB
 682 CXXFLAGS_JDKEXE
 683 CXXFLAGS_JDKLIB
 684 CFLAGS_JDKEXE
 685 CFLAGS_JDKLIB
 686 MACOSX_VERSION_MIN
 687 PACKAGE_PATH
 688 LEGACY_EXTRA_LDFLAGS
 689 LEGACY_EXTRA_CXXFLAGS
 690 LEGACY_EXTRA_CFLAGS
 691 CXX_FLAG_DEPS
 692 C_FLAG_DEPS
 693 CXX_O_FLAG_NONE
 694 CXX_O_FLAG_NORM
 695 CXX_O_FLAG_HI
 696 CXX_O_FLAG_HIGHEST
 697 C_O_FLAG_NONE
 698 C_O_FLAG_NORM
 699 C_O_FLAG_HI
 700 C_O_FLAG_HIGHEST
 701 POST_MCS_CMD
 702 POST_STRIP_CMD
 703 SET_EXECUTABLE_ORIGIN
 704 SET_SHARED_LIBRARY_ORIGIN
 705 CXX_FLAG_REORDER
 706 C_FLAG_REORDER
 707 SET_SHARED_LIBRARY_MAPFILE
 708 SET_SHARED_LIBRARY_NAME
 709 SHARED_LIBRARY_FLAGS
 710 EXE_SUFFIX
 711 STATIC_LIBRARY_SUFFIX
 712 SHARED_LIBRARY_SUFFIX
 713 LIBRARY_PREFIX
 714 STATIC_LIBRARY
 715 SHARED_LIBRARY
 716 OBJ_SUFFIX
 717 COMPILER_NAME
 718 JT_HOME
 719 JTREGEXE
 720 LIPO
 721 ac_ct_OBJDUMP
 722 OBJDUMP
 723 ac_ct_OBJCOPY
 724 OBJCOPY
 725 ac_ct_STRIP
 726 ac_ct_NM
 727 MCS
 728 STRIP
 729 GNM
 730 NM
 731 AS
 732 CXXCPP
 733 CPP
 734 COMPILER_TYPE
 735 RC_FLAGS
 736 DUMPBIN
 737 WINAR
 738 HOTSPOT_RC
 739 HOTSPOT_MT
 740 RC
 741 MT
 742 WINLD
 743 HOTSPOT_LD
 744 HOTSPOT_CXX
 745 ARFLAGS
 746 ac_ct_AR
 747 AR
 748 LDEXECXX
 749 LDCXX
 750 LDEXE
 751 LD
 752 ac_ct_OBJC
 753 OBJCFLAGS
 754 OBJC
 755 ac_ct_CXX
 756 CXXFLAGS
 757 CXX
 758 ac_ct_PROPER_COMPILER_CXX
 759 PROPER_COMPILER_CXX
 760 TOOLS_DIR_CXX
 761 POTENTIAL_CXX
 762 COMPILER_TARGET_BITS_FLAG
 763 OBJEXT
 764 EXEEXT
 765 ac_ct_CC
 766 CPPFLAGS
 767 LDFLAGS
 768 CFLAGS
 769 CC
 770 ac_ct_PROPER_COMPILER_CC
 771 PROPER_COMPILER_CC
 772 TOOLS_DIR_CC
 773 POTENTIAL_CC
 774 BUILD_LD
 775 BUILD_CXX
 776 BUILD_CC
 777 MSVCR_DLL
 778 VS_PATH
 779 VS_LIB
 780 VS_INCLUDE
 781 CYGWIN_LINK
 782 AR_OUT_OPTION
 783 LD_OUT_OPTION
 784 EXE_OUT_OPTION
 785 CC_OUT_OPTION
 786 BUILD_HOTSPOT
 787 HOTSPOT_DIST
 788 BUILD_OUTPUT
 789 OVERRIDE_SRC_ROOT
 790 ADD_SRC_ROOT
 791 JDK_TOPDIR
 792 NASHORN_TOPDIR
 793 HOTSPOT_TOPDIR
 794 JAXWS_TOPDIR
 795 JAXP_TOPDIR
 796 CORBA_TOPDIR
 797 LANGTOOLS_TOPDIR
 798 BOOT_JDK_JVMARGS
 799 JAVAC_FLAGS
 800 BOOT_JDK_SOURCETARGET
 801 JARSIGNER
 802 NATIVE2ASCII
 803 JAR
 804 JAVAH
 805 JAVAC
 806 JAVA
 807 BOOT_JDK
 808 BOOT_TOOLSJAR
 809 BOOT_RTJAR
 810 JAVA_CHECK
 811 JAVAC_CHECK
 812 COOKED_BUILD_NUMBER
 813 JDK_VERSION
 814 COPYRIGHT_YEAR
 815 MACOSX_BUNDLE_ID_BASE
 816 MACOSX_BUNDLE_NAME_BASE
 817 COMPANY_NAME
 818 JDK_RC_PLATFORM_NAME
 819 PRODUCT_SUFFIX
 820 PRODUCT_NAME
 821 LAUNCHER_NAME
 822 MILESTONE
 823 JDK_BUILD_NUMBER
 824 JDK_UPDATE_VERSION
 825 JDK_MICRO_VERSION
 826 JDK_MINOR_VERSION
 827 JDK_MAJOR_VERSION
 828 USER_RELEASE_SUFFIX
 829 COMPRESS_JARS
 830 RMICONNECTOR_IIOP
 831 UNLIMITED_CRYPTO
 832 CACERTS_FILE
 833 TEST_IN_BUILD
 834 BUILD_HEADLESS
 835 SUPPORT_HEADFUL
 836 SUPPORT_HEADLESS
 837 BDEPS_FTP
 838 BDEPS_UNZIP
 839 OS_VERSION_MICRO
 840 OS_VERSION_MINOR
 841 OS_VERSION_MAJOR
 842 PKG_CONFIG
 843 CODESIGN
 844 XATTR
 845 DSYMUTIL
 846 IS_GNU_TIME
 847 TIME
 848 STAT
 849 HG
 850 READELF
 851 OTOOL
 852 LDD
 853 ZIP
 854 UNZIP
 855 FIND_DELETE
 856 MAKE
 857 CHECK_TOOLSDIR_MAKE
 858 CHECK_TOOLSDIR_GMAKE
 859 CHECK_MAKE
 860 CHECK_GMAKE
 861 PKGHANDLER
 862 OUTPUT_ROOT
 863 CONF_NAME
 864 SPEC
 865 BUILD_VARIANT_RELEASE
 866 DEBUG_CLASSFILES
 867 FASTDEBUG
 868 VARIANT
 869 DEBUG_LEVEL
 870 MACOSX_UNIVERSAL
 871 INCLUDE_SA
 872 JVM_VARIANT_CORE
 873 JVM_VARIANT_ZEROSHARK
 874 JVM_VARIANT_ZERO
 875 JVM_VARIANT_KERNEL
 876 JVM_VARIANT_MINIMAL1
 877 JVM_VARIANT_CLIENT
 878 JVM_VARIANT_SERVER
 879 JVM_VARIANTS
 880 JVM_INTERPRETER
 881 JDK_VARIANT
 882 SET_OPENJDK
 883 BUILD_LOG_WRAPPER
 884 BUILD_LOG_PREVIOUS
 885 BUILD_LOG
 886 SYS_ROOT
 887 PATH_SEP
 888 SRC_ROOT
 889 ZERO_ARCHDEF
 890 DEFINE_CROSS_COMPILE_ARCH
 891 LP64
 892 OPENJDK_TARGET_OS_EXPORT_DIR
 893 OPENJDK_TARGET_OS_API_DIR
 894 OPENJDK_TARGET_CPU_JLI_CFLAGS
 895 OPENJDK_TARGET_CPU_OSARCH
 896 OPENJDK_TARGET_CPU_ISADIR
 897 OPENJDK_TARGET_CPU_LIBDIR
 898 OPENJDK_TARGET_CPU_LEGACY_LIB
 899 OPENJDK_TARGET_CPU_LEGACY
 900 REQUIRED_OS_VERSION
 901 REQUIRED_OS_NAME
 902 COMPILE_TYPE
 903 OPENJDK_TARGET_CPU_ENDIAN
 904 OPENJDK_TARGET_CPU_BITS
 905 OPENJDK_TARGET_CPU_ARCH
 906 OPENJDK_TARGET_CPU
 907 OPENJDK_TARGET_OS_API
 908 OPENJDK_TARGET_OS
 909 OPENJDK_BUILD_CPU_ENDIAN
 910 OPENJDK_BUILD_CPU_BITS
 911 OPENJDK_BUILD_CPU_ARCH
 912 OPENJDK_BUILD_CPU
 913 OPENJDK_BUILD_OS_API
 914 OPENJDK_BUILD_OS
 915 OPENJDK_BUILD_AUTOCONF_NAME
 916 OPENJDK_TARGET_AUTOCONF_NAME
 917 target_os
 918 target_vendor
 919 target_cpu
 920 target
 921 host_os
 922 host_vendor
 923 host_cpu
 924 host
 925 build_os
 926 build_vendor
 927 build_cpu
 928 build
 929 SETFILE
 930 DF
 931 READLINK
 932 CYGPATH
 933 SED
 934 FGREP
 935 EGREP
 936 GREP
 937 AWK
 938 XARGS
 939 WHICH
 940 WC
 941 UNIQ
 942 UNAME
 943 TR
 944 TOUCH
 945 TEE
 946 TAR
 947 TAIL
 948 SORT
 949 SH
 950 RM
 951 PRINTF
 952 NAWK
 953 MV
 954 MKTEMP
 955 MKDIR
 956 LS
 957 LN
 958 HEAD
 959 FIND
 960 FILE
 961 EXPR
 962 ECHO
 963 DIRNAME
 964 DIFF
 965 DATE
 966 CUT
 967 CPIO
 968 CP
 969 COMM
 970 CMP
 971 CHMOD
 972 CAT
 973 BASH
 974 BASENAME
 975 DATE_WHEN_CONFIGURED
 976 CONFIGURE_COMMAND_LINE
 977 CUSTOM_MAKE_DIR
 978 target_alias
 979 host_alias
 980 build_alias
 981 LIBS
 982 ECHO_T
 983 ECHO_N
 984 ECHO_C
 985 DEFS
 986 mandir
 987 localedir
 988 libdir
 989 psdir
 990 pdfdir
 991 dvidir
 992 htmldir
 993 infodir
 994 docdir
 995 oldincludedir
 996 includedir
 997 localstatedir
 998 sharedstatedir
 999 sysconfdir
1000 datadir
1001 datarootdir
1002 libexecdir
1003 sbindir
1004 bindir
1005 program_transform_name
1006 prefix
1007 exec_prefix
1008 PACKAGE_URL
1009 PACKAGE_BUGREPORT
1010 PACKAGE_STRING
1011 PACKAGE_VERSION
1012 PACKAGE_TARNAME
1013 PACKAGE_NAME
1014 PATH_SEPARATOR
1015 SHELL'
1016 ac_subst_files=''
1017 ac_user_opts='
1018 enable_option_checking
1019 with_custom_make_dir
1020 with_target_bits
1021 with_sys_root
1022 with_tools_dir
1023 with_devkit
1024 enable_openjdk_only
1025 with_jdk_variant
1026 with_jvm_interpreter
1027 with_jvm_variants
1028 enable_debug
1029 with_debug_level
1030 with_conf_name
1031 with_builddeps_conf
1032 with_builddeps_server
1033 with_builddeps_dir
1034 with_builddeps_group
1035 enable_headful
1036 enable_hotspot_test_in_build
1037 with_cacerts_file
1038 enable_unlimited_crypto
1039 enable_rmiconnector_iiop
1040 with_milestone
1041 with_update_version
1042 with_user_release_suffix
1043 with_build_number
1044 with_boot_jdk
1045 with_boot_jdk_jvmargs
1046 with_add_source_root
1047 with_override_source_root
1048 with_adds_and_overrides
1049 with_override_langtools
1050 with_override_corba
1051 with_override_jaxp
1052 with_override_jaxws
1053 with_override_hotspot
1054 with_override_nashorn
1055 with_override_jdk
1056 with_import_hotspot
1057 with_msvcr_dll
1058 with_dxsdk
1059 with_dxsdk_lib
1060 with_dxsdk_include
1061 with_jtreg
1062 with_extra_cflags
1063 with_extra_cxxflags
1064 with_extra_ldflags
1065 enable_debug_symbols
1066 enable_zip_debug_info
1067 enable_macosx_runtime_support
1068 with_x
1069 with_cups
1070 with_cups_include
1071 with_freetype
1072 with_freetype_include
1073 with_freetype_lib
1074 enable_freetype_bundling
1075 with_alsa
1076 with_alsa_include
1077 with_alsa_lib
1078 with_giflib
1079 with_lcms
1080 with_libpng
1081 with_zlib
1082 with_stdc__lib
1083 with_num_cores
1084 with_memory_size
1085 with_jobs
1086 with_sjavac_server_java
1087 enable_sjavac
1088 enable_precompiled_headers
1089 enable_ccache
1090 with_ccache_dir
1091 '
1092       ac_precious_vars='build_alias
1093 host_alias
1094 target_alias
1095 BASENAME
1096 BASH
1097 CAT
1098 CHMOD
1099 CMP
1100 COMM
1101 CP
1102 CPIO
1103 CUT
1104 DATE
1105 DIFF
1106 DIRNAME
1107 ECHO
1108 EXPR
1109 FILE
1110 FIND
1111 HEAD
1112 LN
1113 LS
1114 MKDIR
1115 MKTEMP
1116 MV
1117 NAWK
1118 PRINTF
1119 RM
1120 SH
1121 SORT
1122 TAIL
1123 TAR
1124 TEE
1125 TOUCH
1126 TR
1127 UNAME
1128 UNIQ
1129 WC
1130 WHICH
1131 XARGS
1132 AWK
1133 GREP
1134 EGREP
1135 FGREP
1136 SED
1137 CYGPATH
1138 READLINK
1139 DF
1140 SETFILE
1141 UNZIP
1142 ZIP
1143 LDD
1144 OTOOL
1145 READELF
1146 HG
1147 STAT
1148 TIME
1149 DSYMUTIL
1150 XATTR
1151 CODESIGN
1152 PKG_CONFIG
1153 JAVA
1154 JAVAC
1155 JAVAH
1156 JAR
1157 NATIVE2ASCII
1158 JARSIGNER
1159 BUILD_CC
1160 BUILD_CXX
1161 BUILD_LD
1162 CC
1163 CFLAGS
1164 LDFLAGS
1165 LIBS
1166 CPPFLAGS
1167 CXX
1168 CXXFLAGS
1169 CCC
1170 OBJC
1171 OBJCFLAGS
1172 AR
1173 CPP
1174 CXXCPP
1175 AS
1176 NM
1177 GNM
1178 STRIP
1179 MCS
1180 OBJCOPY
1181 OBJDUMP
1182 LIPO
1183 JTREGEXE
1184 XMKMF
1185 FREETYPE_CFLAGS
1186 FREETYPE_LIBS
1187 ALSA_CFLAGS
1188 ALSA_LIBS
1189 LCMS_CFLAGS
1190 LCMS_LIBS
1191 PNG_CFLAGS
1192 PNG_LIBS
1193 LIBFFI_CFLAGS
1194 LIBFFI_LIBS
1195 CCACHE'
1196 
1197 
1198 # Initialize some variables set by options.
1199 ac_init_help=
1200 ac_init_version=false
1201 ac_unrecognized_opts=
1202 ac_unrecognized_sep=
1203 # The variables have the same names as the options, with
1204 # dashes changed to underlines.
1205 cache_file=/dev/null
1206 exec_prefix=NONE
1207 no_create=
1208 no_recursion=
1209 prefix=NONE
1210 program_prefix=NONE
1211 program_suffix=NONE
1212 program_transform_name=s,x,x,
1213 silent=
1214 site=
1215 srcdir=
1216 verbose=
1217 x_includes=NONE
1218 x_libraries=NONE
1219 
1220 # Installation directory options.
1221 # These are left unexpanded so users can "make install exec_prefix=/foo"
1222 # and all the variables that are supposed to be based on exec_prefix
1223 # by default will actually change.
1224 # Use braces instead of parens because sh, perl, etc. also accept them.
1225 # (The list follows the same order as the GNU Coding Standards.)
1226 bindir='${exec_prefix}/bin'
1227 sbindir='${exec_prefix}/sbin'
1228 libexecdir='${exec_prefix}/libexec'
1229 datarootdir='${prefix}/share'
1230 datadir='${datarootdir}'
1231 sysconfdir='${prefix}/etc'
1232 sharedstatedir='${prefix}/com'
1233 localstatedir='${prefix}/var'
1234 includedir='${prefix}/include'
1235 oldincludedir='/usr/include'
1236 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1237 infodir='${datarootdir}/info'
1238 htmldir='${docdir}'
1239 dvidir='${docdir}'
1240 pdfdir='${docdir}'
1241 psdir='${docdir}'
1242 libdir='${exec_prefix}/lib'
1243 localedir='${datarootdir}/locale'
1244 mandir='${datarootdir}/man'
1245 
1246 ac_prev=
1247 ac_dashdash=
1248 for ac_option
1249 do
1250   # If the previous option needs an argument, assign it.
1251   if test -n "$ac_prev"; then
1252     eval $ac_prev=\$ac_option
1253     ac_prev=
1254     continue
1255   fi
1256 
1257   case $ac_option in
1258   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1259   *=)   ac_optarg= ;;
1260   *)    ac_optarg=yes ;;
1261   esac
1262 
1263   # Accept the important Cygnus configure options, so we can diagnose typos.
1264 
1265   case $ac_dashdash$ac_option in
1266   --)
1267     ac_dashdash=yes ;;
1268 
1269   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1270     ac_prev=bindir ;;
1271   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1272     bindir=$ac_optarg ;;
1273 
1274   -build | --build | --buil | --bui | --bu)
1275     ac_prev=build_alias ;;
1276   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1277     build_alias=$ac_optarg ;;
1278 
1279   -cache-file | --cache-file | --cache-fil | --cache-fi \
1280   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1281     ac_prev=cache_file ;;
1282   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1283   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1284     cache_file=$ac_optarg ;;
1285 
1286   --config-cache | -C)
1287     cache_file=config.cache ;;
1288 
1289   -datadir | --datadir | --datadi | --datad)
1290     ac_prev=datadir ;;
1291   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1292     datadir=$ac_optarg ;;
1293 
1294   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1295   | --dataroo | --dataro | --datar)
1296     ac_prev=datarootdir ;;
1297   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1298   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1299     datarootdir=$ac_optarg ;;
1300 
1301   -disable-* | --disable-*)
1302     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1303     # Reject names that are not valid shell variable names.
1304     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1305       as_fn_error $? "invalid feature name: $ac_useropt"
1306     ac_useropt_orig=$ac_useropt
1307     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1308     case $ac_user_opts in
1309       *"
1310 "enable_$ac_useropt"
1311 "*) ;;
1312       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1313          ac_unrecognized_sep=', ';;
1314     esac
1315     eval enable_$ac_useropt=no ;;
1316 
1317   -docdir | --docdir | --docdi | --doc | --do)
1318     ac_prev=docdir ;;
1319   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1320     docdir=$ac_optarg ;;
1321 
1322   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1323     ac_prev=dvidir ;;
1324   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1325     dvidir=$ac_optarg ;;
1326 
1327   -enable-* | --enable-*)
1328     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1329     # Reject names that are not valid shell variable names.
1330     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1331       as_fn_error $? "invalid feature name: $ac_useropt"
1332     ac_useropt_orig=$ac_useropt
1333     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1334     case $ac_user_opts in
1335       *"
1336 "enable_$ac_useropt"
1337 "*) ;;
1338       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1339          ac_unrecognized_sep=', ';;
1340     esac
1341     eval enable_$ac_useropt=\$ac_optarg ;;
1342 
1343   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1344   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1345   | --exec | --exe | --ex)
1346     ac_prev=exec_prefix ;;
1347   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1348   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1349   | --exec=* | --exe=* | --ex=*)
1350     exec_prefix=$ac_optarg ;;
1351 
1352   -gas | --gas | --ga | --g)
1353     # Obsolete; use --with-gas.
1354     with_gas=yes ;;
1355 
1356   -help | --help | --hel | --he | -h)
1357     ac_init_help=long ;;
1358   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1359     ac_init_help=recursive ;;
1360   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1361     ac_init_help=short ;;
1362 
1363   -host | --host | --hos | --ho)
1364     ac_prev=host_alias ;;
1365   -host=* | --host=* | --hos=* | --ho=*)
1366     host_alias=$ac_optarg ;;
1367 
1368   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1369     ac_prev=htmldir ;;
1370   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1371   | --ht=*)
1372     htmldir=$ac_optarg ;;
1373 
1374   -includedir | --includedir | --includedi | --included | --include \
1375   | --includ | --inclu | --incl | --inc)
1376     ac_prev=includedir ;;
1377   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1378   | --includ=* | --inclu=* | --incl=* | --inc=*)
1379     includedir=$ac_optarg ;;
1380 
1381   -infodir | --infodir | --infodi | --infod | --info | --inf)
1382     ac_prev=infodir ;;
1383   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1384     infodir=$ac_optarg ;;
1385 
1386   -libdir | --libdir | --libdi | --libd)
1387     ac_prev=libdir ;;
1388   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1389     libdir=$ac_optarg ;;
1390 
1391   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1392   | --libexe | --libex | --libe)
1393     ac_prev=libexecdir ;;
1394   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1395   | --libexe=* | --libex=* | --libe=*)
1396     libexecdir=$ac_optarg ;;
1397 
1398   -localedir | --localedir | --localedi | --localed | --locale)
1399     ac_prev=localedir ;;
1400   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1401     localedir=$ac_optarg ;;
1402 
1403   -localstatedir | --localstatedir | --localstatedi | --localstated \
1404   | --localstate | --localstat | --localsta | --localst | --locals)
1405     ac_prev=localstatedir ;;
1406   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1407   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1408     localstatedir=$ac_optarg ;;
1409 
1410   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1411     ac_prev=mandir ;;
1412   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1413     mandir=$ac_optarg ;;
1414 
1415   -nfp | --nfp | --nf)
1416     # Obsolete; use --without-fp.
1417     with_fp=no ;;
1418 
1419   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1420   | --no-cr | --no-c | -n)
1421     no_create=yes ;;
1422 
1423   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1424   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1425     no_recursion=yes ;;
1426 
1427   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1428   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1429   | --oldin | --oldi | --old | --ol | --o)
1430     ac_prev=oldincludedir ;;
1431   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1432   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1433   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1434     oldincludedir=$ac_optarg ;;
1435 
1436   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1437     ac_prev=prefix ;;
1438   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1439     prefix=$ac_optarg ;;
1440 
1441   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1442   | --program-pre | --program-pr | --program-p)
1443     ac_prev=program_prefix ;;
1444   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1445   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1446     program_prefix=$ac_optarg ;;
1447 
1448   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1449   | --program-suf | --program-su | --program-s)
1450     ac_prev=program_suffix ;;
1451   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1452   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1453     program_suffix=$ac_optarg ;;
1454 
1455   -program-transform-name | --program-transform-name \
1456   | --program-transform-nam | --program-transform-na \
1457   | --program-transform-n | --program-transform- \
1458   | --program-transform | --program-transfor \
1459   | --program-transfo | --program-transf \
1460   | --program-trans | --program-tran \
1461   | --progr-tra | --program-tr | --program-t)
1462     ac_prev=program_transform_name ;;
1463   -program-transform-name=* | --program-transform-name=* \
1464   | --program-transform-nam=* | --program-transform-na=* \
1465   | --program-transform-n=* | --program-transform-=* \
1466   | --program-transform=* | --program-transfor=* \
1467   | --program-transfo=* | --program-transf=* \
1468   | --program-trans=* | --program-tran=* \
1469   | --progr-tra=* | --program-tr=* | --program-t=*)
1470     program_transform_name=$ac_optarg ;;
1471 
1472   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1473     ac_prev=pdfdir ;;
1474   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1475     pdfdir=$ac_optarg ;;
1476 
1477   -psdir | --psdir | --psdi | --psd | --ps)
1478     ac_prev=psdir ;;
1479   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1480     psdir=$ac_optarg ;;
1481 
1482   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1483   | -silent | --silent | --silen | --sile | --sil)
1484     silent=yes ;;
1485 
1486   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1487     ac_prev=sbindir ;;
1488   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1489   | --sbi=* | --sb=*)
1490     sbindir=$ac_optarg ;;
1491 
1492   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1493   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1494   | --sharedst | --shareds | --shared | --share | --shar \
1495   | --sha | --sh)
1496     ac_prev=sharedstatedir ;;
1497   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1498   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1499   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1500   | --sha=* | --sh=*)
1501     sharedstatedir=$ac_optarg ;;
1502 
1503   -site | --site | --sit)
1504     ac_prev=site ;;
1505   -site=* | --site=* | --sit=*)
1506     site=$ac_optarg ;;
1507 
1508   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1509     ac_prev=srcdir ;;
1510   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1511     srcdir=$ac_optarg ;;
1512 
1513   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1514   | --syscon | --sysco | --sysc | --sys | --sy)
1515     ac_prev=sysconfdir ;;
1516   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1517   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1518     sysconfdir=$ac_optarg ;;
1519 
1520   -target | --target | --targe | --targ | --tar | --ta | --t)
1521     ac_prev=target_alias ;;
1522   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1523     target_alias=$ac_optarg ;;
1524 
1525   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1526     verbose=yes ;;
1527 
1528   -version | --version | --versio | --versi | --vers | -V)
1529     ac_init_version=: ;;
1530 
1531   -with-* | --with-*)
1532     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1533     # Reject names that are not valid shell variable names.
1534     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1535       as_fn_error $? "invalid package name: $ac_useropt"
1536     ac_useropt_orig=$ac_useropt
1537     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1538     case $ac_user_opts in
1539       *"
1540 "with_$ac_useropt"
1541 "*) ;;
1542       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1543          ac_unrecognized_sep=', ';;
1544     esac
1545     eval with_$ac_useropt=\$ac_optarg ;;
1546 
1547   -without-* | --without-*)
1548     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1549     # Reject names that are not valid shell variable names.
1550     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1551       as_fn_error $? "invalid package name: $ac_useropt"
1552     ac_useropt_orig=$ac_useropt
1553     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1554     case $ac_user_opts in
1555       *"
1556 "with_$ac_useropt"
1557 "*) ;;
1558       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1559          ac_unrecognized_sep=', ';;
1560     esac
1561     eval with_$ac_useropt=no ;;
1562 
1563   --x)
1564     # Obsolete; use --with-x.
1565     with_x=yes ;;
1566 
1567   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1568   | --x-incl | --x-inc | --x-in | --x-i)
1569     ac_prev=x_includes ;;
1570   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1571   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1572     x_includes=$ac_optarg ;;
1573 
1574   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1575   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1576     ac_prev=x_libraries ;;
1577   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1578   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1579     x_libraries=$ac_optarg ;;
1580 
1581   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1582 Try \`$0 --help' for more information"
1583     ;;
1584 
1585   *=*)
1586     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1587     # Reject names that are not valid shell variable names.
1588     case $ac_envvar in #(
1589       '' | [0-9]* | *[!_$as_cr_alnum]* )
1590       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1591     esac
1592     eval $ac_envvar=\$ac_optarg
1593     export $ac_envvar ;;
1594 
1595   *)
1596     # FIXME: should be removed in autoconf 3.0.
1597     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1598     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1599       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1600     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1601     ;;
1602 
1603   esac
1604 done
1605 
1606 if test -n "$ac_prev"; then
1607   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1608   as_fn_error $? "missing argument to $ac_option"
1609 fi
1610 
1611 if test -n "$ac_unrecognized_opts"; then
1612   case $enable_option_checking in
1613     no) ;;
1614     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1615     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1616   esac
1617 fi
1618 
1619 # Check all directory arguments for consistency.
1620 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1621                 datadir sysconfdir sharedstatedir localstatedir includedir \
1622                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1623                 libdir localedir mandir
1624 do
1625   eval ac_val=\$$ac_var
1626   # Remove trailing slashes.
1627   case $ac_val in
1628     */ )
1629       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1630       eval $ac_var=\$ac_val;;
1631   esac
1632   # Be sure to have absolute directory names.
1633   case $ac_val in
1634     [\\/$]* | ?:[\\/]* )  continue;;
1635     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1636   esac
1637   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1638 done
1639 
1640 # There might be people who depend on the old broken behavior: `$host'
1641 # used to hold the argument of --host etc.
1642 # FIXME: To remove some day.
1643 build=$build_alias
1644 host=$host_alias
1645 target=$target_alias
1646 
1647 # FIXME: To remove some day.
1648 if test "x$host_alias" != x; then
1649   if test "x$build_alias" = x; then
1650     cross_compiling=maybe
1651   elif test "x$build_alias" != "x$host_alias"; then
1652     cross_compiling=yes
1653   fi
1654 fi
1655 
1656 ac_tool_prefix=
1657 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1658 
1659 test "$silent" = yes && exec 6>/dev/null
1660 
1661 
1662 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1663 ac_ls_di=`ls -di .` &&
1664 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1665   as_fn_error $? "working directory cannot be determined"
1666 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1667   as_fn_error $? "pwd does not report name of working directory"
1668 
1669 
1670 # Find the source files, if location was not specified.
1671 if test -z "$srcdir"; then
1672   ac_srcdir_defaulted=yes
1673   # Try the directory containing this script, then the parent directory.
1674   ac_confdir=`$as_dirname -- "$as_myself" ||
1675 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1676          X"$as_myself" : 'X\(//\)[^/]' \| \
1677          X"$as_myself" : 'X\(//\)$' \| \
1678          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1679 $as_echo X"$as_myself" |
1680     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1681             s//\1/
1682             q
1683           }
1684           /^X\(\/\/\)[^/].*/{
1685             s//\1/
1686             q
1687           }
1688           /^X\(\/\/\)$/{
1689             s//\1/
1690             q
1691           }
1692           /^X\(\/\).*/{
1693             s//\1/
1694             q
1695           }
1696           s/.*/./; q'`
1697   srcdir=$ac_confdir
1698   if test ! -r "$srcdir/$ac_unique_file"; then
1699     srcdir=..
1700   fi
1701 else
1702   ac_srcdir_defaulted=no
1703 fi
1704 if test ! -r "$srcdir/$ac_unique_file"; then
1705   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1706   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1707 fi
1708 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1709 ac_abs_confdir=`(
1710         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1711         pwd)`
1712 # When building in place, set srcdir=.
1713 if test "$ac_abs_confdir" = "$ac_pwd"; then
1714   srcdir=.
1715 fi
1716 # Remove unnecessary trailing slashes from srcdir.
1717 # Double slashes in file names in object file debugging info
1718 # mess up M-x gdb in Emacs.
1719 case $srcdir in
1720 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1721 esac
1722 for ac_var in $ac_precious_vars; do
1723   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1724   eval ac_env_${ac_var}_value=\$${ac_var}
1725   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1726   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1727 done
1728 
1729 #
1730 # Report the --help message.
1731 #
1732 if test "$ac_init_help" = "long"; then
1733   # Omit some internal or obsolete options to make the list less imposing.
1734   # This message is too long to be a string in the A/UX 3.1 sh.
1735   cat <<_ACEOF
1736 \`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1737 
1738 Usage: $0 [OPTION]... [VAR=VALUE]...
1739 
1740 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1741 VAR=VALUE.  See below for descriptions of some of the useful variables.
1742 
1743 Defaults for the options are specified in brackets.
1744 
1745 Configuration:
1746   -h, --help              display this help and exit
1747       --help=short        display options specific to this package
1748       --help=recursive    display the short help of all the included packages
1749   -V, --version           display version information and exit
1750   -q, --quiet, --silent   do not print \`checking ...' messages
1751       --cache-file=FILE   cache test results in FILE [disabled]
1752   -C, --config-cache      alias for \`--cache-file=config.cache'
1753   -n, --no-create         do not create output files
1754       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1755 
1756 Installation directories:
1757   --prefix=PREFIX         install architecture-independent files in PREFIX
1758                           [$ac_default_prefix]
1759   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1760                           [PREFIX]
1761 
1762 By default, \`make install' will install all the files in
1763 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1764 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1765 for instance \`--prefix=\$HOME'.
1766 
1767 For better control, use the options below.
1768 
1769 Fine tuning of the installation directories:
1770   --bindir=DIR            user executables [EPREFIX/bin]
1771   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1772   --libexecdir=DIR        program executables [EPREFIX/libexec]
1773   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1774   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1775   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1776   --libdir=DIR            object code libraries [EPREFIX/lib]
1777   --includedir=DIR        C header files [PREFIX/include]
1778   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1779   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1780   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1781   --infodir=DIR           info documentation [DATAROOTDIR/info]
1782   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1783   --mandir=DIR            man documentation [DATAROOTDIR/man]
1784   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1785   --htmldir=DIR           html documentation [DOCDIR]
1786   --dvidir=DIR            dvi documentation [DOCDIR]
1787   --pdfdir=DIR            pdf documentation [DOCDIR]
1788   --psdir=DIR             ps documentation [DOCDIR]
1789 _ACEOF
1790 
1791   cat <<\_ACEOF
1792 
1793 X features:
1794   --x-includes=DIR    X include files are in DIR
1795   --x-libraries=DIR   X library files are in DIR
1796 
1797 System types:
1798   --build=BUILD     configure for building on BUILD [guessed]
1799   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1800   --target=TARGET   configure for building compilers for TARGET [HOST]
1801 _ACEOF
1802 fi
1803 
1804 if test -n "$ac_init_help"; then
1805   case $ac_init_help in
1806      short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1807    esac
1808   cat <<\_ACEOF
1809 
1810 Optional Features:
1811   --disable-option-checking  ignore unrecognized --enable/--with options
1812   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1813   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1814   --enable-openjdk-only   suppress building custom source even if present
1815                           [disabled]
1816   --enable-debug          set the debug level to fastdebug (shorthand for
1817                           --with-debug-level=fastdebug) [disabled]
1818   --disable-headful       disable building headful support (graphical UI
1819                           support) [enabled]
1820   --enable-hotspot-test-in-build
1821                           run the Queens test after Hotspot build [disabled]
1822   --enable-unlimited-crypto
1823                           Enable unlimited crypto policy [disabled]
1824   --enable-rmiconnector-iiop
1825                           enable the JMX RMIConnector iiop transport
1826                           [disabled]
1827   --disable-debug-symbols disable generation of debug symbols [enabled]
1828   --disable-zip-debug-info
1829                           disable zipping of debug-info files [enabled]
1830   --enable-macosx-runtime-support
1831                           Deprecated. Option is kept for backwards
1832                           compatibility and is ignored
1833   --disable-freetype-bundling
1834                           disable bundling of the freetype library with the
1835                           build result [enabled on Windows or when using
1836                           --with-freetype, disabled otherwise]
1837   --enable-sjavac         use sjavac to do fast incremental compiles
1838                           [disabled]
1839   --disable-precompiled-headers
1840                           disable using precompiled headers when compiling C++
1841                           [enabled]
1842   --enable-ccache         enable using ccache to speed up recompilations
1843                           [disabled]
1844 
1845 Optional Packages:
1846   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1847   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1848   --with-custom-make-dir  use this directory for custom build/make files
1849   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1850                           support it), e.g. --with-target-bits=32 [guessed]
1851   --with-sys-root         pass this sys-root to the compilers and tools (for
1852                           cross-compiling)
1853   --with-tools-dir        search this directory for compilers and tools (for
1854                           cross-compiling)
1855   --with-devkit           use this directory as base for tools-dir and
1856                           sys-root (for cross-compiling)
1857   --with-jdk-variant      JDK variant to build (normal) [normal]
1858   --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1859   --with-jvm-variants     JVM variants (separated by commas) to build (server,
1860                           client, minimal1, kernel, zero, zeroshark, core)
1861                           [server]
1862   --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1863                           [release]
1864   --with-conf-name        use this as the name of the configuration [generated
1865                           from important configuration options]
1866   --with-builddeps-conf   use this configuration file for the builddeps
1867   --with-builddeps-server download and use build dependencies from this server
1868                           url
1869   --with-builddeps-dir    store downloaded build dependencies here
1870                           [/localhome/builddeps]
1871   --with-builddeps-group  chgrp the downloaded build dependencies to this
1872                           group
1873   --with-cacerts-file     specify alternative cacerts file
1874   --with-milestone        Set milestone value for build [internal]
1875   --with-update-version   Set update version value for build [b00]
1876   --with-user-release-suffix
1877                           Add a custom string to the version string if build
1878                           number isn't set.[username_builddateb00]
1879   --with-build-number     Set build number value for build [b00]
1880   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1881   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1882                           invocations of the Boot JDK, overriding the default
1883                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1884                           -enableassertions"
1885   --with-add-source-root  for each and every source directory, look in this
1886                           additional source root for the same directory; if it
1887                           exists and have files in it, include it in the build
1888   --with-override-source-root
1889                           for each and every source directory, look in this
1890                           override source root for the same directory; if it
1891                           exists, use that directory instead and ignore the
1892                           directory in the original source root
1893   --with-adds-and-overrides
1894                           use the subdirs 'adds' and 'overrides' in the
1895                           specified directory as add-source-root and
1896                           override-source-root
1897   --with-override-langtools
1898                           use this langtools dir for the build
1899   --with-override-corba   use this corba dir for the build
1900   --with-override-jaxp    use this jaxp dir for the build
1901   --with-override-jaxws   use this jaxws dir for the build
1902   --with-override-hotspot use this hotspot dir for the build
1903   --with-override-nashorn use this nashorn dir for the build
1904   --with-override-jdk     use this jdk dir for the build
1905   --with-import-hotspot   import hotspot binaries from this jdk image or
1906                           hotspot build dist dir instead of building from
1907                           source
1908   --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1909                           only) [probed]
1910   --with-dxsdk            Deprecated. Option is kept for backwards
1911                           compatibility and is ignored
1912   --with-dxsdk-lib        Deprecated. Option is kept for backwards
1913                           compatibility and is ignored
1914   --with-dxsdk-include    Deprecated. Option is kept for backwards
1915                           compatibility and is ignored
1916   --with-jtreg            Regression Test Harness [probed]
1917   --with-extra-cflags     extra flags to be used when compiling jdk c-files
1918   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1919   --with-extra-ldflags    extra flags to be used when linking jdk
1920   --with-x                use the X Window System
1921   --with-cups             specify prefix directory for the cups package
1922                           (expecting the headers under PATH/include)
1923   --with-cups-include     specify directory for the cups include files
1924   --with-freetype         specify prefix directory for the freetype package
1925                           (expecting the libraries under PATH/lib and the
1926                           headers under PATH/include)
1927   --with-freetype-include specify directory for the freetype include files
1928   --with-freetype-lib     specify directory for the freetype library
1929   --with-alsa             specify prefix directory for the alsa package
1930                           (expecting the libraries under PATH/lib and the
1931                           headers under PATH/include)
1932   --with-alsa-include     specify directory for the alsa include files
1933   --with-alsa-lib         specify directory for the alsa library
1934   --with-giflib           use giflib from build system or OpenJDK source
1935                           (system, bundled) [bundled]
1936   --with-lcms             use lcms2 from build system or OpenJDK source
1937                           (system, bundled) [bundled]
1938   --with-libpng           use libpng from build system or OpenJDK source
1939                           (system, bundled) [bundled]
1940   --with-zlib             use zlib from build system or OpenJDK source
1941                           (system, bundled) [bundled]
1942   --with-stdc++lib=<static>,<dynamic>,<default>
1943                           force linking of the C++ runtime on Linux to either
1944                           static or dynamic, default is static with dynamic as
1945                           fallback
1946   --with-num-cores        number of cores in the build system, e.g.
1947                           --with-num-cores=8 [probed]
1948   --with-memory-size      memory (in MB) available in the build system, e.g.
1949                           --with-memory-size=1024 [probed]
1950   --with-jobs             number of parallel jobs to let make run [calculated
1951                           based on cores and memory]
1952   --with-sjavac-server-java
1953                           use this java binary for running the sjavac
1954                           background server [Boot JDK java]
1955   --with-ccache-dir       where to store ccache files [~/.ccache]
1956 
1957 Some influential environment variables:
1958   BASENAME    Override default value for BASENAME
1959   BASH        Override default value for BASH
1960   CAT         Override default value for CAT
1961   CHMOD       Override default value for CHMOD
1962   CMP         Override default value for CMP
1963   COMM        Override default value for COMM
1964   CP          Override default value for CP
1965   CPIO        Override default value for CPIO
1966   CUT         Override default value for CUT
1967   DATE        Override default value for DATE
1968   DIFF        Override default value for DIFF
1969   DIRNAME     Override default value for DIRNAME
1970   ECHO        Override default value for ECHO
1971   EXPR        Override default value for EXPR
1972   FILE        Override default value for FILE
1973   FIND        Override default value for FIND
1974   HEAD        Override default value for HEAD
1975   LN          Override default value for LN
1976   LS          Override default value for LS
1977   MKDIR       Override default value for MKDIR
1978   MKTEMP      Override default value for MKTEMP
1979   MV          Override default value for MV
1980   NAWK        Override default value for NAWK
1981   PRINTF      Override default value for PRINTF
1982   RM          Override default value for RM
1983   SH          Override default value for SH
1984   SORT        Override default value for SORT
1985   TAIL        Override default value for TAIL
1986   TAR         Override default value for TAR
1987   TEE         Override default value for TEE
1988   TOUCH       Override default value for TOUCH
1989   TR          Override default value for TR
1990   UNAME       Override default value for UNAME
1991   UNIQ        Override default value for UNIQ
1992   WC          Override default value for WC
1993   WHICH       Override default value for WHICH
1994   XARGS       Override default value for XARGS
1995   AWK         Override default value for AWK
1996   GREP        Override default value for GREP
1997   EGREP       Override default value for EGREP
1998   FGREP       Override default value for FGREP
1999   SED         Override default value for SED
2000   CYGPATH     Override default value for CYGPATH
2001   READLINK    Override default value for READLINK
2002   DF          Override default value for DF
2003   SETFILE     Override default value for SETFILE
2004   UNZIP       Override default value for UNZIP
2005   ZIP         Override default value for ZIP
2006   LDD         Override default value for LDD
2007   OTOOL       Override default value for OTOOL
2008   READELF     Override default value for READELF
2009   HG          Override default value for HG
2010   STAT        Override default value for STAT
2011   TIME        Override default value for TIME
2012   DSYMUTIL    Override default value for DSYMUTIL
2013   XATTR       Override default value for XATTR
2014   CODESIGN    Override default value for CODESIGN
2015   PKG_CONFIG  path to pkg-config utility
2016   JAVA        Override default value for JAVA
2017   JAVAC       Override default value for JAVAC
2018   JAVAH       Override default value for JAVAH
2019   JAR         Override default value for JAR
2020   NATIVE2ASCII
2021               Override default value for NATIVE2ASCII
2022   JARSIGNER   Override default value for JARSIGNER
2023   BUILD_CC    Override default value for BUILD_CC
2024   BUILD_CXX   Override default value for BUILD_CXX
2025   BUILD_LD    Override default value for BUILD_LD
2026   CC          C compiler command
2027   CFLAGS      C compiler flags
2028   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2029               nonstandard directory <lib dir>
2030   LIBS        libraries to pass to the linker, e.g. -l<library>
2031   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2032               you have headers in a nonstandard directory <include dir>
2033   CXX         C++ compiler command
2034   CXXFLAGS    C++ compiler flags
2035   OBJC        Objective C compiler command
2036   OBJCFLAGS   Objective C compiler flags
2037   AR          Override default value for AR
2038   CPP         C preprocessor
2039   CXXCPP      C++ preprocessor
2040   AS          Override default value for AS
2041   NM          Override default value for NM
2042   GNM         Override default value for GNM
2043   STRIP       Override default value for STRIP
2044   MCS         Override default value for MCS
2045   OBJCOPY     Override default value for OBJCOPY
2046   OBJDUMP     Override default value for OBJDUMP
2047   LIPO        Override default value for LIPO
2048   JTREGEXE    Override default value for JTREGEXE
2049   XMKMF       Path to xmkmf, Makefile generator for X Window System
2050   FREETYPE_CFLAGS
2051               C compiler flags for FREETYPE, overriding pkg-config
2052   FREETYPE_LIBS
2053               linker flags for FREETYPE, overriding pkg-config
2054   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2055   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2056   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2057   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2058   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2059   PNG_LIBS    linker flags for PNG, overriding pkg-config
2060   LIBFFI_CFLAGS
2061               C compiler flags for LIBFFI, overriding pkg-config
2062   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2063   CCACHE      Override default value for CCACHE
2064 
2065 Use these variables to override the choices made by `configure' or to help
2066 it to find libraries and programs with nonstandard names/locations.
2067 
2068 Report bugs to <build-dev@openjdk.java.net>.
2069 OpenJDK home page: <http://openjdk.java.net>.
2070 _ACEOF
2071 ac_status=$?
2072 fi
2073 
2074 if test "$ac_init_help" = "recursive"; then
2075   # If there are subdirs, report their specific --help.
2076   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2077     test -d "$ac_dir" ||
2078       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2079       continue
2080     ac_builddir=.
2081 
2082 case "$ac_dir" in
2083 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2084 *)
2085   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2086   # A ".." for each directory in $ac_dir_suffix.
2087   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2088   case $ac_top_builddir_sub in
2089   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2090   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2091   esac ;;
2092 esac
2093 ac_abs_top_builddir=$ac_pwd
2094 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2095 # for backward compatibility:
2096 ac_top_builddir=$ac_top_build_prefix
2097 
2098 case $srcdir in
2099   .)  # We are building in place.
2100     ac_srcdir=.
2101     ac_top_srcdir=$ac_top_builddir_sub
2102     ac_abs_top_srcdir=$ac_pwd ;;
2103   [\\/]* | ?:[\\/]* )  # Absolute name.
2104     ac_srcdir=$srcdir$ac_dir_suffix;
2105     ac_top_srcdir=$srcdir
2106     ac_abs_top_srcdir=$srcdir ;;
2107   *) # Relative name.
2108     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2109     ac_top_srcdir=$ac_top_build_prefix$srcdir
2110     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2111 esac
2112 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2113 
2114     cd "$ac_dir" || { ac_status=$?; continue; }
2115     # Check for guested configure.
2116     if test -f "$ac_srcdir/configure.gnu"; then
2117       echo &&
2118       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2119     elif test -f "$ac_srcdir/configure"; then
2120       echo &&
2121       $SHELL "$ac_srcdir/configure" --help=recursive
2122     else
2123       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2124     fi || ac_status=$?
2125     cd "$ac_pwd" || { ac_status=$?; break; }
2126   done
2127 fi
2128 
2129 test -n "$ac_init_help" && exit $ac_status
2130 if $ac_init_version; then
2131   cat <<\_ACEOF
2132 OpenJDK configure jdk8
2133 generated by GNU Autoconf 2.69
2134 
2135 Copyright (C) 2012 Free Software Foundation, Inc.
2136 This configure script is free software; the Free Software Foundation
2137 gives unlimited permission to copy, distribute and modify it.
2138 _ACEOF
2139   exit
2140 fi
2141 
2142 ## ------------------------ ##
2143 ## Autoconf initialization. ##
2144 ## ------------------------ ##
2145 
2146 # ac_fn_c_try_compile LINENO
2147 # --------------------------
2148 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2149 ac_fn_c_try_compile ()
2150 {
2151   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2152   rm -f conftest.$ac_objext
2153   if { { ac_try="$ac_compile"
2154 case "(($ac_try" in
2155   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156   *) ac_try_echo=$ac_try;;
2157 esac
2158 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159 $as_echo "$ac_try_echo"; } >&5
2160   (eval "$ac_compile") 2>conftest.err
2161   ac_status=$?
2162   if test -s conftest.err; then
2163     grep -v '^ *+' conftest.err >conftest.er1
2164     cat conftest.er1 >&5
2165     mv -f conftest.er1 conftest.err
2166   fi
2167   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2168   test $ac_status = 0; } && {
2169          test -z "$ac_c_werror_flag" ||
2170          test ! -s conftest.err
2171        } && test -s conftest.$ac_objext; then :
2172   ac_retval=0
2173 else
2174   $as_echo "$as_me: failed program was:" >&5
2175 sed 's/^/| /' conftest.$ac_ext >&5
2176 
2177         ac_retval=1
2178 fi
2179   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2180   as_fn_set_status $ac_retval
2181 
2182 } # ac_fn_c_try_compile
2183 
2184 # ac_fn_cxx_try_compile LINENO
2185 # ----------------------------
2186 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2187 ac_fn_cxx_try_compile ()
2188 {
2189   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190   rm -f conftest.$ac_objext
2191   if { { ac_try="$ac_compile"
2192 case "(($ac_try" in
2193   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2194   *) ac_try_echo=$ac_try;;
2195 esac
2196 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2197 $as_echo "$ac_try_echo"; } >&5
2198   (eval "$ac_compile") 2>conftest.err
2199   ac_status=$?
2200   if test -s conftest.err; then
2201     grep -v '^ *+' conftest.err >conftest.er1
2202     cat conftest.er1 >&5
2203     mv -f conftest.er1 conftest.err
2204   fi
2205   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206   test $ac_status = 0; } && {
2207          test -z "$ac_cxx_werror_flag" ||
2208          test ! -s conftest.err
2209        } && test -s conftest.$ac_objext; then :
2210   ac_retval=0
2211 else
2212   $as_echo "$as_me: failed program was:" >&5
2213 sed 's/^/| /' conftest.$ac_ext >&5
2214 
2215         ac_retval=1
2216 fi
2217   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2218   as_fn_set_status $ac_retval
2219 
2220 } # ac_fn_cxx_try_compile
2221 
2222 # ac_fn_objc_try_compile LINENO
2223 # -----------------------------
2224 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2225 ac_fn_objc_try_compile ()
2226 {
2227   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2228   rm -f conftest.$ac_objext
2229   if { { ac_try="$ac_compile"
2230 case "(($ac_try" in
2231   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2232   *) ac_try_echo=$ac_try;;
2233 esac
2234 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2235 $as_echo "$ac_try_echo"; } >&5
2236   (eval "$ac_compile") 2>conftest.err
2237   ac_status=$?
2238   if test -s conftest.err; then
2239     grep -v '^ *+' conftest.err >conftest.er1
2240     cat conftest.er1 >&5
2241     mv -f conftest.er1 conftest.err
2242   fi
2243   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2244   test $ac_status = 0; } && {
2245          test -z "$ac_objc_werror_flag" ||
2246          test ! -s conftest.err
2247        } && test -s conftest.$ac_objext; then :
2248   ac_retval=0
2249 else
2250   $as_echo "$as_me: failed program was:" >&5
2251 sed 's/^/| /' conftest.$ac_ext >&5
2252 
2253         ac_retval=1
2254 fi
2255   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2256   as_fn_set_status $ac_retval
2257 
2258 } # ac_fn_objc_try_compile
2259 
2260 # ac_fn_c_try_cpp LINENO
2261 # ----------------------
2262 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2263 ac_fn_c_try_cpp ()
2264 {
2265   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2266   if { { ac_try="$ac_cpp conftest.$ac_ext"
2267 case "(($ac_try" in
2268   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2269   *) ac_try_echo=$ac_try;;
2270 esac
2271 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2272 $as_echo "$ac_try_echo"; } >&5
2273   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2274   ac_status=$?
2275   if test -s conftest.err; then
2276     grep -v '^ *+' conftest.err >conftest.er1
2277     cat conftest.er1 >&5
2278     mv -f conftest.er1 conftest.err
2279   fi
2280   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2281   test $ac_status = 0; } > conftest.i && {
2282          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2283          test ! -s conftest.err
2284        }; then :
2285   ac_retval=0
2286 else
2287   $as_echo "$as_me: failed program was:" >&5
2288 sed 's/^/| /' conftest.$ac_ext >&5
2289 
2290     ac_retval=1
2291 fi
2292   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2293   as_fn_set_status $ac_retval
2294 
2295 } # ac_fn_c_try_cpp
2296 
2297 # ac_fn_cxx_try_cpp LINENO
2298 # ------------------------
2299 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2300 ac_fn_cxx_try_cpp ()
2301 {
2302   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2303   if { { ac_try="$ac_cpp conftest.$ac_ext"
2304 case "(($ac_try" in
2305   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2306   *) ac_try_echo=$ac_try;;
2307 esac
2308 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2309 $as_echo "$ac_try_echo"; } >&5
2310   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2311   ac_status=$?
2312   if test -s conftest.err; then
2313     grep -v '^ *+' conftest.err >conftest.er1
2314     cat conftest.er1 >&5
2315     mv -f conftest.er1 conftest.err
2316   fi
2317   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2318   test $ac_status = 0; } > conftest.i && {
2319          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2320          test ! -s conftest.err
2321        }; then :
2322   ac_retval=0
2323 else
2324   $as_echo "$as_me: failed program was:" >&5
2325 sed 's/^/| /' conftest.$ac_ext >&5
2326 
2327     ac_retval=1
2328 fi
2329   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2330   as_fn_set_status $ac_retval
2331 
2332 } # ac_fn_cxx_try_cpp
2333 
2334 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2335 # ---------------------------------------------------------
2336 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2337 # the include files in INCLUDES and setting the cache variable VAR
2338 # accordingly.
2339 ac_fn_cxx_check_header_mongrel ()
2340 {
2341   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2342   if eval \${$3+:} false; then :
2343   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2344 $as_echo_n "checking for $2... " >&6; }
2345 if eval \${$3+:} false; then :
2346   $as_echo_n "(cached) " >&6
2347 fi
2348 eval ac_res=\$$3
2349                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350 $as_echo "$ac_res" >&6; }
2351 else
2352   # Is the header compilable?
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2354 $as_echo_n "checking $2 usability... " >&6; }
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356 /* end confdefs.h.  */
2357 $4
2358 #include <$2>
2359 _ACEOF
2360 if ac_fn_cxx_try_compile "$LINENO"; then :
2361   ac_header_compiler=yes
2362 else
2363   ac_header_compiler=no
2364 fi
2365 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2367 $as_echo "$ac_header_compiler" >&6; }
2368 
2369 # Is the header present?
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2371 $as_echo_n "checking $2 presence... " >&6; }
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373 /* end confdefs.h.  */
2374 #include <$2>
2375 _ACEOF
2376 if ac_fn_cxx_try_cpp "$LINENO"; then :
2377   ac_header_preproc=yes
2378 else
2379   ac_header_preproc=no
2380 fi
2381 rm -f conftest.err conftest.i conftest.$ac_ext
2382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2383 $as_echo "$ac_header_preproc" >&6; }
2384 
2385 # So?  What about this header?
2386 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2387   yes:no: )
2388     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2389 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2390     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2391 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2392     ;;
2393   no:yes:* )
2394     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2395 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2396     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2397 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2398     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2399 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2400     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2401 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2402     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2403 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2404 ( $as_echo "## ----------------------------------------- ##
2405 ## Report this to build-dev@openjdk.java.net ##
2406 ## ----------------------------------------- ##"
2407      ) | sed "s/^/$as_me: WARNING:     /" >&2
2408     ;;
2409 esac
2410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2411 $as_echo_n "checking for $2... " >&6; }
2412 if eval \${$3+:} false; then :
2413   $as_echo_n "(cached) " >&6
2414 else
2415   eval "$3=\$ac_header_compiler"
2416 fi
2417 eval ac_res=\$$3
2418                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2419 $as_echo "$ac_res" >&6; }
2420 fi
2421   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2422 
2423 } # ac_fn_cxx_check_header_mongrel
2424 
2425 # ac_fn_cxx_try_run LINENO
2426 # ------------------------
2427 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2428 # that executables *can* be run.
2429 ac_fn_cxx_try_run ()
2430 {
2431   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432   if { { ac_try="$ac_link"
2433 case "(($ac_try" in
2434   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435   *) ac_try_echo=$ac_try;;
2436 esac
2437 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438 $as_echo "$ac_try_echo"; } >&5
2439   (eval "$ac_link") 2>&5
2440   ac_status=$?
2441   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2442   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2443   { { case "(($ac_try" in
2444   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2445   *) ac_try_echo=$ac_try;;
2446 esac
2447 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2448 $as_echo "$ac_try_echo"; } >&5
2449   (eval "$ac_try") 2>&5
2450   ac_status=$?
2451   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2452   test $ac_status = 0; }; }; then :
2453   ac_retval=0
2454 else
2455   $as_echo "$as_me: program exited with status $ac_status" >&5
2456        $as_echo "$as_me: failed program was:" >&5
2457 sed 's/^/| /' conftest.$ac_ext >&5
2458 
2459        ac_retval=$ac_status
2460 fi
2461   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2462   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463   as_fn_set_status $ac_retval
2464 
2465 } # ac_fn_cxx_try_run
2466 
2467 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2468 # ---------------------------------------------------------
2469 # Tests whether HEADER exists and can be compiled using the include files in
2470 # INCLUDES, setting the cache variable VAR accordingly.
2471 ac_fn_cxx_check_header_compile ()
2472 {
2473   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2474   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2475 $as_echo_n "checking for $2... " >&6; }
2476 if eval \${$3+:} false; then :
2477   $as_echo_n "(cached) " >&6
2478 else
2479   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2480 /* end confdefs.h.  */
2481 $4
2482 #include <$2>
2483 _ACEOF
2484 if ac_fn_cxx_try_compile "$LINENO"; then :
2485   eval "$3=yes"
2486 else
2487   eval "$3=no"
2488 fi
2489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2490 fi
2491 eval ac_res=\$$3
2492                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2493 $as_echo "$ac_res" >&6; }
2494   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2495 
2496 } # ac_fn_cxx_check_header_compile
2497 
2498 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2499 # ----------------------------------------------
2500 # Tries to find the compile-time value of EXPR in a program that includes
2501 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2502 # computed
2503 ac_fn_cxx_compute_int ()
2504 {
2505   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506   if test "$cross_compiling" = yes; then
2507     # Depending upon the size, compute the lo and hi bounds.
2508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2509 /* end confdefs.h.  */
2510 $4
2511 int
2512 main ()
2513 {
2514 static int test_array [1 - 2 * !(($2) >= 0)];
2515 test_array [0] = 0;
2516 return test_array [0];
2517 
2518   ;
2519   return 0;
2520 }
2521 _ACEOF
2522 if ac_fn_cxx_try_compile "$LINENO"; then :
2523   ac_lo=0 ac_mid=0
2524   while :; do
2525     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2526 /* end confdefs.h.  */
2527 $4
2528 int
2529 main ()
2530 {
2531 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2532 test_array [0] = 0;
2533 return test_array [0];
2534 
2535   ;
2536   return 0;
2537 }
2538 _ACEOF
2539 if ac_fn_cxx_try_compile "$LINENO"; then :
2540   ac_hi=$ac_mid; break
2541 else
2542   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2543                         if test $ac_lo -le $ac_mid; then
2544                           ac_lo= ac_hi=
2545                           break
2546                         fi
2547                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2548 fi
2549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2550   done
2551 else
2552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2553 /* end confdefs.h.  */
2554 $4
2555 int
2556 main ()
2557 {
2558 static int test_array [1 - 2 * !(($2) < 0)];
2559 test_array [0] = 0;
2560 return test_array [0];
2561 
2562   ;
2563   return 0;
2564 }
2565 _ACEOF
2566 if ac_fn_cxx_try_compile "$LINENO"; then :
2567   ac_hi=-1 ac_mid=-1
2568   while :; do
2569     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570 /* end confdefs.h.  */
2571 $4
2572 int
2573 main ()
2574 {
2575 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2576 test_array [0] = 0;
2577 return test_array [0];
2578 
2579   ;
2580   return 0;
2581 }
2582 _ACEOF
2583 if ac_fn_cxx_try_compile "$LINENO"; then :
2584   ac_lo=$ac_mid; break
2585 else
2586   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2587                         if test $ac_mid -le $ac_hi; then
2588                           ac_lo= ac_hi=
2589                           break
2590                         fi
2591                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2592 fi
2593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2594   done
2595 else
2596   ac_lo= ac_hi=
2597 fi
2598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2599 fi
2600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601 # Binary search between lo and hi bounds.
2602 while test "x$ac_lo" != "x$ac_hi"; do
2603   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2604   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605 /* end confdefs.h.  */
2606 $4
2607 int
2608 main ()
2609 {
2610 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2611 test_array [0] = 0;
2612 return test_array [0];
2613 
2614   ;
2615   return 0;
2616 }
2617 _ACEOF
2618 if ac_fn_cxx_try_compile "$LINENO"; then :
2619   ac_hi=$ac_mid
2620 else
2621   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2622 fi
2623 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2624 done
2625 case $ac_lo in #((
2626 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2627 '') ac_retval=1 ;;
2628 esac
2629   else
2630     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631 /* end confdefs.h.  */
2632 $4
2633 static long int longval () { return $2; }
2634 static unsigned long int ulongval () { return $2; }
2635 #include <stdio.h>
2636 #include <stdlib.h>
2637 int
2638 main ()
2639 {
2640 
2641   FILE *f = fopen ("conftest.val", "w");
2642   if (! f)
2643     return 1;
2644   if (($2) < 0)
2645     {
2646       long int i = longval ();
2647       if (i != ($2))
2648         return 1;
2649       fprintf (f, "%ld", i);
2650     }
2651   else
2652     {
2653       unsigned long int i = ulongval ();
2654       if (i != ($2))
2655         return 1;
2656       fprintf (f, "%lu", i);
2657     }
2658   /* Do not output a trailing newline, as this causes \r\n confusion
2659      on some platforms.  */
2660   return ferror (f) || fclose (f) != 0;
2661 
2662   ;
2663   return 0;
2664 }
2665 _ACEOF
2666 if ac_fn_cxx_try_run "$LINENO"; then :
2667   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2668 else
2669   ac_retval=1
2670 fi
2671 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2672   conftest.$ac_objext conftest.beam conftest.$ac_ext
2673 rm -f conftest.val
2674 
2675   fi
2676   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677   as_fn_set_status $ac_retval
2678 
2679 } # ac_fn_cxx_compute_int
2680 
2681 # ac_fn_cxx_try_link LINENO
2682 # -------------------------
2683 # Try to link conftest.$ac_ext, and return whether this succeeded.
2684 ac_fn_cxx_try_link ()
2685 {
2686   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687   rm -f conftest.$ac_objext conftest$ac_exeext
2688   if { { ac_try="$ac_link"
2689 case "(($ac_try" in
2690   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2691   *) ac_try_echo=$ac_try;;
2692 esac
2693 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2694 $as_echo "$ac_try_echo"; } >&5
2695   (eval "$ac_link") 2>conftest.err
2696   ac_status=$?
2697   if test -s conftest.err; then
2698     grep -v '^ *+' conftest.err >conftest.er1
2699     cat conftest.er1 >&5
2700     mv -f conftest.er1 conftest.err
2701   fi
2702   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703   test $ac_status = 0; } && {
2704          test -z "$ac_cxx_werror_flag" ||
2705          test ! -s conftest.err
2706        } && test -s conftest$ac_exeext && {
2707          test "$cross_compiling" = yes ||
2708          test -x conftest$ac_exeext
2709        }; then :
2710   ac_retval=0
2711 else
2712   $as_echo "$as_me: failed program was:" >&5
2713 sed 's/^/| /' conftest.$ac_ext >&5
2714 
2715         ac_retval=1
2716 fi
2717   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2718   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2719   # interfere with the next link command; also delete a directory that is
2720   # left behind by Apple's compiler.  We do this before executing the actions.
2721   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2722   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2723   as_fn_set_status $ac_retval
2724 
2725 } # ac_fn_cxx_try_link
2726 
2727 # ac_fn_cxx_check_func LINENO FUNC VAR
2728 # ------------------------------------
2729 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2730 ac_fn_cxx_check_func ()
2731 {
2732   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2733   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2734 $as_echo_n "checking for $2... " >&6; }
2735 if eval \${$3+:} false; then :
2736   $as_echo_n "(cached) " >&6
2737 else
2738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2739 /* end confdefs.h.  */
2740 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2741    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2742 #define $2 innocuous_$2
2743 
2744 /* System header to define __stub macros and hopefully few prototypes,
2745     which can conflict with char $2 (); below.
2746     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2747     <limits.h> exists even on freestanding compilers.  */
2748 
2749 #ifdef __STDC__
2750 # include <limits.h>
2751 #else
2752 # include <assert.h>
2753 #endif
2754 
2755 #undef $2
2756 
2757 /* Override any GCC internal prototype to avoid an error.
2758    Use char because int might match the return type of a GCC
2759    builtin and then its argument prototype would still apply.  */
2760 #ifdef __cplusplus
2761 extern "C"
2762 #endif
2763 char $2 ();
2764 /* The GNU C library defines this for functions which it implements
2765     to always fail with ENOSYS.  Some functions are actually named
2766     something starting with __ and the normal name is an alias.  */
2767 #if defined __stub_$2 || defined __stub___$2
2768 choke me
2769 #endif
2770 
2771 int
2772 main ()
2773 {
2774 return $2 ();
2775   ;
2776   return 0;
2777 }
2778 _ACEOF
2779 if ac_fn_cxx_try_link "$LINENO"; then :
2780   eval "$3=yes"
2781 else
2782   eval "$3=no"
2783 fi
2784 rm -f core conftest.err conftest.$ac_objext \
2785     conftest$ac_exeext conftest.$ac_ext
2786 fi
2787 eval ac_res=\$$3
2788                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2789 $as_echo "$ac_res" >&6; }
2790   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791 
2792 } # ac_fn_cxx_check_func
2793 
2794 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2795 # -------------------------------------------------------
2796 # Tests whether HEADER exists and can be compiled using the include files in
2797 # INCLUDES, setting the cache variable VAR accordingly.
2798 ac_fn_c_check_header_compile ()
2799 {
2800   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2802 $as_echo_n "checking for $2... " >&6; }
2803 if eval \${$3+:} false; then :
2804   $as_echo_n "(cached) " >&6
2805 else
2806   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807 /* end confdefs.h.  */
2808 $4
2809 #include <$2>
2810 _ACEOF
2811 if ac_fn_c_try_compile "$LINENO"; then :
2812   eval "$3=yes"
2813 else
2814   eval "$3=no"
2815 fi
2816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817 fi
2818 eval ac_res=\$$3
2819                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2820 $as_echo "$ac_res" >&6; }
2821   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2822 
2823 } # ac_fn_c_check_header_compile
2824 cat >config.log <<_ACEOF
2825 This file contains any messages produced by compilers while
2826 running configure, to aid debugging if configure makes a mistake.
2827 
2828 It was created by OpenJDK $as_me jdk8, which was
2829 generated by GNU Autoconf 2.69.  Invocation command line was
2830 
2831   $ $0 $@
2832 
2833 _ACEOF
2834 exec 5>>config.log
2835 {
2836 cat <<_ASUNAME
2837 ## --------- ##
2838 ## Platform. ##
2839 ## --------- ##
2840 
2841 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2842 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2843 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2844 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2845 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2846 
2847 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2848 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2849 
2850 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2851 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2852 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2853 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2854 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2855 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2856 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2857 
2858 _ASUNAME
2859 
2860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2861 for as_dir in $PATH
2862 do
2863   IFS=$as_save_IFS
2864   test -z "$as_dir" && as_dir=.
2865     $as_echo "PATH: $as_dir"
2866   done
2867 IFS=$as_save_IFS
2868 
2869 } >&5
2870 
2871 cat >&5 <<_ACEOF
2872 
2873 
2874 ## ----------- ##
2875 ## Core tests. ##
2876 ## ----------- ##
2877 
2878 _ACEOF
2879 
2880 
2881 # Keep a trace of the command line.
2882 # Strip out --no-create and --no-recursion so they do not pile up.
2883 # Strip out --silent because we don't want to record it for future runs.
2884 # Also quote any args containing shell meta-characters.
2885 # Make two passes to allow for proper duplicate-argument suppression.
2886 ac_configure_args=
2887 ac_configure_args0=
2888 ac_configure_args1=
2889 ac_must_keep_next=false
2890 for ac_pass in 1 2
2891 do
2892   for ac_arg
2893   do
2894     case $ac_arg in
2895     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2896     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2897     | -silent | --silent | --silen | --sile | --sil)
2898       continue ;;
2899     *\'*)
2900       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2901     esac
2902     case $ac_pass in
2903     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2904     2)
2905       as_fn_append ac_configure_args1 " '$ac_arg'"
2906       if test $ac_must_keep_next = true; then
2907         ac_must_keep_next=false # Got value, back to normal.
2908       else
2909         case $ac_arg in
2910           *=* | --config-cache | -C | -disable-* | --disable-* \
2911           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2912           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2913           | -with-* | --with-* | -without-* | --without-* | --x)
2914             case "$ac_configure_args0 " in
2915               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2916             esac
2917             ;;
2918           -* ) ac_must_keep_next=true ;;
2919         esac
2920       fi
2921       as_fn_append ac_configure_args " '$ac_arg'"
2922       ;;
2923     esac
2924   done
2925 done
2926 { ac_configure_args0=; unset ac_configure_args0;}
2927 { ac_configure_args1=; unset ac_configure_args1;}
2928 
2929 # When interrupted or exit'd, cleanup temporary files, and complete
2930 # config.log.  We remove comments because anyway the quotes in there
2931 # would cause problems or look ugly.
2932 # WARNING: Use '\'' to represent an apostrophe within the trap.
2933 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2934 trap 'exit_status=$?
2935   # Save into config.log some information that might help in debugging.
2936   {
2937     echo
2938 
2939     $as_echo "## ---------------- ##
2940 ## Cache variables. ##
2941 ## ---------------- ##"
2942     echo
2943     # The following way of writing the cache mishandles newlines in values,
2944 (
2945   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2946     eval ac_val=\$$ac_var
2947     case $ac_val in #(
2948     *${as_nl}*)
2949       case $ac_var in #(
2950       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2951 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2952       esac
2953       case $ac_var in #(
2954       _ | IFS | as_nl) ;; #(
2955       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2956       *) { eval $ac_var=; unset $ac_var;} ;;
2957       esac ;;
2958     esac
2959   done
2960   (set) 2>&1 |
2961     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2962     *${as_nl}ac_space=\ *)
2963       sed -n \
2964         "s/'\''/'\''\\\\'\'''\''/g;
2965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2966       ;; #(
2967     *)
2968       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2969       ;;
2970     esac |
2971     sort
2972 )
2973     echo
2974 
2975     $as_echo "## ----------------- ##
2976 ## Output variables. ##
2977 ## ----------------- ##"
2978     echo
2979     for ac_var in $ac_subst_vars
2980     do
2981       eval ac_val=\$$ac_var
2982       case $ac_val in
2983       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2984       esac
2985       $as_echo "$ac_var='\''$ac_val'\''"
2986     done | sort
2987     echo
2988 
2989     if test -n "$ac_subst_files"; then
2990       $as_echo "## ------------------- ##
2991 ## File substitutions. ##
2992 ## ------------------- ##"
2993       echo
2994       for ac_var in $ac_subst_files
2995       do
2996         eval ac_val=\$$ac_var
2997         case $ac_val in
2998         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2999         esac
3000         $as_echo "$ac_var='\''$ac_val'\''"
3001       done | sort
3002       echo
3003     fi
3004 
3005     if test -s confdefs.h; then
3006       $as_echo "## ----------- ##
3007 ## confdefs.h. ##
3008 ## ----------- ##"
3009       echo
3010       cat confdefs.h
3011       echo
3012     fi
3013     test "$ac_signal" != 0 &&
3014       $as_echo "$as_me: caught signal $ac_signal"
3015     $as_echo "$as_me: exit $exit_status"
3016   } >&5
3017   rm -f core *.core core.conftest.* &&
3018     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3019     exit $exit_status
3020 ' 0
3021 for ac_signal in 1 2 13 15; do
3022   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3023 done
3024 ac_signal=0
3025 
3026 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3027 rm -f -r conftest* confdefs.h
3028 
3029 $as_echo "/* confdefs.h */" > confdefs.h
3030 
3031 # Predefined preprocessor variables.
3032 
3033 cat >>confdefs.h <<_ACEOF
3034 #define PACKAGE_NAME "$PACKAGE_NAME"
3035 _ACEOF
3036 
3037 cat >>confdefs.h <<_ACEOF
3038 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3039 _ACEOF
3040 
3041 cat >>confdefs.h <<_ACEOF
3042 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3043 _ACEOF
3044 
3045 cat >>confdefs.h <<_ACEOF
3046 #define PACKAGE_STRING "$PACKAGE_STRING"
3047 _ACEOF
3048 
3049 cat >>confdefs.h <<_ACEOF
3050 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3051 _ACEOF
3052 
3053 cat >>confdefs.h <<_ACEOF
3054 #define PACKAGE_URL "$PACKAGE_URL"
3055 _ACEOF
3056 
3057 
3058 # Let the site file select an alternate cache file if it wants to.
3059 # Prefer an explicitly selected file to automatically selected ones.
3060 ac_site_file1=NONE
3061 ac_site_file2=NONE
3062 if test -n "$CONFIG_SITE"; then
3063   # We do not want a PATH search for config.site.
3064   case $CONFIG_SITE in #((
3065     -*)  ac_site_file1=./$CONFIG_SITE;;
3066     */*) ac_site_file1=$CONFIG_SITE;;
3067     *)   ac_site_file1=./$CONFIG_SITE;;
3068   esac
3069 elif test "x$prefix" != xNONE; then
3070   ac_site_file1=$prefix/share/config.site
3071   ac_site_file2=$prefix/etc/config.site
3072 else
3073   ac_site_file1=$ac_default_prefix/share/config.site
3074   ac_site_file2=$ac_default_prefix/etc/config.site
3075 fi
3076 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3077 do
3078   test "x$ac_site_file" = xNONE && continue
3079   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3080     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3081 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3082     sed 's/^/| /' "$ac_site_file" >&5
3083     . "$ac_site_file" \
3084       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3085 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3086 as_fn_error $? "failed to load site script $ac_site_file
3087 See \`config.log' for more details" "$LINENO" 5; }
3088   fi
3089 done
3090 
3091 if test -r "$cache_file"; then
3092   # Some versions of bash will fail to source /dev/null (special files
3093   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3094   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3095     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3096 $as_echo "$as_me: loading cache $cache_file" >&6;}
3097     case $cache_file in
3098       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3099       *)                      . "./$cache_file";;
3100     esac
3101   fi
3102 else
3103   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3104 $as_echo "$as_me: creating cache $cache_file" >&6;}
3105   >$cache_file
3106 fi
3107 
3108 # Check that the precious variables saved in the cache have kept the same
3109 # value.
3110 ac_cache_corrupted=false
3111 for ac_var in $ac_precious_vars; do
3112   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3113   eval ac_new_set=\$ac_env_${ac_var}_set
3114   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3115   eval ac_new_val=\$ac_env_${ac_var}_value
3116   case $ac_old_set,$ac_new_set in
3117     set,)
3118       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3119 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3120       ac_cache_corrupted=: ;;
3121     ,set)
3122       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3123 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3124       ac_cache_corrupted=: ;;
3125     ,);;
3126     *)
3127       if test "x$ac_old_val" != "x$ac_new_val"; then
3128         # differences in whitespace do not lead to failure.
3129         ac_old_val_w=`echo x $ac_old_val`
3130         ac_new_val_w=`echo x $ac_new_val`
3131         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3132           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3133 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3134           ac_cache_corrupted=:
3135         else
3136           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3137 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3138           eval $ac_var=\$ac_old_val
3139         fi
3140         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3141 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3142         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3143 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3144       fi;;
3145   esac
3146   # Pass precious variables to config.status.
3147   if test "$ac_new_set" = set; then
3148     case $ac_new_val in
3149     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3150     *) ac_arg=$ac_var=$ac_new_val ;;
3151     esac
3152     case " $ac_configure_args " in
3153       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3154       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3155     esac
3156   fi
3157 done
3158 if $ac_cache_corrupted; then
3159   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3161   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3162 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3163   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3164 fi
3165 ## -------------------- ##
3166 ## Main body of script. ##
3167 ## -------------------- ##
3168 
3169 ac_ext=c
3170 ac_cpp='$CPP $CPPFLAGS'
3171 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3172 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3173 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3174 
3175 
3176 
3177 ac_aux_dir=
3178 for ac_dir in build-aux "$srcdir"/build-aux; do
3179   if test -f "$ac_dir/install-sh"; then
3180     ac_aux_dir=$ac_dir
3181     ac_install_sh="$ac_aux_dir/install-sh -c"
3182     break
3183   elif test -f "$ac_dir/install.sh"; then
3184     ac_aux_dir=$ac_dir
3185     ac_install_sh="$ac_aux_dir/install.sh -c"
3186     break
3187   elif test -f "$ac_dir/shtool"; then
3188     ac_aux_dir=$ac_dir
3189     ac_install_sh="$ac_aux_dir/shtool install -c"
3190     break
3191   fi
3192 done
3193 if test -z "$ac_aux_dir"; then
3194   as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3195 fi
3196 
3197 # These three variables are undocumented and unsupported,
3198 # and are intended to be withdrawn in a future Autoconf release.
3199 # They can cause serious problems if a builder's source tree is in a directory
3200 # whose full name contains unusual characters.
3201 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3202 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3203 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3204 
3205 
3206 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3207 
3208 #
3209 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3210 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3211 #
3212 # This code is free software; you can redistribute it and/or modify it
3213 # under the terms of the GNU General Public License version 2 only, as
3214 # published by the Free Software Foundation.  Oracle designates this
3215 # particular file as subject to the "Classpath" exception as provided
3216 # by Oracle in the LICENSE file that accompanied this code.
3217 #
3218 # This code is distributed in the hope that it will be useful, but WITHOUT
3219 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3220 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3221 # version 2 for more details (a copy is included in the LICENSE file that
3222 # accompanied this code).
3223 #
3224 # You should have received a copy of the GNU General Public License version
3225 # 2 along with this work; if not, write to the Free Software Foundation,
3226 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3227 #
3228 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3229 # or visit www.oracle.com if you need additional information or have any
3230 # questions.
3231 #
3232 
3233 #
3234 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3235 #
3236 # This program is free software; you can redistribute it and/or modify
3237 # it under the terms of the GNU General Public License as published by
3238 # the Free Software Foundation; either version 2 of the License, or
3239 # (at your option) any later version.
3240 #
3241 # This program is distributed in the hope that it will be useful, but
3242 # WITHOUT ANY WARRANTY; without even the implied warranty of
3243 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3244 # General Public License for more details.
3245 #
3246 # You should have received a copy of the GNU General Public License
3247 # along with this program; if not, write to the Free Software
3248 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3249 #
3250 # As a special exception to the GNU General Public License, if you
3251 # distribute this file as part of a program that contains a
3252 # configuration script generated by Autoconf, you may include it under
3253 # the same distribution terms that you use for the rest of that program.
3254 
3255 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3256 # ----------------------------------
3257 # PKG_PROG_PKG_CONFIG
3258 
3259 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3260 #
3261 # Check to see whether a particular set of modules exists.  Similar
3262 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3263 #
3264 #
3265 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3266 # this or PKG_CHECK_MODULES is called, or make sure to call
3267 # PKG_CHECK_EXISTS manually
3268 # --------------------------------------------------------------
3269 
3270 
3271 
3272 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3273 # ---------------------------------------------
3274 # _PKG_CONFIG
3275 
3276 # _PKG_SHORT_ERRORS_SUPPORTED
3277 # -----------------------------
3278 # _PKG_SHORT_ERRORS_SUPPORTED
3279 
3280 
3281 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3282 # [ACTION-IF-NOT-FOUND])
3283 #
3284 #
3285 # Note that if there is a possibility the first call to
3286 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3287 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3288 #
3289 #
3290 # --------------------------------------------------------------
3291 # PKG_CHECK_MODULES
3292 
3293 
3294 # Include these first...
3295 #
3296 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3297 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3298 #
3299 # This code is free software; you can redistribute it and/or modify it
3300 # under the terms of the GNU General Public License version 2 only, as
3301 # published by the Free Software Foundation.  Oracle designates this
3302 # particular file as subject to the "Classpath" exception as provided
3303 # by Oracle in the LICENSE file that accompanied this code.
3304 #
3305 # This code is distributed in the hope that it will be useful, but WITHOUT
3306 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3307 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3308 # version 2 for more details (a copy is included in the LICENSE file that
3309 # accompanied this code).
3310 #
3311 # You should have received a copy of the GNU General Public License version
3312 # 2 along with this work; if not, write to the Free Software Foundation,
3313 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3314 #
3315 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3316 # or visit www.oracle.com if you need additional information or have any
3317 # questions.
3318 #
3319 
3320 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3321 # If so, then append $1 to $2 \
3322 # Also set JVM_ARG_OK to true/false depending on outcome.
3323 
3324 
3325 # Appends a string to a path variable, only adding the : when needed.
3326 
3327 
3328 # This will make sure the given variable points to a full and proper
3329 # path. This means:
3330 # 1) There will be no spaces in the path. On posix platforms,
3331 #    spaces in the path will result in an error. On Windows,
3332 #    the path will be rewritten using short-style to be space-free.
3333 # 2) The path will be absolute, and it will be in unix-style (on
3334 #     cygwin).
3335 # $1: The name of the variable to fix
3336 
3337 
3338 # This will make sure the given variable points to a executable
3339 # with a full and proper path. This means:
3340 # 1) There will be no spaces in the path. On posix platforms,
3341 #    spaces in the path will result in an error. On Windows,
3342 #    the path will be rewritten using short-style to be space-free.
3343 # 2) The path will be absolute, and it will be in unix-style (on
3344 #     cygwin).
3345 # Any arguments given to the executable is preserved.
3346 # If the input variable does not have a directory specification, then
3347 # it need to be in the PATH.
3348 # $1: The name of the variable to fix
3349 
3350 
3351 
3352 
3353 # Register a --with argument but mark it as deprecated
3354 # $1: The name of the with argument to deprecate, not including --with-
3355 
3356 
3357 # Register a --enable argument but mark it as deprecated
3358 # $1: The name of the with argument to deprecate, not including --enable-
3359 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3360 
3361 
3362 
3363 
3364 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3365 # $1: variable to check
3366 
3367 
3368 # Check that there are no unprocessed overridden variables left.
3369 # If so, they are an incorrect argument and we will exit with an error.
3370 
3371 
3372 # Setup a tool for the given variable. If correctly specified by the user,
3373 # use that value, otherwise search for the tool using the supplied code snippet.
3374 # $1: variable to set
3375 # $2: code snippet to call to look for the tool
3376 
3377 
3378 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3379 # $1: variable to set
3380 # $2: executable name (or list of names) to look for
3381 
3382 
3383 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3384 # $1: variable to set
3385 # $2: executable name (or list of names) to look for
3386 
3387 
3388 # Like BASIC_PATH_PROGS but fails if no tool was found.
3389 # $1: variable to set
3390 # $2: executable name (or list of names) to look for
3391 
3392 
3393 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3394 # $1: variable to set
3395 # $2: autoconf macro to call to look for the special tool
3396 
3397 
3398 # Setup the most fundamental tools that relies on not much else to set up,
3399 # but is used by much of the early bootstrap code.
3400 
3401 
3402 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3403 
3404 
3405 
3406 
3407 
3408 
3409 
3410 #%%% Simple tools %%%
3411 
3412 # Check if we have found a usable version of make
3413 # $1: the path to a potential make binary (or empty)
3414 # $2: the description on how we found this
3415 
3416 
3417 # Goes looking for a usable version of GNU make.
3418 
3419 
3420 
3421 
3422 
3423 
3424 # Check if build directory is on local disk. If not possible to determine,
3425 # we prefer to claim it's local.
3426 # Argument 1: directory to test
3427 # Argument 2: what to do if it is on local disk
3428 # Argument 3: what to do otherwise (remote disk or failure)
3429 
3430 
3431 # Check that source files have basic read permissions set. This might
3432 # not be the case in cygwin in certain conditions.
3433 
3434 
3435 
3436 
3437 #
3438 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3439 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3440 #
3441 # This code is free software; you can redistribute it and/or modify it
3442 # under the terms of the GNU General Public License version 2 only, as
3443 # published by the Free Software Foundation.  Oracle designates this
3444 # particular file as subject to the "Classpath" exception as provided
3445 # by Oracle in the LICENSE file that accompanied this code.
3446 #
3447 # This code is distributed in the hope that it will be useful, but WITHOUT
3448 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3449 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3450 # version 2 for more details (a copy is included in the LICENSE file that
3451 # accompanied this code).
3452 #
3453 # You should have received a copy of the GNU General Public License version
3454 # 2 along with this work; if not, write to the Free Software Foundation,
3455 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3456 #
3457 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3458 # or visit www.oracle.com if you need additional information or have any
3459 # questions.
3460 #
3461 
3462 
3463 
3464 
3465 
3466 # Helper function which possibly converts a path using DOS-style short mode.
3467 # If so, the updated path is stored in $new_path.
3468 # $1: The path to check
3469 
3470 
3471 # Helper function which possibly converts a path using DOS-style short mode.
3472 # If so, the updated path is stored in $new_path.
3473 # $1: The path to check
3474 
3475 
3476 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3477 # and could probably be heavily simplified. However, all changes in this
3478 # area tend to need lot of testing in different scenarios, and in lack of
3479 # proper unit testing, cleaning this up has not been deemed worth the effort
3480 # at the moment.
3481 
3482 
3483 
3484 
3485 
3486 
3487 
3488 
3489 
3490 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3491 
3492 
3493 
3494 
3495 #
3496 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3497 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3498 #
3499 # This code is free software; you can redistribute it and/or modify it
3500 # under the terms of the GNU General Public License version 2 only, as
3501 # published by the Free Software Foundation.  Oracle designates this
3502 # particular file as subject to the "Classpath" exception as provided
3503 # by Oracle in the LICENSE file that accompanied this code.
3504 #
3505 # This code is distributed in the hope that it will be useful, but WITHOUT
3506 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3507 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3508 # version 2 for more details (a copy is included in the LICENSE file that
3509 # accompanied this code).
3510 #
3511 # You should have received a copy of the GNU General Public License version
3512 # 2 along with this work; if not, write to the Free Software Foundation,
3513 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3514 #
3515 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3516 # or visit www.oracle.com if you need additional information or have any
3517 # questions.
3518 #
3519 
3520 
3521 
3522 
3523 
3524 
3525 
3526 
3527 
3528 
3529 
3530 # ... then the rest
3531 #
3532 # Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3533 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3534 #
3535 # This code is free software; you can redistribute it and/or modify it
3536 # under the terms of the GNU General Public License version 2 only, as
3537 # published by the Free Software Foundation.  Oracle designates this
3538 # particular file as subject to the "Classpath" exception as provided
3539 # by Oracle in the LICENSE file that accompanied this code.
3540 #
3541 # This code is distributed in the hope that it will be useful, but WITHOUT
3542 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3543 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3544 # version 2 for more details (a copy is included in the LICENSE file that
3545 # accompanied this code).
3546 #
3547 # You should have received a copy of the GNU General Public License version
3548 # 2 along with this work; if not, write to the Free Software Foundation,
3549 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3550 #
3551 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3552 # or visit www.oracle.com if you need additional information or have any
3553 # questions.
3554 #
3555 
3556 ########################################################################
3557 # This file handles detection of the Boot JDK. The Boot JDK detection
3558 # process has been developed as a response to solve a complex real-world
3559 # problem. Initially, it was simple, but it has grown as platform after
3560 # platform, idiosyncracy after idiosyncracy has been supported.
3561 #
3562 # The basic idea is this:
3563 # 1) You need an acceptable *) JDK to use as a Boot JDK
3564 # 2) There are several ways to locate a JDK, that are mostly platform
3565 #    dependent **)
3566 # 3) You can have multiple JDKs installed
3567 # 4) If possible, configure should try to dig out an acceptable JDK
3568 #    automatically, without having to resort to command-line options
3569 #
3570 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3571 #     javac) and not a JRE, etc.
3572 #
3573 # **) On Windows we typically use a well-known path.
3574 #     On MacOSX we typically use the tool java_home.
3575 #     On Linux we typically find javac in the $PATH, and then follow a
3576 #     chain of symlinks that often ends up in a real JDK.
3577 #
3578 # This leads to the code where we check in different ways to locate a
3579 # JDK, and if one is found, check if it is acceptable. If not, we print
3580 # our reasons for rejecting it (useful when debugging non-working
3581 # configure situations) and continue checking the next one.
3582 ########################################################################
3583 
3584 # Execute the check given as argument, and verify the result
3585 # If the Boot JDK was previously found, do nothing
3586 # $1 A command line (typically autoconf macro) to execute
3587 
3588 
3589 # Test: Is bootjdk explicitely set by command line arguments?
3590 
3591 
3592 # Test: Is bootjdk available from builddeps?
3593 
3594 
3595 # Test: Is $JAVA_HOME set?
3596 
3597 
3598 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3599 
3600 
3601 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3602 # $1: Argument to the java_home binary (optional)
3603 
3604 
3605 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3606 
3607 
3608 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3609 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3610 # $1 = Path to directory containing jdk installations.
3611 # $2 = String to append to the found JDK directory to get the proper JDK home
3612 
3613 
3614 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3615 # environmental variable as base for where to look.
3616 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3617 
3618 
3619 # Test: Is there a JDK installed in default, well-known locations?
3620 
3621 
3622 # Check that a command-line tool in the Boot JDK is correct
3623 # $1 = name of variable to assign
3624 # $2 = name of binary
3625 
3626 
3627 ###############################################################################
3628 #
3629 # We need a Boot JDK to bootstrap the build.
3630 #
3631 
3632 
3633 
3634 
3635 
3636 #
3637 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3638 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3639 #
3640 # This code is free software; you can redistribute it and/or modify it
3641 # under the terms of the GNU General Public License version 2 only, as
3642 # published by the Free Software Foundation.  Oracle designates this
3643 # particular file as subject to the "Classpath" exception as provided
3644 # by Oracle in the LICENSE file that accompanied this code.
3645 #
3646 # This code is distributed in the hope that it will be useful, but WITHOUT
3647 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3648 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3649 # version 2 for more details (a copy is included in the LICENSE file that
3650 # accompanied this code).
3651 #
3652 # You should have received a copy of the GNU General Public License version
3653 # 2 along with this work; if not, write to the Free Software Foundation,
3654 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3655 #
3656 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3657 # or visit www.oracle.com if you need additional information or have any
3658 # questions.
3659 #
3660 
3661 
3662 
3663 
3664 
3665 
3666 
3667 
3668 
3669 
3670 
3671 
3672 
3673 
3674 
3675 
3676 
3677 
3678 
3679 
3680 #
3681 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3682 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3683 #
3684 # This code is free software; you can redistribute it and/or modify it
3685 # under the terms of the GNU General Public License version 2 only, as
3686 # published by the Free Software Foundation.  Oracle designates this
3687 # particular file as subject to the "Classpath" exception as provided
3688 # by Oracle in the LICENSE file that accompanied this code.
3689 #
3690 # This code is distributed in the hope that it will be useful, but WITHOUT
3691 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3692 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3693 # version 2 for more details (a copy is included in the LICENSE file that
3694 # accompanied this code).
3695 #
3696 # You should have received a copy of the GNU General Public License version
3697 # 2 along with this work; if not, write to the Free Software Foundation,
3698 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3699 #
3700 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3701 # or visit www.oracle.com if you need additional information or have any
3702 # questions.
3703 #
3704 
3705 
3706 
3707 
3708 
3709 cygwin_help() {
3710   case $1 in
3711     unzip)
3712       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3713       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3714       ;;
3715     zip)
3716       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3717       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3718       ;;
3719     make)
3720       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3721       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3722       ;;
3723     freetype)
3724       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3725         HELP_MSG="To install freetype, run:
3726 wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3727 chmod +x /tmp/freetype-setup.exe
3728 /tmp/freetype-setup.exe
3729 Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3730 After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3731       else
3732         HELP_MSG="You need to build a 64-bit version of freetype.
3733 This is not readily available.
3734 You can find source code and build instructions on
3735 http://www.freetype.org/
3736 If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3737       fi
3738       ;;
3739   esac
3740 }
3741 
3742 msys_help() {
3743   PKGHANDLER_COMMAND=""
3744 }
3745 
3746 apt_help() {
3747   case $1 in
3748     devkit)
3749       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3750     openjdk)
3751       PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3752     alsa)
3753       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3754     cups)
3755       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3756     freetype)
3757       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3758     pulse)
3759       PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3760     x11)
3761       PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3762     ccache)
3763       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3764   esac
3765 }
3766 
3767 yum_help() {
3768   case $1 in
3769     devkit)
3770       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3771     openjdk)
3772       PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3773     alsa)
3774       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3775     cups)
3776       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3777     freetype)
3778       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3779     pulse)
3780       PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3781     x11)
3782       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3783     ccache)
3784       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3785   esac
3786 }
3787 
3788 port_help() {
3789   PKGHANDLER_COMMAND=""
3790 }
3791 
3792 pkgutil_help() {
3793   PKGHANDLER_COMMAND=""
3794 }
3795 
3796 pkgadd_help() {
3797   PKGHANDLER_COMMAND=""
3798 }
3799 
3800 
3801 
3802 #
3803 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3804 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3805 #
3806 # This code is free software; you can redistribute it and/or modify it
3807 # under the terms of the GNU General Public License version 2 only, as
3808 # published by the Free Software Foundation.  Oracle designates this
3809 # particular file as subject to the "Classpath" exception as provided
3810 # by Oracle in the LICENSE file that accompanied this code.
3811 #
3812 # This code is distributed in the hope that it will be useful, but WITHOUT
3813 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3814 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3815 # version 2 for more details (a copy is included in the LICENSE file that
3816 # accompanied this code).
3817 #
3818 # You should have received a copy of the GNU General Public License version
3819 # 2 along with this work; if not, write to the Free Software Foundation,
3820 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3821 #
3822 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3823 # or visit www.oracle.com if you need additional information or have any
3824 # questions.
3825 #
3826 
3827 
3828 
3829 
3830 
3831 
3832 
3833 
3834 
3835 
3836 ###############################################################################
3837 #
3838 # Should we build only OpenJDK even if closed sources are present?
3839 #
3840 
3841 
3842 
3843 
3844 ###############################################################################
3845 #
3846 # Setup version numbers
3847 #
3848 
3849 
3850 
3851 
3852 
3853 
3854 # Support for customization of the build process. Some build files
3855 # will include counterparts from this location, if they exist. This allows
3856 # for a degree of customization of the build targets and the rules/recipes
3857 # to create them
3858 
3859 # Check whether --with-custom-make-dir was given.
3860 if test "${with_custom_make_dir+set}" = set; then :
3861   withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3862 fi
3863 
3864 
3865 
3866 #
3867 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3868 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3869 #
3870 # This code is free software; you can redistribute it and/or modify it
3871 # under the terms of the GNU General Public License version 2 only, as
3872 # published by the Free Software Foundation.  Oracle designates this
3873 # particular file as subject to the "Classpath" exception as provided
3874 # by Oracle in the LICENSE file that accompanied this code.
3875 #
3876 # This code is distributed in the hope that it will be useful, but WITHOUT
3877 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3878 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3879 # version 2 for more details (a copy is included in the LICENSE file that
3880 # accompanied this code).
3881 #
3882 # You should have received a copy of the GNU General Public License version
3883 # 2 along with this work; if not, write to the Free Software Foundation,
3884 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3885 #
3886 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3887 # or visit www.oracle.com if you need additional information or have any
3888 # questions.
3889 #
3890 
3891 
3892 
3893 
3894 
3895 
3896 
3897 
3898 
3899 
3900 
3901 
3902 
3903 
3904 
3905 
3906 
3907 #
3908 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3909 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3910 #
3911 # This code is free software; you can redistribute it and/or modify it
3912 # under the terms of the GNU General Public License version 2 only, as
3913 # published by the Free Software Foundation.  Oracle designates this
3914 # particular file as subject to the "Classpath" exception as provided
3915 # by Oracle in the LICENSE file that accompanied this code.
3916 #
3917 # This code is distributed in the hope that it will be useful, but WITHOUT
3918 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3919 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3920 # version 2 for more details (a copy is included in the LICENSE file that
3921 # accompanied this code).
3922 #
3923 # You should have received a copy of the GNU General Public License version
3924 # 2 along with this work; if not, write to the Free Software Foundation,
3925 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3926 #
3927 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3928 # or visit www.oracle.com if you need additional information or have any
3929 # questions.
3930 #
3931 
3932 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3933 # Converts autoconf style CPU name to OpenJDK style, into
3934 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3935 
3936 
3937 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3938 # Converts autoconf style OS name to OpenJDK style, into
3939 # VAR_OS and VAR_OS_API.
3940 
3941 
3942 # Expects $host_os $host_cpu $build_os and $build_cpu
3943 # and $with_target_bits to have been setup!
3944 #
3945 # Translate the standard triplet(quadruplet) definition
3946 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3947 # OPENJDK_BUILD_OS, etc.
3948 
3949 
3950 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3951 # accordingly. Must be done after setting up build and target system, but before
3952 # doing anything else with these values.
3953 
3954 
3955 # Setup the legacy variables, for controlling the old makefiles.
3956 #
3957 
3958 
3959 
3960 
3961 #%%% Build and target systems %%%
3962 
3963 
3964 
3965 
3966 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3967 # Add -mX to various FLAGS variables.
3968 
3969 
3970 
3971 
3972 
3973 
3974 #
3975 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3976 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977 #
3978 # This code is free software; you can redistribute it and/or modify it
3979 # under the terms of the GNU General Public License version 2 only, as
3980 # published by the Free Software Foundation.  Oracle designates this
3981 # particular file as subject to the "Classpath" exception as provided
3982 # by Oracle in the LICENSE file that accompanied this code.
3983 #
3984 # This code is distributed in the hope that it will be useful, but WITHOUT
3985 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987 # version 2 for more details (a copy is included in the LICENSE file that
3988 # accompanied this code).
3989 #
3990 # You should have received a copy of the GNU General Public License version
3991 # 2 along with this work; if not, write to the Free Software Foundation,
3992 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993 #
3994 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995 # or visit www.oracle.com if you need additional information or have any
3996 # questions.
3997 #
3998 
3999 
4000 
4001 
4002 
4003 
4004 
4005 
4006 #
4007 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4008 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4009 #
4010 # This code is free software; you can redistribute it and/or modify it
4011 # under the terms of the GNU General Public License version 2 only, as
4012 # published by the Free Software Foundation.  Oracle designates this
4013 # particular file as subject to the "Classpath" exception as provided
4014 # by Oracle in the LICENSE file that accompanied this code.
4015 #
4016 # This code is distributed in the hope that it will be useful, but WITHOUT
4017 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4018 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4019 # version 2 for more details (a copy is included in the LICENSE file that
4020 # accompanied this code).
4021 #
4022 # You should have received a copy of the GNU General Public License version
4023 # 2 along with this work; if not, write to the Free Software Foundation,
4024 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4025 #
4026 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4027 # or visit www.oracle.com if you need additional information or have any
4028 # questions.
4029 #
4030 
4031 # $1 = compiler to test (CC or CXX)
4032 # $2 = human readable name of compiler (C or C++)
4033 
4034 
4035 
4036 
4037 
4038 # $1 = compiler to test (CC or CXX)
4039 # $2 = human readable name of compiler (C or C++)
4040 # $3 = list of compiler names to search for
4041 
4042 
4043 
4044 
4045 
4046 
4047 
4048 
4049 
4050 
4051 
4052 
4053 
4054 # TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
4055 #                                   [RUN-IF-FALSE])
4056 # ------------------------------------------------------------
4057 # Check that the c and c++ compilers support an argument
4058 
4059 
4060 
4061 
4062 # Setup the JTREG paths
4063 
4064 
4065 #
4066 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4067 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4068 #
4069 # This code is free software; you can redistribute it and/or modify it
4070 # under the terms of the GNU General Public License version 2 only, as
4071 # published by the Free Software Foundation.  Oracle designates this
4072 # particular file as subject to the "Classpath" exception as provided
4073 # by Oracle in the LICENSE file that accompanied this code.
4074 #
4075 # This code is distributed in the hope that it will be useful, but WITHOUT
4076 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4077 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4078 # version 2 for more details (a copy is included in the LICENSE file that
4079 # accompanied this code).
4080 #
4081 # You should have received a copy of the GNU General Public License version
4082 # 2 along with this work; if not, write to the Free Software Foundation,
4083 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4084 #
4085 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4086 # or visit www.oracle.com if you need additional information or have any
4087 # questions.
4088 #
4089 
4090 
4091 
4092 
4093 
4094 
4095 
4096 # Check if the VS env variables were setup prior to running configure.
4097 # If not, then find vcvarsall.bat and run it automatically, and integrate
4098 # the set env variables into the spec file.
4099 
4100 
4101 
4102 
4103 
4104 
4105 
4106 
4107 
4108 
4109 # This line needs to be here, verbatim, after all includes and the dummy hook
4110 # definitions. It is replaced with custom functionality when building
4111 # custom sources.
4112 #CUSTOM_AUTOCONF_INCLUDE
4113 
4114 # Do not change or remove the following line, it is needed for consistency checks:
4115 DATE_WHEN_GENERATED=1392933025
4116 
4117 ###############################################################################
4118 #
4119 # Initialization / Boot-strapping
4120 #
4121 # The bootstrapping process needs to solve the "chicken or the egg" problem,
4122 # thus it jumps back and forth, each time gaining something needed later on.
4123 #
4124 ###############################################################################
4125 
4126 # Basic initialization that must happen first of all
4127 
4128   # Save the original command line. This is passed to us by the wrapper configure script.
4129 
4130   DATE_WHEN_CONFIGURED=`LANG=C date`
4131 
4132   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4133 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4134   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4135 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4136 
4137 
4138   # Start with tools that do not need have cross compilation support
4139   # and can be expected to be found in the default PATH. These tools are
4140   # used by configure. Nor are these tools expected to be found in the
4141   # devkit from the builddeps server either, since they are
4142   # needed to download the devkit.
4143 
4144   # First are all the simple required tools.
4145 
4146 
4147 
4148   # Publish this variable in the help.
4149 
4150 
4151   if test "x$BASENAME" = x; then
4152     # The variable is not set by user, try to locate tool using the code snippet
4153     for ac_prog in basename
4154 do
4155   # Extract the first word of "$ac_prog", so it can be a program name with args.
4156 set dummy $ac_prog; ac_word=$2
4157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4158 $as_echo_n "checking for $ac_word... " >&6; }
4159 if ${ac_cv_path_BASENAME+:} false; then :
4160   $as_echo_n "(cached) " >&6
4161 else
4162   case $BASENAME in
4163   [\\/]* | ?:[\\/]*)
4164   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4165   ;;
4166   *)
4167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168 for as_dir in $PATH
4169 do
4170   IFS=$as_save_IFS
4171   test -z "$as_dir" && as_dir=.
4172     for ac_exec_ext in '' $ac_executable_extensions; do
4173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4174     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4176     break 2
4177   fi
4178 done
4179   done
4180 IFS=$as_save_IFS
4181 
4182   ;;
4183 esac
4184 fi
4185 BASENAME=$ac_cv_path_BASENAME
4186 if test -n "$BASENAME"; then
4187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4188 $as_echo "$BASENAME" >&6; }
4189 else
4190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4191 $as_echo "no" >&6; }
4192 fi
4193 
4194 
4195   test -n "$BASENAME" && break
4196 done
4197 
4198   else
4199     # The variable is set, but is it from the command line or the environment?
4200 
4201     # Try to remove the string !BASENAME! from our list.
4202     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4203     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4204       # If it failed, the variable was not from the command line. Ignore it,
4205       # but warn the user (except for BASH, which is always set by the calling BASH).
4206       if test "xBASENAME" != xBASH; then
4207         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4208 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4209       fi
4210       # Try to locate tool using the code snippet
4211       for ac_prog in basename
4212 do
4213   # Extract the first word of "$ac_prog", so it can be a program name with args.
4214 set dummy $ac_prog; ac_word=$2
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4216 $as_echo_n "checking for $ac_word... " >&6; }
4217 if ${ac_cv_path_BASENAME+:} false; then :
4218   $as_echo_n "(cached) " >&6
4219 else
4220   case $BASENAME in
4221   [\\/]* | ?:[\\/]*)
4222   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4223   ;;
4224   *)
4225   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4226 for as_dir in $PATH
4227 do
4228   IFS=$as_save_IFS
4229   test -z "$as_dir" && as_dir=.
4230     for ac_exec_ext in '' $ac_executable_extensions; do
4231   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4232     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4233     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234     break 2
4235   fi
4236 done
4237   done
4238 IFS=$as_save_IFS
4239 
4240   ;;
4241 esac
4242 fi
4243 BASENAME=$ac_cv_path_BASENAME
4244 if test -n "$BASENAME"; then
4245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4246 $as_echo "$BASENAME" >&6; }
4247 else
4248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4249 $as_echo "no" >&6; }
4250 fi
4251 
4252 
4253   test -n "$BASENAME" && break
4254 done
4255 
4256     else
4257       # If it succeeded, then it was overridden by the user. We will use it
4258       # for the tool.
4259 
4260       # First remove it from the list of overridden variables, so we can test
4261       # for unknown variables in the end.
4262       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4263 
4264       # Check if the provided tool contains a complete path.
4265       tool_specified="$BASENAME"
4266       tool_basename="${tool_specified##*/}"
4267       if test "x$tool_basename" = "x$tool_specified"; then
4268         # A command without a complete path is provided, search $PATH.
4269         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4270 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4271         # Extract the first word of "$tool_basename", so it can be a program name with args.
4272 set dummy $tool_basename; ac_word=$2
4273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4274 $as_echo_n "checking for $ac_word... " >&6; }
4275 if ${ac_cv_path_BASENAME+:} false; then :
4276   $as_echo_n "(cached) " >&6
4277 else
4278   case $BASENAME in
4279   [\\/]* | ?:[\\/]*)
4280   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4281   ;;
4282   *)
4283   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284 for as_dir in $PATH
4285 do
4286   IFS=$as_save_IFS
4287   test -z "$as_dir" && as_dir=.
4288     for ac_exec_ext in '' $ac_executable_extensions; do
4289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4290     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4292     break 2
4293   fi
4294 done
4295   done
4296 IFS=$as_save_IFS
4297 
4298   ;;
4299 esac
4300 fi
4301 BASENAME=$ac_cv_path_BASENAME
4302 if test -n "$BASENAME"; then
4303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4304 $as_echo "$BASENAME" >&6; }
4305 else
4306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4307 $as_echo "no" >&6; }
4308 fi
4309 
4310 
4311         if test "x$BASENAME" = x; then
4312           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4313         fi
4314       else
4315         # Otherwise we believe it is a complete path. Use it as it is.
4316         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4317 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4318         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4319 $as_echo_n "checking for BASENAME... " >&6; }
4320         if test ! -x "$tool_specified"; then
4321           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4322 $as_echo "not found" >&6; }
4323           as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4324         fi
4325         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4326 $as_echo "$tool_specified" >&6; }
4327       fi
4328     fi
4329   fi
4330 
4331 
4332 
4333   if test "x$BASENAME" = x; then
4334     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4335   fi
4336 
4337 
4338 
4339 
4340 
4341   # Publish this variable in the help.
4342 
4343 
4344   if test "x$BASH" = x; then
4345     # The variable is not set by user, try to locate tool using the code snippet
4346     for ac_prog in bash
4347 do
4348   # Extract the first word of "$ac_prog", so it can be a program name with args.
4349 set dummy $ac_prog; ac_word=$2
4350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4351 $as_echo_n "checking for $ac_word... " >&6; }
4352 if ${ac_cv_path_BASH+:} false; then :
4353   $as_echo_n "(cached) " >&6
4354 else
4355   case $BASH in
4356   [\\/]* | ?:[\\/]*)
4357   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4358   ;;
4359   *)
4360   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361 for as_dir in $PATH
4362 do
4363   IFS=$as_save_IFS
4364   test -z "$as_dir" && as_dir=.
4365     for ac_exec_ext in '' $ac_executable_extensions; do
4366   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4367     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4368     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4369     break 2
4370   fi
4371 done
4372   done
4373 IFS=$as_save_IFS
4374 
4375   ;;
4376 esac
4377 fi
4378 BASH=$ac_cv_path_BASH
4379 if test -n "$BASH"; then
4380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4381 $as_echo "$BASH" >&6; }
4382 else
4383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4384 $as_echo "no" >&6; }
4385 fi
4386 
4387 
4388   test -n "$BASH" && break
4389 done
4390 
4391   else
4392     # The variable is set, but is it from the command line or the environment?
4393 
4394     # Try to remove the string !BASH! from our list.
4395     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4396     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4397       # If it failed, the variable was not from the command line. Ignore it,
4398       # but warn the user (except for BASH, which is always set by the calling BASH).
4399       if test "xBASH" != xBASH; then
4400         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4401 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4402       fi
4403       # Try to locate tool using the code snippet
4404       for ac_prog in bash
4405 do
4406   # Extract the first word of "$ac_prog", so it can be a program name with args.
4407 set dummy $ac_prog; ac_word=$2
4408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4409 $as_echo_n "checking for $ac_word... " >&6; }
4410 if ${ac_cv_path_BASH+:} false; then :
4411   $as_echo_n "(cached) " >&6
4412 else
4413   case $BASH in
4414   [\\/]* | ?:[\\/]*)
4415   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4416   ;;
4417   *)
4418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4419 for as_dir in $PATH
4420 do
4421   IFS=$as_save_IFS
4422   test -z "$as_dir" && as_dir=.
4423     for ac_exec_ext in '' $ac_executable_extensions; do
4424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4425     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4427     break 2
4428   fi
4429 done
4430   done
4431 IFS=$as_save_IFS
4432 
4433   ;;
4434 esac
4435 fi
4436 BASH=$ac_cv_path_BASH
4437 if test -n "$BASH"; then
4438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4439 $as_echo "$BASH" >&6; }
4440 else
4441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4442 $as_echo "no" >&6; }
4443 fi
4444 
4445 
4446   test -n "$BASH" && break
4447 done
4448 
4449     else
4450       # If it succeeded, then it was overridden by the user. We will use it
4451       # for the tool.
4452 
4453       # First remove it from the list of overridden variables, so we can test
4454       # for unknown variables in the end.
4455       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4456 
4457       # Check if the provided tool contains a complete path.
4458       tool_specified="$BASH"
4459       tool_basename="${tool_specified##*/}"
4460       if test "x$tool_basename" = "x$tool_specified"; then
4461         # A command without a complete path is provided, search $PATH.
4462         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4463 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4464         # Extract the first word of "$tool_basename", so it can be a program name with args.
4465 set dummy $tool_basename; ac_word=$2
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4467 $as_echo_n "checking for $ac_word... " >&6; }
4468 if ${ac_cv_path_BASH+:} false; then :
4469   $as_echo_n "(cached) " >&6
4470 else
4471   case $BASH in
4472   [\\/]* | ?:[\\/]*)
4473   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4474   ;;
4475   *)
4476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4477 for as_dir in $PATH
4478 do
4479   IFS=$as_save_IFS
4480   test -z "$as_dir" && as_dir=.
4481     for ac_exec_ext in '' $ac_executable_extensions; do
4482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4483     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4485     break 2
4486   fi
4487 done
4488   done
4489 IFS=$as_save_IFS
4490 
4491   ;;
4492 esac
4493 fi
4494 BASH=$ac_cv_path_BASH
4495 if test -n "$BASH"; then
4496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4497 $as_echo "$BASH" >&6; }
4498 else
4499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4500 $as_echo "no" >&6; }
4501 fi
4502 
4503 
4504         if test "x$BASH" = x; then
4505           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4506         fi
4507       else
4508         # Otherwise we believe it is a complete path. Use it as it is.
4509         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4510 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4511         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4512 $as_echo_n "checking for BASH... " >&6; }
4513         if test ! -x "$tool_specified"; then
4514           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4515 $as_echo "not found" >&6; }
4516           as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4517         fi
4518         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4519 $as_echo "$tool_specified" >&6; }
4520       fi
4521     fi
4522   fi
4523 
4524 
4525 
4526   if test "x$BASH" = x; then
4527     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4528   fi
4529 
4530 
4531 
4532 
4533 
4534   # Publish this variable in the help.
4535 
4536 
4537   if test "x$CAT" = x; then
4538     # The variable is not set by user, try to locate tool using the code snippet
4539     for ac_prog in cat
4540 do
4541   # Extract the first word of "$ac_prog", so it can be a program name with args.
4542 set dummy $ac_prog; ac_word=$2
4543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4544 $as_echo_n "checking for $ac_word... " >&6; }
4545 if ${ac_cv_path_CAT+:} false; then :
4546   $as_echo_n "(cached) " >&6
4547 else
4548   case $CAT in
4549   [\\/]* | ?:[\\/]*)
4550   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4551   ;;
4552   *)
4553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554 for as_dir in $PATH
4555 do
4556   IFS=$as_save_IFS
4557   test -z "$as_dir" && as_dir=.
4558     for ac_exec_ext in '' $ac_executable_extensions; do
4559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4560     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4562     break 2
4563   fi
4564 done
4565   done
4566 IFS=$as_save_IFS
4567 
4568   ;;
4569 esac
4570 fi
4571 CAT=$ac_cv_path_CAT
4572 if test -n "$CAT"; then
4573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4574 $as_echo "$CAT" >&6; }
4575 else
4576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577 $as_echo "no" >&6; }
4578 fi
4579 
4580 
4581   test -n "$CAT" && break
4582 done
4583 
4584   else
4585     # The variable is set, but is it from the command line or the environment?
4586 
4587     # Try to remove the string !CAT! from our list.
4588     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4589     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4590       # If it failed, the variable was not from the command line. Ignore it,
4591       # but warn the user (except for BASH, which is always set by the calling BASH).
4592       if test "xCAT" != xBASH; then
4593         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4594 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4595       fi
4596       # Try to locate tool using the code snippet
4597       for ac_prog in cat
4598 do
4599   # Extract the first word of "$ac_prog", so it can be a program name with args.
4600 set dummy $ac_prog; ac_word=$2
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4602 $as_echo_n "checking for $ac_word... " >&6; }
4603 if ${ac_cv_path_CAT+:} false; then :
4604   $as_echo_n "(cached) " >&6
4605 else
4606   case $CAT in
4607   [\\/]* | ?:[\\/]*)
4608   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4609   ;;
4610   *)
4611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4612 for as_dir in $PATH
4613 do
4614   IFS=$as_save_IFS
4615   test -z "$as_dir" && as_dir=.
4616     for ac_exec_ext in '' $ac_executable_extensions; do
4617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4618     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4620     break 2
4621   fi
4622 done
4623   done
4624 IFS=$as_save_IFS
4625 
4626   ;;
4627 esac
4628 fi
4629 CAT=$ac_cv_path_CAT
4630 if test -n "$CAT"; then
4631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4632 $as_echo "$CAT" >&6; }
4633 else
4634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4635 $as_echo "no" >&6; }
4636 fi
4637 
4638 
4639   test -n "$CAT" && break
4640 done
4641 
4642     else
4643       # If it succeeded, then it was overridden by the user. We will use it
4644       # for the tool.
4645 
4646       # First remove it from the list of overridden variables, so we can test
4647       # for unknown variables in the end.
4648       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4649 
4650       # Check if the provided tool contains a complete path.
4651       tool_specified="$CAT"
4652       tool_basename="${tool_specified##*/}"
4653       if test "x$tool_basename" = "x$tool_specified"; then
4654         # A command without a complete path is provided, search $PATH.
4655         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4656 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4657         # Extract the first word of "$tool_basename", so it can be a program name with args.
4658 set dummy $tool_basename; ac_word=$2
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660 $as_echo_n "checking for $ac_word... " >&6; }
4661 if ${ac_cv_path_CAT+:} false; then :
4662   $as_echo_n "(cached) " >&6
4663 else
4664   case $CAT in
4665   [\\/]* | ?:[\\/]*)
4666   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4667   ;;
4668   *)
4669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4670 for as_dir in $PATH
4671 do
4672   IFS=$as_save_IFS
4673   test -z "$as_dir" && as_dir=.
4674     for ac_exec_ext in '' $ac_executable_extensions; do
4675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4676     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4678     break 2
4679   fi
4680 done
4681   done
4682 IFS=$as_save_IFS
4683 
4684   ;;
4685 esac
4686 fi
4687 CAT=$ac_cv_path_CAT
4688 if test -n "$CAT"; then
4689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4690 $as_echo "$CAT" >&6; }
4691 else
4692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4693 $as_echo "no" >&6; }
4694 fi
4695 
4696 
4697         if test "x$CAT" = x; then
4698           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4699         fi
4700       else
4701         # Otherwise we believe it is a complete path. Use it as it is.
4702         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4703 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4705 $as_echo_n "checking for CAT... " >&6; }
4706         if test ! -x "$tool_specified"; then
4707           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4708 $as_echo "not found" >&6; }
4709           as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4710         fi
4711         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4712 $as_echo "$tool_specified" >&6; }
4713       fi
4714     fi
4715   fi
4716 
4717 
4718 
4719   if test "x$CAT" = x; then
4720     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4721   fi
4722 
4723 
4724 
4725 
4726 
4727   # Publish this variable in the help.
4728 
4729 
4730   if test "x$CHMOD" = x; then
4731     # The variable is not set by user, try to locate tool using the code snippet
4732     for ac_prog in chmod
4733 do
4734   # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737 $as_echo_n "checking for $ac_word... " >&6; }
4738 if ${ac_cv_path_CHMOD+:} false; then :
4739   $as_echo_n "(cached) " >&6
4740 else
4741   case $CHMOD in
4742   [\\/]* | ?:[\\/]*)
4743   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4744   ;;
4745   *)
4746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747 for as_dir in $PATH
4748 do
4749   IFS=$as_save_IFS
4750   test -z "$as_dir" && as_dir=.
4751     for ac_exec_ext in '' $ac_executable_extensions; do
4752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4753     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755     break 2
4756   fi
4757 done
4758   done
4759 IFS=$as_save_IFS
4760 
4761   ;;
4762 esac
4763 fi
4764 CHMOD=$ac_cv_path_CHMOD
4765 if test -n "$CHMOD"; then
4766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4767 $as_echo "$CHMOD" >&6; }
4768 else
4769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770 $as_echo "no" >&6; }
4771 fi
4772 
4773 
4774   test -n "$CHMOD" && break
4775 done
4776 
4777   else
4778     # The variable is set, but is it from the command line or the environment?
4779 
4780     # Try to remove the string !CHMOD! from our list.
4781     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4782     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4783       # If it failed, the variable was not from the command line. Ignore it,
4784       # but warn the user (except for BASH, which is always set by the calling BASH).
4785       if test "xCHMOD" != xBASH; then
4786         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4787 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4788       fi
4789       # Try to locate tool using the code snippet
4790       for ac_prog in chmod
4791 do
4792   # Extract the first word of "$ac_prog", so it can be a program name with args.
4793 set dummy $ac_prog; ac_word=$2
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4795 $as_echo_n "checking for $ac_word... " >&6; }
4796 if ${ac_cv_path_CHMOD+:} false; then :
4797   $as_echo_n "(cached) " >&6
4798 else
4799   case $CHMOD in
4800   [\\/]* | ?:[\\/]*)
4801   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4802   ;;
4803   *)
4804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4805 for as_dir in $PATH
4806 do
4807   IFS=$as_save_IFS
4808   test -z "$as_dir" && as_dir=.
4809     for ac_exec_ext in '' $ac_executable_extensions; do
4810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4811     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4813     break 2
4814   fi
4815 done
4816   done
4817 IFS=$as_save_IFS
4818 
4819   ;;
4820 esac
4821 fi
4822 CHMOD=$ac_cv_path_CHMOD
4823 if test -n "$CHMOD"; then
4824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4825 $as_echo "$CHMOD" >&6; }
4826 else
4827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828 $as_echo "no" >&6; }
4829 fi
4830 
4831 
4832   test -n "$CHMOD" && break
4833 done
4834 
4835     else
4836       # If it succeeded, then it was overridden by the user. We will use it
4837       # for the tool.
4838 
4839       # First remove it from the list of overridden variables, so we can test
4840       # for unknown variables in the end.
4841       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4842 
4843       # Check if the provided tool contains a complete path.
4844       tool_specified="$CHMOD"
4845       tool_basename="${tool_specified##*/}"
4846       if test "x$tool_basename" = "x$tool_specified"; then
4847         # A command without a complete path is provided, search $PATH.
4848         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4849 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4850         # Extract the first word of "$tool_basename", so it can be a program name with args.
4851 set dummy $tool_basename; ac_word=$2
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4853 $as_echo_n "checking for $ac_word... " >&6; }
4854 if ${ac_cv_path_CHMOD+:} false; then :
4855   $as_echo_n "(cached) " >&6
4856 else
4857   case $CHMOD in
4858   [\\/]* | ?:[\\/]*)
4859   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4860   ;;
4861   *)
4862   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4863 for as_dir in $PATH
4864 do
4865   IFS=$as_save_IFS
4866   test -z "$as_dir" && as_dir=.
4867     for ac_exec_ext in '' $ac_executable_extensions; do
4868   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4869     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4870     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4871     break 2
4872   fi
4873 done
4874   done
4875 IFS=$as_save_IFS
4876 
4877   ;;
4878 esac
4879 fi
4880 CHMOD=$ac_cv_path_CHMOD
4881 if test -n "$CHMOD"; then
4882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4883 $as_echo "$CHMOD" >&6; }
4884 else
4885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4886 $as_echo "no" >&6; }
4887 fi
4888 
4889 
4890         if test "x$CHMOD" = x; then
4891           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4892         fi
4893       else
4894         # Otherwise we believe it is a complete path. Use it as it is.
4895         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
4896 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
4897         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
4898 $as_echo_n "checking for CHMOD... " >&6; }
4899         if test ! -x "$tool_specified"; then
4900           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4901 $as_echo "not found" >&6; }
4902           as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
4903         fi
4904         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4905 $as_echo "$tool_specified" >&6; }
4906       fi
4907     fi
4908   fi
4909 
4910 
4911 
4912   if test "x$CHMOD" = x; then
4913     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
4914   fi
4915 
4916 
4917 
4918 
4919 
4920   # Publish this variable in the help.
4921 
4922 
4923   if test "x$CMP" = x; then
4924     # The variable is not set by user, try to locate tool using the code snippet
4925     for ac_prog in cmp
4926 do
4927   # Extract the first word of "$ac_prog", so it can be a program name with args.
4928 set dummy $ac_prog; ac_word=$2
4929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4930 $as_echo_n "checking for $ac_word... " >&6; }
4931 if ${ac_cv_path_CMP+:} false; then :
4932   $as_echo_n "(cached) " >&6
4933 else
4934   case $CMP in
4935   [\\/]* | ?:[\\/]*)
4936   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4937   ;;
4938   *)
4939   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4940 for as_dir in $PATH
4941 do
4942   IFS=$as_save_IFS
4943   test -z "$as_dir" && as_dir=.
4944     for ac_exec_ext in '' $ac_executable_extensions; do
4945   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4946     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4947     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4948     break 2
4949   fi
4950 done
4951   done
4952 IFS=$as_save_IFS
4953 
4954   ;;
4955 esac
4956 fi
4957 CMP=$ac_cv_path_CMP
4958 if test -n "$CMP"; then
4959   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4960 $as_echo "$CMP" >&6; }
4961 else
4962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4963 $as_echo "no" >&6; }
4964 fi
4965 
4966 
4967   test -n "$CMP" && break
4968 done
4969 
4970   else
4971     # The variable is set, but is it from the command line or the environment?
4972 
4973     # Try to remove the string !CMP! from our list.
4974     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
4975     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4976       # If it failed, the variable was not from the command line. Ignore it,
4977       # but warn the user (except for BASH, which is always set by the calling BASH).
4978       if test "xCMP" != xBASH; then
4979         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
4980 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
4981       fi
4982       # Try to locate tool using the code snippet
4983       for ac_prog in cmp
4984 do
4985   # Extract the first word of "$ac_prog", so it can be a program name with args.
4986 set dummy $ac_prog; ac_word=$2
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988 $as_echo_n "checking for $ac_word... " >&6; }
4989 if ${ac_cv_path_CMP+:} false; then :
4990   $as_echo_n "(cached) " >&6
4991 else
4992   case $CMP in
4993   [\\/]* | ?:[\\/]*)
4994   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4995   ;;
4996   *)
4997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998 for as_dir in $PATH
4999 do
5000   IFS=$as_save_IFS
5001   test -z "$as_dir" && as_dir=.
5002     for ac_exec_ext in '' $ac_executable_extensions; do
5003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5004     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006     break 2
5007   fi
5008 done
5009   done
5010 IFS=$as_save_IFS
5011 
5012   ;;
5013 esac
5014 fi
5015 CMP=$ac_cv_path_CMP
5016 if test -n "$CMP"; then
5017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5018 $as_echo "$CMP" >&6; }
5019 else
5020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021 $as_echo "no" >&6; }
5022 fi
5023 
5024 
5025   test -n "$CMP" && break
5026 done
5027 
5028     else
5029       # If it succeeded, then it was overridden by the user. We will use it
5030       # for the tool.
5031 
5032       # First remove it from the list of overridden variables, so we can test
5033       # for unknown variables in the end.
5034       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5035 
5036       # Check if the provided tool contains a complete path.
5037       tool_specified="$CMP"
5038       tool_basename="${tool_specified##*/}"
5039       if test "x$tool_basename" = "x$tool_specified"; then
5040         # A command without a complete path is provided, search $PATH.
5041         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5042 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5043         # Extract the first word of "$tool_basename", so it can be a program name with args.
5044 set dummy $tool_basename; ac_word=$2
5045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5046 $as_echo_n "checking for $ac_word... " >&6; }
5047 if ${ac_cv_path_CMP+:} false; then :
5048   $as_echo_n "(cached) " >&6
5049 else
5050   case $CMP in
5051   [\\/]* | ?:[\\/]*)
5052   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5053   ;;
5054   *)
5055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5056 for as_dir in $PATH
5057 do
5058   IFS=$as_save_IFS
5059   test -z "$as_dir" && as_dir=.
5060     for ac_exec_ext in '' $ac_executable_extensions; do
5061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5062     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5064     break 2
5065   fi
5066 done
5067   done
5068 IFS=$as_save_IFS
5069 
5070   ;;
5071 esac
5072 fi
5073 CMP=$ac_cv_path_CMP
5074 if test -n "$CMP"; then
5075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5076 $as_echo "$CMP" >&6; }
5077 else
5078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5079 $as_echo "no" >&6; }
5080 fi
5081 
5082 
5083         if test "x$CMP" = x; then
5084           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5085         fi
5086       else
5087         # Otherwise we believe it is a complete path. Use it as it is.
5088         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5089 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5090         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5091 $as_echo_n "checking for CMP... " >&6; }
5092         if test ! -x "$tool_specified"; then
5093           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5094 $as_echo "not found" >&6; }
5095           as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5096         fi
5097         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5098 $as_echo "$tool_specified" >&6; }
5099       fi
5100     fi
5101   fi
5102 
5103 
5104 
5105   if test "x$CMP" = x; then
5106     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5107   fi
5108 
5109 
5110 
5111 
5112 
5113   # Publish this variable in the help.
5114 
5115 
5116   if test "x$COMM" = x; then
5117     # The variable is not set by user, try to locate tool using the code snippet
5118     for ac_prog in comm
5119 do
5120   # Extract the first word of "$ac_prog", so it can be a program name with args.
5121 set dummy $ac_prog; ac_word=$2
5122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5123 $as_echo_n "checking for $ac_word... " >&6; }
5124 if ${ac_cv_path_COMM+:} false; then :
5125   $as_echo_n "(cached) " >&6
5126 else
5127   case $COMM in
5128   [\\/]* | ?:[\\/]*)
5129   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5130   ;;
5131   *)
5132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5133 for as_dir in $PATH
5134 do
5135   IFS=$as_save_IFS
5136   test -z "$as_dir" && as_dir=.
5137     for ac_exec_ext in '' $ac_executable_extensions; do
5138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5139     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5141     break 2
5142   fi
5143 done
5144   done
5145 IFS=$as_save_IFS
5146 
5147   ;;
5148 esac
5149 fi
5150 COMM=$ac_cv_path_COMM
5151 if test -n "$COMM"; then
5152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5153 $as_echo "$COMM" >&6; }
5154 else
5155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5156 $as_echo "no" >&6; }
5157 fi
5158 
5159 
5160   test -n "$COMM" && break
5161 done
5162 
5163   else
5164     # The variable is set, but is it from the command line or the environment?
5165 
5166     # Try to remove the string !COMM! from our list.
5167     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5168     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5169       # If it failed, the variable was not from the command line. Ignore it,
5170       # but warn the user (except for BASH, which is always set by the calling BASH).
5171       if test "xCOMM" != xBASH; then
5172         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5173 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5174       fi
5175       # Try to locate tool using the code snippet
5176       for ac_prog in comm
5177 do
5178   # Extract the first word of "$ac_prog", so it can be a program name with args.
5179 set dummy $ac_prog; ac_word=$2
5180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5181 $as_echo_n "checking for $ac_word... " >&6; }
5182 if ${ac_cv_path_COMM+:} false; then :
5183   $as_echo_n "(cached) " >&6
5184 else
5185   case $COMM in
5186   [\\/]* | ?:[\\/]*)
5187   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5188   ;;
5189   *)
5190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191 for as_dir in $PATH
5192 do
5193   IFS=$as_save_IFS
5194   test -z "$as_dir" && as_dir=.
5195     for ac_exec_ext in '' $ac_executable_extensions; do
5196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5197     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199     break 2
5200   fi
5201 done
5202   done
5203 IFS=$as_save_IFS
5204 
5205   ;;
5206 esac
5207 fi
5208 COMM=$ac_cv_path_COMM
5209 if test -n "$COMM"; then
5210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5211 $as_echo "$COMM" >&6; }
5212 else
5213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214 $as_echo "no" >&6; }
5215 fi
5216 
5217 
5218   test -n "$COMM" && break
5219 done
5220 
5221     else
5222       # If it succeeded, then it was overridden by the user. We will use it
5223       # for the tool.
5224 
5225       # First remove it from the list of overridden variables, so we can test
5226       # for unknown variables in the end.
5227       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5228 
5229       # Check if the provided tool contains a complete path.
5230       tool_specified="$COMM"
5231       tool_basename="${tool_specified##*/}"
5232       if test "x$tool_basename" = "x$tool_specified"; then
5233         # A command without a complete path is provided, search $PATH.
5234         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5235 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5236         # Extract the first word of "$tool_basename", so it can be a program name with args.
5237 set dummy $tool_basename; ac_word=$2
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5239 $as_echo_n "checking for $ac_word... " >&6; }
5240 if ${ac_cv_path_COMM+:} false; then :
5241   $as_echo_n "(cached) " >&6
5242 else
5243   case $COMM in
5244   [\\/]* | ?:[\\/]*)
5245   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5246   ;;
5247   *)
5248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5249 for as_dir in $PATH
5250 do
5251   IFS=$as_save_IFS
5252   test -z "$as_dir" && as_dir=.
5253     for ac_exec_ext in '' $ac_executable_extensions; do
5254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5255     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5257     break 2
5258   fi
5259 done
5260   done
5261 IFS=$as_save_IFS
5262 
5263   ;;
5264 esac
5265 fi
5266 COMM=$ac_cv_path_COMM
5267 if test -n "$COMM"; then
5268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5269 $as_echo "$COMM" >&6; }
5270 else
5271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5272 $as_echo "no" >&6; }
5273 fi
5274 
5275 
5276         if test "x$COMM" = x; then
5277           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5278         fi
5279       else
5280         # Otherwise we believe it is a complete path. Use it as it is.
5281         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5282 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5283         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5284 $as_echo_n "checking for COMM... " >&6; }
5285         if test ! -x "$tool_specified"; then
5286           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5287 $as_echo "not found" >&6; }
5288           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5289         fi
5290         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5291 $as_echo "$tool_specified" >&6; }
5292       fi
5293     fi
5294   fi
5295 
5296 
5297 
5298   if test "x$COMM" = x; then
5299     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5300   fi
5301 
5302 
5303 
5304 
5305 
5306   # Publish this variable in the help.
5307 
5308 
5309   if test "x$CP" = x; then
5310     # The variable is not set by user, try to locate tool using the code snippet
5311     for ac_prog in cp
5312 do
5313   # Extract the first word of "$ac_prog", so it can be a program name with args.
5314 set dummy $ac_prog; ac_word=$2
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5316 $as_echo_n "checking for $ac_word... " >&6; }
5317 if ${ac_cv_path_CP+:} false; then :
5318   $as_echo_n "(cached) " >&6
5319 else
5320   case $CP in
5321   [\\/]* | ?:[\\/]*)
5322   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5323   ;;
5324   *)
5325   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5326 for as_dir in $PATH
5327 do
5328   IFS=$as_save_IFS
5329   test -z "$as_dir" && as_dir=.
5330     for ac_exec_ext in '' $ac_executable_extensions; do
5331   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5332     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5333     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5334     break 2
5335   fi
5336 done
5337   done
5338 IFS=$as_save_IFS
5339 
5340   ;;
5341 esac
5342 fi
5343 CP=$ac_cv_path_CP
5344 if test -n "$CP"; then
5345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5346 $as_echo "$CP" >&6; }
5347 else
5348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349 $as_echo "no" >&6; }
5350 fi
5351 
5352 
5353   test -n "$CP" && break
5354 done
5355 
5356   else
5357     # The variable is set, but is it from the command line or the environment?
5358 
5359     # Try to remove the string !CP! from our list.
5360     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5361     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5362       # If it failed, the variable was not from the command line. Ignore it,
5363       # but warn the user (except for BASH, which is always set by the calling BASH).
5364       if test "xCP" != xBASH; then
5365         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5366 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5367       fi
5368       # Try to locate tool using the code snippet
5369       for ac_prog in cp
5370 do
5371   # Extract the first word of "$ac_prog", so it can be a program name with args.
5372 set dummy $ac_prog; ac_word=$2
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5374 $as_echo_n "checking for $ac_word... " >&6; }
5375 if ${ac_cv_path_CP+:} false; then :
5376   $as_echo_n "(cached) " >&6
5377 else
5378   case $CP in
5379   [\\/]* | ?:[\\/]*)
5380   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5381   ;;
5382   *)
5383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5384 for as_dir in $PATH
5385 do
5386   IFS=$as_save_IFS
5387   test -z "$as_dir" && as_dir=.
5388     for ac_exec_ext in '' $ac_executable_extensions; do
5389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5390     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5392     break 2
5393   fi
5394 done
5395   done
5396 IFS=$as_save_IFS
5397 
5398   ;;
5399 esac
5400 fi
5401 CP=$ac_cv_path_CP
5402 if test -n "$CP"; then
5403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5404 $as_echo "$CP" >&6; }
5405 else
5406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5407 $as_echo "no" >&6; }
5408 fi
5409 
5410 
5411   test -n "$CP" && break
5412 done
5413 
5414     else
5415       # If it succeeded, then it was overridden by the user. We will use it
5416       # for the tool.
5417 
5418       # First remove it from the list of overridden variables, so we can test
5419       # for unknown variables in the end.
5420       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5421 
5422       # Check if the provided tool contains a complete path.
5423       tool_specified="$CP"
5424       tool_basename="${tool_specified##*/}"
5425       if test "x$tool_basename" = "x$tool_specified"; then
5426         # A command without a complete path is provided, search $PATH.
5427         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5428 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5429         # Extract the first word of "$tool_basename", so it can be a program name with args.
5430 set dummy $tool_basename; ac_word=$2
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5432 $as_echo_n "checking for $ac_word... " >&6; }
5433 if ${ac_cv_path_CP+:} false; then :
5434   $as_echo_n "(cached) " >&6
5435 else
5436   case $CP in
5437   [\\/]* | ?:[\\/]*)
5438   ac_cv_path_CP="$CP" # Let the user override the test with a path.
5439   ;;
5440   *)
5441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5442 for as_dir in $PATH
5443 do
5444   IFS=$as_save_IFS
5445   test -z "$as_dir" && as_dir=.
5446     for ac_exec_ext in '' $ac_executable_extensions; do
5447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5448     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5450     break 2
5451   fi
5452 done
5453   done
5454 IFS=$as_save_IFS
5455 
5456   ;;
5457 esac
5458 fi
5459 CP=$ac_cv_path_CP
5460 if test -n "$CP"; then
5461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5462 $as_echo "$CP" >&6; }
5463 else
5464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5465 $as_echo "no" >&6; }
5466 fi
5467 
5468 
5469         if test "x$CP" = x; then
5470           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5471         fi
5472       else
5473         # Otherwise we believe it is a complete path. Use it as it is.
5474         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5475 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5476         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5477 $as_echo_n "checking for CP... " >&6; }
5478         if test ! -x "$tool_specified"; then
5479           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5480 $as_echo "not found" >&6; }
5481           as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5482         fi
5483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5484 $as_echo "$tool_specified" >&6; }
5485       fi
5486     fi
5487   fi
5488 
5489 
5490 
5491   if test "x$CP" = x; then
5492     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5493   fi
5494 
5495 
5496 
5497 
5498 
5499   # Publish this variable in the help.
5500 
5501 
5502   if test "x$CPIO" = x; then
5503     # The variable is not set by user, try to locate tool using the code snippet
5504     for ac_prog in cpio
5505 do
5506   # Extract the first word of "$ac_prog", so it can be a program name with args.
5507 set dummy $ac_prog; ac_word=$2
5508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5509 $as_echo_n "checking for $ac_word... " >&6; }
5510 if ${ac_cv_path_CPIO+:} false; then :
5511   $as_echo_n "(cached) " >&6
5512 else
5513   case $CPIO in
5514   [\\/]* | ?:[\\/]*)
5515   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5516   ;;
5517   *)
5518   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5519 for as_dir in $PATH
5520 do
5521   IFS=$as_save_IFS
5522   test -z "$as_dir" && as_dir=.
5523     for ac_exec_ext in '' $ac_executable_extensions; do
5524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5525     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5527     break 2
5528   fi
5529 done
5530   done
5531 IFS=$as_save_IFS
5532 
5533   ;;
5534 esac
5535 fi
5536 CPIO=$ac_cv_path_CPIO
5537 if test -n "$CPIO"; then
5538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5539 $as_echo "$CPIO" >&6; }
5540 else
5541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5542 $as_echo "no" >&6; }
5543 fi
5544 
5545 
5546   test -n "$CPIO" && break
5547 done
5548 
5549   else
5550     # The variable is set, but is it from the command line or the environment?
5551 
5552     # Try to remove the string !CPIO! from our list.
5553     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5554     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5555       # If it failed, the variable was not from the command line. Ignore it,
5556       # but warn the user (except for BASH, which is always set by the calling BASH).
5557       if test "xCPIO" != xBASH; then
5558         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5559 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5560       fi
5561       # Try to locate tool using the code snippet
5562       for ac_prog in cpio
5563 do
5564   # Extract the first word of "$ac_prog", so it can be a program name with args.
5565 set dummy $ac_prog; ac_word=$2
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5567 $as_echo_n "checking for $ac_word... " >&6; }
5568 if ${ac_cv_path_CPIO+:} false; then :
5569   $as_echo_n "(cached) " >&6
5570 else
5571   case $CPIO in
5572   [\\/]* | ?:[\\/]*)
5573   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5574   ;;
5575   *)
5576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5577 for as_dir in $PATH
5578 do
5579   IFS=$as_save_IFS
5580   test -z "$as_dir" && as_dir=.
5581     for ac_exec_ext in '' $ac_executable_extensions; do
5582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5583     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5585     break 2
5586   fi
5587 done
5588   done
5589 IFS=$as_save_IFS
5590 
5591   ;;
5592 esac
5593 fi
5594 CPIO=$ac_cv_path_CPIO
5595 if test -n "$CPIO"; then
5596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5597 $as_echo "$CPIO" >&6; }
5598 else
5599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5600 $as_echo "no" >&6; }
5601 fi
5602 
5603 
5604   test -n "$CPIO" && break
5605 done
5606 
5607     else
5608       # If it succeeded, then it was overridden by the user. We will use it
5609       # for the tool.
5610 
5611       # First remove it from the list of overridden variables, so we can test
5612       # for unknown variables in the end.
5613       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5614 
5615       # Check if the provided tool contains a complete path.
5616       tool_specified="$CPIO"
5617       tool_basename="${tool_specified##*/}"
5618       if test "x$tool_basename" = "x$tool_specified"; then
5619         # A command without a complete path is provided, search $PATH.
5620         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5621 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5622         # Extract the first word of "$tool_basename", so it can be a program name with args.
5623 set dummy $tool_basename; ac_word=$2
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5625 $as_echo_n "checking for $ac_word... " >&6; }
5626 if ${ac_cv_path_CPIO+:} false; then :
5627   $as_echo_n "(cached) " >&6
5628 else
5629   case $CPIO in
5630   [\\/]* | ?:[\\/]*)
5631   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5632   ;;
5633   *)
5634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5635 for as_dir in $PATH
5636 do
5637   IFS=$as_save_IFS
5638   test -z "$as_dir" && as_dir=.
5639     for ac_exec_ext in '' $ac_executable_extensions; do
5640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5641     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5643     break 2
5644   fi
5645 done
5646   done
5647 IFS=$as_save_IFS
5648 
5649   ;;
5650 esac
5651 fi
5652 CPIO=$ac_cv_path_CPIO
5653 if test -n "$CPIO"; then
5654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5655 $as_echo "$CPIO" >&6; }
5656 else
5657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658 $as_echo "no" >&6; }
5659 fi
5660 
5661 
5662         if test "x$CPIO" = x; then
5663           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5664         fi
5665       else
5666         # Otherwise we believe it is a complete path. Use it as it is.
5667         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5668 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5669         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5670 $as_echo_n "checking for CPIO... " >&6; }
5671         if test ! -x "$tool_specified"; then
5672           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5673 $as_echo "not found" >&6; }
5674           as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5675         fi
5676         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5677 $as_echo "$tool_specified" >&6; }
5678       fi
5679     fi
5680   fi
5681 
5682 
5683 
5684   if test "x$CPIO" = x; then
5685     as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5686   fi
5687 
5688 
5689 
5690 
5691 
5692   # Publish this variable in the help.
5693 
5694 
5695   if test "x$CUT" = x; then
5696     # The variable is not set by user, try to locate tool using the code snippet
5697     for ac_prog in cut
5698 do
5699   # Extract the first word of "$ac_prog", so it can be a program name with args.
5700 set dummy $ac_prog; ac_word=$2
5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702 $as_echo_n "checking for $ac_word... " >&6; }
5703 if ${ac_cv_path_CUT+:} false; then :
5704   $as_echo_n "(cached) " >&6
5705 else
5706   case $CUT in
5707   [\\/]* | ?:[\\/]*)
5708   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5709   ;;
5710   *)
5711   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712 for as_dir in $PATH
5713 do
5714   IFS=$as_save_IFS
5715   test -z "$as_dir" && as_dir=.
5716     for ac_exec_ext in '' $ac_executable_extensions; do
5717   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5719     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720     break 2
5721   fi
5722 done
5723   done
5724 IFS=$as_save_IFS
5725 
5726   ;;
5727 esac
5728 fi
5729 CUT=$ac_cv_path_CUT
5730 if test -n "$CUT"; then
5731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5732 $as_echo "$CUT" >&6; }
5733 else
5734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735 $as_echo "no" >&6; }
5736 fi
5737 
5738 
5739   test -n "$CUT" && break
5740 done
5741 
5742   else
5743     # The variable is set, but is it from the command line or the environment?
5744 
5745     # Try to remove the string !CUT! from our list.
5746     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5747     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5748       # If it failed, the variable was not from the command line. Ignore it,
5749       # but warn the user (except for BASH, which is always set by the calling BASH).
5750       if test "xCUT" != xBASH; then
5751         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5752 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5753       fi
5754       # Try to locate tool using the code snippet
5755       for ac_prog in cut
5756 do
5757   # Extract the first word of "$ac_prog", so it can be a program name with args.
5758 set dummy $ac_prog; ac_word=$2
5759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760 $as_echo_n "checking for $ac_word... " >&6; }
5761 if ${ac_cv_path_CUT+:} false; then :
5762   $as_echo_n "(cached) " >&6
5763 else
5764   case $CUT in
5765   [\\/]* | ?:[\\/]*)
5766   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5767   ;;
5768   *)
5769   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770 for as_dir in $PATH
5771 do
5772   IFS=$as_save_IFS
5773   test -z "$as_dir" && as_dir=.
5774     for ac_exec_ext in '' $ac_executable_extensions; do
5775   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5776     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5777     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5778     break 2
5779   fi
5780 done
5781   done
5782 IFS=$as_save_IFS
5783 
5784   ;;
5785 esac
5786 fi
5787 CUT=$ac_cv_path_CUT
5788 if test -n "$CUT"; then
5789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5790 $as_echo "$CUT" >&6; }
5791 else
5792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5793 $as_echo "no" >&6; }
5794 fi
5795 
5796 
5797   test -n "$CUT" && break
5798 done
5799 
5800     else
5801       # If it succeeded, then it was overridden by the user. We will use it
5802       # for the tool.
5803 
5804       # First remove it from the list of overridden variables, so we can test
5805       # for unknown variables in the end.
5806       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5807 
5808       # Check if the provided tool contains a complete path.
5809       tool_specified="$CUT"
5810       tool_basename="${tool_specified##*/}"
5811       if test "x$tool_basename" = "x$tool_specified"; then
5812         # A command without a complete path is provided, search $PATH.
5813         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5814 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5815         # Extract the first word of "$tool_basename", so it can be a program name with args.
5816 set dummy $tool_basename; ac_word=$2
5817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5818 $as_echo_n "checking for $ac_word... " >&6; }
5819 if ${ac_cv_path_CUT+:} false; then :
5820   $as_echo_n "(cached) " >&6
5821 else
5822   case $CUT in
5823   [\\/]* | ?:[\\/]*)
5824   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5825   ;;
5826   *)
5827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5828 for as_dir in $PATH
5829 do
5830   IFS=$as_save_IFS
5831   test -z "$as_dir" && as_dir=.
5832     for ac_exec_ext in '' $ac_executable_extensions; do
5833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5834     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5836     break 2
5837   fi
5838 done
5839   done
5840 IFS=$as_save_IFS
5841 
5842   ;;
5843 esac
5844 fi
5845 CUT=$ac_cv_path_CUT
5846 if test -n "$CUT"; then
5847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5848 $as_echo "$CUT" >&6; }
5849 else
5850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5851 $as_echo "no" >&6; }
5852 fi
5853 
5854 
5855         if test "x$CUT" = x; then
5856           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5857         fi
5858       else
5859         # Otherwise we believe it is a complete path. Use it as it is.
5860         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5861 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5862         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5863 $as_echo_n "checking for CUT... " >&6; }
5864         if test ! -x "$tool_specified"; then
5865           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5866 $as_echo "not found" >&6; }
5867           as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5868         fi
5869         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5870 $as_echo "$tool_specified" >&6; }
5871       fi
5872     fi
5873   fi
5874 
5875 
5876 
5877   if test "x$CUT" = x; then
5878     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5879   fi
5880 
5881 
5882 
5883 
5884 
5885   # Publish this variable in the help.
5886 
5887 
5888   if test "x$DATE" = x; then
5889     # The variable is not set by user, try to locate tool using the code snippet
5890     for ac_prog in date
5891 do
5892   # Extract the first word of "$ac_prog", so it can be a program name with args.
5893 set dummy $ac_prog; ac_word=$2
5894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5895 $as_echo_n "checking for $ac_word... " >&6; }
5896 if ${ac_cv_path_DATE+:} false; then :
5897   $as_echo_n "(cached) " >&6
5898 else
5899   case $DATE in
5900   [\\/]* | ?:[\\/]*)
5901   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5902   ;;
5903   *)
5904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905 for as_dir in $PATH
5906 do
5907   IFS=$as_save_IFS
5908   test -z "$as_dir" && as_dir=.
5909     for ac_exec_ext in '' $ac_executable_extensions; do
5910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5911     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913     break 2
5914   fi
5915 done
5916   done
5917 IFS=$as_save_IFS
5918 
5919   ;;
5920 esac
5921 fi
5922 DATE=$ac_cv_path_DATE
5923 if test -n "$DATE"; then
5924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5925 $as_echo "$DATE" >&6; }
5926 else
5927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928 $as_echo "no" >&6; }
5929 fi
5930 
5931 
5932   test -n "$DATE" && break
5933 done
5934 
5935   else
5936     # The variable is set, but is it from the command line or the environment?
5937 
5938     # Try to remove the string !DATE! from our list.
5939     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
5940     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5941       # If it failed, the variable was not from the command line. Ignore it,
5942       # but warn the user (except for BASH, which is always set by the calling BASH).
5943       if test "xDATE" != xBASH; then
5944         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
5945 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
5946       fi
5947       # Try to locate tool using the code snippet
5948       for ac_prog in date
5949 do
5950   # Extract the first word of "$ac_prog", so it can be a program name with args.
5951 set dummy $ac_prog; ac_word=$2
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953 $as_echo_n "checking for $ac_word... " >&6; }
5954 if ${ac_cv_path_DATE+:} false; then :
5955   $as_echo_n "(cached) " >&6
5956 else
5957   case $DATE in
5958   [\\/]* | ?:[\\/]*)
5959   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5960   ;;
5961   *)
5962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5963 for as_dir in $PATH
5964 do
5965   IFS=$as_save_IFS
5966   test -z "$as_dir" && as_dir=.
5967     for ac_exec_ext in '' $ac_executable_extensions; do
5968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5969     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5971     break 2
5972   fi
5973 done
5974   done
5975 IFS=$as_save_IFS
5976 
5977   ;;
5978 esac
5979 fi
5980 DATE=$ac_cv_path_DATE
5981 if test -n "$DATE"; then
5982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
5983 $as_echo "$DATE" >&6; }
5984 else
5985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986 $as_echo "no" >&6; }
5987 fi
5988 
5989 
5990   test -n "$DATE" && break
5991 done
5992 
5993     else
5994       # If it succeeded, then it was overridden by the user. We will use it
5995       # for the tool.
5996 
5997       # First remove it from the list of overridden variables, so we can test
5998       # for unknown variables in the end.
5999       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6000 
6001       # Check if the provided tool contains a complete path.
6002       tool_specified="$DATE"
6003       tool_basename="${tool_specified##*/}"
6004       if test "x$tool_basename" = "x$tool_specified"; then
6005         # A command without a complete path is provided, search $PATH.
6006         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6007 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6008         # Extract the first word of "$tool_basename", so it can be a program name with args.
6009 set dummy $tool_basename; ac_word=$2
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6011 $as_echo_n "checking for $ac_word... " >&6; }
6012 if ${ac_cv_path_DATE+:} false; then :
6013   $as_echo_n "(cached) " >&6
6014 else
6015   case $DATE in
6016   [\\/]* | ?:[\\/]*)
6017   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6018   ;;
6019   *)
6020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6021 for as_dir in $PATH
6022 do
6023   IFS=$as_save_IFS
6024   test -z "$as_dir" && as_dir=.
6025     for ac_exec_ext in '' $ac_executable_extensions; do
6026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6027     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6029     break 2
6030   fi
6031 done
6032   done
6033 IFS=$as_save_IFS
6034 
6035   ;;
6036 esac
6037 fi
6038 DATE=$ac_cv_path_DATE
6039 if test -n "$DATE"; then
6040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6041 $as_echo "$DATE" >&6; }
6042 else
6043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6044 $as_echo "no" >&6; }
6045 fi
6046 
6047 
6048         if test "x$DATE" = x; then
6049           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6050         fi
6051       else
6052         # Otherwise we believe it is a complete path. Use it as it is.
6053         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6054 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6055         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6056 $as_echo_n "checking for DATE... " >&6; }
6057         if test ! -x "$tool_specified"; then
6058           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6059 $as_echo "not found" >&6; }
6060           as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6061         fi
6062         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6063 $as_echo "$tool_specified" >&6; }
6064       fi
6065     fi
6066   fi
6067 
6068 
6069 
6070   if test "x$DATE" = x; then
6071     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6072   fi
6073 
6074 
6075 
6076 
6077 
6078   # Publish this variable in the help.
6079 
6080 
6081   if test "x$DIFF" = x; then
6082     # The variable is not set by user, try to locate tool using the code snippet
6083     for ac_prog in gdiff diff
6084 do
6085   # Extract the first word of "$ac_prog", so it can be a program name with args.
6086 set dummy $ac_prog; ac_word=$2
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6088 $as_echo_n "checking for $ac_word... " >&6; }
6089 if ${ac_cv_path_DIFF+:} false; then :
6090   $as_echo_n "(cached) " >&6
6091 else
6092   case $DIFF in
6093   [\\/]* | ?:[\\/]*)
6094   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6095   ;;
6096   *)
6097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098 for as_dir in $PATH
6099 do
6100   IFS=$as_save_IFS
6101   test -z "$as_dir" && as_dir=.
6102     for ac_exec_ext in '' $ac_executable_extensions; do
6103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6104     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6106     break 2
6107   fi
6108 done
6109   done
6110 IFS=$as_save_IFS
6111 
6112   ;;
6113 esac
6114 fi
6115 DIFF=$ac_cv_path_DIFF
6116 if test -n "$DIFF"; then
6117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6118 $as_echo "$DIFF" >&6; }
6119 else
6120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121 $as_echo "no" >&6; }
6122 fi
6123 
6124 
6125   test -n "$DIFF" && break
6126 done
6127 
6128   else
6129     # The variable is set, but is it from the command line or the environment?
6130 
6131     # Try to remove the string !DIFF! from our list.
6132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6134       # If it failed, the variable was not from the command line. Ignore it,
6135       # but warn the user (except for BASH, which is always set by the calling BASH).
6136       if test "xDIFF" != xBASH; then
6137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6138 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6139       fi
6140       # Try to locate tool using the code snippet
6141       for ac_prog in gdiff diff
6142 do
6143   # Extract the first word of "$ac_prog", so it can be a program name with args.
6144 set dummy $ac_prog; ac_word=$2
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6146 $as_echo_n "checking for $ac_word... " >&6; }
6147 if ${ac_cv_path_DIFF+:} false; then :
6148   $as_echo_n "(cached) " >&6
6149 else
6150   case $DIFF in
6151   [\\/]* | ?:[\\/]*)
6152   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6153   ;;
6154   *)
6155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6156 for as_dir in $PATH
6157 do
6158   IFS=$as_save_IFS
6159   test -z "$as_dir" && as_dir=.
6160     for ac_exec_ext in '' $ac_executable_extensions; do
6161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6162     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6164     break 2
6165   fi
6166 done
6167   done
6168 IFS=$as_save_IFS
6169 
6170   ;;
6171 esac
6172 fi
6173 DIFF=$ac_cv_path_DIFF
6174 if test -n "$DIFF"; then
6175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6176 $as_echo "$DIFF" >&6; }
6177 else
6178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6179 $as_echo "no" >&6; }
6180 fi
6181 
6182 
6183   test -n "$DIFF" && break
6184 done
6185 
6186     else
6187       # If it succeeded, then it was overridden by the user. We will use it
6188       # for the tool.
6189 
6190       # First remove it from the list of overridden variables, so we can test
6191       # for unknown variables in the end.
6192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6193 
6194       # Check if the provided tool contains a complete path.
6195       tool_specified="$DIFF"
6196       tool_basename="${tool_specified##*/}"
6197       if test "x$tool_basename" = "x$tool_specified"; then
6198         # A command without a complete path is provided, search $PATH.
6199         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6200 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6201         # Extract the first word of "$tool_basename", so it can be a program name with args.
6202 set dummy $tool_basename; ac_word=$2
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204 $as_echo_n "checking for $ac_word... " >&6; }
6205 if ${ac_cv_path_DIFF+:} false; then :
6206   $as_echo_n "(cached) " >&6
6207 else
6208   case $DIFF in
6209   [\\/]* | ?:[\\/]*)
6210   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6211   ;;
6212   *)
6213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214 for as_dir in $PATH
6215 do
6216   IFS=$as_save_IFS
6217   test -z "$as_dir" && as_dir=.
6218     for ac_exec_ext in '' $ac_executable_extensions; do
6219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6220     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6222     break 2
6223   fi
6224 done
6225   done
6226 IFS=$as_save_IFS
6227 
6228   ;;
6229 esac
6230 fi
6231 DIFF=$ac_cv_path_DIFF
6232 if test -n "$DIFF"; then
6233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6234 $as_echo "$DIFF" >&6; }
6235 else
6236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237 $as_echo "no" >&6; }
6238 fi
6239 
6240 
6241         if test "x$DIFF" = x; then
6242           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6243         fi
6244       else
6245         # Otherwise we believe it is a complete path. Use it as it is.
6246         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6247 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6248         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6249 $as_echo_n "checking for DIFF... " >&6; }
6250         if test ! -x "$tool_specified"; then
6251           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6252 $as_echo "not found" >&6; }
6253           as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6254         fi
6255         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6256 $as_echo "$tool_specified" >&6; }
6257       fi
6258     fi
6259   fi
6260 
6261 
6262 
6263   if test "x$DIFF" = x; then
6264     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6265   fi
6266 
6267 
6268 
6269 
6270 
6271   # Publish this variable in the help.
6272 
6273 
6274   if test "x$DIRNAME" = x; then
6275     # The variable is not set by user, try to locate tool using the code snippet
6276     for ac_prog in dirname
6277 do
6278   # Extract the first word of "$ac_prog", so it can be a program name with args.
6279 set dummy $ac_prog; ac_word=$2
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6281 $as_echo_n "checking for $ac_word... " >&6; }
6282 if ${ac_cv_path_DIRNAME+:} false; then :
6283   $as_echo_n "(cached) " >&6
6284 else
6285   case $DIRNAME in
6286   [\\/]* | ?:[\\/]*)
6287   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6288   ;;
6289   *)
6290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6291 for as_dir in $PATH
6292 do
6293   IFS=$as_save_IFS
6294   test -z "$as_dir" && as_dir=.
6295     for ac_exec_ext in '' $ac_executable_extensions; do
6296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6297     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6299     break 2
6300   fi
6301 done
6302   done
6303 IFS=$as_save_IFS
6304 
6305   ;;
6306 esac
6307 fi
6308 DIRNAME=$ac_cv_path_DIRNAME
6309 if test -n "$DIRNAME"; then
6310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6311 $as_echo "$DIRNAME" >&6; }
6312 else
6313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6314 $as_echo "no" >&6; }
6315 fi
6316 
6317 
6318   test -n "$DIRNAME" && break
6319 done
6320 
6321   else
6322     # The variable is set, but is it from the command line or the environment?
6323 
6324     # Try to remove the string !DIRNAME! from our list.
6325     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6326     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6327       # If it failed, the variable was not from the command line. Ignore it,
6328       # but warn the user (except for BASH, which is always set by the calling BASH).
6329       if test "xDIRNAME" != xBASH; then
6330         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6331 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6332       fi
6333       # Try to locate tool using the code snippet
6334       for ac_prog in dirname
6335 do
6336   # Extract the first word of "$ac_prog", so it can be a program name with args.
6337 set dummy $ac_prog; ac_word=$2
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339 $as_echo_n "checking for $ac_word... " >&6; }
6340 if ${ac_cv_path_DIRNAME+:} false; then :
6341   $as_echo_n "(cached) " >&6
6342 else
6343   case $DIRNAME in
6344   [\\/]* | ?:[\\/]*)
6345   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6346   ;;
6347   *)
6348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6349 for as_dir in $PATH
6350 do
6351   IFS=$as_save_IFS
6352   test -z "$as_dir" && as_dir=.
6353     for ac_exec_ext in '' $ac_executable_extensions; do
6354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6355     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6357     break 2
6358   fi
6359 done
6360   done
6361 IFS=$as_save_IFS
6362 
6363   ;;
6364 esac
6365 fi
6366 DIRNAME=$ac_cv_path_DIRNAME
6367 if test -n "$DIRNAME"; then
6368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6369 $as_echo "$DIRNAME" >&6; }
6370 else
6371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372 $as_echo "no" >&6; }
6373 fi
6374 
6375 
6376   test -n "$DIRNAME" && break
6377 done
6378 
6379     else
6380       # If it succeeded, then it was overridden by the user. We will use it
6381       # for the tool.
6382 
6383       # First remove it from the list of overridden variables, so we can test
6384       # for unknown variables in the end.
6385       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6386 
6387       # Check if the provided tool contains a complete path.
6388       tool_specified="$DIRNAME"
6389       tool_basename="${tool_specified##*/}"
6390       if test "x$tool_basename" = "x$tool_specified"; then
6391         # A command without a complete path is provided, search $PATH.
6392         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6393 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6394         # Extract the first word of "$tool_basename", so it can be a program name with args.
6395 set dummy $tool_basename; ac_word=$2
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6397 $as_echo_n "checking for $ac_word... " >&6; }
6398 if ${ac_cv_path_DIRNAME+:} false; then :
6399   $as_echo_n "(cached) " >&6
6400 else
6401   case $DIRNAME in
6402   [\\/]* | ?:[\\/]*)
6403   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6404   ;;
6405   *)
6406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6407 for as_dir in $PATH
6408 do
6409   IFS=$as_save_IFS
6410   test -z "$as_dir" && as_dir=.
6411     for ac_exec_ext in '' $ac_executable_extensions; do
6412   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6413     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6414     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6415     break 2
6416   fi
6417 done
6418   done
6419 IFS=$as_save_IFS
6420 
6421   ;;
6422 esac
6423 fi
6424 DIRNAME=$ac_cv_path_DIRNAME
6425 if test -n "$DIRNAME"; then
6426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6427 $as_echo "$DIRNAME" >&6; }
6428 else
6429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430 $as_echo "no" >&6; }
6431 fi
6432 
6433 
6434         if test "x$DIRNAME" = x; then
6435           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6436         fi
6437       else
6438         # Otherwise we believe it is a complete path. Use it as it is.
6439         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6440 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6441         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6442 $as_echo_n "checking for DIRNAME... " >&6; }
6443         if test ! -x "$tool_specified"; then
6444           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6445 $as_echo "not found" >&6; }
6446           as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6447         fi
6448         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6449 $as_echo "$tool_specified" >&6; }
6450       fi
6451     fi
6452   fi
6453 
6454 
6455 
6456   if test "x$DIRNAME" = x; then
6457     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6458   fi
6459 
6460 
6461 
6462 
6463 
6464   # Publish this variable in the help.
6465 
6466 
6467   if test "x$ECHO" = x; then
6468     # The variable is not set by user, try to locate tool using the code snippet
6469     for ac_prog in echo
6470 do
6471   # Extract the first word of "$ac_prog", so it can be a program name with args.
6472 set dummy $ac_prog; ac_word=$2
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6474 $as_echo_n "checking for $ac_word... " >&6; }
6475 if ${ac_cv_path_ECHO+:} false; then :
6476   $as_echo_n "(cached) " >&6
6477 else
6478   case $ECHO in
6479   [\\/]* | ?:[\\/]*)
6480   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6481   ;;
6482   *)
6483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6484 for as_dir in $PATH
6485 do
6486   IFS=$as_save_IFS
6487   test -z "$as_dir" && as_dir=.
6488     for ac_exec_ext in '' $ac_executable_extensions; do
6489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6490     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6492     break 2
6493   fi
6494 done
6495   done
6496 IFS=$as_save_IFS
6497 
6498   ;;
6499 esac
6500 fi
6501 ECHO=$ac_cv_path_ECHO
6502 if test -n "$ECHO"; then
6503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6504 $as_echo "$ECHO" >&6; }
6505 else
6506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507 $as_echo "no" >&6; }
6508 fi
6509 
6510 
6511   test -n "$ECHO" && break
6512 done
6513 
6514   else
6515     # The variable is set, but is it from the command line or the environment?
6516 
6517     # Try to remove the string !ECHO! from our list.
6518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6520       # If it failed, the variable was not from the command line. Ignore it,
6521       # but warn the user (except for BASH, which is always set by the calling BASH).
6522       if test "xECHO" != xBASH; then
6523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6524 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6525       fi
6526       # Try to locate tool using the code snippet
6527       for ac_prog in echo
6528 do
6529   # Extract the first word of "$ac_prog", so it can be a program name with args.
6530 set dummy $ac_prog; ac_word=$2
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532 $as_echo_n "checking for $ac_word... " >&6; }
6533 if ${ac_cv_path_ECHO+:} false; then :
6534   $as_echo_n "(cached) " >&6
6535 else
6536   case $ECHO in
6537   [\\/]* | ?:[\\/]*)
6538   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6539   ;;
6540   *)
6541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542 for as_dir in $PATH
6543 do
6544   IFS=$as_save_IFS
6545   test -z "$as_dir" && as_dir=.
6546     for ac_exec_ext in '' $ac_executable_extensions; do
6547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550     break 2
6551   fi
6552 done
6553   done
6554 IFS=$as_save_IFS
6555 
6556   ;;
6557 esac
6558 fi
6559 ECHO=$ac_cv_path_ECHO
6560 if test -n "$ECHO"; then
6561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6562 $as_echo "$ECHO" >&6; }
6563 else
6564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565 $as_echo "no" >&6; }
6566 fi
6567 
6568 
6569   test -n "$ECHO" && break
6570 done
6571 
6572     else
6573       # If it succeeded, then it was overridden by the user. We will use it
6574       # for the tool.
6575 
6576       # First remove it from the list of overridden variables, so we can test
6577       # for unknown variables in the end.
6578       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6579 
6580       # Check if the provided tool contains a complete path.
6581       tool_specified="$ECHO"
6582       tool_basename="${tool_specified##*/}"
6583       if test "x$tool_basename" = "x$tool_specified"; then
6584         # A command without a complete path is provided, search $PATH.
6585         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6586 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6587         # Extract the first word of "$tool_basename", so it can be a program name with args.
6588 set dummy $tool_basename; ac_word=$2
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6590 $as_echo_n "checking for $ac_word... " >&6; }
6591 if ${ac_cv_path_ECHO+:} false; then :
6592   $as_echo_n "(cached) " >&6
6593 else
6594   case $ECHO in
6595   [\\/]* | ?:[\\/]*)
6596   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6597   ;;
6598   *)
6599   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6600 for as_dir in $PATH
6601 do
6602   IFS=$as_save_IFS
6603   test -z "$as_dir" && as_dir=.
6604     for ac_exec_ext in '' $ac_executable_extensions; do
6605   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6606     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6607     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6608     break 2
6609   fi
6610 done
6611   done
6612 IFS=$as_save_IFS
6613 
6614   ;;
6615 esac
6616 fi
6617 ECHO=$ac_cv_path_ECHO
6618 if test -n "$ECHO"; then
6619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6620 $as_echo "$ECHO" >&6; }
6621 else
6622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6623 $as_echo "no" >&6; }
6624 fi
6625 
6626 
6627         if test "x$ECHO" = x; then
6628           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6629         fi
6630       else
6631         # Otherwise we believe it is a complete path. Use it as it is.
6632         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6633 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6634         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6635 $as_echo_n "checking for ECHO... " >&6; }
6636         if test ! -x "$tool_specified"; then
6637           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6638 $as_echo "not found" >&6; }
6639           as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6640         fi
6641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6642 $as_echo "$tool_specified" >&6; }
6643       fi
6644     fi
6645   fi
6646 
6647 
6648 
6649   if test "x$ECHO" = x; then
6650     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6651   fi
6652 
6653 
6654 
6655 
6656 
6657   # Publish this variable in the help.
6658 
6659 
6660   if test "x$EXPR" = x; then
6661     # The variable is not set by user, try to locate tool using the code snippet
6662     for ac_prog in expr
6663 do
6664   # Extract the first word of "$ac_prog", so it can be a program name with args.
6665 set dummy $ac_prog; ac_word=$2
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6667 $as_echo_n "checking for $ac_word... " >&6; }
6668 if ${ac_cv_path_EXPR+:} false; then :
6669   $as_echo_n "(cached) " >&6
6670 else
6671   case $EXPR in
6672   [\\/]* | ?:[\\/]*)
6673   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6674   ;;
6675   *)
6676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6677 for as_dir in $PATH
6678 do
6679   IFS=$as_save_IFS
6680   test -z "$as_dir" && as_dir=.
6681     for ac_exec_ext in '' $ac_executable_extensions; do
6682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6683     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6685     break 2
6686   fi
6687 done
6688   done
6689 IFS=$as_save_IFS
6690 
6691   ;;
6692 esac
6693 fi
6694 EXPR=$ac_cv_path_EXPR
6695 if test -n "$EXPR"; then
6696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6697 $as_echo "$EXPR" >&6; }
6698 else
6699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6700 $as_echo "no" >&6; }
6701 fi
6702 
6703 
6704   test -n "$EXPR" && break
6705 done
6706 
6707   else
6708     # The variable is set, but is it from the command line or the environment?
6709 
6710     # Try to remove the string !EXPR! from our list.
6711     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6712     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6713       # If it failed, the variable was not from the command line. Ignore it,
6714       # but warn the user (except for BASH, which is always set by the calling BASH).
6715       if test "xEXPR" != xBASH; then
6716         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6717 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6718       fi
6719       # Try to locate tool using the code snippet
6720       for ac_prog in expr
6721 do
6722   # Extract the first word of "$ac_prog", so it can be a program name with args.
6723 set dummy $ac_prog; ac_word=$2
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6725 $as_echo_n "checking for $ac_word... " >&6; }
6726 if ${ac_cv_path_EXPR+:} false; then :
6727   $as_echo_n "(cached) " >&6
6728 else
6729   case $EXPR in
6730   [\\/]* | ?:[\\/]*)
6731   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6732   ;;
6733   *)
6734   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6735 for as_dir in $PATH
6736 do
6737   IFS=$as_save_IFS
6738   test -z "$as_dir" && as_dir=.
6739     for ac_exec_ext in '' $ac_executable_extensions; do
6740   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6741     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6742     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6743     break 2
6744   fi
6745 done
6746   done
6747 IFS=$as_save_IFS
6748 
6749   ;;
6750 esac
6751 fi
6752 EXPR=$ac_cv_path_EXPR
6753 if test -n "$EXPR"; then
6754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6755 $as_echo "$EXPR" >&6; }
6756 else
6757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6758 $as_echo "no" >&6; }
6759 fi
6760 
6761 
6762   test -n "$EXPR" && break
6763 done
6764 
6765     else
6766       # If it succeeded, then it was overridden by the user. We will use it
6767       # for the tool.
6768 
6769       # First remove it from the list of overridden variables, so we can test
6770       # for unknown variables in the end.
6771       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6772 
6773       # Check if the provided tool contains a complete path.
6774       tool_specified="$EXPR"
6775       tool_basename="${tool_specified##*/}"
6776       if test "x$tool_basename" = "x$tool_specified"; then
6777         # A command without a complete path is provided, search $PATH.
6778         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6779 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6780         # Extract the first word of "$tool_basename", so it can be a program name with args.
6781 set dummy $tool_basename; ac_word=$2
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6783 $as_echo_n "checking for $ac_word... " >&6; }
6784 if ${ac_cv_path_EXPR+:} false; then :
6785   $as_echo_n "(cached) " >&6
6786 else
6787   case $EXPR in
6788   [\\/]* | ?:[\\/]*)
6789   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6790   ;;
6791   *)
6792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6793 for as_dir in $PATH
6794 do
6795   IFS=$as_save_IFS
6796   test -z "$as_dir" && as_dir=.
6797     for ac_exec_ext in '' $ac_executable_extensions; do
6798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6799     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6801     break 2
6802   fi
6803 done
6804   done
6805 IFS=$as_save_IFS
6806 
6807   ;;
6808 esac
6809 fi
6810 EXPR=$ac_cv_path_EXPR
6811 if test -n "$EXPR"; then
6812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6813 $as_echo "$EXPR" >&6; }
6814 else
6815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6816 $as_echo "no" >&6; }
6817 fi
6818 
6819 
6820         if test "x$EXPR" = x; then
6821           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6822         fi
6823       else
6824         # Otherwise we believe it is a complete path. Use it as it is.
6825         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6826 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6827         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6828 $as_echo_n "checking for EXPR... " >&6; }
6829         if test ! -x "$tool_specified"; then
6830           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6831 $as_echo "not found" >&6; }
6832           as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6833         fi
6834         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6835 $as_echo "$tool_specified" >&6; }
6836       fi
6837     fi
6838   fi
6839 
6840 
6841 
6842   if test "x$EXPR" = x; then
6843     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6844   fi
6845 
6846 
6847 
6848 
6849 
6850   # Publish this variable in the help.
6851 
6852 
6853   if test "x$FILE" = x; then
6854     # The variable is not set by user, try to locate tool using the code snippet
6855     for ac_prog in file
6856 do
6857   # Extract the first word of "$ac_prog", so it can be a program name with args.
6858 set dummy $ac_prog; ac_word=$2
6859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6860 $as_echo_n "checking for $ac_word... " >&6; }
6861 if ${ac_cv_path_FILE+:} false; then :
6862   $as_echo_n "(cached) " >&6
6863 else
6864   case $FILE in
6865   [\\/]* | ?:[\\/]*)
6866   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6867   ;;
6868   *)
6869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6870 for as_dir in $PATH
6871 do
6872   IFS=$as_save_IFS
6873   test -z "$as_dir" && as_dir=.
6874     for ac_exec_ext in '' $ac_executable_extensions; do
6875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6876     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6878     break 2
6879   fi
6880 done
6881   done
6882 IFS=$as_save_IFS
6883 
6884   ;;
6885 esac
6886 fi
6887 FILE=$ac_cv_path_FILE
6888 if test -n "$FILE"; then
6889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6890 $as_echo "$FILE" >&6; }
6891 else
6892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6893 $as_echo "no" >&6; }
6894 fi
6895 
6896 
6897   test -n "$FILE" && break
6898 done
6899 
6900   else
6901     # The variable is set, but is it from the command line or the environment?
6902 
6903     # Try to remove the string !FILE! from our list.
6904     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6905     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6906       # If it failed, the variable was not from the command line. Ignore it,
6907       # but warn the user (except for BASH, which is always set by the calling BASH).
6908       if test "xFILE" != xBASH; then
6909         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6910 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6911       fi
6912       # Try to locate tool using the code snippet
6913       for ac_prog in file
6914 do
6915   # Extract the first word of "$ac_prog", so it can be a program name with args.
6916 set dummy $ac_prog; ac_word=$2
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6918 $as_echo_n "checking for $ac_word... " >&6; }
6919 if ${ac_cv_path_FILE+:} false; then :
6920   $as_echo_n "(cached) " >&6
6921 else
6922   case $FILE in
6923   [\\/]* | ?:[\\/]*)
6924   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6925   ;;
6926   *)
6927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928 for as_dir in $PATH
6929 do
6930   IFS=$as_save_IFS
6931   test -z "$as_dir" && as_dir=.
6932     for ac_exec_ext in '' $ac_executable_extensions; do
6933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6934     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6936     break 2
6937   fi
6938 done
6939   done
6940 IFS=$as_save_IFS
6941 
6942   ;;
6943 esac
6944 fi
6945 FILE=$ac_cv_path_FILE
6946 if test -n "$FILE"; then
6947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6948 $as_echo "$FILE" >&6; }
6949 else
6950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951 $as_echo "no" >&6; }
6952 fi
6953 
6954 
6955   test -n "$FILE" && break
6956 done
6957 
6958     else
6959       # If it succeeded, then it was overridden by the user. We will use it
6960       # for the tool.
6961 
6962       # First remove it from the list of overridden variables, so we can test
6963       # for unknown variables in the end.
6964       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6965 
6966       # Check if the provided tool contains a complete path.
6967       tool_specified="$FILE"
6968       tool_basename="${tool_specified##*/}"
6969       if test "x$tool_basename" = "x$tool_specified"; then
6970         # A command without a complete path is provided, search $PATH.
6971         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
6972 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
6973         # Extract the first word of "$tool_basename", so it can be a program name with args.
6974 set dummy $tool_basename; ac_word=$2
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6976 $as_echo_n "checking for $ac_word... " >&6; }
6977 if ${ac_cv_path_FILE+:} false; then :
6978   $as_echo_n "(cached) " >&6
6979 else
6980   case $FILE in
6981   [\\/]* | ?:[\\/]*)
6982   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6983   ;;
6984   *)
6985   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6986 for as_dir in $PATH
6987 do
6988   IFS=$as_save_IFS
6989   test -z "$as_dir" && as_dir=.
6990     for ac_exec_ext in '' $ac_executable_extensions; do
6991   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6992     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6993     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6994     break 2
6995   fi
6996 done
6997   done
6998 IFS=$as_save_IFS
6999 
7000   ;;
7001 esac
7002 fi
7003 FILE=$ac_cv_path_FILE
7004 if test -n "$FILE"; then
7005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7006 $as_echo "$FILE" >&6; }
7007 else
7008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7009 $as_echo "no" >&6; }
7010 fi
7011 
7012 
7013         if test "x$FILE" = x; then
7014           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7015         fi
7016       else
7017         # Otherwise we believe it is a complete path. Use it as it is.
7018         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7019 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7020         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7021 $as_echo_n "checking for FILE... " >&6; }
7022         if test ! -x "$tool_specified"; then
7023           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7024 $as_echo "not found" >&6; }
7025           as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7026         fi
7027         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7028 $as_echo "$tool_specified" >&6; }
7029       fi
7030     fi
7031   fi
7032 
7033 
7034 
7035   if test "x$FILE" = x; then
7036     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7037   fi
7038 
7039 
7040 
7041 
7042 
7043   # Publish this variable in the help.
7044 
7045 
7046   if test "x$FIND" = x; then
7047     # The variable is not set by user, try to locate tool using the code snippet
7048     for ac_prog in find
7049 do
7050   # Extract the first word of "$ac_prog", so it can be a program name with args.
7051 set dummy $ac_prog; ac_word=$2
7052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7053 $as_echo_n "checking for $ac_word... " >&6; }
7054 if ${ac_cv_path_FIND+:} false; then :
7055   $as_echo_n "(cached) " >&6
7056 else
7057   case $FIND in
7058   [\\/]* | ?:[\\/]*)
7059   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7060   ;;
7061   *)
7062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7063 for as_dir in $PATH
7064 do
7065   IFS=$as_save_IFS
7066   test -z "$as_dir" && as_dir=.
7067     for ac_exec_ext in '' $ac_executable_extensions; do
7068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7069     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7071     break 2
7072   fi
7073 done
7074   done
7075 IFS=$as_save_IFS
7076 
7077   ;;
7078 esac
7079 fi
7080 FIND=$ac_cv_path_FIND
7081 if test -n "$FIND"; then
7082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7083 $as_echo "$FIND" >&6; }
7084 else
7085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7086 $as_echo "no" >&6; }
7087 fi
7088 
7089 
7090   test -n "$FIND" && break
7091 done
7092 
7093   else
7094     # The variable is set, but is it from the command line or the environment?
7095 
7096     # Try to remove the string !FIND! from our list.
7097     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7098     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7099       # If it failed, the variable was not from the command line. Ignore it,
7100       # but warn the user (except for BASH, which is always set by the calling BASH).
7101       if test "xFIND" != xBASH; then
7102         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7103 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7104       fi
7105       # Try to locate tool using the code snippet
7106       for ac_prog in find
7107 do
7108   # Extract the first word of "$ac_prog", so it can be a program name with args.
7109 set dummy $ac_prog; ac_word=$2
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111 $as_echo_n "checking for $ac_word... " >&6; }
7112 if ${ac_cv_path_FIND+:} false; then :
7113   $as_echo_n "(cached) " >&6
7114 else
7115   case $FIND in
7116   [\\/]* | ?:[\\/]*)
7117   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7118   ;;
7119   *)
7120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7121 for as_dir in $PATH
7122 do
7123   IFS=$as_save_IFS
7124   test -z "$as_dir" && as_dir=.
7125     for ac_exec_ext in '' $ac_executable_extensions; do
7126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7127     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7129     break 2
7130   fi
7131 done
7132   done
7133 IFS=$as_save_IFS
7134 
7135   ;;
7136 esac
7137 fi
7138 FIND=$ac_cv_path_FIND
7139 if test -n "$FIND"; then
7140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7141 $as_echo "$FIND" >&6; }
7142 else
7143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144 $as_echo "no" >&6; }
7145 fi
7146 
7147 
7148   test -n "$FIND" && break
7149 done
7150 
7151     else
7152       # If it succeeded, then it was overridden by the user. We will use it
7153       # for the tool.
7154 
7155       # First remove it from the list of overridden variables, so we can test
7156       # for unknown variables in the end.
7157       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7158 
7159       # Check if the provided tool contains a complete path.
7160       tool_specified="$FIND"
7161       tool_basename="${tool_specified##*/}"
7162       if test "x$tool_basename" = "x$tool_specified"; then
7163         # A command without a complete path is provided, search $PATH.
7164         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7165 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7166         # Extract the first word of "$tool_basename", so it can be a program name with args.
7167 set dummy $tool_basename; ac_word=$2
7168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7169 $as_echo_n "checking for $ac_word... " >&6; }
7170 if ${ac_cv_path_FIND+:} false; then :
7171   $as_echo_n "(cached) " >&6
7172 else
7173   case $FIND in
7174   [\\/]* | ?:[\\/]*)
7175   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7176   ;;
7177   *)
7178   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7179 for as_dir in $PATH
7180 do
7181   IFS=$as_save_IFS
7182   test -z "$as_dir" && as_dir=.
7183     for ac_exec_ext in '' $ac_executable_extensions; do
7184   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7185     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7186     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7187     break 2
7188   fi
7189 done
7190   done
7191 IFS=$as_save_IFS
7192 
7193   ;;
7194 esac
7195 fi
7196 FIND=$ac_cv_path_FIND
7197 if test -n "$FIND"; then
7198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7199 $as_echo "$FIND" >&6; }
7200 else
7201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7202 $as_echo "no" >&6; }
7203 fi
7204 
7205 
7206         if test "x$FIND" = x; then
7207           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7208         fi
7209       else
7210         # Otherwise we believe it is a complete path. Use it as it is.
7211         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7212 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7213         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7214 $as_echo_n "checking for FIND... " >&6; }
7215         if test ! -x "$tool_specified"; then
7216           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7217 $as_echo "not found" >&6; }
7218           as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7219         fi
7220         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7221 $as_echo "$tool_specified" >&6; }
7222       fi
7223     fi
7224   fi
7225 
7226 
7227 
7228   if test "x$FIND" = x; then
7229     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7230   fi
7231 
7232 
7233 
7234 
7235 
7236   # Publish this variable in the help.
7237 
7238 
7239   if test "x$HEAD" = x; then
7240     # The variable is not set by user, try to locate tool using the code snippet
7241     for ac_prog in head
7242 do
7243   # Extract the first word of "$ac_prog", so it can be a program name with args.
7244 set dummy $ac_prog; ac_word=$2
7245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7246 $as_echo_n "checking for $ac_word... " >&6; }
7247 if ${ac_cv_path_HEAD+:} false; then :
7248   $as_echo_n "(cached) " >&6
7249 else
7250   case $HEAD in
7251   [\\/]* | ?:[\\/]*)
7252   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7253   ;;
7254   *)
7255   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7256 for as_dir in $PATH
7257 do
7258   IFS=$as_save_IFS
7259   test -z "$as_dir" && as_dir=.
7260     for ac_exec_ext in '' $ac_executable_extensions; do
7261   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7262     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7263     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7264     break 2
7265   fi
7266 done
7267   done
7268 IFS=$as_save_IFS
7269 
7270   ;;
7271 esac
7272 fi
7273 HEAD=$ac_cv_path_HEAD
7274 if test -n "$HEAD"; then
7275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7276 $as_echo "$HEAD" >&6; }
7277 else
7278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7279 $as_echo "no" >&6; }
7280 fi
7281 
7282 
7283   test -n "$HEAD" && break
7284 done
7285 
7286   else
7287     # The variable is set, but is it from the command line or the environment?
7288 
7289     # Try to remove the string !HEAD! from our list.
7290     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7291     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7292       # If it failed, the variable was not from the command line. Ignore it,
7293       # but warn the user (except for BASH, which is always set by the calling BASH).
7294       if test "xHEAD" != xBASH; then
7295         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7296 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7297       fi
7298       # Try to locate tool using the code snippet
7299       for ac_prog in head
7300 do
7301   # Extract the first word of "$ac_prog", so it can be a program name with args.
7302 set dummy $ac_prog; ac_word=$2
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7304 $as_echo_n "checking for $ac_word... " >&6; }
7305 if ${ac_cv_path_HEAD+:} false; then :
7306   $as_echo_n "(cached) " >&6
7307 else
7308   case $HEAD in
7309   [\\/]* | ?:[\\/]*)
7310   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7311   ;;
7312   *)
7313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7314 for as_dir in $PATH
7315 do
7316   IFS=$as_save_IFS
7317   test -z "$as_dir" && as_dir=.
7318     for ac_exec_ext in '' $ac_executable_extensions; do
7319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7320     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7322     break 2
7323   fi
7324 done
7325   done
7326 IFS=$as_save_IFS
7327 
7328   ;;
7329 esac
7330 fi
7331 HEAD=$ac_cv_path_HEAD
7332 if test -n "$HEAD"; then
7333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7334 $as_echo "$HEAD" >&6; }
7335 else
7336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337 $as_echo "no" >&6; }
7338 fi
7339 
7340 
7341   test -n "$HEAD" && break
7342 done
7343 
7344     else
7345       # If it succeeded, then it was overridden by the user. We will use it
7346       # for the tool.
7347 
7348       # First remove it from the list of overridden variables, so we can test
7349       # for unknown variables in the end.
7350       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7351 
7352       # Check if the provided tool contains a complete path.
7353       tool_specified="$HEAD"
7354       tool_basename="${tool_specified##*/}"
7355       if test "x$tool_basename" = "x$tool_specified"; then
7356         # A command without a complete path is provided, search $PATH.
7357         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7358 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7359         # Extract the first word of "$tool_basename", so it can be a program name with args.
7360 set dummy $tool_basename; ac_word=$2
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7362 $as_echo_n "checking for $ac_word... " >&6; }
7363 if ${ac_cv_path_HEAD+:} false; then :
7364   $as_echo_n "(cached) " >&6
7365 else
7366   case $HEAD in
7367   [\\/]* | ?:[\\/]*)
7368   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7369   ;;
7370   *)
7371   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7372 for as_dir in $PATH
7373 do
7374   IFS=$as_save_IFS
7375   test -z "$as_dir" && as_dir=.
7376     for ac_exec_ext in '' $ac_executable_extensions; do
7377   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7378     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7379     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7380     break 2
7381   fi
7382 done
7383   done
7384 IFS=$as_save_IFS
7385 
7386   ;;
7387 esac
7388 fi
7389 HEAD=$ac_cv_path_HEAD
7390 if test -n "$HEAD"; then
7391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7392 $as_echo "$HEAD" >&6; }
7393 else
7394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7395 $as_echo "no" >&6; }
7396 fi
7397 
7398 
7399         if test "x$HEAD" = x; then
7400           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7401         fi
7402       else
7403         # Otherwise we believe it is a complete path. Use it as it is.
7404         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7405 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7406         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7407 $as_echo_n "checking for HEAD... " >&6; }
7408         if test ! -x "$tool_specified"; then
7409           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7410 $as_echo "not found" >&6; }
7411           as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7412         fi
7413         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7414 $as_echo "$tool_specified" >&6; }
7415       fi
7416     fi
7417   fi
7418 
7419 
7420 
7421   if test "x$HEAD" = x; then
7422     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7423   fi
7424 
7425 
7426 
7427 
7428 
7429   # Publish this variable in the help.
7430 
7431 
7432   if test "x$LN" = x; then
7433     # The variable is not set by user, try to locate tool using the code snippet
7434     for ac_prog in ln
7435 do
7436   # Extract the first word of "$ac_prog", so it can be a program name with args.
7437 set dummy $ac_prog; ac_word=$2
7438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7439 $as_echo_n "checking for $ac_word... " >&6; }
7440 if ${ac_cv_path_LN+:} false; then :
7441   $as_echo_n "(cached) " >&6
7442 else
7443   case $LN in
7444   [\\/]* | ?:[\\/]*)
7445   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7446   ;;
7447   *)
7448   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449 for as_dir in $PATH
7450 do
7451   IFS=$as_save_IFS
7452   test -z "$as_dir" && as_dir=.
7453     for ac_exec_ext in '' $ac_executable_extensions; do
7454   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7455     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7456     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7457     break 2
7458   fi
7459 done
7460   done
7461 IFS=$as_save_IFS
7462 
7463   ;;
7464 esac
7465 fi
7466 LN=$ac_cv_path_LN
7467 if test -n "$LN"; then
7468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7469 $as_echo "$LN" >&6; }
7470 else
7471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7472 $as_echo "no" >&6; }
7473 fi
7474 
7475 
7476   test -n "$LN" && break
7477 done
7478 
7479   else
7480     # The variable is set, but is it from the command line or the environment?
7481 
7482     # Try to remove the string !LN! from our list.
7483     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7484     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7485       # If it failed, the variable was not from the command line. Ignore it,
7486       # but warn the user (except for BASH, which is always set by the calling BASH).
7487       if test "xLN" != xBASH; then
7488         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7489 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7490       fi
7491       # Try to locate tool using the code snippet
7492       for ac_prog in ln
7493 do
7494   # Extract the first word of "$ac_prog", so it can be a program name with args.
7495 set dummy $ac_prog; ac_word=$2
7496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7497 $as_echo_n "checking for $ac_word... " >&6; }
7498 if ${ac_cv_path_LN+:} false; then :
7499   $as_echo_n "(cached) " >&6
7500 else
7501   case $LN in
7502   [\\/]* | ?:[\\/]*)
7503   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7504   ;;
7505   *)
7506   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7507 for as_dir in $PATH
7508 do
7509   IFS=$as_save_IFS
7510   test -z "$as_dir" && as_dir=.
7511     for ac_exec_ext in '' $ac_executable_extensions; do
7512   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7513     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7514     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7515     break 2
7516   fi
7517 done
7518   done
7519 IFS=$as_save_IFS
7520 
7521   ;;
7522 esac
7523 fi
7524 LN=$ac_cv_path_LN
7525 if test -n "$LN"; then
7526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7527 $as_echo "$LN" >&6; }
7528 else
7529   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7530 $as_echo "no" >&6; }
7531 fi
7532 
7533 
7534   test -n "$LN" && break
7535 done
7536 
7537     else
7538       # If it succeeded, then it was overridden by the user. We will use it
7539       # for the tool.
7540 
7541       # First remove it from the list of overridden variables, so we can test
7542       # for unknown variables in the end.
7543       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7544 
7545       # Check if the provided tool contains a complete path.
7546       tool_specified="$LN"
7547       tool_basename="${tool_specified##*/}"
7548       if test "x$tool_basename" = "x$tool_specified"; then
7549         # A command without a complete path is provided, search $PATH.
7550         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7551 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7552         # Extract the first word of "$tool_basename", so it can be a program name with args.
7553 set dummy $tool_basename; ac_word=$2
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7555 $as_echo_n "checking for $ac_word... " >&6; }
7556 if ${ac_cv_path_LN+:} false; then :
7557   $as_echo_n "(cached) " >&6
7558 else
7559   case $LN in
7560   [\\/]* | ?:[\\/]*)
7561   ac_cv_path_LN="$LN" # Let the user override the test with a path.
7562   ;;
7563   *)
7564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565 for as_dir in $PATH
7566 do
7567   IFS=$as_save_IFS
7568   test -z "$as_dir" && as_dir=.
7569     for ac_exec_ext in '' $ac_executable_extensions; do
7570   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7571     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7572     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7573     break 2
7574   fi
7575 done
7576   done
7577 IFS=$as_save_IFS
7578 
7579   ;;
7580 esac
7581 fi
7582 LN=$ac_cv_path_LN
7583 if test -n "$LN"; then
7584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7585 $as_echo "$LN" >&6; }
7586 else
7587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7588 $as_echo "no" >&6; }
7589 fi
7590 
7591 
7592         if test "x$LN" = x; then
7593           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7594         fi
7595       else
7596         # Otherwise we believe it is a complete path. Use it as it is.
7597         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7598 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7599         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7600 $as_echo_n "checking for LN... " >&6; }
7601         if test ! -x "$tool_specified"; then
7602           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7603 $as_echo "not found" >&6; }
7604           as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7605         fi
7606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7607 $as_echo "$tool_specified" >&6; }
7608       fi
7609     fi
7610   fi
7611 
7612 
7613 
7614   if test "x$LN" = x; then
7615     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7616   fi
7617 
7618 
7619 
7620 
7621 
7622   # Publish this variable in the help.
7623 
7624 
7625   if test "x$LS" = x; then
7626     # The variable is not set by user, try to locate tool using the code snippet
7627     for ac_prog in ls
7628 do
7629   # Extract the first word of "$ac_prog", so it can be a program name with args.
7630 set dummy $ac_prog; ac_word=$2
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7632 $as_echo_n "checking for $ac_word... " >&6; }
7633 if ${ac_cv_path_LS+:} false; then :
7634   $as_echo_n "(cached) " >&6
7635 else
7636   case $LS in
7637   [\\/]* | ?:[\\/]*)
7638   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7639   ;;
7640   *)
7641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642 for as_dir in $PATH
7643 do
7644   IFS=$as_save_IFS
7645   test -z "$as_dir" && as_dir=.
7646     for ac_exec_ext in '' $ac_executable_extensions; do
7647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7648     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7650     break 2
7651   fi
7652 done
7653   done
7654 IFS=$as_save_IFS
7655 
7656   ;;
7657 esac
7658 fi
7659 LS=$ac_cv_path_LS
7660 if test -n "$LS"; then
7661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7662 $as_echo "$LS" >&6; }
7663 else
7664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665 $as_echo "no" >&6; }
7666 fi
7667 
7668 
7669   test -n "$LS" && break
7670 done
7671 
7672   else
7673     # The variable is set, but is it from the command line or the environment?
7674 
7675     # Try to remove the string !LS! from our list.
7676     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7677     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7678       # If it failed, the variable was not from the command line. Ignore it,
7679       # but warn the user (except for BASH, which is always set by the calling BASH).
7680       if test "xLS" != xBASH; then
7681         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7682 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7683       fi
7684       # Try to locate tool using the code snippet
7685       for ac_prog in ls
7686 do
7687   # Extract the first word of "$ac_prog", so it can be a program name with args.
7688 set dummy $ac_prog; ac_word=$2
7689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7690 $as_echo_n "checking for $ac_word... " >&6; }
7691 if ${ac_cv_path_LS+:} false; then :
7692   $as_echo_n "(cached) " >&6
7693 else
7694   case $LS in
7695   [\\/]* | ?:[\\/]*)
7696   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7697   ;;
7698   *)
7699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7700 for as_dir in $PATH
7701 do
7702   IFS=$as_save_IFS
7703   test -z "$as_dir" && as_dir=.
7704     for ac_exec_ext in '' $ac_executable_extensions; do
7705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7706     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7708     break 2
7709   fi
7710 done
7711   done
7712 IFS=$as_save_IFS
7713 
7714   ;;
7715 esac
7716 fi
7717 LS=$ac_cv_path_LS
7718 if test -n "$LS"; then
7719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7720 $as_echo "$LS" >&6; }
7721 else
7722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7723 $as_echo "no" >&6; }
7724 fi
7725 
7726 
7727   test -n "$LS" && break
7728 done
7729 
7730     else
7731       # If it succeeded, then it was overridden by the user. We will use it
7732       # for the tool.
7733 
7734       # First remove it from the list of overridden variables, so we can test
7735       # for unknown variables in the end.
7736       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7737 
7738       # Check if the provided tool contains a complete path.
7739       tool_specified="$LS"
7740       tool_basename="${tool_specified##*/}"
7741       if test "x$tool_basename" = "x$tool_specified"; then
7742         # A command without a complete path is provided, search $PATH.
7743         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7744 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7745         # Extract the first word of "$tool_basename", so it can be a program name with args.
7746 set dummy $tool_basename; ac_word=$2
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7748 $as_echo_n "checking for $ac_word... " >&6; }
7749 if ${ac_cv_path_LS+:} false; then :
7750   $as_echo_n "(cached) " >&6
7751 else
7752   case $LS in
7753   [\\/]* | ?:[\\/]*)
7754   ac_cv_path_LS="$LS" # Let the user override the test with a path.
7755   ;;
7756   *)
7757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7758 for as_dir in $PATH
7759 do
7760   IFS=$as_save_IFS
7761   test -z "$as_dir" && as_dir=.
7762     for ac_exec_ext in '' $ac_executable_extensions; do
7763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7764     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7766     break 2
7767   fi
7768 done
7769   done
7770 IFS=$as_save_IFS
7771 
7772   ;;
7773 esac
7774 fi
7775 LS=$ac_cv_path_LS
7776 if test -n "$LS"; then
7777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7778 $as_echo "$LS" >&6; }
7779 else
7780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7781 $as_echo "no" >&6; }
7782 fi
7783 
7784 
7785         if test "x$LS" = x; then
7786           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7787         fi
7788       else
7789         # Otherwise we believe it is a complete path. Use it as it is.
7790         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7791 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7792         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7793 $as_echo_n "checking for LS... " >&6; }
7794         if test ! -x "$tool_specified"; then
7795           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7796 $as_echo "not found" >&6; }
7797           as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7798         fi
7799         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7800 $as_echo "$tool_specified" >&6; }
7801       fi
7802     fi
7803   fi
7804 
7805 
7806 
7807   if test "x$LS" = x; then
7808     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7809   fi
7810 
7811 
7812 
7813 
7814 
7815   # Publish this variable in the help.
7816 
7817 
7818   if test "x$MKDIR" = x; then
7819     # The variable is not set by user, try to locate tool using the code snippet
7820     for ac_prog in mkdir
7821 do
7822   # Extract the first word of "$ac_prog", so it can be a program name with args.
7823 set dummy $ac_prog; ac_word=$2
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7825 $as_echo_n "checking for $ac_word... " >&6; }
7826 if ${ac_cv_path_MKDIR+:} false; then :
7827   $as_echo_n "(cached) " >&6
7828 else
7829   case $MKDIR in
7830   [\\/]* | ?:[\\/]*)
7831   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7832   ;;
7833   *)
7834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7835 for as_dir in $PATH
7836 do
7837   IFS=$as_save_IFS
7838   test -z "$as_dir" && as_dir=.
7839     for ac_exec_ext in '' $ac_executable_extensions; do
7840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7841     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7843     break 2
7844   fi
7845 done
7846   done
7847 IFS=$as_save_IFS
7848 
7849   ;;
7850 esac
7851 fi
7852 MKDIR=$ac_cv_path_MKDIR
7853 if test -n "$MKDIR"; then
7854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7855 $as_echo "$MKDIR" >&6; }
7856 else
7857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7858 $as_echo "no" >&6; }
7859 fi
7860 
7861 
7862   test -n "$MKDIR" && break
7863 done
7864 
7865   else
7866     # The variable is set, but is it from the command line or the environment?
7867 
7868     # Try to remove the string !MKDIR! from our list.
7869     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7870     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7871       # If it failed, the variable was not from the command line. Ignore it,
7872       # but warn the user (except for BASH, which is always set by the calling BASH).
7873       if test "xMKDIR" != xBASH; then
7874         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7875 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7876       fi
7877       # Try to locate tool using the code snippet
7878       for ac_prog in mkdir
7879 do
7880   # Extract the first word of "$ac_prog", so it can be a program name with args.
7881 set dummy $ac_prog; ac_word=$2
7882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7883 $as_echo_n "checking for $ac_word... " >&6; }
7884 if ${ac_cv_path_MKDIR+:} false; then :
7885   $as_echo_n "(cached) " >&6
7886 else
7887   case $MKDIR in
7888   [\\/]* | ?:[\\/]*)
7889   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7890   ;;
7891   *)
7892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7893 for as_dir in $PATH
7894 do
7895   IFS=$as_save_IFS
7896   test -z "$as_dir" && as_dir=.
7897     for ac_exec_ext in '' $ac_executable_extensions; do
7898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7899     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7901     break 2
7902   fi
7903 done
7904   done
7905 IFS=$as_save_IFS
7906 
7907   ;;
7908 esac
7909 fi
7910 MKDIR=$ac_cv_path_MKDIR
7911 if test -n "$MKDIR"; then
7912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7913 $as_echo "$MKDIR" >&6; }
7914 else
7915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7916 $as_echo "no" >&6; }
7917 fi
7918 
7919 
7920   test -n "$MKDIR" && break
7921 done
7922 
7923     else
7924       # If it succeeded, then it was overridden by the user. We will use it
7925       # for the tool.
7926 
7927       # First remove it from the list of overridden variables, so we can test
7928       # for unknown variables in the end.
7929       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7930 
7931       # Check if the provided tool contains a complete path.
7932       tool_specified="$MKDIR"
7933       tool_basename="${tool_specified##*/}"
7934       if test "x$tool_basename" = "x$tool_specified"; then
7935         # A command without a complete path is provided, search $PATH.
7936         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
7937 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
7938         # Extract the first word of "$tool_basename", so it can be a program name with args.
7939 set dummy $tool_basename; ac_word=$2
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7941 $as_echo_n "checking for $ac_word... " >&6; }
7942 if ${ac_cv_path_MKDIR+:} false; then :
7943   $as_echo_n "(cached) " >&6
7944 else
7945   case $MKDIR in
7946   [\\/]* | ?:[\\/]*)
7947   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7948   ;;
7949   *)
7950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951 for as_dir in $PATH
7952 do
7953   IFS=$as_save_IFS
7954   test -z "$as_dir" && as_dir=.
7955     for ac_exec_ext in '' $ac_executable_extensions; do
7956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7957     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7959     break 2
7960   fi
7961 done
7962   done
7963 IFS=$as_save_IFS
7964 
7965   ;;
7966 esac
7967 fi
7968 MKDIR=$ac_cv_path_MKDIR
7969 if test -n "$MKDIR"; then
7970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7971 $as_echo "$MKDIR" >&6; }
7972 else
7973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7974 $as_echo "no" >&6; }
7975 fi
7976 
7977 
7978         if test "x$MKDIR" = x; then
7979           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7980         fi
7981       else
7982         # Otherwise we believe it is a complete path. Use it as it is.
7983         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
7984 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
7985         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
7986 $as_echo_n "checking for MKDIR... " >&6; }
7987         if test ! -x "$tool_specified"; then
7988           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7989 $as_echo "not found" >&6; }
7990           as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
7991         fi
7992         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7993 $as_echo "$tool_specified" >&6; }
7994       fi
7995     fi
7996   fi
7997 
7998 
7999 
8000   if test "x$MKDIR" = x; then
8001     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8002   fi
8003 
8004 
8005 
8006 
8007 
8008   # Publish this variable in the help.
8009 
8010 
8011   if test "x$MKTEMP" = x; then
8012     # The variable is not set by user, try to locate tool using the code snippet
8013     for ac_prog in mktemp
8014 do
8015   # Extract the first word of "$ac_prog", so it can be a program name with args.
8016 set dummy $ac_prog; ac_word=$2
8017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8018 $as_echo_n "checking for $ac_word... " >&6; }
8019 if ${ac_cv_path_MKTEMP+:} false; then :
8020   $as_echo_n "(cached) " >&6
8021 else
8022   case $MKTEMP in
8023   [\\/]* | ?:[\\/]*)
8024   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8025   ;;
8026   *)
8027   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8028 for as_dir in $PATH
8029 do
8030   IFS=$as_save_IFS
8031   test -z "$as_dir" && as_dir=.
8032     for ac_exec_ext in '' $ac_executable_extensions; do
8033   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8034     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8035     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8036     break 2
8037   fi
8038 done
8039   done
8040 IFS=$as_save_IFS
8041 
8042   ;;
8043 esac
8044 fi
8045 MKTEMP=$ac_cv_path_MKTEMP
8046 if test -n "$MKTEMP"; then
8047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8048 $as_echo "$MKTEMP" >&6; }
8049 else
8050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8051 $as_echo "no" >&6; }
8052 fi
8053 
8054 
8055   test -n "$MKTEMP" && break
8056 done
8057 
8058   else
8059     # The variable is set, but is it from the command line or the environment?
8060 
8061     # Try to remove the string !MKTEMP! from our list.
8062     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8063     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8064       # If it failed, the variable was not from the command line. Ignore it,
8065       # but warn the user (except for BASH, which is always set by the calling BASH).
8066       if test "xMKTEMP" != xBASH; then
8067         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8068 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8069       fi
8070       # Try to locate tool using the code snippet
8071       for ac_prog in mktemp
8072 do
8073   # Extract the first word of "$ac_prog", so it can be a program name with args.
8074 set dummy $ac_prog; ac_word=$2
8075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8076 $as_echo_n "checking for $ac_word... " >&6; }
8077 if ${ac_cv_path_MKTEMP+:} false; then :
8078   $as_echo_n "(cached) " >&6
8079 else
8080   case $MKTEMP in
8081   [\\/]* | ?:[\\/]*)
8082   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8083   ;;
8084   *)
8085   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8086 for as_dir in $PATH
8087 do
8088   IFS=$as_save_IFS
8089   test -z "$as_dir" && as_dir=.
8090     for ac_exec_ext in '' $ac_executable_extensions; do
8091   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8092     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8093     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8094     break 2
8095   fi
8096 done
8097   done
8098 IFS=$as_save_IFS
8099 
8100   ;;
8101 esac
8102 fi
8103 MKTEMP=$ac_cv_path_MKTEMP
8104 if test -n "$MKTEMP"; then
8105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8106 $as_echo "$MKTEMP" >&6; }
8107 else
8108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109 $as_echo "no" >&6; }
8110 fi
8111 
8112 
8113   test -n "$MKTEMP" && break
8114 done
8115 
8116     else
8117       # If it succeeded, then it was overridden by the user. We will use it
8118       # for the tool.
8119 
8120       # First remove it from the list of overridden variables, so we can test
8121       # for unknown variables in the end.
8122       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8123 
8124       # Check if the provided tool contains a complete path.
8125       tool_specified="$MKTEMP"
8126       tool_basename="${tool_specified##*/}"
8127       if test "x$tool_basename" = "x$tool_specified"; then
8128         # A command without a complete path is provided, search $PATH.
8129         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8130 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8131         # Extract the first word of "$tool_basename", so it can be a program name with args.
8132 set dummy $tool_basename; ac_word=$2
8133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8134 $as_echo_n "checking for $ac_word... " >&6; }
8135 if ${ac_cv_path_MKTEMP+:} false; then :
8136   $as_echo_n "(cached) " >&6
8137 else
8138   case $MKTEMP in
8139   [\\/]* | ?:[\\/]*)
8140   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8141   ;;
8142   *)
8143   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8144 for as_dir in $PATH
8145 do
8146   IFS=$as_save_IFS
8147   test -z "$as_dir" && as_dir=.
8148     for ac_exec_ext in '' $ac_executable_extensions; do
8149   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8150     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8151     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8152     break 2
8153   fi
8154 done
8155   done
8156 IFS=$as_save_IFS
8157 
8158   ;;
8159 esac
8160 fi
8161 MKTEMP=$ac_cv_path_MKTEMP
8162 if test -n "$MKTEMP"; then
8163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8164 $as_echo "$MKTEMP" >&6; }
8165 else
8166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8167 $as_echo "no" >&6; }
8168 fi
8169 
8170 
8171         if test "x$MKTEMP" = x; then
8172           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8173         fi
8174       else
8175         # Otherwise we believe it is a complete path. Use it as it is.
8176         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8177 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8178         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8179 $as_echo_n "checking for MKTEMP... " >&6; }
8180         if test ! -x "$tool_specified"; then
8181           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8182 $as_echo "not found" >&6; }
8183           as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8184         fi
8185         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8186 $as_echo "$tool_specified" >&6; }
8187       fi
8188     fi
8189   fi
8190 
8191 
8192 
8193   if test "x$MKTEMP" = x; then
8194     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8195   fi
8196 
8197 
8198 
8199 
8200 
8201   # Publish this variable in the help.
8202 
8203 
8204   if test "x$MV" = x; then
8205     # The variable is not set by user, try to locate tool using the code snippet
8206     for ac_prog in mv
8207 do
8208   # Extract the first word of "$ac_prog", so it can be a program name with args.
8209 set dummy $ac_prog; ac_word=$2
8210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8211 $as_echo_n "checking for $ac_word... " >&6; }
8212 if ${ac_cv_path_MV+:} false; then :
8213   $as_echo_n "(cached) " >&6
8214 else
8215   case $MV in
8216   [\\/]* | ?:[\\/]*)
8217   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8218   ;;
8219   *)
8220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8221 for as_dir in $PATH
8222 do
8223   IFS=$as_save_IFS
8224   test -z "$as_dir" && as_dir=.
8225     for ac_exec_ext in '' $ac_executable_extensions; do
8226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8227     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8229     break 2
8230   fi
8231 done
8232   done
8233 IFS=$as_save_IFS
8234 
8235   ;;
8236 esac
8237 fi
8238 MV=$ac_cv_path_MV
8239 if test -n "$MV"; then
8240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8241 $as_echo "$MV" >&6; }
8242 else
8243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8244 $as_echo "no" >&6; }
8245 fi
8246 
8247 
8248   test -n "$MV" && break
8249 done
8250 
8251   else
8252     # The variable is set, but is it from the command line or the environment?
8253 
8254     # Try to remove the string !MV! from our list.
8255     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8256     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8257       # If it failed, the variable was not from the command line. Ignore it,
8258       # but warn the user (except for BASH, which is always set by the calling BASH).
8259       if test "xMV" != xBASH; then
8260         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8261 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8262       fi
8263       # Try to locate tool using the code snippet
8264       for ac_prog in mv
8265 do
8266   # Extract the first word of "$ac_prog", so it can be a program name with args.
8267 set dummy $ac_prog; ac_word=$2
8268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8269 $as_echo_n "checking for $ac_word... " >&6; }
8270 if ${ac_cv_path_MV+:} false; then :
8271   $as_echo_n "(cached) " >&6
8272 else
8273   case $MV in
8274   [\\/]* | ?:[\\/]*)
8275   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8276   ;;
8277   *)
8278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8279 for as_dir in $PATH
8280 do
8281   IFS=$as_save_IFS
8282   test -z "$as_dir" && as_dir=.
8283     for ac_exec_ext in '' $ac_executable_extensions; do
8284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8285     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8287     break 2
8288   fi
8289 done
8290   done
8291 IFS=$as_save_IFS
8292 
8293   ;;
8294 esac
8295 fi
8296 MV=$ac_cv_path_MV
8297 if test -n "$MV"; then
8298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8299 $as_echo "$MV" >&6; }
8300 else
8301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8302 $as_echo "no" >&6; }
8303 fi
8304 
8305 
8306   test -n "$MV" && break
8307 done
8308 
8309     else
8310       # If it succeeded, then it was overridden by the user. We will use it
8311       # for the tool.
8312 
8313       # First remove it from the list of overridden variables, so we can test
8314       # for unknown variables in the end.
8315       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8316 
8317       # Check if the provided tool contains a complete path.
8318       tool_specified="$MV"
8319       tool_basename="${tool_specified##*/}"
8320       if test "x$tool_basename" = "x$tool_specified"; then
8321         # A command without a complete path is provided, search $PATH.
8322         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8323 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8324         # Extract the first word of "$tool_basename", so it can be a program name with args.
8325 set dummy $tool_basename; ac_word=$2
8326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8327 $as_echo_n "checking for $ac_word... " >&6; }
8328 if ${ac_cv_path_MV+:} false; then :
8329   $as_echo_n "(cached) " >&6
8330 else
8331   case $MV in
8332   [\\/]* | ?:[\\/]*)
8333   ac_cv_path_MV="$MV" # Let the user override the test with a path.
8334   ;;
8335   *)
8336   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8337 for as_dir in $PATH
8338 do
8339   IFS=$as_save_IFS
8340   test -z "$as_dir" && as_dir=.
8341     for ac_exec_ext in '' $ac_executable_extensions; do
8342   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8343     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8344     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8345     break 2
8346   fi
8347 done
8348   done
8349 IFS=$as_save_IFS
8350 
8351   ;;
8352 esac
8353 fi
8354 MV=$ac_cv_path_MV
8355 if test -n "$MV"; then
8356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8357 $as_echo "$MV" >&6; }
8358 else
8359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8360 $as_echo "no" >&6; }
8361 fi
8362 
8363 
8364         if test "x$MV" = x; then
8365           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8366         fi
8367       else
8368         # Otherwise we believe it is a complete path. Use it as it is.
8369         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8370 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8371         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8372 $as_echo_n "checking for MV... " >&6; }
8373         if test ! -x "$tool_specified"; then
8374           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8375 $as_echo "not found" >&6; }
8376           as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8377         fi
8378         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8379 $as_echo "$tool_specified" >&6; }
8380       fi
8381     fi
8382   fi
8383 
8384 
8385 
8386   if test "x$MV" = x; then
8387     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8388   fi
8389 
8390 
8391 
8392 
8393 
8394   # Publish this variable in the help.
8395 
8396 
8397   if test "x$NAWK" = x; then
8398     # The variable is not set by user, try to locate tool using the code snippet
8399     for ac_prog in nawk gawk awk
8400 do
8401   # Extract the first word of "$ac_prog", so it can be a program name with args.
8402 set dummy $ac_prog; ac_word=$2
8403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8404 $as_echo_n "checking for $ac_word... " >&6; }
8405 if ${ac_cv_path_NAWK+:} false; then :
8406   $as_echo_n "(cached) " >&6
8407 else
8408   case $NAWK in
8409   [\\/]* | ?:[\\/]*)
8410   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8411   ;;
8412   *)
8413   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8414 for as_dir in $PATH
8415 do
8416   IFS=$as_save_IFS
8417   test -z "$as_dir" && as_dir=.
8418     for ac_exec_ext in '' $ac_executable_extensions; do
8419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8420     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8422     break 2
8423   fi
8424 done
8425   done
8426 IFS=$as_save_IFS
8427 
8428   ;;
8429 esac
8430 fi
8431 NAWK=$ac_cv_path_NAWK
8432 if test -n "$NAWK"; then
8433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8434 $as_echo "$NAWK" >&6; }
8435 else
8436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8437 $as_echo "no" >&6; }
8438 fi
8439 
8440 
8441   test -n "$NAWK" && break
8442 done
8443 
8444   else
8445     # The variable is set, but is it from the command line or the environment?
8446 
8447     # Try to remove the string !NAWK! from our list.
8448     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8449     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8450       # If it failed, the variable was not from the command line. Ignore it,
8451       # but warn the user (except for BASH, which is always set by the calling BASH).
8452       if test "xNAWK" != xBASH; then
8453         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8454 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8455       fi
8456       # Try to locate tool using the code snippet
8457       for ac_prog in nawk gawk awk
8458 do
8459   # Extract the first word of "$ac_prog", so it can be a program name with args.
8460 set dummy $ac_prog; ac_word=$2
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8462 $as_echo_n "checking for $ac_word... " >&6; }
8463 if ${ac_cv_path_NAWK+:} false; then :
8464   $as_echo_n "(cached) " >&6
8465 else
8466   case $NAWK in
8467   [\\/]* | ?:[\\/]*)
8468   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8469   ;;
8470   *)
8471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8472 for as_dir in $PATH
8473 do
8474   IFS=$as_save_IFS
8475   test -z "$as_dir" && as_dir=.
8476     for ac_exec_ext in '' $ac_executable_extensions; do
8477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8478     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8480     break 2
8481   fi
8482 done
8483   done
8484 IFS=$as_save_IFS
8485 
8486   ;;
8487 esac
8488 fi
8489 NAWK=$ac_cv_path_NAWK
8490 if test -n "$NAWK"; then
8491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8492 $as_echo "$NAWK" >&6; }
8493 else
8494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8495 $as_echo "no" >&6; }
8496 fi
8497 
8498 
8499   test -n "$NAWK" && break
8500 done
8501 
8502     else
8503       # If it succeeded, then it was overridden by the user. We will use it
8504       # for the tool.
8505 
8506       # First remove it from the list of overridden variables, so we can test
8507       # for unknown variables in the end.
8508       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8509 
8510       # Check if the provided tool contains a complete path.
8511       tool_specified="$NAWK"
8512       tool_basename="${tool_specified##*/}"
8513       if test "x$tool_basename" = "x$tool_specified"; then
8514         # A command without a complete path is provided, search $PATH.
8515         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8516 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8517         # Extract the first word of "$tool_basename", so it can be a program name with args.
8518 set dummy $tool_basename; ac_word=$2
8519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8520 $as_echo_n "checking for $ac_word... " >&6; }
8521 if ${ac_cv_path_NAWK+:} false; then :
8522   $as_echo_n "(cached) " >&6
8523 else
8524   case $NAWK in
8525   [\\/]* | ?:[\\/]*)
8526   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8527   ;;
8528   *)
8529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8530 for as_dir in $PATH
8531 do
8532   IFS=$as_save_IFS
8533   test -z "$as_dir" && as_dir=.
8534     for ac_exec_ext in '' $ac_executable_extensions; do
8535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8536     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8538     break 2
8539   fi
8540 done
8541   done
8542 IFS=$as_save_IFS
8543 
8544   ;;
8545 esac
8546 fi
8547 NAWK=$ac_cv_path_NAWK
8548 if test -n "$NAWK"; then
8549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8550 $as_echo "$NAWK" >&6; }
8551 else
8552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8553 $as_echo "no" >&6; }
8554 fi
8555 
8556 
8557         if test "x$NAWK" = x; then
8558           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8559         fi
8560       else
8561         # Otherwise we believe it is a complete path. Use it as it is.
8562         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8563 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8564         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8565 $as_echo_n "checking for NAWK... " >&6; }
8566         if test ! -x "$tool_specified"; then
8567           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8568 $as_echo "not found" >&6; }
8569           as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8570         fi
8571         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8572 $as_echo "$tool_specified" >&6; }
8573       fi
8574     fi
8575   fi
8576 
8577 
8578 
8579   if test "x$NAWK" = x; then
8580     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8581   fi
8582 
8583 
8584 
8585 
8586 
8587   # Publish this variable in the help.
8588 
8589 
8590   if test "x$PRINTF" = x; then
8591     # The variable is not set by user, try to locate tool using the code snippet
8592     for ac_prog in printf
8593 do
8594   # Extract the first word of "$ac_prog", so it can be a program name with args.
8595 set dummy $ac_prog; ac_word=$2
8596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8597 $as_echo_n "checking for $ac_word... " >&6; }
8598 if ${ac_cv_path_PRINTF+:} false; then :
8599   $as_echo_n "(cached) " >&6
8600 else
8601   case $PRINTF in
8602   [\\/]* | ?:[\\/]*)
8603   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8604   ;;
8605   *)
8606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8607 for as_dir in $PATH
8608 do
8609   IFS=$as_save_IFS
8610   test -z "$as_dir" && as_dir=.
8611     for ac_exec_ext in '' $ac_executable_extensions; do
8612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8613     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8615     break 2
8616   fi
8617 done
8618   done
8619 IFS=$as_save_IFS
8620 
8621   ;;
8622 esac
8623 fi
8624 PRINTF=$ac_cv_path_PRINTF
8625 if test -n "$PRINTF"; then
8626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8627 $as_echo "$PRINTF" >&6; }
8628 else
8629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8630 $as_echo "no" >&6; }
8631 fi
8632 
8633 
8634   test -n "$PRINTF" && break
8635 done
8636 
8637   else
8638     # The variable is set, but is it from the command line or the environment?
8639 
8640     # Try to remove the string !PRINTF! from our list.
8641     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8642     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8643       # If it failed, the variable was not from the command line. Ignore it,
8644       # but warn the user (except for BASH, which is always set by the calling BASH).
8645       if test "xPRINTF" != xBASH; then
8646         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8647 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8648       fi
8649       # Try to locate tool using the code snippet
8650       for ac_prog in printf
8651 do
8652   # Extract the first word of "$ac_prog", so it can be a program name with args.
8653 set dummy $ac_prog; ac_word=$2
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8655 $as_echo_n "checking for $ac_word... " >&6; }
8656 if ${ac_cv_path_PRINTF+:} false; then :
8657   $as_echo_n "(cached) " >&6
8658 else
8659   case $PRINTF in
8660   [\\/]* | ?:[\\/]*)
8661   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8662   ;;
8663   *)
8664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8665 for as_dir in $PATH
8666 do
8667   IFS=$as_save_IFS
8668   test -z "$as_dir" && as_dir=.
8669     for ac_exec_ext in '' $ac_executable_extensions; do
8670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8671     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8673     break 2
8674   fi
8675 done
8676   done
8677 IFS=$as_save_IFS
8678 
8679   ;;
8680 esac
8681 fi
8682 PRINTF=$ac_cv_path_PRINTF
8683 if test -n "$PRINTF"; then
8684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8685 $as_echo "$PRINTF" >&6; }
8686 else
8687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8688 $as_echo "no" >&6; }
8689 fi
8690 
8691 
8692   test -n "$PRINTF" && break
8693 done
8694 
8695     else
8696       # If it succeeded, then it was overridden by the user. We will use it
8697       # for the tool.
8698 
8699       # First remove it from the list of overridden variables, so we can test
8700       # for unknown variables in the end.
8701       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8702 
8703       # Check if the provided tool contains a complete path.
8704       tool_specified="$PRINTF"
8705       tool_basename="${tool_specified##*/}"
8706       if test "x$tool_basename" = "x$tool_specified"; then
8707         # A command without a complete path is provided, search $PATH.
8708         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8709 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8710         # Extract the first word of "$tool_basename", so it can be a program name with args.
8711 set dummy $tool_basename; ac_word=$2
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8713 $as_echo_n "checking for $ac_word... " >&6; }
8714 if ${ac_cv_path_PRINTF+:} false; then :
8715   $as_echo_n "(cached) " >&6
8716 else
8717   case $PRINTF in
8718   [\\/]* | ?:[\\/]*)
8719   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8720   ;;
8721   *)
8722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8723 for as_dir in $PATH
8724 do
8725   IFS=$as_save_IFS
8726   test -z "$as_dir" && as_dir=.
8727     for ac_exec_ext in '' $ac_executable_extensions; do
8728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8729     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8731     break 2
8732   fi
8733 done
8734   done
8735 IFS=$as_save_IFS
8736 
8737   ;;
8738 esac
8739 fi
8740 PRINTF=$ac_cv_path_PRINTF
8741 if test -n "$PRINTF"; then
8742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8743 $as_echo "$PRINTF" >&6; }
8744 else
8745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8746 $as_echo "no" >&6; }
8747 fi
8748 
8749 
8750         if test "x$PRINTF" = x; then
8751           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8752         fi
8753       else
8754         # Otherwise we believe it is a complete path. Use it as it is.
8755         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8756 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8757         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8758 $as_echo_n "checking for PRINTF... " >&6; }
8759         if test ! -x "$tool_specified"; then
8760           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8761 $as_echo "not found" >&6; }
8762           as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8763         fi
8764         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8765 $as_echo "$tool_specified" >&6; }
8766       fi
8767     fi
8768   fi
8769 
8770 
8771 
8772   if test "x$PRINTF" = x; then
8773     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8774   fi
8775 
8776 
8777 
8778 
8779 
8780   # Publish this variable in the help.
8781 
8782 
8783   if test "x$RM" = x; then
8784     # The variable is not set by user, try to locate tool using the code snippet
8785     for ac_prog in rm
8786 do
8787   # Extract the first word of "$ac_prog", so it can be a program name with args.
8788 set dummy $ac_prog; ac_word=$2
8789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8790 $as_echo_n "checking for $ac_word... " >&6; }
8791 if ${ac_cv_path_RM+:} false; then :
8792   $as_echo_n "(cached) " >&6
8793 else
8794   case $RM in
8795   [\\/]* | ?:[\\/]*)
8796   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8797   ;;
8798   *)
8799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8800 for as_dir in $PATH
8801 do
8802   IFS=$as_save_IFS
8803   test -z "$as_dir" && as_dir=.
8804     for ac_exec_ext in '' $ac_executable_extensions; do
8805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8806     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8808     break 2
8809   fi
8810 done
8811   done
8812 IFS=$as_save_IFS
8813 
8814   ;;
8815 esac
8816 fi
8817 RM=$ac_cv_path_RM
8818 if test -n "$RM"; then
8819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8820 $as_echo "$RM" >&6; }
8821 else
8822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8823 $as_echo "no" >&6; }
8824 fi
8825 
8826 
8827   test -n "$RM" && break
8828 done
8829 
8830   else
8831     # The variable is set, but is it from the command line or the environment?
8832 
8833     # Try to remove the string !RM! from our list.
8834     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8835     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8836       # If it failed, the variable was not from the command line. Ignore it,
8837       # but warn the user (except for BASH, which is always set by the calling BASH).
8838       if test "xRM" != xBASH; then
8839         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8840 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8841       fi
8842       # Try to locate tool using the code snippet
8843       for ac_prog in rm
8844 do
8845   # Extract the first word of "$ac_prog", so it can be a program name with args.
8846 set dummy $ac_prog; ac_word=$2
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8848 $as_echo_n "checking for $ac_word... " >&6; }
8849 if ${ac_cv_path_RM+:} false; then :
8850   $as_echo_n "(cached) " >&6
8851 else
8852   case $RM in
8853   [\\/]* | ?:[\\/]*)
8854   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8855   ;;
8856   *)
8857   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8858 for as_dir in $PATH
8859 do
8860   IFS=$as_save_IFS
8861   test -z "$as_dir" && as_dir=.
8862     for ac_exec_ext in '' $ac_executable_extensions; do
8863   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8864     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8865     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8866     break 2
8867   fi
8868 done
8869   done
8870 IFS=$as_save_IFS
8871 
8872   ;;
8873 esac
8874 fi
8875 RM=$ac_cv_path_RM
8876 if test -n "$RM"; then
8877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8878 $as_echo "$RM" >&6; }
8879 else
8880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8881 $as_echo "no" >&6; }
8882 fi
8883 
8884 
8885   test -n "$RM" && break
8886 done
8887 
8888     else
8889       # If it succeeded, then it was overridden by the user. We will use it
8890       # for the tool.
8891 
8892       # First remove it from the list of overridden variables, so we can test
8893       # for unknown variables in the end.
8894       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8895 
8896       # Check if the provided tool contains a complete path.
8897       tool_specified="$RM"
8898       tool_basename="${tool_specified##*/}"
8899       if test "x$tool_basename" = "x$tool_specified"; then
8900         # A command without a complete path is provided, search $PATH.
8901         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8902 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8903         # Extract the first word of "$tool_basename", so it can be a program name with args.
8904 set dummy $tool_basename; ac_word=$2
8905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8906 $as_echo_n "checking for $ac_word... " >&6; }
8907 if ${ac_cv_path_RM+:} false; then :
8908   $as_echo_n "(cached) " >&6
8909 else
8910   case $RM in
8911   [\\/]* | ?:[\\/]*)
8912   ac_cv_path_RM="$RM" # Let the user override the test with a path.
8913   ;;
8914   *)
8915   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8916 for as_dir in $PATH
8917 do
8918   IFS=$as_save_IFS
8919   test -z "$as_dir" && as_dir=.
8920     for ac_exec_ext in '' $ac_executable_extensions; do
8921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8922     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8924     break 2
8925   fi
8926 done
8927   done
8928 IFS=$as_save_IFS
8929 
8930   ;;
8931 esac
8932 fi
8933 RM=$ac_cv_path_RM
8934 if test -n "$RM"; then
8935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8936 $as_echo "$RM" >&6; }
8937 else
8938   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8939 $as_echo "no" >&6; }
8940 fi
8941 
8942 
8943         if test "x$RM" = x; then
8944           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8945         fi
8946       else
8947         # Otherwise we believe it is a complete path. Use it as it is.
8948         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
8949 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
8950         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
8951 $as_echo_n "checking for RM... " >&6; }
8952         if test ! -x "$tool_specified"; then
8953           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8954 $as_echo "not found" >&6; }
8955           as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
8956         fi
8957         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8958 $as_echo "$tool_specified" >&6; }
8959       fi
8960     fi
8961   fi
8962 
8963 
8964 
8965   if test "x$RM" = x; then
8966     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
8967   fi
8968 
8969 
8970 
8971 
8972 
8973   # Publish this variable in the help.
8974 
8975 
8976   if test "x$SH" = x; then
8977     # The variable is not set by user, try to locate tool using the code snippet
8978     for ac_prog in sh
8979 do
8980   # Extract the first word of "$ac_prog", so it can be a program name with args.
8981 set dummy $ac_prog; ac_word=$2
8982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8983 $as_echo_n "checking for $ac_word... " >&6; }
8984 if ${ac_cv_path_SH+:} false; then :
8985   $as_echo_n "(cached) " >&6
8986 else
8987   case $SH in
8988   [\\/]* | ?:[\\/]*)
8989   ac_cv_path_SH="$SH" # Let the user override the test with a path.
8990   ;;
8991   *)
8992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8993 for as_dir in $PATH
8994 do
8995   IFS=$as_save_IFS
8996   test -z "$as_dir" && as_dir=.
8997     for ac_exec_ext in '' $ac_executable_extensions; do
8998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8999     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9001     break 2
9002   fi
9003 done
9004   done
9005 IFS=$as_save_IFS
9006 
9007   ;;
9008 esac
9009 fi
9010 SH=$ac_cv_path_SH
9011 if test -n "$SH"; then
9012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9013 $as_echo "$SH" >&6; }
9014 else
9015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9016 $as_echo "no" >&6; }
9017 fi
9018 
9019 
9020   test -n "$SH" && break
9021 done
9022 
9023   else
9024     # The variable is set, but is it from the command line or the environment?
9025 
9026     # Try to remove the string !SH! from our list.
9027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9029       # If it failed, the variable was not from the command line. Ignore it,
9030       # but warn the user (except for BASH, which is always set by the calling BASH).
9031       if test "xSH" != xBASH; then
9032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9033 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9034       fi
9035       # Try to locate tool using the code snippet
9036       for ac_prog in sh
9037 do
9038   # Extract the first word of "$ac_prog", so it can be a program name with args.
9039 set dummy $ac_prog; ac_word=$2
9040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041 $as_echo_n "checking for $ac_word... " >&6; }
9042 if ${ac_cv_path_SH+:} false; then :
9043   $as_echo_n "(cached) " >&6
9044 else
9045   case $SH in
9046   [\\/]* | ?:[\\/]*)
9047   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9048   ;;
9049   *)
9050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9051 for as_dir in $PATH
9052 do
9053   IFS=$as_save_IFS
9054   test -z "$as_dir" && as_dir=.
9055     for ac_exec_ext in '' $ac_executable_extensions; do
9056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9057     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9059     break 2
9060   fi
9061 done
9062   done
9063 IFS=$as_save_IFS
9064 
9065   ;;
9066 esac
9067 fi
9068 SH=$ac_cv_path_SH
9069 if test -n "$SH"; then
9070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9071 $as_echo "$SH" >&6; }
9072 else
9073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9074 $as_echo "no" >&6; }
9075 fi
9076 
9077 
9078   test -n "$SH" && break
9079 done
9080 
9081     else
9082       # If it succeeded, then it was overridden by the user. We will use it
9083       # for the tool.
9084 
9085       # First remove it from the list of overridden variables, so we can test
9086       # for unknown variables in the end.
9087       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9088 
9089       # Check if the provided tool contains a complete path.
9090       tool_specified="$SH"
9091       tool_basename="${tool_specified##*/}"
9092       if test "x$tool_basename" = "x$tool_specified"; then
9093         # A command without a complete path is provided, search $PATH.
9094         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9095 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9096         # Extract the first word of "$tool_basename", so it can be a program name with args.
9097 set dummy $tool_basename; ac_word=$2
9098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9099 $as_echo_n "checking for $ac_word... " >&6; }
9100 if ${ac_cv_path_SH+:} false; then :
9101   $as_echo_n "(cached) " >&6
9102 else
9103   case $SH in
9104   [\\/]* | ?:[\\/]*)
9105   ac_cv_path_SH="$SH" # Let the user override the test with a path.
9106   ;;
9107   *)
9108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9109 for as_dir in $PATH
9110 do
9111   IFS=$as_save_IFS
9112   test -z "$as_dir" && as_dir=.
9113     for ac_exec_ext in '' $ac_executable_extensions; do
9114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9115     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9117     break 2
9118   fi
9119 done
9120   done
9121 IFS=$as_save_IFS
9122 
9123   ;;
9124 esac
9125 fi
9126 SH=$ac_cv_path_SH
9127 if test -n "$SH"; then
9128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9129 $as_echo "$SH" >&6; }
9130 else
9131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132 $as_echo "no" >&6; }
9133 fi
9134 
9135 
9136         if test "x$SH" = x; then
9137           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9138         fi
9139       else
9140         # Otherwise we believe it is a complete path. Use it as it is.
9141         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9142 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9143         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9144 $as_echo_n "checking for SH... " >&6; }
9145         if test ! -x "$tool_specified"; then
9146           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9147 $as_echo "not found" >&6; }
9148           as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9149         fi
9150         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9151 $as_echo "$tool_specified" >&6; }
9152       fi
9153     fi
9154   fi
9155 
9156 
9157 
9158   if test "x$SH" = x; then
9159     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9160   fi
9161 
9162 
9163 
9164 
9165 
9166   # Publish this variable in the help.
9167 
9168 
9169   if test "x$SORT" = x; then
9170     # The variable is not set by user, try to locate tool using the code snippet
9171     for ac_prog in sort
9172 do
9173   # Extract the first word of "$ac_prog", so it can be a program name with args.
9174 set dummy $ac_prog; ac_word=$2
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9176 $as_echo_n "checking for $ac_word... " >&6; }
9177 if ${ac_cv_path_SORT+:} false; then :
9178   $as_echo_n "(cached) " >&6
9179 else
9180   case $SORT in
9181   [\\/]* | ?:[\\/]*)
9182   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9183   ;;
9184   *)
9185   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9186 for as_dir in $PATH
9187 do
9188   IFS=$as_save_IFS
9189   test -z "$as_dir" && as_dir=.
9190     for ac_exec_ext in '' $ac_executable_extensions; do
9191   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9192     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9193     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9194     break 2
9195   fi
9196 done
9197   done
9198 IFS=$as_save_IFS
9199 
9200   ;;
9201 esac
9202 fi
9203 SORT=$ac_cv_path_SORT
9204 if test -n "$SORT"; then
9205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9206 $as_echo "$SORT" >&6; }
9207 else
9208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9209 $as_echo "no" >&6; }
9210 fi
9211 
9212 
9213   test -n "$SORT" && break
9214 done
9215 
9216   else
9217     # The variable is set, but is it from the command line or the environment?
9218 
9219     # Try to remove the string !SORT! from our list.
9220     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9221     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9222       # If it failed, the variable was not from the command line. Ignore it,
9223       # but warn the user (except for BASH, which is always set by the calling BASH).
9224       if test "xSORT" != xBASH; then
9225         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9226 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9227       fi
9228       # Try to locate tool using the code snippet
9229       for ac_prog in sort
9230 do
9231   # Extract the first word of "$ac_prog", so it can be a program name with args.
9232 set dummy $ac_prog; ac_word=$2
9233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9234 $as_echo_n "checking for $ac_word... " >&6; }
9235 if ${ac_cv_path_SORT+:} false; then :
9236   $as_echo_n "(cached) " >&6
9237 else
9238   case $SORT in
9239   [\\/]* | ?:[\\/]*)
9240   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9241   ;;
9242   *)
9243   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9244 for as_dir in $PATH
9245 do
9246   IFS=$as_save_IFS
9247   test -z "$as_dir" && as_dir=.
9248     for ac_exec_ext in '' $ac_executable_extensions; do
9249   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9250     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9251     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9252     break 2
9253   fi
9254 done
9255   done
9256 IFS=$as_save_IFS
9257 
9258   ;;
9259 esac
9260 fi
9261 SORT=$ac_cv_path_SORT
9262 if test -n "$SORT"; then
9263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9264 $as_echo "$SORT" >&6; }
9265 else
9266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9267 $as_echo "no" >&6; }
9268 fi
9269 
9270 
9271   test -n "$SORT" && break
9272 done
9273 
9274     else
9275       # If it succeeded, then it was overridden by the user. We will use it
9276       # for the tool.
9277 
9278       # First remove it from the list of overridden variables, so we can test
9279       # for unknown variables in the end.
9280       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9281 
9282       # Check if the provided tool contains a complete path.
9283       tool_specified="$SORT"
9284       tool_basename="${tool_specified##*/}"
9285       if test "x$tool_basename" = "x$tool_specified"; then
9286         # A command without a complete path is provided, search $PATH.
9287         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9288 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9289         # Extract the first word of "$tool_basename", so it can be a program name with args.
9290 set dummy $tool_basename; ac_word=$2
9291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9292 $as_echo_n "checking for $ac_word... " >&6; }
9293 if ${ac_cv_path_SORT+:} false; then :
9294   $as_echo_n "(cached) " >&6
9295 else
9296   case $SORT in
9297   [\\/]* | ?:[\\/]*)
9298   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9299   ;;
9300   *)
9301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9302 for as_dir in $PATH
9303 do
9304   IFS=$as_save_IFS
9305   test -z "$as_dir" && as_dir=.
9306     for ac_exec_ext in '' $ac_executable_extensions; do
9307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9308     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9310     break 2
9311   fi
9312 done
9313   done
9314 IFS=$as_save_IFS
9315 
9316   ;;
9317 esac
9318 fi
9319 SORT=$ac_cv_path_SORT
9320 if test -n "$SORT"; then
9321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9322 $as_echo "$SORT" >&6; }
9323 else
9324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9325 $as_echo "no" >&6; }
9326 fi
9327 
9328 
9329         if test "x$SORT" = x; then
9330           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9331         fi
9332       else
9333         # Otherwise we believe it is a complete path. Use it as it is.
9334         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9335 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9336         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9337 $as_echo_n "checking for SORT... " >&6; }
9338         if test ! -x "$tool_specified"; then
9339           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9340 $as_echo "not found" >&6; }
9341           as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9342         fi
9343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9344 $as_echo "$tool_specified" >&6; }
9345       fi
9346     fi
9347   fi
9348 
9349 
9350 
9351   if test "x$SORT" = x; then
9352     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9353   fi
9354 
9355 
9356 
9357 
9358 
9359   # Publish this variable in the help.
9360 
9361 
9362   if test "x$TAIL" = x; then
9363     # The variable is not set by user, try to locate tool using the code snippet
9364     for ac_prog in tail
9365 do
9366   # Extract the first word of "$ac_prog", so it can be a program name with args.
9367 set dummy $ac_prog; ac_word=$2
9368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9369 $as_echo_n "checking for $ac_word... " >&6; }
9370 if ${ac_cv_path_TAIL+:} false; then :
9371   $as_echo_n "(cached) " >&6
9372 else
9373   case $TAIL in
9374   [\\/]* | ?:[\\/]*)
9375   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9376   ;;
9377   *)
9378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9379 for as_dir in $PATH
9380 do
9381   IFS=$as_save_IFS
9382   test -z "$as_dir" && as_dir=.
9383     for ac_exec_ext in '' $ac_executable_extensions; do
9384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9385     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9387     break 2
9388   fi
9389 done
9390   done
9391 IFS=$as_save_IFS
9392 
9393   ;;
9394 esac
9395 fi
9396 TAIL=$ac_cv_path_TAIL
9397 if test -n "$TAIL"; then
9398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9399 $as_echo "$TAIL" >&6; }
9400 else
9401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402 $as_echo "no" >&6; }
9403 fi
9404 
9405 
9406   test -n "$TAIL" && break
9407 done
9408 
9409   else
9410     # The variable is set, but is it from the command line or the environment?
9411 
9412     # Try to remove the string !TAIL! from our list.
9413     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9414     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9415       # If it failed, the variable was not from the command line. Ignore it,
9416       # but warn the user (except for BASH, which is always set by the calling BASH).
9417       if test "xTAIL" != xBASH; then
9418         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9419 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9420       fi
9421       # Try to locate tool using the code snippet
9422       for ac_prog in tail
9423 do
9424   # Extract the first word of "$ac_prog", so it can be a program name with args.
9425 set dummy $ac_prog; ac_word=$2
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427 $as_echo_n "checking for $ac_word... " >&6; }
9428 if ${ac_cv_path_TAIL+:} false; then :
9429   $as_echo_n "(cached) " >&6
9430 else
9431   case $TAIL in
9432   [\\/]* | ?:[\\/]*)
9433   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9434   ;;
9435   *)
9436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437 for as_dir in $PATH
9438 do
9439   IFS=$as_save_IFS
9440   test -z "$as_dir" && as_dir=.
9441     for ac_exec_ext in '' $ac_executable_extensions; do
9442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9443     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445     break 2
9446   fi
9447 done
9448   done
9449 IFS=$as_save_IFS
9450 
9451   ;;
9452 esac
9453 fi
9454 TAIL=$ac_cv_path_TAIL
9455 if test -n "$TAIL"; then
9456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9457 $as_echo "$TAIL" >&6; }
9458 else
9459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460 $as_echo "no" >&6; }
9461 fi
9462 
9463 
9464   test -n "$TAIL" && break
9465 done
9466 
9467     else
9468       # If it succeeded, then it was overridden by the user. We will use it
9469       # for the tool.
9470 
9471       # First remove it from the list of overridden variables, so we can test
9472       # for unknown variables in the end.
9473       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9474 
9475       # Check if the provided tool contains a complete path.
9476       tool_specified="$TAIL"
9477       tool_basename="${tool_specified##*/}"
9478       if test "x$tool_basename" = "x$tool_specified"; then
9479         # A command without a complete path is provided, search $PATH.
9480         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9481 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9482         # Extract the first word of "$tool_basename", so it can be a program name with args.
9483 set dummy $tool_basename; ac_word=$2
9484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9485 $as_echo_n "checking for $ac_word... " >&6; }
9486 if ${ac_cv_path_TAIL+:} false; then :
9487   $as_echo_n "(cached) " >&6
9488 else
9489   case $TAIL in
9490   [\\/]* | ?:[\\/]*)
9491   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9492   ;;
9493   *)
9494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9495 for as_dir in $PATH
9496 do
9497   IFS=$as_save_IFS
9498   test -z "$as_dir" && as_dir=.
9499     for ac_exec_ext in '' $ac_executable_extensions; do
9500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9501     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9503     break 2
9504   fi
9505 done
9506   done
9507 IFS=$as_save_IFS
9508 
9509   ;;
9510 esac
9511 fi
9512 TAIL=$ac_cv_path_TAIL
9513 if test -n "$TAIL"; then
9514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9515 $as_echo "$TAIL" >&6; }
9516 else
9517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9518 $as_echo "no" >&6; }
9519 fi
9520 
9521 
9522         if test "x$TAIL" = x; then
9523           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9524         fi
9525       else
9526         # Otherwise we believe it is a complete path. Use it as it is.
9527         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9528 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9529         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9530 $as_echo_n "checking for TAIL... " >&6; }
9531         if test ! -x "$tool_specified"; then
9532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9533 $as_echo "not found" >&6; }
9534           as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9535         fi
9536         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9537 $as_echo "$tool_specified" >&6; }
9538       fi
9539     fi
9540   fi
9541 
9542 
9543 
9544   if test "x$TAIL" = x; then
9545     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9546   fi
9547 
9548 
9549 
9550 
9551 
9552   # Publish this variable in the help.
9553 
9554 
9555   if test "x$TAR" = x; then
9556     # The variable is not set by user, try to locate tool using the code snippet
9557     for ac_prog in tar
9558 do
9559   # Extract the first word of "$ac_prog", so it can be a program name with args.
9560 set dummy $ac_prog; ac_word=$2
9561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9562 $as_echo_n "checking for $ac_word... " >&6; }
9563 if ${ac_cv_path_TAR+:} false; then :
9564   $as_echo_n "(cached) " >&6
9565 else
9566   case $TAR in
9567   [\\/]* | ?:[\\/]*)
9568   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9569   ;;
9570   *)
9571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9572 for as_dir in $PATH
9573 do
9574   IFS=$as_save_IFS
9575   test -z "$as_dir" && as_dir=.
9576     for ac_exec_ext in '' $ac_executable_extensions; do
9577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9578     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9580     break 2
9581   fi
9582 done
9583   done
9584 IFS=$as_save_IFS
9585 
9586   ;;
9587 esac
9588 fi
9589 TAR=$ac_cv_path_TAR
9590 if test -n "$TAR"; then
9591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9592 $as_echo "$TAR" >&6; }
9593 else
9594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9595 $as_echo "no" >&6; }
9596 fi
9597 
9598 
9599   test -n "$TAR" && break
9600 done
9601 
9602   else
9603     # The variable is set, but is it from the command line or the environment?
9604 
9605     # Try to remove the string !TAR! from our list.
9606     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9607     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9608       # If it failed, the variable was not from the command line. Ignore it,
9609       # but warn the user (except for BASH, which is always set by the calling BASH).
9610       if test "xTAR" != xBASH; then
9611         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9612 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9613       fi
9614       # Try to locate tool using the code snippet
9615       for ac_prog in tar
9616 do
9617   # Extract the first word of "$ac_prog", so it can be a program name with args.
9618 set dummy $ac_prog; ac_word=$2
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9620 $as_echo_n "checking for $ac_word... " >&6; }
9621 if ${ac_cv_path_TAR+:} false; then :
9622   $as_echo_n "(cached) " >&6
9623 else
9624   case $TAR in
9625   [\\/]* | ?:[\\/]*)
9626   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9627   ;;
9628   *)
9629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9630 for as_dir in $PATH
9631 do
9632   IFS=$as_save_IFS
9633   test -z "$as_dir" && as_dir=.
9634     for ac_exec_ext in '' $ac_executable_extensions; do
9635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9636     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9638     break 2
9639   fi
9640 done
9641   done
9642 IFS=$as_save_IFS
9643 
9644   ;;
9645 esac
9646 fi
9647 TAR=$ac_cv_path_TAR
9648 if test -n "$TAR"; then
9649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9650 $as_echo "$TAR" >&6; }
9651 else
9652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9653 $as_echo "no" >&6; }
9654 fi
9655 
9656 
9657   test -n "$TAR" && break
9658 done
9659 
9660     else
9661       # If it succeeded, then it was overridden by the user. We will use it
9662       # for the tool.
9663 
9664       # First remove it from the list of overridden variables, so we can test
9665       # for unknown variables in the end.
9666       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9667 
9668       # Check if the provided tool contains a complete path.
9669       tool_specified="$TAR"
9670       tool_basename="${tool_specified##*/}"
9671       if test "x$tool_basename" = "x$tool_specified"; then
9672         # A command without a complete path is provided, search $PATH.
9673         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9674 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9675         # Extract the first word of "$tool_basename", so it can be a program name with args.
9676 set dummy $tool_basename; ac_word=$2
9677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9678 $as_echo_n "checking for $ac_word... " >&6; }
9679 if ${ac_cv_path_TAR+:} false; then :
9680   $as_echo_n "(cached) " >&6
9681 else
9682   case $TAR in
9683   [\\/]* | ?:[\\/]*)
9684   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9685   ;;
9686   *)
9687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9688 for as_dir in $PATH
9689 do
9690   IFS=$as_save_IFS
9691   test -z "$as_dir" && as_dir=.
9692     for ac_exec_ext in '' $ac_executable_extensions; do
9693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9694     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9696     break 2
9697   fi
9698 done
9699   done
9700 IFS=$as_save_IFS
9701 
9702   ;;
9703 esac
9704 fi
9705 TAR=$ac_cv_path_TAR
9706 if test -n "$TAR"; then
9707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9708 $as_echo "$TAR" >&6; }
9709 else
9710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9711 $as_echo "no" >&6; }
9712 fi
9713 
9714 
9715         if test "x$TAR" = x; then
9716           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9717         fi
9718       else
9719         # Otherwise we believe it is a complete path. Use it as it is.
9720         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9721 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9722         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9723 $as_echo_n "checking for TAR... " >&6; }
9724         if test ! -x "$tool_specified"; then
9725           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9726 $as_echo "not found" >&6; }
9727           as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9728         fi
9729         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9730 $as_echo "$tool_specified" >&6; }
9731       fi
9732     fi
9733   fi
9734 
9735 
9736 
9737   if test "x$TAR" = x; then
9738     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9739   fi
9740 
9741 
9742 
9743 
9744 
9745   # Publish this variable in the help.
9746 
9747 
9748   if test "x$TEE" = x; then
9749     # The variable is not set by user, try to locate tool using the code snippet
9750     for ac_prog in tee
9751 do
9752   # Extract the first word of "$ac_prog", so it can be a program name with args.
9753 set dummy $ac_prog; ac_word=$2
9754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755 $as_echo_n "checking for $ac_word... " >&6; }
9756 if ${ac_cv_path_TEE+:} false; then :
9757   $as_echo_n "(cached) " >&6
9758 else
9759   case $TEE in
9760   [\\/]* | ?:[\\/]*)
9761   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9762   ;;
9763   *)
9764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9765 for as_dir in $PATH
9766 do
9767   IFS=$as_save_IFS
9768   test -z "$as_dir" && as_dir=.
9769     for ac_exec_ext in '' $ac_executable_extensions; do
9770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9771     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9773     break 2
9774   fi
9775 done
9776   done
9777 IFS=$as_save_IFS
9778 
9779   ;;
9780 esac
9781 fi
9782 TEE=$ac_cv_path_TEE
9783 if test -n "$TEE"; then
9784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9785 $as_echo "$TEE" >&6; }
9786 else
9787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788 $as_echo "no" >&6; }
9789 fi
9790 
9791 
9792   test -n "$TEE" && break
9793 done
9794 
9795   else
9796     # The variable is set, but is it from the command line or the environment?
9797 
9798     # Try to remove the string !TEE! from our list.
9799     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9800     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9801       # If it failed, the variable was not from the command line. Ignore it,
9802       # but warn the user (except for BASH, which is always set by the calling BASH).
9803       if test "xTEE" != xBASH; then
9804         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9805 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9806       fi
9807       # Try to locate tool using the code snippet
9808       for ac_prog in tee
9809 do
9810   # Extract the first word of "$ac_prog", so it can be a program name with args.
9811 set dummy $ac_prog; ac_word=$2
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9813 $as_echo_n "checking for $ac_word... " >&6; }
9814 if ${ac_cv_path_TEE+:} false; then :
9815   $as_echo_n "(cached) " >&6
9816 else
9817   case $TEE in
9818   [\\/]* | ?:[\\/]*)
9819   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9820   ;;
9821   *)
9822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9823 for as_dir in $PATH
9824 do
9825   IFS=$as_save_IFS
9826   test -z "$as_dir" && as_dir=.
9827     for ac_exec_ext in '' $ac_executable_extensions; do
9828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9829     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9831     break 2
9832   fi
9833 done
9834   done
9835 IFS=$as_save_IFS
9836 
9837   ;;
9838 esac
9839 fi
9840 TEE=$ac_cv_path_TEE
9841 if test -n "$TEE"; then
9842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9843 $as_echo "$TEE" >&6; }
9844 else
9845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9846 $as_echo "no" >&6; }
9847 fi
9848 
9849 
9850   test -n "$TEE" && break
9851 done
9852 
9853     else
9854       # If it succeeded, then it was overridden by the user. We will use it
9855       # for the tool.
9856 
9857       # First remove it from the list of overridden variables, so we can test
9858       # for unknown variables in the end.
9859       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9860 
9861       # Check if the provided tool contains a complete path.
9862       tool_specified="$TEE"
9863       tool_basename="${tool_specified##*/}"
9864       if test "x$tool_basename" = "x$tool_specified"; then
9865         # A command without a complete path is provided, search $PATH.
9866         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9867 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9868         # Extract the first word of "$tool_basename", so it can be a program name with args.
9869 set dummy $tool_basename; ac_word=$2
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9871 $as_echo_n "checking for $ac_word... " >&6; }
9872 if ${ac_cv_path_TEE+:} false; then :
9873   $as_echo_n "(cached) " >&6
9874 else
9875   case $TEE in
9876   [\\/]* | ?:[\\/]*)
9877   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9878   ;;
9879   *)
9880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9881 for as_dir in $PATH
9882 do
9883   IFS=$as_save_IFS
9884   test -z "$as_dir" && as_dir=.
9885     for ac_exec_ext in '' $ac_executable_extensions; do
9886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9887     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9889     break 2
9890   fi
9891 done
9892   done
9893 IFS=$as_save_IFS
9894 
9895   ;;
9896 esac
9897 fi
9898 TEE=$ac_cv_path_TEE
9899 if test -n "$TEE"; then
9900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9901 $as_echo "$TEE" >&6; }
9902 else
9903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904 $as_echo "no" >&6; }
9905 fi
9906 
9907 
9908         if test "x$TEE" = x; then
9909           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9910         fi
9911       else
9912         # Otherwise we believe it is a complete path. Use it as it is.
9913         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9914 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9915         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9916 $as_echo_n "checking for TEE... " >&6; }
9917         if test ! -x "$tool_specified"; then
9918           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9919 $as_echo "not found" >&6; }
9920           as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9921         fi
9922         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9923 $as_echo "$tool_specified" >&6; }
9924       fi
9925     fi
9926   fi
9927 
9928 
9929 
9930   if test "x$TEE" = x; then
9931     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
9932   fi
9933 
9934 
9935 
9936 
9937 
9938   # Publish this variable in the help.
9939 
9940 
9941   if test "x$TOUCH" = x; then
9942     # The variable is not set by user, try to locate tool using the code snippet
9943     for ac_prog in touch
9944 do
9945   # Extract the first word of "$ac_prog", so it can be a program name with args.
9946 set dummy $ac_prog; ac_word=$2
9947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9948 $as_echo_n "checking for $ac_word... " >&6; }
9949 if ${ac_cv_path_TOUCH+:} false; then :
9950   $as_echo_n "(cached) " >&6
9951 else
9952   case $TOUCH in
9953   [\\/]* | ?:[\\/]*)
9954   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
9955   ;;
9956   *)
9957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9958 for as_dir in $PATH
9959 do
9960   IFS=$as_save_IFS
9961   test -z "$as_dir" && as_dir=.
9962     for ac_exec_ext in '' $ac_executable_extensions; do
9963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9964     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
9965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9966     break 2
9967   fi
9968 done
9969   done
9970 IFS=$as_save_IFS
9971 
9972   ;;
9973 esac
9974 fi
9975 TOUCH=$ac_cv_path_TOUCH
9976 if test -n "$TOUCH"; then
9977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
9978 $as_echo "$TOUCH" >&6; }
9979 else
9980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9981 $as_echo "no" >&6; }
9982 fi
9983 
9984 
9985   test -n "$TOUCH" && break
9986 done
9987 
9988   else
9989     # The variable is set, but is it from the command line or the environment?
9990 
9991     # Try to remove the string !TOUCH! from our list.
9992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
9993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9994       # If it failed, the variable was not from the command line. Ignore it,
9995       # but warn the user (except for BASH, which is always set by the calling BASH).
9996       if test "xTOUCH" != xBASH; then
9997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
9998 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
9999       fi
10000       # Try to locate tool using the code snippet
10001       for ac_prog in touch
10002 do
10003   # Extract the first word of "$ac_prog", so it can be a program name with args.
10004 set dummy $ac_prog; ac_word=$2
10005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10006 $as_echo_n "checking for $ac_word... " >&6; }
10007 if ${ac_cv_path_TOUCH+:} false; then :
10008   $as_echo_n "(cached) " >&6
10009 else
10010   case $TOUCH in
10011   [\\/]* | ?:[\\/]*)
10012   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10013   ;;
10014   *)
10015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10016 for as_dir in $PATH
10017 do
10018   IFS=$as_save_IFS
10019   test -z "$as_dir" && as_dir=.
10020     for ac_exec_ext in '' $ac_executable_extensions; do
10021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10022     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10024     break 2
10025   fi
10026 done
10027   done
10028 IFS=$as_save_IFS
10029 
10030   ;;
10031 esac
10032 fi
10033 TOUCH=$ac_cv_path_TOUCH
10034 if test -n "$TOUCH"; then
10035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10036 $as_echo "$TOUCH" >&6; }
10037 else
10038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10039 $as_echo "no" >&6; }
10040 fi
10041 
10042 
10043   test -n "$TOUCH" && break
10044 done
10045 
10046     else
10047       # If it succeeded, then it was overridden by the user. We will use it
10048       # for the tool.
10049 
10050       # First remove it from the list of overridden variables, so we can test
10051       # for unknown variables in the end.
10052       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10053 
10054       # Check if the provided tool contains a complete path.
10055       tool_specified="$TOUCH"
10056       tool_basename="${tool_specified##*/}"
10057       if test "x$tool_basename" = "x$tool_specified"; then
10058         # A command without a complete path is provided, search $PATH.
10059         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10060 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10061         # Extract the first word of "$tool_basename", so it can be a program name with args.
10062 set dummy $tool_basename; ac_word=$2
10063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064 $as_echo_n "checking for $ac_word... " >&6; }
10065 if ${ac_cv_path_TOUCH+:} false; then :
10066   $as_echo_n "(cached) " >&6
10067 else
10068   case $TOUCH in
10069   [\\/]* | ?:[\\/]*)
10070   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10071   ;;
10072   *)
10073   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074 for as_dir in $PATH
10075 do
10076   IFS=$as_save_IFS
10077   test -z "$as_dir" && as_dir=.
10078     for ac_exec_ext in '' $ac_executable_extensions; do
10079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10080     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082     break 2
10083   fi
10084 done
10085   done
10086 IFS=$as_save_IFS
10087 
10088   ;;
10089 esac
10090 fi
10091 TOUCH=$ac_cv_path_TOUCH
10092 if test -n "$TOUCH"; then
10093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10094 $as_echo "$TOUCH" >&6; }
10095 else
10096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097 $as_echo "no" >&6; }
10098 fi
10099 
10100 
10101         if test "x$TOUCH" = x; then
10102           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10103         fi
10104       else
10105         # Otherwise we believe it is a complete path. Use it as it is.
10106         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10107 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10109 $as_echo_n "checking for TOUCH... " >&6; }
10110         if test ! -x "$tool_specified"; then
10111           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10112 $as_echo "not found" >&6; }
10113           as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10114         fi
10115         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10116 $as_echo "$tool_specified" >&6; }
10117       fi
10118     fi
10119   fi
10120 
10121 
10122 
10123   if test "x$TOUCH" = x; then
10124     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10125   fi
10126 
10127 
10128 
10129 
10130 
10131   # Publish this variable in the help.
10132 
10133 
10134   if test "x$TR" = x; then
10135     # The variable is not set by user, try to locate tool using the code snippet
10136     for ac_prog in tr
10137 do
10138   # Extract the first word of "$ac_prog", so it can be a program name with args.
10139 set dummy $ac_prog; ac_word=$2
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10141 $as_echo_n "checking for $ac_word... " >&6; }
10142 if ${ac_cv_path_TR+:} false; then :
10143   $as_echo_n "(cached) " >&6
10144 else
10145   case $TR in
10146   [\\/]* | ?:[\\/]*)
10147   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10148   ;;
10149   *)
10150   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10151 for as_dir in $PATH
10152 do
10153   IFS=$as_save_IFS
10154   test -z "$as_dir" && as_dir=.
10155     for ac_exec_ext in '' $ac_executable_extensions; do
10156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10157     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10159     break 2
10160   fi
10161 done
10162   done
10163 IFS=$as_save_IFS
10164 
10165   ;;
10166 esac
10167 fi
10168 TR=$ac_cv_path_TR
10169 if test -n "$TR"; then
10170   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10171 $as_echo "$TR" >&6; }
10172 else
10173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10174 $as_echo "no" >&6; }
10175 fi
10176 
10177 
10178   test -n "$TR" && break
10179 done
10180 
10181   else
10182     # The variable is set, but is it from the command line or the environment?
10183 
10184     # Try to remove the string !TR! from our list.
10185     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10186     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10187       # If it failed, the variable was not from the command line. Ignore it,
10188       # but warn the user (except for BASH, which is always set by the calling BASH).
10189       if test "xTR" != xBASH; then
10190         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10191 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10192       fi
10193       # Try to locate tool using the code snippet
10194       for ac_prog in tr
10195 do
10196   # Extract the first word of "$ac_prog", so it can be a program name with args.
10197 set dummy $ac_prog; ac_word=$2
10198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10199 $as_echo_n "checking for $ac_word... " >&6; }
10200 if ${ac_cv_path_TR+:} false; then :
10201   $as_echo_n "(cached) " >&6
10202 else
10203   case $TR in
10204   [\\/]* | ?:[\\/]*)
10205   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10206   ;;
10207   *)
10208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10209 for as_dir in $PATH
10210 do
10211   IFS=$as_save_IFS
10212   test -z "$as_dir" && as_dir=.
10213     for ac_exec_ext in '' $ac_executable_extensions; do
10214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10215     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10217     break 2
10218   fi
10219 done
10220   done
10221 IFS=$as_save_IFS
10222 
10223   ;;
10224 esac
10225 fi
10226 TR=$ac_cv_path_TR
10227 if test -n "$TR"; then
10228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10229 $as_echo "$TR" >&6; }
10230 else
10231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10232 $as_echo "no" >&6; }
10233 fi
10234 
10235 
10236   test -n "$TR" && break
10237 done
10238 
10239     else
10240       # If it succeeded, then it was overridden by the user. We will use it
10241       # for the tool.
10242 
10243       # First remove it from the list of overridden variables, so we can test
10244       # for unknown variables in the end.
10245       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10246 
10247       # Check if the provided tool contains a complete path.
10248       tool_specified="$TR"
10249       tool_basename="${tool_specified##*/}"
10250       if test "x$tool_basename" = "x$tool_specified"; then
10251         # A command without a complete path is provided, search $PATH.
10252         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10253 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10254         # Extract the first word of "$tool_basename", so it can be a program name with args.
10255 set dummy $tool_basename; ac_word=$2
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10257 $as_echo_n "checking for $ac_word... " >&6; }
10258 if ${ac_cv_path_TR+:} false; then :
10259   $as_echo_n "(cached) " >&6
10260 else
10261   case $TR in
10262   [\\/]* | ?:[\\/]*)
10263   ac_cv_path_TR="$TR" # Let the user override the test with a path.
10264   ;;
10265   *)
10266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10267 for as_dir in $PATH
10268 do
10269   IFS=$as_save_IFS
10270   test -z "$as_dir" && as_dir=.
10271     for ac_exec_ext in '' $ac_executable_extensions; do
10272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10273     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10275     break 2
10276   fi
10277 done
10278   done
10279 IFS=$as_save_IFS
10280 
10281   ;;
10282 esac
10283 fi
10284 TR=$ac_cv_path_TR
10285 if test -n "$TR"; then
10286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10287 $as_echo "$TR" >&6; }
10288 else
10289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290 $as_echo "no" >&6; }
10291 fi
10292 
10293 
10294         if test "x$TR" = x; then
10295           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10296         fi
10297       else
10298         # Otherwise we believe it is a complete path. Use it as it is.
10299         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10300 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10301         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10302 $as_echo_n "checking for TR... " >&6; }
10303         if test ! -x "$tool_specified"; then
10304           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10305 $as_echo "not found" >&6; }
10306           as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10307         fi
10308         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10309 $as_echo "$tool_specified" >&6; }
10310       fi
10311     fi
10312   fi
10313 
10314 
10315 
10316   if test "x$TR" = x; then
10317     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10318   fi
10319 
10320 
10321 
10322 
10323 
10324   # Publish this variable in the help.
10325 
10326 
10327   if test "x$UNAME" = x; then
10328     # The variable is not set by user, try to locate tool using the code snippet
10329     for ac_prog in uname
10330 do
10331   # Extract the first word of "$ac_prog", so it can be a program name with args.
10332 set dummy $ac_prog; ac_word=$2
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10334 $as_echo_n "checking for $ac_word... " >&6; }
10335 if ${ac_cv_path_UNAME+:} false; then :
10336   $as_echo_n "(cached) " >&6
10337 else
10338   case $UNAME in
10339   [\\/]* | ?:[\\/]*)
10340   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10341   ;;
10342   *)
10343   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10344 for as_dir in $PATH
10345 do
10346   IFS=$as_save_IFS
10347   test -z "$as_dir" && as_dir=.
10348     for ac_exec_ext in '' $ac_executable_extensions; do
10349   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10350     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10351     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10352     break 2
10353   fi
10354 done
10355   done
10356 IFS=$as_save_IFS
10357 
10358   ;;
10359 esac
10360 fi
10361 UNAME=$ac_cv_path_UNAME
10362 if test -n "$UNAME"; then
10363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10364 $as_echo "$UNAME" >&6; }
10365 else
10366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10367 $as_echo "no" >&6; }
10368 fi
10369 
10370 
10371   test -n "$UNAME" && break
10372 done
10373 
10374   else
10375     # The variable is set, but is it from the command line or the environment?
10376 
10377     # Try to remove the string !UNAME! from our list.
10378     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10379     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10380       # If it failed, the variable was not from the command line. Ignore it,
10381       # but warn the user (except for BASH, which is always set by the calling BASH).
10382       if test "xUNAME" != xBASH; then
10383         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10384 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10385       fi
10386       # Try to locate tool using the code snippet
10387       for ac_prog in uname
10388 do
10389   # Extract the first word of "$ac_prog", so it can be a program name with args.
10390 set dummy $ac_prog; ac_word=$2
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392 $as_echo_n "checking for $ac_word... " >&6; }
10393 if ${ac_cv_path_UNAME+:} false; then :
10394   $as_echo_n "(cached) " >&6
10395 else
10396   case $UNAME in
10397   [\\/]* | ?:[\\/]*)
10398   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10399   ;;
10400   *)
10401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402 for as_dir in $PATH
10403 do
10404   IFS=$as_save_IFS
10405   test -z "$as_dir" && as_dir=.
10406     for ac_exec_ext in '' $ac_executable_extensions; do
10407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10410     break 2
10411   fi
10412 done
10413   done
10414 IFS=$as_save_IFS
10415 
10416   ;;
10417 esac
10418 fi
10419 UNAME=$ac_cv_path_UNAME
10420 if test -n "$UNAME"; then
10421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10422 $as_echo "$UNAME" >&6; }
10423 else
10424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425 $as_echo "no" >&6; }
10426 fi
10427 
10428 
10429   test -n "$UNAME" && break
10430 done
10431 
10432     else
10433       # If it succeeded, then it was overridden by the user. We will use it
10434       # for the tool.
10435 
10436       # First remove it from the list of overridden variables, so we can test
10437       # for unknown variables in the end.
10438       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10439 
10440       # Check if the provided tool contains a complete path.
10441       tool_specified="$UNAME"
10442       tool_basename="${tool_specified##*/}"
10443       if test "x$tool_basename" = "x$tool_specified"; then
10444         # A command without a complete path is provided, search $PATH.
10445         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10446 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10447         # Extract the first word of "$tool_basename", so it can be a program name with args.
10448 set dummy $tool_basename; ac_word=$2
10449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10450 $as_echo_n "checking for $ac_word... " >&6; }
10451 if ${ac_cv_path_UNAME+:} false; then :
10452   $as_echo_n "(cached) " >&6
10453 else
10454   case $UNAME in
10455   [\\/]* | ?:[\\/]*)
10456   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10457   ;;
10458   *)
10459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10460 for as_dir in $PATH
10461 do
10462   IFS=$as_save_IFS
10463   test -z "$as_dir" && as_dir=.
10464     for ac_exec_ext in '' $ac_executable_extensions; do
10465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10466     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10468     break 2
10469   fi
10470 done
10471   done
10472 IFS=$as_save_IFS
10473 
10474   ;;
10475 esac
10476 fi
10477 UNAME=$ac_cv_path_UNAME
10478 if test -n "$UNAME"; then
10479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10480 $as_echo "$UNAME" >&6; }
10481 else
10482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10483 $as_echo "no" >&6; }
10484 fi
10485 
10486 
10487         if test "x$UNAME" = x; then
10488           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10489         fi
10490       else
10491         # Otherwise we believe it is a complete path. Use it as it is.
10492         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10493 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10494         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10495 $as_echo_n "checking for UNAME... " >&6; }
10496         if test ! -x "$tool_specified"; then
10497           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10498 $as_echo "not found" >&6; }
10499           as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10500         fi
10501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10502 $as_echo "$tool_specified" >&6; }
10503       fi
10504     fi
10505   fi
10506 
10507 
10508 
10509   if test "x$UNAME" = x; then
10510     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10511   fi
10512 
10513 
10514 
10515 
10516 
10517   # Publish this variable in the help.
10518 
10519 
10520   if test "x$UNIQ" = x; then
10521     # The variable is not set by user, try to locate tool using the code snippet
10522     for ac_prog in uniq
10523 do
10524   # Extract the first word of "$ac_prog", so it can be a program name with args.
10525 set dummy $ac_prog; ac_word=$2
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10527 $as_echo_n "checking for $ac_word... " >&6; }
10528 if ${ac_cv_path_UNIQ+:} false; then :
10529   $as_echo_n "(cached) " >&6
10530 else
10531   case $UNIQ in
10532   [\\/]* | ?:[\\/]*)
10533   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10534   ;;
10535   *)
10536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10537 for as_dir in $PATH
10538 do
10539   IFS=$as_save_IFS
10540   test -z "$as_dir" && as_dir=.
10541     for ac_exec_ext in '' $ac_executable_extensions; do
10542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10543     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10545     break 2
10546   fi
10547 done
10548   done
10549 IFS=$as_save_IFS
10550 
10551   ;;
10552 esac
10553 fi
10554 UNIQ=$ac_cv_path_UNIQ
10555 if test -n "$UNIQ"; then
10556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10557 $as_echo "$UNIQ" >&6; }
10558 else
10559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10560 $as_echo "no" >&6; }
10561 fi
10562 
10563 
10564   test -n "$UNIQ" && break
10565 done
10566 
10567   else
10568     # The variable is set, but is it from the command line or the environment?
10569 
10570     # Try to remove the string !UNIQ! from our list.
10571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10573       # If it failed, the variable was not from the command line. Ignore it,
10574       # but warn the user (except for BASH, which is always set by the calling BASH).
10575       if test "xUNIQ" != xBASH; then
10576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10577 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10578       fi
10579       # Try to locate tool using the code snippet
10580       for ac_prog in uniq
10581 do
10582   # Extract the first word of "$ac_prog", so it can be a program name with args.
10583 set dummy $ac_prog; ac_word=$2
10584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10585 $as_echo_n "checking for $ac_word... " >&6; }
10586 if ${ac_cv_path_UNIQ+:} false; then :
10587   $as_echo_n "(cached) " >&6
10588 else
10589   case $UNIQ in
10590   [\\/]* | ?:[\\/]*)
10591   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10592   ;;
10593   *)
10594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10595 for as_dir in $PATH
10596 do
10597   IFS=$as_save_IFS
10598   test -z "$as_dir" && as_dir=.
10599     for ac_exec_ext in '' $ac_executable_extensions; do
10600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10601     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10603     break 2
10604   fi
10605 done
10606   done
10607 IFS=$as_save_IFS
10608 
10609   ;;
10610 esac
10611 fi
10612 UNIQ=$ac_cv_path_UNIQ
10613 if test -n "$UNIQ"; then
10614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10615 $as_echo "$UNIQ" >&6; }
10616 else
10617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618 $as_echo "no" >&6; }
10619 fi
10620 
10621 
10622   test -n "$UNIQ" && break
10623 done
10624 
10625     else
10626       # If it succeeded, then it was overridden by the user. We will use it
10627       # for the tool.
10628 
10629       # First remove it from the list of overridden variables, so we can test
10630       # for unknown variables in the end.
10631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10632 
10633       # Check if the provided tool contains a complete path.
10634       tool_specified="$UNIQ"
10635       tool_basename="${tool_specified##*/}"
10636       if test "x$tool_basename" = "x$tool_specified"; then
10637         # A command without a complete path is provided, search $PATH.
10638         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10639 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10640         # Extract the first word of "$tool_basename", so it can be a program name with args.
10641 set dummy $tool_basename; ac_word=$2
10642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10643 $as_echo_n "checking for $ac_word... " >&6; }
10644 if ${ac_cv_path_UNIQ+:} false; then :
10645   $as_echo_n "(cached) " >&6
10646 else
10647   case $UNIQ in
10648   [\\/]* | ?:[\\/]*)
10649   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10650   ;;
10651   *)
10652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10653 for as_dir in $PATH
10654 do
10655   IFS=$as_save_IFS
10656   test -z "$as_dir" && as_dir=.
10657     for ac_exec_ext in '' $ac_executable_extensions; do
10658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10659     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10661     break 2
10662   fi
10663 done
10664   done
10665 IFS=$as_save_IFS
10666 
10667   ;;
10668 esac
10669 fi
10670 UNIQ=$ac_cv_path_UNIQ
10671 if test -n "$UNIQ"; then
10672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10673 $as_echo "$UNIQ" >&6; }
10674 else
10675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10676 $as_echo "no" >&6; }
10677 fi
10678 
10679 
10680         if test "x$UNIQ" = x; then
10681           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10682         fi
10683       else
10684         # Otherwise we believe it is a complete path. Use it as it is.
10685         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10686 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10687         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10688 $as_echo_n "checking for UNIQ... " >&6; }
10689         if test ! -x "$tool_specified"; then
10690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10691 $as_echo "not found" >&6; }
10692           as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10693         fi
10694         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10695 $as_echo "$tool_specified" >&6; }
10696       fi
10697     fi
10698   fi
10699 
10700 
10701 
10702   if test "x$UNIQ" = x; then
10703     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10704   fi
10705 
10706 
10707 
10708 
10709 
10710   # Publish this variable in the help.
10711 
10712 
10713   if test "x$WC" = x; then
10714     # The variable is not set by user, try to locate tool using the code snippet
10715     for ac_prog in wc
10716 do
10717   # Extract the first word of "$ac_prog", so it can be a program name with args.
10718 set dummy $ac_prog; ac_word=$2
10719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10720 $as_echo_n "checking for $ac_word... " >&6; }
10721 if ${ac_cv_path_WC+:} false; then :
10722   $as_echo_n "(cached) " >&6
10723 else
10724   case $WC in
10725   [\\/]* | ?:[\\/]*)
10726   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10727   ;;
10728   *)
10729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10730 for as_dir in $PATH
10731 do
10732   IFS=$as_save_IFS
10733   test -z "$as_dir" && as_dir=.
10734     for ac_exec_ext in '' $ac_executable_extensions; do
10735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10736     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10738     break 2
10739   fi
10740 done
10741   done
10742 IFS=$as_save_IFS
10743 
10744   ;;
10745 esac
10746 fi
10747 WC=$ac_cv_path_WC
10748 if test -n "$WC"; then
10749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10750 $as_echo "$WC" >&6; }
10751 else
10752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10753 $as_echo "no" >&6; }
10754 fi
10755 
10756 
10757   test -n "$WC" && break
10758 done
10759 
10760   else
10761     # The variable is set, but is it from the command line or the environment?
10762 
10763     # Try to remove the string !WC! from our list.
10764     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10765     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10766       # If it failed, the variable was not from the command line. Ignore it,
10767       # but warn the user (except for BASH, which is always set by the calling BASH).
10768       if test "xWC" != xBASH; then
10769         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10770 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10771       fi
10772       # Try to locate tool using the code snippet
10773       for ac_prog in wc
10774 do
10775   # Extract the first word of "$ac_prog", so it can be a program name with args.
10776 set dummy $ac_prog; ac_word=$2
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10778 $as_echo_n "checking for $ac_word... " >&6; }
10779 if ${ac_cv_path_WC+:} false; then :
10780   $as_echo_n "(cached) " >&6
10781 else
10782   case $WC in
10783   [\\/]* | ?:[\\/]*)
10784   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10785   ;;
10786   *)
10787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10788 for as_dir in $PATH
10789 do
10790   IFS=$as_save_IFS
10791   test -z "$as_dir" && as_dir=.
10792     for ac_exec_ext in '' $ac_executable_extensions; do
10793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10794     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10796     break 2
10797   fi
10798 done
10799   done
10800 IFS=$as_save_IFS
10801 
10802   ;;
10803 esac
10804 fi
10805 WC=$ac_cv_path_WC
10806 if test -n "$WC"; then
10807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10808 $as_echo "$WC" >&6; }
10809 else
10810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10811 $as_echo "no" >&6; }
10812 fi
10813 
10814 
10815   test -n "$WC" && break
10816 done
10817 
10818     else
10819       # If it succeeded, then it was overridden by the user. We will use it
10820       # for the tool.
10821 
10822       # First remove it from the list of overridden variables, so we can test
10823       # for unknown variables in the end.
10824       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10825 
10826       # Check if the provided tool contains a complete path.
10827       tool_specified="$WC"
10828       tool_basename="${tool_specified##*/}"
10829       if test "x$tool_basename" = "x$tool_specified"; then
10830         # A command without a complete path is provided, search $PATH.
10831         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10832 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10833         # Extract the first word of "$tool_basename", so it can be a program name with args.
10834 set dummy $tool_basename; ac_word=$2
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10836 $as_echo_n "checking for $ac_word... " >&6; }
10837 if ${ac_cv_path_WC+:} false; then :
10838   $as_echo_n "(cached) " >&6
10839 else
10840   case $WC in
10841   [\\/]* | ?:[\\/]*)
10842   ac_cv_path_WC="$WC" # Let the user override the test with a path.
10843   ;;
10844   *)
10845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10846 for as_dir in $PATH
10847 do
10848   IFS=$as_save_IFS
10849   test -z "$as_dir" && as_dir=.
10850     for ac_exec_ext in '' $ac_executable_extensions; do
10851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10852     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10854     break 2
10855   fi
10856 done
10857   done
10858 IFS=$as_save_IFS
10859 
10860   ;;
10861 esac
10862 fi
10863 WC=$ac_cv_path_WC
10864 if test -n "$WC"; then
10865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10866 $as_echo "$WC" >&6; }
10867 else
10868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869 $as_echo "no" >&6; }
10870 fi
10871 
10872 
10873         if test "x$WC" = x; then
10874           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10875         fi
10876       else
10877         # Otherwise we believe it is a complete path. Use it as it is.
10878         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10879 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10880         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10881 $as_echo_n "checking for WC... " >&6; }
10882         if test ! -x "$tool_specified"; then
10883           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10884 $as_echo "not found" >&6; }
10885           as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10886         fi
10887         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10888 $as_echo "$tool_specified" >&6; }
10889       fi
10890     fi
10891   fi
10892 
10893 
10894 
10895   if test "x$WC" = x; then
10896     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10897   fi
10898 
10899 
10900 
10901 
10902 
10903   # Publish this variable in the help.
10904 
10905 
10906   if test "x$WHICH" = x; then
10907     # The variable is not set by user, try to locate tool using the code snippet
10908     for ac_prog in which
10909 do
10910   # Extract the first word of "$ac_prog", so it can be a program name with args.
10911 set dummy $ac_prog; ac_word=$2
10912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10913 $as_echo_n "checking for $ac_word... " >&6; }
10914 if ${ac_cv_path_WHICH+:} false; then :
10915   $as_echo_n "(cached) " >&6
10916 else
10917   case $WHICH in
10918   [\\/]* | ?:[\\/]*)
10919   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10920   ;;
10921   *)
10922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10923 for as_dir in $PATH
10924 do
10925   IFS=$as_save_IFS
10926   test -z "$as_dir" && as_dir=.
10927     for ac_exec_ext in '' $ac_executable_extensions; do
10928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10929     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10931     break 2
10932   fi
10933 done
10934   done
10935 IFS=$as_save_IFS
10936 
10937   ;;
10938 esac
10939 fi
10940 WHICH=$ac_cv_path_WHICH
10941 if test -n "$WHICH"; then
10942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
10943 $as_echo "$WHICH" >&6; }
10944 else
10945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10946 $as_echo "no" >&6; }
10947 fi
10948 
10949 
10950   test -n "$WHICH" && break
10951 done
10952 
10953   else
10954     # The variable is set, but is it from the command line or the environment?
10955 
10956     # Try to remove the string !WHICH! from our list.
10957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
10958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10959       # If it failed, the variable was not from the command line. Ignore it,
10960       # but warn the user (except for BASH, which is always set by the calling BASH).
10961       if test "xWHICH" != xBASH; then
10962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
10963 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
10964       fi
10965       # Try to locate tool using the code snippet
10966       for ac_prog in which
10967 do
10968   # Extract the first word of "$ac_prog", so it can be a program name with args.
10969 set dummy $ac_prog; ac_word=$2
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10971 $as_echo_n "checking for $ac_word... " >&6; }
10972 if ${ac_cv_path_WHICH+:} false; then :
10973   $as_echo_n "(cached) " >&6
10974 else
10975   case $WHICH in
10976   [\\/]* | ?:[\\/]*)
10977   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10978   ;;
10979   *)
10980   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10981 for as_dir in $PATH
10982 do
10983   IFS=$as_save_IFS
10984   test -z "$as_dir" && as_dir=.
10985     for ac_exec_ext in '' $ac_executable_extensions; do
10986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10987     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
10988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10989     break 2
10990   fi
10991 done
10992   done
10993 IFS=$as_save_IFS
10994 
10995   ;;
10996 esac
10997 fi
10998 WHICH=$ac_cv_path_WHICH
10999 if test -n "$WHICH"; then
11000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11001 $as_echo "$WHICH" >&6; }
11002 else
11003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004 $as_echo "no" >&6; }
11005 fi
11006 
11007 
11008   test -n "$WHICH" && break
11009 done
11010 
11011     else
11012       # If it succeeded, then it was overridden by the user. We will use it
11013       # for the tool.
11014 
11015       # First remove it from the list of overridden variables, so we can test
11016       # for unknown variables in the end.
11017       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11018 
11019       # Check if the provided tool contains a complete path.
11020       tool_specified="$WHICH"
11021       tool_basename="${tool_specified##*/}"
11022       if test "x$tool_basename" = "x$tool_specified"; then
11023         # A command without a complete path is provided, search $PATH.
11024         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11025 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11026         # Extract the first word of "$tool_basename", so it can be a program name with args.
11027 set dummy $tool_basename; ac_word=$2
11028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11029 $as_echo_n "checking for $ac_word... " >&6; }
11030 if ${ac_cv_path_WHICH+:} false; then :
11031   $as_echo_n "(cached) " >&6
11032 else
11033   case $WHICH in
11034   [\\/]* | ?:[\\/]*)
11035   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11036   ;;
11037   *)
11038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11039 for as_dir in $PATH
11040 do
11041   IFS=$as_save_IFS
11042   test -z "$as_dir" && as_dir=.
11043     for ac_exec_ext in '' $ac_executable_extensions; do
11044   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11045     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11047     break 2
11048   fi
11049 done
11050   done
11051 IFS=$as_save_IFS
11052 
11053   ;;
11054 esac
11055 fi
11056 WHICH=$ac_cv_path_WHICH
11057 if test -n "$WHICH"; then
11058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11059 $as_echo "$WHICH" >&6; }
11060 else
11061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11062 $as_echo "no" >&6; }
11063 fi
11064 
11065 
11066         if test "x$WHICH" = x; then
11067           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11068         fi
11069       else
11070         # Otherwise we believe it is a complete path. Use it as it is.
11071         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11072 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11073         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11074 $as_echo_n "checking for WHICH... " >&6; }
11075         if test ! -x "$tool_specified"; then
11076           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11077 $as_echo "not found" >&6; }
11078           as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11079         fi
11080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11081 $as_echo "$tool_specified" >&6; }
11082       fi
11083     fi
11084   fi
11085 
11086 
11087 
11088   if test "x$WHICH" = x; then
11089     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11090   fi
11091 
11092 
11093 
11094 
11095 
11096   # Publish this variable in the help.
11097 
11098 
11099   if test "x$XARGS" = x; then
11100     # The variable is not set by user, try to locate tool using the code snippet
11101     for ac_prog in xargs
11102 do
11103   # Extract the first word of "$ac_prog", so it can be a program name with args.
11104 set dummy $ac_prog; ac_word=$2
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11106 $as_echo_n "checking for $ac_word... " >&6; }
11107 if ${ac_cv_path_XARGS+:} false; then :
11108   $as_echo_n "(cached) " >&6
11109 else
11110   case $XARGS in
11111   [\\/]* | ?:[\\/]*)
11112   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11113   ;;
11114   *)
11115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11116 for as_dir in $PATH
11117 do
11118   IFS=$as_save_IFS
11119   test -z "$as_dir" && as_dir=.
11120     for ac_exec_ext in '' $ac_executable_extensions; do
11121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11122     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11124     break 2
11125   fi
11126 done
11127   done
11128 IFS=$as_save_IFS
11129 
11130   ;;
11131 esac
11132 fi
11133 XARGS=$ac_cv_path_XARGS
11134 if test -n "$XARGS"; then
11135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11136 $as_echo "$XARGS" >&6; }
11137 else
11138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11139 $as_echo "no" >&6; }
11140 fi
11141 
11142 
11143   test -n "$XARGS" && break
11144 done
11145 
11146   else
11147     # The variable is set, but is it from the command line or the environment?
11148 
11149     # Try to remove the string !XARGS! from our list.
11150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11152       # If it failed, the variable was not from the command line. Ignore it,
11153       # but warn the user (except for BASH, which is always set by the calling BASH).
11154       if test "xXARGS" != xBASH; then
11155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11156 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11157       fi
11158       # Try to locate tool using the code snippet
11159       for ac_prog in xargs
11160 do
11161   # Extract the first word of "$ac_prog", so it can be a program name with args.
11162 set dummy $ac_prog; ac_word=$2
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11164 $as_echo_n "checking for $ac_word... " >&6; }
11165 if ${ac_cv_path_XARGS+:} false; then :
11166   $as_echo_n "(cached) " >&6
11167 else
11168   case $XARGS in
11169   [\\/]* | ?:[\\/]*)
11170   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11171   ;;
11172   *)
11173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11174 for as_dir in $PATH
11175 do
11176   IFS=$as_save_IFS
11177   test -z "$as_dir" && as_dir=.
11178     for ac_exec_ext in '' $ac_executable_extensions; do
11179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11180     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11182     break 2
11183   fi
11184 done
11185   done
11186 IFS=$as_save_IFS
11187 
11188   ;;
11189 esac
11190 fi
11191 XARGS=$ac_cv_path_XARGS
11192 if test -n "$XARGS"; then
11193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11194 $as_echo "$XARGS" >&6; }
11195 else
11196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11197 $as_echo "no" >&6; }
11198 fi
11199 
11200 
11201   test -n "$XARGS" && break
11202 done
11203 
11204     else
11205       # If it succeeded, then it was overridden by the user. We will use it
11206       # for the tool.
11207 
11208       # First remove it from the list of overridden variables, so we can test
11209       # for unknown variables in the end.
11210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11211 
11212       # Check if the provided tool contains a complete path.
11213       tool_specified="$XARGS"
11214       tool_basename="${tool_specified##*/}"
11215       if test "x$tool_basename" = "x$tool_specified"; then
11216         # A command without a complete path is provided, search $PATH.
11217         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11218 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11219         # Extract the first word of "$tool_basename", so it can be a program name with args.
11220 set dummy $tool_basename; ac_word=$2
11221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11222 $as_echo_n "checking for $ac_word... " >&6; }
11223 if ${ac_cv_path_XARGS+:} false; then :
11224   $as_echo_n "(cached) " >&6
11225 else
11226   case $XARGS in
11227   [\\/]* | ?:[\\/]*)
11228   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11229   ;;
11230   *)
11231   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11232 for as_dir in $PATH
11233 do
11234   IFS=$as_save_IFS
11235   test -z "$as_dir" && as_dir=.
11236     for ac_exec_ext in '' $ac_executable_extensions; do
11237   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11238     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11239     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11240     break 2
11241   fi
11242 done
11243   done
11244 IFS=$as_save_IFS
11245 
11246   ;;
11247 esac
11248 fi
11249 XARGS=$ac_cv_path_XARGS
11250 if test -n "$XARGS"; then
11251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11252 $as_echo "$XARGS" >&6; }
11253 else
11254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11255 $as_echo "no" >&6; }
11256 fi
11257 
11258 
11259         if test "x$XARGS" = x; then
11260           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11261         fi
11262       else
11263         # Otherwise we believe it is a complete path. Use it as it is.
11264         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11265 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11267 $as_echo_n "checking for XARGS... " >&6; }
11268         if test ! -x "$tool_specified"; then
11269           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11270 $as_echo "not found" >&6; }
11271           as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11272         fi
11273         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11274 $as_echo "$tool_specified" >&6; }
11275       fi
11276     fi
11277   fi
11278 
11279 
11280 
11281   if test "x$XARGS" = x; then
11282     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11283   fi
11284 
11285 
11286 
11287   # Then required tools that require some special treatment.
11288 
11289 
11290   # Publish this variable in the help.
11291 
11292 
11293   if test "x$AWK" = x; then
11294     # The variable is not set by user, try to locate tool using the code snippet
11295     for ac_prog in gawk mawk nawk awk
11296 do
11297   # Extract the first word of "$ac_prog", so it can be a program name with args.
11298 set dummy $ac_prog; ac_word=$2
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11300 $as_echo_n "checking for $ac_word... " >&6; }
11301 if ${ac_cv_prog_AWK+:} false; then :
11302   $as_echo_n "(cached) " >&6
11303 else
11304   if test -n "$AWK"; then
11305   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11306 else
11307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11308 for as_dir in $PATH
11309 do
11310   IFS=$as_save_IFS
11311   test -z "$as_dir" && as_dir=.
11312     for ac_exec_ext in '' $ac_executable_extensions; do
11313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11314     ac_cv_prog_AWK="$ac_prog"
11315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11316     break 2
11317   fi
11318 done
11319   done
11320 IFS=$as_save_IFS
11321 
11322 fi
11323 fi
11324 AWK=$ac_cv_prog_AWK
11325 if test -n "$AWK"; then
11326   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11327 $as_echo "$AWK" >&6; }
11328 else
11329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330 $as_echo "no" >&6; }
11331 fi
11332 
11333 
11334   test -n "$AWK" && break
11335 done
11336 
11337   else
11338     # The variable is set, but is it from the command line or the environment?
11339 
11340     # Try to remove the string !AWK! from our list.
11341     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11342     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11343       # If it failed, the variable was not from the command line. Ignore it,
11344       # but warn the user (except for BASH, which is always set by the calling BASH).
11345       if test "xAWK" != xBASH; then
11346         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11347 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11348       fi
11349       # Try to locate tool using the code snippet
11350       for ac_prog in gawk mawk nawk awk
11351 do
11352   # Extract the first word of "$ac_prog", so it can be a program name with args.
11353 set dummy $ac_prog; ac_word=$2
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11355 $as_echo_n "checking for $ac_word... " >&6; }
11356 if ${ac_cv_prog_AWK+:} false; then :
11357   $as_echo_n "(cached) " >&6
11358 else
11359   if test -n "$AWK"; then
11360   ac_cv_prog_AWK="$AWK" # Let the user override the test.
11361 else
11362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11363 for as_dir in $PATH
11364 do
11365   IFS=$as_save_IFS
11366   test -z "$as_dir" && as_dir=.
11367     for ac_exec_ext in '' $ac_executable_extensions; do
11368   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11369     ac_cv_prog_AWK="$ac_prog"
11370     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11371     break 2
11372   fi
11373 done
11374   done
11375 IFS=$as_save_IFS
11376 
11377 fi
11378 fi
11379 AWK=$ac_cv_prog_AWK
11380 if test -n "$AWK"; then
11381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11382 $as_echo "$AWK" >&6; }
11383 else
11384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385 $as_echo "no" >&6; }
11386 fi
11387 
11388 
11389   test -n "$AWK" && break
11390 done
11391 
11392     else
11393       # If it succeeded, then it was overridden by the user. We will use it
11394       # for the tool.
11395 
11396       # First remove it from the list of overridden variables, so we can test
11397       # for unknown variables in the end.
11398       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11399 
11400       # Check if the provided tool contains a complete path.
11401       tool_specified="$AWK"
11402       tool_basename="${tool_specified##*/}"
11403       if test "x$tool_basename" = "x$tool_specified"; then
11404         # A command without a complete path is provided, search $PATH.
11405         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11406 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11407         # Extract the first word of "$tool_basename", so it can be a program name with args.
11408 set dummy $tool_basename; ac_word=$2
11409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11410 $as_echo_n "checking for $ac_word... " >&6; }
11411 if ${ac_cv_path_AWK+:} false; then :
11412   $as_echo_n "(cached) " >&6
11413 else
11414   case $AWK in
11415   [\\/]* | ?:[\\/]*)
11416   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11417   ;;
11418   *)
11419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11420 for as_dir in $PATH
11421 do
11422   IFS=$as_save_IFS
11423   test -z "$as_dir" && as_dir=.
11424     for ac_exec_ext in '' $ac_executable_extensions; do
11425   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11426     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11427     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11428     break 2
11429   fi
11430 done
11431   done
11432 IFS=$as_save_IFS
11433 
11434   ;;
11435 esac
11436 fi
11437 AWK=$ac_cv_path_AWK
11438 if test -n "$AWK"; then
11439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11440 $as_echo "$AWK" >&6; }
11441 else
11442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443 $as_echo "no" >&6; }
11444 fi
11445 
11446 
11447         if test "x$AWK" = x; then
11448           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11449         fi
11450       else
11451         # Otherwise we believe it is a complete path. Use it as it is.
11452         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11453 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11454         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11455 $as_echo_n "checking for AWK... " >&6; }
11456         if test ! -x "$tool_specified"; then
11457           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11458 $as_echo "not found" >&6; }
11459           as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11460         fi
11461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11462 $as_echo "$tool_specified" >&6; }
11463       fi
11464     fi
11465   fi
11466 
11467 
11468   if test "x$AWK" = x; then
11469     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11470   fi
11471 
11472 
11473 
11474 
11475   # Publish this variable in the help.
11476 
11477 
11478   if test "x$GREP" = x; then
11479     # The variable is not set by user, try to locate tool using the code snippet
11480     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11481 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11482 if ${ac_cv_path_GREP+:} false; then :
11483   $as_echo_n "(cached) " >&6
11484 else
11485   if test -z "$GREP"; then
11486   ac_path_GREP_found=false
11487   # Loop through the user's path and test for each of PROGNAME-LIST
11488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11489 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11490 do
11491   IFS=$as_save_IFS
11492   test -z "$as_dir" && as_dir=.
11493     for ac_prog in grep ggrep; do
11494     for ac_exec_ext in '' $ac_executable_extensions; do
11495       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11496       as_fn_executable_p "$ac_path_GREP" || continue
11497 # Check for GNU ac_path_GREP and select it if it is found.
11498   # Check for GNU $ac_path_GREP
11499 case `"$ac_path_GREP" --version 2>&1` in
11500 *GNU*)
11501   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11502 *)
11503   ac_count=0
11504   $as_echo_n 0123456789 >"conftest.in"
11505   while :
11506   do
11507     cat "conftest.in" "conftest.in" >"conftest.tmp"
11508     mv "conftest.tmp" "conftest.in"
11509     cp "conftest.in" "conftest.nl"
11510     $as_echo 'GREP' >> "conftest.nl"
11511     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11512     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11513     as_fn_arith $ac_count + 1 && ac_count=$as_val
11514     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11515       # Best one so far, save it but keep looking for a better one
11516       ac_cv_path_GREP="$ac_path_GREP"
11517       ac_path_GREP_max=$ac_count
11518     fi
11519     # 10*(2^10) chars as input seems more than enough
11520     test $ac_count -gt 10 && break
11521   done
11522   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11523 esac
11524 
11525       $ac_path_GREP_found && break 3
11526     done
11527   done
11528   done
11529 IFS=$as_save_IFS
11530   if test -z "$ac_cv_path_GREP"; then
11531     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11532   fi
11533 else
11534   ac_cv_path_GREP=$GREP
11535 fi
11536 
11537 fi
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11539 $as_echo "$ac_cv_path_GREP" >&6; }
11540  GREP="$ac_cv_path_GREP"
11541 
11542 
11543   else
11544     # The variable is set, but is it from the command line or the environment?
11545 
11546     # Try to remove the string !GREP! from our list.
11547     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11548     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11549       # If it failed, the variable was not from the command line. Ignore it,
11550       # but warn the user (except for BASH, which is always set by the calling BASH).
11551       if test "xGREP" != xBASH; then
11552         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11553 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11554       fi
11555       # Try to locate tool using the code snippet
11556       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11557 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11558 if ${ac_cv_path_GREP+:} false; then :
11559   $as_echo_n "(cached) " >&6
11560 else
11561   if test -z "$GREP"; then
11562   ac_path_GREP_found=false
11563   # Loop through the user's path and test for each of PROGNAME-LIST
11564   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11565 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11566 do
11567   IFS=$as_save_IFS
11568   test -z "$as_dir" && as_dir=.
11569     for ac_prog in grep ggrep; do
11570     for ac_exec_ext in '' $ac_executable_extensions; do
11571       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11572       as_fn_executable_p "$ac_path_GREP" || continue
11573 # Check for GNU ac_path_GREP and select it if it is found.
11574   # Check for GNU $ac_path_GREP
11575 case `"$ac_path_GREP" --version 2>&1` in
11576 *GNU*)
11577   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11578 *)
11579   ac_count=0
11580   $as_echo_n 0123456789 >"conftest.in"
11581   while :
11582   do
11583     cat "conftest.in" "conftest.in" >"conftest.tmp"
11584     mv "conftest.tmp" "conftest.in"
11585     cp "conftest.in" "conftest.nl"
11586     $as_echo 'GREP' >> "conftest.nl"
11587     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11588     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11589     as_fn_arith $ac_count + 1 && ac_count=$as_val
11590     if test $ac_count -gt ${ac_path_GREP_max-0}; then
11591       # Best one so far, save it but keep looking for a better one
11592       ac_cv_path_GREP="$ac_path_GREP"
11593       ac_path_GREP_max=$ac_count
11594     fi
11595     # 10*(2^10) chars as input seems more than enough
11596     test $ac_count -gt 10 && break
11597   done
11598   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11599 esac
11600 
11601       $ac_path_GREP_found && break 3
11602     done
11603   done
11604   done
11605 IFS=$as_save_IFS
11606   if test -z "$ac_cv_path_GREP"; then
11607     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11608   fi
11609 else
11610   ac_cv_path_GREP=$GREP
11611 fi
11612 
11613 fi
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11615 $as_echo "$ac_cv_path_GREP" >&6; }
11616  GREP="$ac_cv_path_GREP"
11617 
11618 
11619     else
11620       # If it succeeded, then it was overridden by the user. We will use it
11621       # for the tool.
11622 
11623       # First remove it from the list of overridden variables, so we can test
11624       # for unknown variables in the end.
11625       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11626 
11627       # Check if the provided tool contains a complete path.
11628       tool_specified="$GREP"
11629       tool_basename="${tool_specified##*/}"
11630       if test "x$tool_basename" = "x$tool_specified"; then
11631         # A command without a complete path is provided, search $PATH.
11632         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11633 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11634         # Extract the first word of "$tool_basename", so it can be a program name with args.
11635 set dummy $tool_basename; ac_word=$2
11636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11637 $as_echo_n "checking for $ac_word... " >&6; }
11638 if ${ac_cv_path_GREP+:} false; then :
11639   $as_echo_n "(cached) " >&6
11640 else
11641   case $GREP in
11642   [\\/]* | ?:[\\/]*)
11643   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11644   ;;
11645   *)
11646   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11647 for as_dir in $PATH
11648 do
11649   IFS=$as_save_IFS
11650   test -z "$as_dir" && as_dir=.
11651     for ac_exec_ext in '' $ac_executable_extensions; do
11652   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11653     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11654     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11655     break 2
11656   fi
11657 done
11658   done
11659 IFS=$as_save_IFS
11660 
11661   ;;
11662 esac
11663 fi
11664 GREP=$ac_cv_path_GREP
11665 if test -n "$GREP"; then
11666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11667 $as_echo "$GREP" >&6; }
11668 else
11669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11670 $as_echo "no" >&6; }
11671 fi
11672 
11673 
11674         if test "x$GREP" = x; then
11675           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11676         fi
11677       else
11678         # Otherwise we believe it is a complete path. Use it as it is.
11679         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11680 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11681         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11682 $as_echo_n "checking for GREP... " >&6; }
11683         if test ! -x "$tool_specified"; then
11684           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11685 $as_echo "not found" >&6; }
11686           as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11687         fi
11688         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11689 $as_echo "$tool_specified" >&6; }
11690       fi
11691     fi
11692   fi
11693 
11694 
11695   if test "x$GREP" = x; then
11696     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11697   fi
11698 
11699 
11700 
11701 
11702   # Publish this variable in the help.
11703 
11704 
11705   if test "x$EGREP" = x; then
11706     # The variable is not set by user, try to locate tool using the code snippet
11707     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11708 $as_echo_n "checking for egrep... " >&6; }
11709 if ${ac_cv_path_EGREP+:} false; then :
11710   $as_echo_n "(cached) " >&6
11711 else
11712   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11713    then ac_cv_path_EGREP="$GREP -E"
11714    else
11715      if test -z "$EGREP"; then
11716   ac_path_EGREP_found=false
11717   # Loop through the user's path and test for each of PROGNAME-LIST
11718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11719 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11720 do
11721   IFS=$as_save_IFS
11722   test -z "$as_dir" && as_dir=.
11723     for ac_prog in egrep; do
11724     for ac_exec_ext in '' $ac_executable_extensions; do
11725       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11726       as_fn_executable_p "$ac_path_EGREP" || continue
11727 # Check for GNU ac_path_EGREP and select it if it is found.
11728   # Check for GNU $ac_path_EGREP
11729 case `"$ac_path_EGREP" --version 2>&1` in
11730 *GNU*)
11731   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11732 *)
11733   ac_count=0
11734   $as_echo_n 0123456789 >"conftest.in"
11735   while :
11736   do
11737     cat "conftest.in" "conftest.in" >"conftest.tmp"
11738     mv "conftest.tmp" "conftest.in"
11739     cp "conftest.in" "conftest.nl"
11740     $as_echo 'EGREP' >> "conftest.nl"
11741     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11742     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11743     as_fn_arith $ac_count + 1 && ac_count=$as_val
11744     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11745       # Best one so far, save it but keep looking for a better one
11746       ac_cv_path_EGREP="$ac_path_EGREP"
11747       ac_path_EGREP_max=$ac_count
11748     fi
11749     # 10*(2^10) chars as input seems more than enough
11750     test $ac_count -gt 10 && break
11751   done
11752   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11753 esac
11754 
11755       $ac_path_EGREP_found && break 3
11756     done
11757   done
11758   done
11759 IFS=$as_save_IFS
11760   if test -z "$ac_cv_path_EGREP"; then
11761     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11762   fi
11763 else
11764   ac_cv_path_EGREP=$EGREP
11765 fi
11766 
11767    fi
11768 fi
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11770 $as_echo "$ac_cv_path_EGREP" >&6; }
11771  EGREP="$ac_cv_path_EGREP"
11772 
11773 
11774   else
11775     # The variable is set, but is it from the command line or the environment?
11776 
11777     # Try to remove the string !EGREP! from our list.
11778     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11779     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11780       # If it failed, the variable was not from the command line. Ignore it,
11781       # but warn the user (except for BASH, which is always set by the calling BASH).
11782       if test "xEGREP" != xBASH; then
11783         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11784 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11785       fi
11786       # Try to locate tool using the code snippet
11787       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11788 $as_echo_n "checking for egrep... " >&6; }
11789 if ${ac_cv_path_EGREP+:} false; then :
11790   $as_echo_n "(cached) " >&6
11791 else
11792   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11793    then ac_cv_path_EGREP="$GREP -E"
11794    else
11795      if test -z "$EGREP"; then
11796   ac_path_EGREP_found=false
11797   # Loop through the user's path and test for each of PROGNAME-LIST
11798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11799 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11800 do
11801   IFS=$as_save_IFS
11802   test -z "$as_dir" && as_dir=.
11803     for ac_prog in egrep; do
11804     for ac_exec_ext in '' $ac_executable_extensions; do
11805       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11806       as_fn_executable_p "$ac_path_EGREP" || continue
11807 # Check for GNU ac_path_EGREP and select it if it is found.
11808   # Check for GNU $ac_path_EGREP
11809 case `"$ac_path_EGREP" --version 2>&1` in
11810 *GNU*)
11811   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11812 *)
11813   ac_count=0
11814   $as_echo_n 0123456789 >"conftest.in"
11815   while :
11816   do
11817     cat "conftest.in" "conftest.in" >"conftest.tmp"
11818     mv "conftest.tmp" "conftest.in"
11819     cp "conftest.in" "conftest.nl"
11820     $as_echo 'EGREP' >> "conftest.nl"
11821     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11822     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11823     as_fn_arith $ac_count + 1 && ac_count=$as_val
11824     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11825       # Best one so far, save it but keep looking for a better one
11826       ac_cv_path_EGREP="$ac_path_EGREP"
11827       ac_path_EGREP_max=$ac_count
11828     fi
11829     # 10*(2^10) chars as input seems more than enough
11830     test $ac_count -gt 10 && break
11831   done
11832   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11833 esac
11834 
11835       $ac_path_EGREP_found && break 3
11836     done
11837   done
11838   done
11839 IFS=$as_save_IFS
11840   if test -z "$ac_cv_path_EGREP"; then
11841     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11842   fi
11843 else
11844   ac_cv_path_EGREP=$EGREP
11845 fi
11846 
11847    fi
11848 fi
11849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11850 $as_echo "$ac_cv_path_EGREP" >&6; }
11851  EGREP="$ac_cv_path_EGREP"
11852 
11853 
11854     else
11855       # If it succeeded, then it was overridden by the user. We will use it
11856       # for the tool.
11857 
11858       # First remove it from the list of overridden variables, so we can test
11859       # for unknown variables in the end.
11860       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11861 
11862       # Check if the provided tool contains a complete path.
11863       tool_specified="$EGREP"
11864       tool_basename="${tool_specified##*/}"
11865       if test "x$tool_basename" = "x$tool_specified"; then
11866         # A command without a complete path is provided, search $PATH.
11867         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11868 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11869         # Extract the first word of "$tool_basename", so it can be a program name with args.
11870 set dummy $tool_basename; ac_word=$2
11871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11872 $as_echo_n "checking for $ac_word... " >&6; }
11873 if ${ac_cv_path_EGREP+:} false; then :
11874   $as_echo_n "(cached) " >&6
11875 else
11876   case $EGREP in
11877   [\\/]* | ?:[\\/]*)
11878   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11879   ;;
11880   *)
11881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11882 for as_dir in $PATH
11883 do
11884   IFS=$as_save_IFS
11885   test -z "$as_dir" && as_dir=.
11886     for ac_exec_ext in '' $ac_executable_extensions; do
11887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11888     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11890     break 2
11891   fi
11892 done
11893   done
11894 IFS=$as_save_IFS
11895 
11896   ;;
11897 esac
11898 fi
11899 EGREP=$ac_cv_path_EGREP
11900 if test -n "$EGREP"; then
11901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11902 $as_echo "$EGREP" >&6; }
11903 else
11904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11905 $as_echo "no" >&6; }
11906 fi
11907 
11908 
11909         if test "x$EGREP" = x; then
11910           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11911         fi
11912       else
11913         # Otherwise we believe it is a complete path. Use it as it is.
11914         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11915 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11916         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11917 $as_echo_n "checking for EGREP... " >&6; }
11918         if test ! -x "$tool_specified"; then
11919           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11920 $as_echo "not found" >&6; }
11921           as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11922         fi
11923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11924 $as_echo "$tool_specified" >&6; }
11925       fi
11926     fi
11927   fi
11928 
11929 
11930   if test "x$EGREP" = x; then
11931     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
11932   fi
11933 
11934 
11935 
11936 
11937   # Publish this variable in the help.
11938 
11939 
11940   if test "x$FGREP" = x; then
11941     # The variable is not set by user, try to locate tool using the code snippet
11942     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
11943 $as_echo_n "checking for fgrep... " >&6; }
11944 if ${ac_cv_path_FGREP+:} false; then :
11945   $as_echo_n "(cached) " >&6
11946 else
11947   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
11948    then ac_cv_path_FGREP="$GREP -F"
11949    else
11950      if test -z "$FGREP"; then
11951   ac_path_FGREP_found=false
11952   # Loop through the user's path and test for each of PROGNAME-LIST
11953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11954 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11955 do
11956   IFS=$as_save_IFS
11957   test -z "$as_dir" && as_dir=.
11958     for ac_prog in fgrep; do
11959     for ac_exec_ext in '' $ac_executable_extensions; do
11960       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
11961       as_fn_executable_p "$ac_path_FGREP" || continue
11962 # Check for GNU ac_path_FGREP and select it if it is found.
11963   # Check for GNU $ac_path_FGREP
11964 case `"$ac_path_FGREP" --version 2>&1` in
11965 *GNU*)
11966   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
11967 *)
11968   ac_count=0
11969   $as_echo_n 0123456789 >"conftest.in"
11970   while :
11971   do
11972     cat "conftest.in" "conftest.in" >"conftest.tmp"
11973     mv "conftest.tmp" "conftest.in"
11974     cp "conftest.in" "conftest.nl"
11975     $as_echo 'FGREP' >> "conftest.nl"
11976     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
11977     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11978     as_fn_arith $ac_count + 1 && ac_count=$as_val
11979     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
11980       # Best one so far, save it but keep looking for a better one
11981       ac_cv_path_FGREP="$ac_path_FGREP"
11982       ac_path_FGREP_max=$ac_count
11983     fi
11984     # 10*(2^10) chars as input seems more than enough
11985     test $ac_count -gt 10 && break
11986   done
11987   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11988 esac
11989 
11990       $ac_path_FGREP_found && break 3
11991     done
11992   done
11993   done
11994 IFS=$as_save_IFS
11995   if test -z "$ac_cv_path_FGREP"; then
11996     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11997   fi
11998 else
11999   ac_cv_path_FGREP=$FGREP
12000 fi
12001 
12002    fi
12003 fi
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12005 $as_echo "$ac_cv_path_FGREP" >&6; }
12006  FGREP="$ac_cv_path_FGREP"
12007 
12008 
12009   else
12010     # The variable is set, but is it from the command line or the environment?
12011 
12012     # Try to remove the string !FGREP! from our list.
12013     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12014     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12015       # If it failed, the variable was not from the command line. Ignore it,
12016       # but warn the user (except for BASH, which is always set by the calling BASH).
12017       if test "xFGREP" != xBASH; then
12018         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12019 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12020       fi
12021       # Try to locate tool using the code snippet
12022       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12023 $as_echo_n "checking for fgrep... " >&6; }
12024 if ${ac_cv_path_FGREP+:} false; then :
12025   $as_echo_n "(cached) " >&6
12026 else
12027   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12028    then ac_cv_path_FGREP="$GREP -F"
12029    else
12030      if test -z "$FGREP"; then
12031   ac_path_FGREP_found=false
12032   # Loop through the user's path and test for each of PROGNAME-LIST
12033   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12035 do
12036   IFS=$as_save_IFS
12037   test -z "$as_dir" && as_dir=.
12038     for ac_prog in fgrep; do
12039     for ac_exec_ext in '' $ac_executable_extensions; do
12040       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12041       as_fn_executable_p "$ac_path_FGREP" || continue
12042 # Check for GNU ac_path_FGREP and select it if it is found.
12043   # Check for GNU $ac_path_FGREP
12044 case `"$ac_path_FGREP" --version 2>&1` in
12045 *GNU*)
12046   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12047 *)
12048   ac_count=0
12049   $as_echo_n 0123456789 >"conftest.in"
12050   while :
12051   do
12052     cat "conftest.in" "conftest.in" >"conftest.tmp"
12053     mv "conftest.tmp" "conftest.in"
12054     cp "conftest.in" "conftest.nl"
12055     $as_echo 'FGREP' >> "conftest.nl"
12056     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12057     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12058     as_fn_arith $ac_count + 1 && ac_count=$as_val
12059     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12060       # Best one so far, save it but keep looking for a better one
12061       ac_cv_path_FGREP="$ac_path_FGREP"
12062       ac_path_FGREP_max=$ac_count
12063     fi
12064     # 10*(2^10) chars as input seems more than enough
12065     test $ac_count -gt 10 && break
12066   done
12067   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12068 esac
12069 
12070       $ac_path_FGREP_found && break 3
12071     done
12072   done
12073   done
12074 IFS=$as_save_IFS
12075   if test -z "$ac_cv_path_FGREP"; then
12076     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12077   fi
12078 else
12079   ac_cv_path_FGREP=$FGREP
12080 fi
12081 
12082    fi
12083 fi
12084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12085 $as_echo "$ac_cv_path_FGREP" >&6; }
12086  FGREP="$ac_cv_path_FGREP"
12087 
12088 
12089     else
12090       # If it succeeded, then it was overridden by the user. We will use it
12091       # for the tool.
12092 
12093       # First remove it from the list of overridden variables, so we can test
12094       # for unknown variables in the end.
12095       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12096 
12097       # Check if the provided tool contains a complete path.
12098       tool_specified="$FGREP"
12099       tool_basename="${tool_specified##*/}"
12100       if test "x$tool_basename" = "x$tool_specified"; then
12101         # A command without a complete path is provided, search $PATH.
12102         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12103 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12104         # Extract the first word of "$tool_basename", so it can be a program name with args.
12105 set dummy $tool_basename; ac_word=$2
12106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12107 $as_echo_n "checking for $ac_word... " >&6; }
12108 if ${ac_cv_path_FGREP+:} false; then :
12109   $as_echo_n "(cached) " >&6
12110 else
12111   case $FGREP in
12112   [\\/]* | ?:[\\/]*)
12113   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12114   ;;
12115   *)
12116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12117 for as_dir in $PATH
12118 do
12119   IFS=$as_save_IFS
12120   test -z "$as_dir" && as_dir=.
12121     for ac_exec_ext in '' $ac_executable_extensions; do
12122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12123     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12125     break 2
12126   fi
12127 done
12128   done
12129 IFS=$as_save_IFS
12130 
12131   ;;
12132 esac
12133 fi
12134 FGREP=$ac_cv_path_FGREP
12135 if test -n "$FGREP"; then
12136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12137 $as_echo "$FGREP" >&6; }
12138 else
12139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12140 $as_echo "no" >&6; }
12141 fi
12142 
12143 
12144         if test "x$FGREP" = x; then
12145           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12146         fi
12147       else
12148         # Otherwise we believe it is a complete path. Use it as it is.
12149         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12150 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12151         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12152 $as_echo_n "checking for FGREP... " >&6; }
12153         if test ! -x "$tool_specified"; then
12154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12155 $as_echo "not found" >&6; }
12156           as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12157         fi
12158         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12159 $as_echo "$tool_specified" >&6; }
12160       fi
12161     fi
12162   fi
12163 
12164 
12165   if test "x$FGREP" = x; then
12166     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12167   fi
12168 
12169 
12170 
12171 
12172   # Publish this variable in the help.
12173 
12174 
12175   if test "x$SED" = x; then
12176     # The variable is not set by user, try to locate tool using the code snippet
12177     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12178 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12179 if ${ac_cv_path_SED+:} false; then :
12180   $as_echo_n "(cached) " >&6
12181 else
12182             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12183      for ac_i in 1 2 3 4 5 6 7; do
12184        ac_script="$ac_script$as_nl$ac_script"
12185      done
12186      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12187      { ac_script=; unset ac_script;}
12188      if test -z "$SED"; then
12189   ac_path_SED_found=false
12190   # Loop through the user's path and test for each of PROGNAME-LIST
12191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12192 for as_dir in $PATH
12193 do
12194   IFS=$as_save_IFS
12195   test -z "$as_dir" && as_dir=.
12196     for ac_prog in sed gsed; do
12197     for ac_exec_ext in '' $ac_executable_extensions; do
12198       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12199       as_fn_executable_p "$ac_path_SED" || continue
12200 # Check for GNU ac_path_SED and select it if it is found.
12201   # Check for GNU $ac_path_SED
12202 case `"$ac_path_SED" --version 2>&1` in
12203 *GNU*)
12204   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12205 *)
12206   ac_count=0
12207   $as_echo_n 0123456789 >"conftest.in"
12208   while :
12209   do
12210     cat "conftest.in" "conftest.in" >"conftest.tmp"
12211     mv "conftest.tmp" "conftest.in"
12212     cp "conftest.in" "conftest.nl"
12213     $as_echo '' >> "conftest.nl"
12214     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12215     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12216     as_fn_arith $ac_count + 1 && ac_count=$as_val
12217     if test $ac_count -gt ${ac_path_SED_max-0}; then
12218       # Best one so far, save it but keep looking for a better one
12219       ac_cv_path_SED="$ac_path_SED"
12220       ac_path_SED_max=$ac_count
12221     fi
12222     # 10*(2^10) chars as input seems more than enough
12223     test $ac_count -gt 10 && break
12224   done
12225   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12226 esac
12227 
12228       $ac_path_SED_found && break 3
12229     done
12230   done
12231   done
12232 IFS=$as_save_IFS
12233   if test -z "$ac_cv_path_SED"; then
12234     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12235   fi
12236 else
12237   ac_cv_path_SED=$SED
12238 fi
12239 
12240 fi
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12242 $as_echo "$ac_cv_path_SED" >&6; }
12243  SED="$ac_cv_path_SED"
12244   rm -f conftest.sed
12245 
12246   else
12247     # The variable is set, but is it from the command line or the environment?
12248 
12249     # Try to remove the string !SED! from our list.
12250     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12251     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12252       # If it failed, the variable was not from the command line. Ignore it,
12253       # but warn the user (except for BASH, which is always set by the calling BASH).
12254       if test "xSED" != xBASH; then
12255         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12256 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12257       fi
12258       # Try to locate tool using the code snippet
12259       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12260 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12261 if ${ac_cv_path_SED+:} false; then :
12262   $as_echo_n "(cached) " >&6
12263 else
12264             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12265      for ac_i in 1 2 3 4 5 6 7; do
12266        ac_script="$ac_script$as_nl$ac_script"
12267      done
12268      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12269      { ac_script=; unset ac_script;}
12270      if test -z "$SED"; then
12271   ac_path_SED_found=false
12272   # Loop through the user's path and test for each of PROGNAME-LIST
12273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12274 for as_dir in $PATH
12275 do
12276   IFS=$as_save_IFS
12277   test -z "$as_dir" && as_dir=.
12278     for ac_prog in sed gsed; do
12279     for ac_exec_ext in '' $ac_executable_extensions; do
12280       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12281       as_fn_executable_p "$ac_path_SED" || continue
12282 # Check for GNU ac_path_SED and select it if it is found.
12283   # Check for GNU $ac_path_SED
12284 case `"$ac_path_SED" --version 2>&1` in
12285 *GNU*)
12286   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12287 *)
12288   ac_count=0
12289   $as_echo_n 0123456789 >"conftest.in"
12290   while :
12291   do
12292     cat "conftest.in" "conftest.in" >"conftest.tmp"
12293     mv "conftest.tmp" "conftest.in"
12294     cp "conftest.in" "conftest.nl"
12295     $as_echo '' >> "conftest.nl"
12296     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12297     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12298     as_fn_arith $ac_count + 1 && ac_count=$as_val
12299     if test $ac_count -gt ${ac_path_SED_max-0}; then
12300       # Best one so far, save it but keep looking for a better one
12301       ac_cv_path_SED="$ac_path_SED"
12302       ac_path_SED_max=$ac_count
12303     fi
12304     # 10*(2^10) chars as input seems more than enough
12305     test $ac_count -gt 10 && break
12306   done
12307   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12308 esac
12309 
12310       $ac_path_SED_found && break 3
12311     done
12312   done
12313   done
12314 IFS=$as_save_IFS
12315   if test -z "$ac_cv_path_SED"; then
12316     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12317   fi
12318 else
12319   ac_cv_path_SED=$SED
12320 fi
12321 
12322 fi
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12324 $as_echo "$ac_cv_path_SED" >&6; }
12325  SED="$ac_cv_path_SED"
12326   rm -f conftest.sed
12327 
12328     else
12329       # If it succeeded, then it was overridden by the user. We will use it
12330       # for the tool.
12331 
12332       # First remove it from the list of overridden variables, so we can test
12333       # for unknown variables in the end.
12334       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12335 
12336       # Check if the provided tool contains a complete path.
12337       tool_specified="$SED"
12338       tool_basename="${tool_specified##*/}"
12339       if test "x$tool_basename" = "x$tool_specified"; then
12340         # A command without a complete path is provided, search $PATH.
12341         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12342 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12343         # Extract the first word of "$tool_basename", so it can be a program name with args.
12344 set dummy $tool_basename; ac_word=$2
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12346 $as_echo_n "checking for $ac_word... " >&6; }
12347 if ${ac_cv_path_SED+:} false; then :
12348   $as_echo_n "(cached) " >&6
12349 else
12350   case $SED in
12351   [\\/]* | ?:[\\/]*)
12352   ac_cv_path_SED="$SED" # Let the user override the test with a path.
12353   ;;
12354   *)
12355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12356 for as_dir in $PATH
12357 do
12358   IFS=$as_save_IFS
12359   test -z "$as_dir" && as_dir=.
12360     for ac_exec_ext in '' $ac_executable_extensions; do
12361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12362     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12364     break 2
12365   fi
12366 done
12367   done
12368 IFS=$as_save_IFS
12369 
12370   ;;
12371 esac
12372 fi
12373 SED=$ac_cv_path_SED
12374 if test -n "$SED"; then
12375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12376 $as_echo "$SED" >&6; }
12377 else
12378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12379 $as_echo "no" >&6; }
12380 fi
12381 
12382 
12383         if test "x$SED" = x; then
12384           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12385         fi
12386       else
12387         # Otherwise we believe it is a complete path. Use it as it is.
12388         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12389 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12390         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12391 $as_echo_n "checking for SED... " >&6; }
12392         if test ! -x "$tool_specified"; then
12393           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12394 $as_echo "not found" >&6; }
12395           as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12396         fi
12397         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12398 $as_echo "$tool_specified" >&6; }
12399       fi
12400     fi
12401   fi
12402 
12403 
12404   if test "x$SED" = x; then
12405     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12406   fi
12407 
12408 
12409 
12410   # Always force rm.
12411   RM="$RM -f"
12412 
12413   # pwd behaves differently on various platforms and some don't support the -L flag.
12414   # Always use the bash builtin pwd to get uniform behavior.
12415   THEPWDCMD=pwd
12416 
12417   # These are not required on all platforms
12418 
12419 
12420   # Publish this variable in the help.
12421 
12422 
12423   if test "x$CYGPATH" = x; then
12424     # The variable is not set by user, try to locate tool using the code snippet
12425     for ac_prog in cygpath
12426 do
12427   # Extract the first word of "$ac_prog", so it can be a program name with args.
12428 set dummy $ac_prog; ac_word=$2
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12430 $as_echo_n "checking for $ac_word... " >&6; }
12431 if ${ac_cv_path_CYGPATH+:} false; then :
12432   $as_echo_n "(cached) " >&6
12433 else
12434   case $CYGPATH in
12435   [\\/]* | ?:[\\/]*)
12436   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12437   ;;
12438   *)
12439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12440 for as_dir in $PATH
12441 do
12442   IFS=$as_save_IFS
12443   test -z "$as_dir" && as_dir=.
12444     for ac_exec_ext in '' $ac_executable_extensions; do
12445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12446     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12448     break 2
12449   fi
12450 done
12451   done
12452 IFS=$as_save_IFS
12453 
12454   ;;
12455 esac
12456 fi
12457 CYGPATH=$ac_cv_path_CYGPATH
12458 if test -n "$CYGPATH"; then
12459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12460 $as_echo "$CYGPATH" >&6; }
12461 else
12462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12463 $as_echo "no" >&6; }
12464 fi
12465 
12466 
12467   test -n "$CYGPATH" && break
12468 done
12469 
12470   else
12471     # The variable is set, but is it from the command line or the environment?
12472 
12473     # Try to remove the string !CYGPATH! from our list.
12474     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12475     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12476       # If it failed, the variable was not from the command line. Ignore it,
12477       # but warn the user (except for BASH, which is always set by the calling BASH).
12478       if test "xCYGPATH" != xBASH; then
12479         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12480 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12481       fi
12482       # Try to locate tool using the code snippet
12483       for ac_prog in cygpath
12484 do
12485   # Extract the first word of "$ac_prog", so it can be a program name with args.
12486 set dummy $ac_prog; ac_word=$2
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12488 $as_echo_n "checking for $ac_word... " >&6; }
12489 if ${ac_cv_path_CYGPATH+:} false; then :
12490   $as_echo_n "(cached) " >&6
12491 else
12492   case $CYGPATH in
12493   [\\/]* | ?:[\\/]*)
12494   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12495   ;;
12496   *)
12497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12498 for as_dir in $PATH
12499 do
12500   IFS=$as_save_IFS
12501   test -z "$as_dir" && as_dir=.
12502     for ac_exec_ext in '' $ac_executable_extensions; do
12503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12504     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12506     break 2
12507   fi
12508 done
12509   done
12510 IFS=$as_save_IFS
12511 
12512   ;;
12513 esac
12514 fi
12515 CYGPATH=$ac_cv_path_CYGPATH
12516 if test -n "$CYGPATH"; then
12517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12518 $as_echo "$CYGPATH" >&6; }
12519 else
12520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12521 $as_echo "no" >&6; }
12522 fi
12523 
12524 
12525   test -n "$CYGPATH" && break
12526 done
12527 
12528     else
12529       # If it succeeded, then it was overridden by the user. We will use it
12530       # for the tool.
12531 
12532       # First remove it from the list of overridden variables, so we can test
12533       # for unknown variables in the end.
12534       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12535 
12536       # Check if the provided tool contains a complete path.
12537       tool_specified="$CYGPATH"
12538       tool_basename="${tool_specified##*/}"
12539       if test "x$tool_basename" = "x$tool_specified"; then
12540         # A command without a complete path is provided, search $PATH.
12541         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12542 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12543         # Extract the first word of "$tool_basename", so it can be a program name with args.
12544 set dummy $tool_basename; ac_word=$2
12545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12546 $as_echo_n "checking for $ac_word... " >&6; }
12547 if ${ac_cv_path_CYGPATH+:} false; then :
12548   $as_echo_n "(cached) " >&6
12549 else
12550   case $CYGPATH in
12551   [\\/]* | ?:[\\/]*)
12552   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12553   ;;
12554   *)
12555   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12556 for as_dir in $PATH
12557 do
12558   IFS=$as_save_IFS
12559   test -z "$as_dir" && as_dir=.
12560     for ac_exec_ext in '' $ac_executable_extensions; do
12561   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12562     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12563     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12564     break 2
12565   fi
12566 done
12567   done
12568 IFS=$as_save_IFS
12569 
12570   ;;
12571 esac
12572 fi
12573 CYGPATH=$ac_cv_path_CYGPATH
12574 if test -n "$CYGPATH"; then
12575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12576 $as_echo "$CYGPATH" >&6; }
12577 else
12578   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12579 $as_echo "no" >&6; }
12580 fi
12581 
12582 
12583         if test "x$CYGPATH" = x; then
12584           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12585         fi
12586       else
12587         # Otherwise we believe it is a complete path. Use it as it is.
12588         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12589 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12591 $as_echo_n "checking for CYGPATH... " >&6; }
12592         if test ! -x "$tool_specified"; then
12593           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12594 $as_echo "not found" >&6; }
12595           as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12596         fi
12597         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12598 $as_echo "$tool_specified" >&6; }
12599       fi
12600     fi
12601   fi
12602 
12603 
12604 
12605 
12606   # Publish this variable in the help.
12607 
12608 
12609   if test "x$READLINK" = x; then
12610     # The variable is not set by user, try to locate tool using the code snippet
12611     for ac_prog in greadlink readlink
12612 do
12613   # Extract the first word of "$ac_prog", so it can be a program name with args.
12614 set dummy $ac_prog; ac_word=$2
12615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12616 $as_echo_n "checking for $ac_word... " >&6; }
12617 if ${ac_cv_path_READLINK+:} false; then :
12618   $as_echo_n "(cached) " >&6
12619 else
12620   case $READLINK in
12621   [\\/]* | ?:[\\/]*)
12622   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12623   ;;
12624   *)
12625   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12626 for as_dir in $PATH
12627 do
12628   IFS=$as_save_IFS
12629   test -z "$as_dir" && as_dir=.
12630     for ac_exec_ext in '' $ac_executable_extensions; do
12631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12632     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12634     break 2
12635   fi
12636 done
12637   done
12638 IFS=$as_save_IFS
12639 
12640   ;;
12641 esac
12642 fi
12643 READLINK=$ac_cv_path_READLINK
12644 if test -n "$READLINK"; then
12645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12646 $as_echo "$READLINK" >&6; }
12647 else
12648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12649 $as_echo "no" >&6; }
12650 fi
12651 
12652 
12653   test -n "$READLINK" && break
12654 done
12655 
12656   else
12657     # The variable is set, but is it from the command line or the environment?
12658 
12659     # Try to remove the string !READLINK! from our list.
12660     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12661     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12662       # If it failed, the variable was not from the command line. Ignore it,
12663       # but warn the user (except for BASH, which is always set by the calling BASH).
12664       if test "xREADLINK" != xBASH; then
12665         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12666 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12667       fi
12668       # Try to locate tool using the code snippet
12669       for ac_prog in greadlink readlink
12670 do
12671   # Extract the first word of "$ac_prog", so it can be a program name with args.
12672 set dummy $ac_prog; ac_word=$2
12673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12674 $as_echo_n "checking for $ac_word... " >&6; }
12675 if ${ac_cv_path_READLINK+:} false; then :
12676   $as_echo_n "(cached) " >&6
12677 else
12678   case $READLINK in
12679   [\\/]* | ?:[\\/]*)
12680   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12681   ;;
12682   *)
12683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12684 for as_dir in $PATH
12685 do
12686   IFS=$as_save_IFS
12687   test -z "$as_dir" && as_dir=.
12688     for ac_exec_ext in '' $ac_executable_extensions; do
12689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12690     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12692     break 2
12693   fi
12694 done
12695   done
12696 IFS=$as_save_IFS
12697 
12698   ;;
12699 esac
12700 fi
12701 READLINK=$ac_cv_path_READLINK
12702 if test -n "$READLINK"; then
12703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12704 $as_echo "$READLINK" >&6; }
12705 else
12706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12707 $as_echo "no" >&6; }
12708 fi
12709 
12710 
12711   test -n "$READLINK" && break
12712 done
12713 
12714     else
12715       # If it succeeded, then it was overridden by the user. We will use it
12716       # for the tool.
12717 
12718       # First remove it from the list of overridden variables, so we can test
12719       # for unknown variables in the end.
12720       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12721 
12722       # Check if the provided tool contains a complete path.
12723       tool_specified="$READLINK"
12724       tool_basename="${tool_specified##*/}"
12725       if test "x$tool_basename" = "x$tool_specified"; then
12726         # A command without a complete path is provided, search $PATH.
12727         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12728 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12729         # Extract the first word of "$tool_basename", so it can be a program name with args.
12730 set dummy $tool_basename; ac_word=$2
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12732 $as_echo_n "checking for $ac_word... " >&6; }
12733 if ${ac_cv_path_READLINK+:} false; then :
12734   $as_echo_n "(cached) " >&6
12735 else
12736   case $READLINK in
12737   [\\/]* | ?:[\\/]*)
12738   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12739   ;;
12740   *)
12741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12742 for as_dir in $PATH
12743 do
12744   IFS=$as_save_IFS
12745   test -z "$as_dir" && as_dir=.
12746     for ac_exec_ext in '' $ac_executable_extensions; do
12747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12748     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12750     break 2
12751   fi
12752 done
12753   done
12754 IFS=$as_save_IFS
12755 
12756   ;;
12757 esac
12758 fi
12759 READLINK=$ac_cv_path_READLINK
12760 if test -n "$READLINK"; then
12761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12762 $as_echo "$READLINK" >&6; }
12763 else
12764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12765 $as_echo "no" >&6; }
12766 fi
12767 
12768 
12769         if test "x$READLINK" = x; then
12770           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12771         fi
12772       else
12773         # Otherwise we believe it is a complete path. Use it as it is.
12774         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12775 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12776         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12777 $as_echo_n "checking for READLINK... " >&6; }
12778         if test ! -x "$tool_specified"; then
12779           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12780 $as_echo "not found" >&6; }
12781           as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12782         fi
12783         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12784 $as_echo "$tool_specified" >&6; }
12785       fi
12786     fi
12787   fi
12788 
12789 
12790 
12791 
12792   # Publish this variable in the help.
12793 
12794 
12795   if test "x$DF" = x; then
12796     # The variable is not set by user, try to locate tool using the code snippet
12797     for ac_prog in df
12798 do
12799   # Extract the first word of "$ac_prog", so it can be a program name with args.
12800 set dummy $ac_prog; ac_word=$2
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12802 $as_echo_n "checking for $ac_word... " >&6; }
12803 if ${ac_cv_path_DF+:} false; then :
12804   $as_echo_n "(cached) " >&6
12805 else
12806   case $DF in
12807   [\\/]* | ?:[\\/]*)
12808   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12809   ;;
12810   *)
12811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12812 for as_dir in $PATH
12813 do
12814   IFS=$as_save_IFS
12815   test -z "$as_dir" && as_dir=.
12816     for ac_exec_ext in '' $ac_executable_extensions; do
12817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12818     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12820     break 2
12821   fi
12822 done
12823   done
12824 IFS=$as_save_IFS
12825 
12826   ;;
12827 esac
12828 fi
12829 DF=$ac_cv_path_DF
12830 if test -n "$DF"; then
12831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12832 $as_echo "$DF" >&6; }
12833 else
12834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12835 $as_echo "no" >&6; }
12836 fi
12837 
12838 
12839   test -n "$DF" && break
12840 done
12841 
12842   else
12843     # The variable is set, but is it from the command line or the environment?
12844 
12845     # Try to remove the string !DF! from our list.
12846     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12847     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12848       # If it failed, the variable was not from the command line. Ignore it,
12849       # but warn the user (except for BASH, which is always set by the calling BASH).
12850       if test "xDF" != xBASH; then
12851         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12852 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12853       fi
12854       # Try to locate tool using the code snippet
12855       for ac_prog in df
12856 do
12857   # Extract the first word of "$ac_prog", so it can be a program name with args.
12858 set dummy $ac_prog; ac_word=$2
12859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12860 $as_echo_n "checking for $ac_word... " >&6; }
12861 if ${ac_cv_path_DF+:} false; then :
12862   $as_echo_n "(cached) " >&6
12863 else
12864   case $DF in
12865   [\\/]* | ?:[\\/]*)
12866   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12867   ;;
12868   *)
12869   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12870 for as_dir in $PATH
12871 do
12872   IFS=$as_save_IFS
12873   test -z "$as_dir" && as_dir=.
12874     for ac_exec_ext in '' $ac_executable_extensions; do
12875   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12876     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12877     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12878     break 2
12879   fi
12880 done
12881   done
12882 IFS=$as_save_IFS
12883 
12884   ;;
12885 esac
12886 fi
12887 DF=$ac_cv_path_DF
12888 if test -n "$DF"; then
12889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12890 $as_echo "$DF" >&6; }
12891 else
12892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12893 $as_echo "no" >&6; }
12894 fi
12895 
12896 
12897   test -n "$DF" && break
12898 done
12899 
12900     else
12901       # If it succeeded, then it was overridden by the user. We will use it
12902       # for the tool.
12903 
12904       # First remove it from the list of overridden variables, so we can test
12905       # for unknown variables in the end.
12906       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12907 
12908       # Check if the provided tool contains a complete path.
12909       tool_specified="$DF"
12910       tool_basename="${tool_specified##*/}"
12911       if test "x$tool_basename" = "x$tool_specified"; then
12912         # A command without a complete path is provided, search $PATH.
12913         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12914 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12915         # Extract the first word of "$tool_basename", so it can be a program name with args.
12916 set dummy $tool_basename; ac_word=$2
12917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12918 $as_echo_n "checking for $ac_word... " >&6; }
12919 if ${ac_cv_path_DF+:} false; then :
12920   $as_echo_n "(cached) " >&6
12921 else
12922   case $DF in
12923   [\\/]* | ?:[\\/]*)
12924   ac_cv_path_DF="$DF" # Let the user override the test with a path.
12925   ;;
12926   *)
12927   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12928 for as_dir in $PATH
12929 do
12930   IFS=$as_save_IFS
12931   test -z "$as_dir" && as_dir=.
12932     for ac_exec_ext in '' $ac_executable_extensions; do
12933   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12934     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12935     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12936     break 2
12937   fi
12938 done
12939   done
12940 IFS=$as_save_IFS
12941 
12942   ;;
12943 esac
12944 fi
12945 DF=$ac_cv_path_DF
12946 if test -n "$DF"; then
12947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12948 $as_echo "$DF" >&6; }
12949 else
12950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12951 $as_echo "no" >&6; }
12952 fi
12953 
12954 
12955         if test "x$DF" = x; then
12956           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12957         fi
12958       else
12959         # Otherwise we believe it is a complete path. Use it as it is.
12960         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
12961 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
12962         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
12963 $as_echo_n "checking for DF... " >&6; }
12964         if test ! -x "$tool_specified"; then
12965           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12966 $as_echo "not found" >&6; }
12967           as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
12968         fi
12969         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12970 $as_echo "$tool_specified" >&6; }
12971       fi
12972     fi
12973   fi
12974 
12975 
12976 
12977 
12978   # Publish this variable in the help.
12979 
12980 
12981   if test "x$SETFILE" = x; then
12982     # The variable is not set by user, try to locate tool using the code snippet
12983     for ac_prog in SetFile
12984 do
12985   # Extract the first word of "$ac_prog", so it can be a program name with args.
12986 set dummy $ac_prog; ac_word=$2
12987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12988 $as_echo_n "checking for $ac_word... " >&6; }
12989 if ${ac_cv_path_SETFILE+:} false; then :
12990   $as_echo_n "(cached) " >&6
12991 else
12992   case $SETFILE in
12993   [\\/]* | ?:[\\/]*)
12994   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
12995   ;;
12996   *)
12997   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12998 for as_dir in $PATH
12999 do
13000   IFS=$as_save_IFS
13001   test -z "$as_dir" && as_dir=.
13002     for ac_exec_ext in '' $ac_executable_extensions; do
13003   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13004     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13005     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13006     break 2
13007   fi
13008 done
13009   done
13010 IFS=$as_save_IFS
13011 
13012   ;;
13013 esac
13014 fi
13015 SETFILE=$ac_cv_path_SETFILE
13016 if test -n "$SETFILE"; then
13017   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13018 $as_echo "$SETFILE" >&6; }
13019 else
13020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13021 $as_echo "no" >&6; }
13022 fi
13023 
13024 
13025   test -n "$SETFILE" && break
13026 done
13027 
13028   else
13029     # The variable is set, but is it from the command line or the environment?
13030 
13031     # Try to remove the string !SETFILE! from our list.
13032     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13033     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13034       # If it failed, the variable was not from the command line. Ignore it,
13035       # but warn the user (except for BASH, which is always set by the calling BASH).
13036       if test "xSETFILE" != xBASH; then
13037         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13038 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13039       fi
13040       # Try to locate tool using the code snippet
13041       for ac_prog in SetFile
13042 do
13043   # Extract the first word of "$ac_prog", so it can be a program name with args.
13044 set dummy $ac_prog; ac_word=$2
13045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046 $as_echo_n "checking for $ac_word... " >&6; }
13047 if ${ac_cv_path_SETFILE+:} false; then :
13048   $as_echo_n "(cached) " >&6
13049 else
13050   case $SETFILE in
13051   [\\/]* | ?:[\\/]*)
13052   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13053   ;;
13054   *)
13055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056 for as_dir in $PATH
13057 do
13058   IFS=$as_save_IFS
13059   test -z "$as_dir" && as_dir=.
13060     for ac_exec_ext in '' $ac_executable_extensions; do
13061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13062     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13064     break 2
13065   fi
13066 done
13067   done
13068 IFS=$as_save_IFS
13069 
13070   ;;
13071 esac
13072 fi
13073 SETFILE=$ac_cv_path_SETFILE
13074 if test -n "$SETFILE"; then
13075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13076 $as_echo "$SETFILE" >&6; }
13077 else
13078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079 $as_echo "no" >&6; }
13080 fi
13081 
13082 
13083   test -n "$SETFILE" && break
13084 done
13085 
13086     else
13087       # If it succeeded, then it was overridden by the user. We will use it
13088       # for the tool.
13089 
13090       # First remove it from the list of overridden variables, so we can test
13091       # for unknown variables in the end.
13092       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13093 
13094       # Check if the provided tool contains a complete path.
13095       tool_specified="$SETFILE"
13096       tool_basename="${tool_specified##*/}"
13097       if test "x$tool_basename" = "x$tool_specified"; then
13098         # A command without a complete path is provided, search $PATH.
13099         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13100 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13101         # Extract the first word of "$tool_basename", so it can be a program name with args.
13102 set dummy $tool_basename; ac_word=$2
13103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13104 $as_echo_n "checking for $ac_word... " >&6; }
13105 if ${ac_cv_path_SETFILE+:} false; then :
13106   $as_echo_n "(cached) " >&6
13107 else
13108   case $SETFILE in
13109   [\\/]* | ?:[\\/]*)
13110   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13111   ;;
13112   *)
13113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13114 for as_dir in $PATH
13115 do
13116   IFS=$as_save_IFS
13117   test -z "$as_dir" && as_dir=.
13118     for ac_exec_ext in '' $ac_executable_extensions; do
13119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13120     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13122     break 2
13123   fi
13124 done
13125   done
13126 IFS=$as_save_IFS
13127 
13128   ;;
13129 esac
13130 fi
13131 SETFILE=$ac_cv_path_SETFILE
13132 if test -n "$SETFILE"; then
13133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13134 $as_echo "$SETFILE" >&6; }
13135 else
13136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13137 $as_echo "no" >&6; }
13138 fi
13139 
13140 
13141         if test "x$SETFILE" = x; then
13142           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13143         fi
13144       else
13145         # Otherwise we believe it is a complete path. Use it as it is.
13146         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13147 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13148         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13149 $as_echo_n "checking for SETFILE... " >&6; }
13150         if test ! -x "$tool_specified"; then
13151           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13152 $as_echo "not found" >&6; }
13153           as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13154         fi
13155         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13156 $as_echo "$tool_specified" >&6; }
13157       fi
13158     fi
13159   fi
13160 
13161 
13162 
13163 
13164 # Now we can determine OpenJDK build and target platforms. This is required to
13165 # have early on.
13166 # Make sure we can run config.sub.
13167 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13168   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13169 
13170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13171 $as_echo_n "checking build system type... " >&6; }
13172 if ${ac_cv_build+:} false; then :
13173   $as_echo_n "(cached) " >&6
13174 else
13175   ac_build_alias=$build_alias
13176 test "x$ac_build_alias" = x &&
13177   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13178 test "x$ac_build_alias" = x &&
13179   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13180 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13181   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13182 
13183 fi
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13185 $as_echo "$ac_cv_build" >&6; }
13186 case $ac_cv_build in
13187 *-*-*) ;;
13188 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13189 esac
13190 build=$ac_cv_build
13191 ac_save_IFS=$IFS; IFS='-'
13192 set x $ac_cv_build
13193 shift
13194 build_cpu=$1
13195 build_vendor=$2
13196 shift; shift
13197 # Remember, the first character of IFS is used to create $*,
13198 # except with old shells:
13199 build_os=$*
13200 IFS=$ac_save_IFS
13201 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13202 
13203 
13204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13205 $as_echo_n "checking host system type... " >&6; }
13206 if ${ac_cv_host+:} false; then :
13207   $as_echo_n "(cached) " >&6
13208 else
13209   if test "x$host_alias" = x; then
13210   ac_cv_host=$ac_cv_build
13211 else
13212   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13213     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13214 fi
13215 
13216 fi
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13218 $as_echo "$ac_cv_host" >&6; }
13219 case $ac_cv_host in
13220 *-*-*) ;;
13221 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13222 esac
13223 host=$ac_cv_host
13224 ac_save_IFS=$IFS; IFS='-'
13225 set x $ac_cv_host
13226 shift
13227 host_cpu=$1
13228 host_vendor=$2
13229 shift; shift
13230 # Remember, the first character of IFS is used to create $*,
13231 # except with old shells:
13232 host_os=$*
13233 IFS=$ac_save_IFS
13234 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13235 
13236 
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13238 $as_echo_n "checking target system type... " >&6; }
13239 if ${ac_cv_target+:} false; then :
13240   $as_echo_n "(cached) " >&6
13241 else
13242   if test "x$target_alias" = x; then
13243   ac_cv_target=$ac_cv_host
13244 else
13245   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13246     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13247 fi
13248 
13249 fi
13250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13251 $as_echo "$ac_cv_target" >&6; }
13252 case $ac_cv_target in
13253 *-*-*) ;;
13254 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13255 esac
13256 target=$ac_cv_target
13257 ac_save_IFS=$IFS; IFS='-'
13258 set x $ac_cv_target
13259 shift
13260 target_cpu=$1
13261 target_vendor=$2
13262 shift; shift
13263 # Remember, the first character of IFS is used to create $*,
13264 # except with old shells:
13265 target_os=$*
13266 IFS=$ac_save_IFS
13267 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13268 
13269 
13270 # The aliases save the names the user supplied, while $host etc.
13271 # will get canonicalized.
13272 test -n "$target_alias" &&
13273   test "$program_prefix$program_suffix$program_transform_name" = \
13274     NONENONEs,x,x, &&
13275   program_prefix=${target_alias}-
13276 
13277   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13278   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13279   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13280   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13281   # to use the configure naming style.
13282 
13283 
13284 
13285 
13286 
13287   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13288   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13289   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13290   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13291   OPENJDK_TARGET_AUTOCONF_NAME="$host"
13292   OPENJDK_BUILD_AUTOCONF_NAME="$build"
13293 
13294 
13295 
13296   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13297 
13298   case "$build_os" in
13299     *linux*)
13300       VAR_OS=linux
13301       VAR_OS_API=posix
13302       VAR_OS_ENV=linux
13303       ;;
13304     *solaris*)
13305       VAR_OS=solaris
13306       VAR_OS_API=posix
13307       VAR_OS_ENV=solaris
13308       ;;
13309     *darwin*)
13310       VAR_OS=macosx
13311       VAR_OS_API=posix
13312       VAR_OS_ENV=macosx
13313       ;;
13314     *bsd*)
13315       VAR_OS=bsd
13316       VAR_OS_API=posix
13317       VAR_OS_ENV=bsd
13318       ;;
13319     *cygwin*)
13320       VAR_OS=windows
13321       VAR_OS_API=winapi
13322       VAR_OS_ENV=windows.cygwin
13323       ;;
13324     *mingw*)
13325       VAR_OS=windows
13326       VAR_OS_API=winapi
13327       VAR_OS_ENV=windows.msys
13328       ;;
13329     *aix*)
13330       VAR_OS=aix
13331       VAR_OS_API=posix
13332       VAR_OS_ENV=aix
13333       ;;
13334     *)
13335       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13336       ;;
13337   esac
13338 
13339 
13340   # First argument is the cpu name from the trip/quad
13341   case "$build_cpu" in
13342     x86_64)
13343       VAR_CPU=x86_64
13344       VAR_CPU_ARCH=x86
13345       VAR_CPU_BITS=64
13346       VAR_CPU_ENDIAN=little
13347       ;;
13348     i?86)
13349       VAR_CPU=x86
13350       VAR_CPU_ARCH=x86
13351       VAR_CPU_BITS=32
13352       VAR_CPU_ENDIAN=little
13353       ;;
13354     arm*)
13355       VAR_CPU=arm
13356       VAR_CPU_ARCH=arm
13357       VAR_CPU_BITS=32
13358       VAR_CPU_ENDIAN=little
13359       ;;
13360     powerpc)
13361       VAR_CPU=ppc
13362       VAR_CPU_ARCH=ppc
13363       VAR_CPU_BITS=32
13364       VAR_CPU_ENDIAN=big
13365       ;;
13366     powerpc64)
13367       VAR_CPU=ppc64
13368       VAR_CPU_ARCH=ppc
13369       VAR_CPU_BITS=64
13370       VAR_CPU_ENDIAN=big
13371       ;;
13372     s390)
13373       VAR_CPU=s390
13374       VAR_CPU_ARCH=s390
13375       VAR_CPU_BITS=32
13376       VAR_CPU_ENDIAN=big
13377       ;;
13378     s390x)
13379       VAR_CPU=s390x
13380       VAR_CPU_ARCH=s390
13381       VAR_CPU_BITS=64
13382       VAR_CPU_ENDIAN=big
13383       ;;
13384     sparc)
13385       VAR_CPU=sparc
13386       VAR_CPU_ARCH=sparc
13387       VAR_CPU_BITS=32
13388       VAR_CPU_ENDIAN=big
13389       ;;
13390     sparcv9)
13391       VAR_CPU=sparcv9
13392       VAR_CPU_ARCH=sparc
13393       VAR_CPU_BITS=64
13394       VAR_CPU_ENDIAN=big
13395       ;;
13396     *)
13397       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13398       ;;
13399   esac
13400 
13401   # ..and setup our own variables. (Do this explicitely to facilitate searching)
13402   OPENJDK_BUILD_OS="$VAR_OS"
13403   OPENJDK_BUILD_OS_API="$VAR_OS_API"
13404   OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13405   OPENJDK_BUILD_CPU="$VAR_CPU"
13406   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13407   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13408   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13409 
13410 
13411 
13412 
13413 
13414 
13415 
13416   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13417 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
13418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13419 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13420 
13421   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13422 
13423   case "$host_os" in
13424     *linux*)
13425       VAR_OS=linux
13426       VAR_OS_API=posix
13427       VAR_OS_ENV=linux
13428       ;;
13429     *solaris*)
13430       VAR_OS=solaris
13431       VAR_OS_API=posix
13432       VAR_OS_ENV=solaris
13433       ;;
13434     *darwin*)
13435       VAR_OS=macosx
13436       VAR_OS_API=posix
13437       VAR_OS_ENV=macosx
13438       ;;
13439     *bsd*)
13440       VAR_OS=bsd
13441       VAR_OS_API=posix
13442       VAR_OS_ENV=bsd
13443       ;;
13444     *cygwin*)
13445       VAR_OS=windows
13446       VAR_OS_API=winapi
13447       VAR_OS_ENV=windows.cygwin
13448       ;;
13449     *mingw*)
13450       VAR_OS=windows
13451       VAR_OS_API=winapi
13452       VAR_OS_ENV=windows.msys
13453       ;;
13454     *aix*)
13455       VAR_OS=aix
13456       VAR_OS_API=posix
13457       VAR_OS_ENV=aix
13458       ;;
13459     *)
13460       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13461       ;;
13462   esac
13463 
13464 
13465   # First argument is the cpu name from the trip/quad
13466   case "$host_cpu" in
13467     x86_64)
13468       VAR_CPU=x86_64
13469       VAR_CPU_ARCH=x86
13470       VAR_CPU_BITS=64
13471       VAR_CPU_ENDIAN=little
13472       ;;
13473     i?86)
13474       VAR_CPU=x86
13475       VAR_CPU_ARCH=x86
13476       VAR_CPU_BITS=32
13477       VAR_CPU_ENDIAN=little
13478       ;;
13479     arm*)
13480       VAR_CPU=arm
13481       VAR_CPU_ARCH=arm
13482       VAR_CPU_BITS=32
13483       VAR_CPU_ENDIAN=little
13484       ;;
13485     powerpc)
13486       VAR_CPU=ppc
13487       VAR_CPU_ARCH=ppc
13488       VAR_CPU_BITS=32
13489       VAR_CPU_ENDIAN=big
13490       ;;
13491     powerpc64)
13492       VAR_CPU=ppc64
13493       VAR_CPU_ARCH=ppc
13494       VAR_CPU_BITS=64
13495       VAR_CPU_ENDIAN=big
13496       ;;
13497     s390)
13498       VAR_CPU=s390
13499       VAR_CPU_ARCH=s390
13500       VAR_CPU_BITS=32
13501       VAR_CPU_ENDIAN=big
13502       ;;
13503     s390x)
13504       VAR_CPU=s390x
13505       VAR_CPU_ARCH=s390
13506       VAR_CPU_BITS=64
13507       VAR_CPU_ENDIAN=big
13508       ;;
13509     sparc)
13510       VAR_CPU=sparc
13511       VAR_CPU_ARCH=sparc
13512       VAR_CPU_BITS=32
13513       VAR_CPU_ENDIAN=big
13514       ;;
13515     sparcv9)
13516       VAR_CPU=sparcv9
13517       VAR_CPU_ARCH=sparc
13518       VAR_CPU_BITS=64
13519       VAR_CPU_ENDIAN=big
13520       ;;
13521     *)
13522       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13523       ;;
13524   esac
13525 
13526   # ... and setup our own variables. (Do this explicitely to facilitate searching)
13527   OPENJDK_TARGET_OS="$VAR_OS"
13528   OPENJDK_TARGET_OS_API="$VAR_OS_API"
13529   OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13530   OPENJDK_TARGET_CPU="$VAR_CPU"
13531   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13532   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13533   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13534 
13535 
13536 
13537 
13538 
13539 
13540 
13541   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13542 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
13543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13544 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13545 
13546 
13547 
13548 # Check whether --with-target-bits was given.
13549 if test "${with_target_bits+set}" = set; then :
13550   withval=$with_target_bits;
13551 fi
13552 
13553 
13554   # We have three types of compiles:
13555   # native  == normal compilation, target system == build system
13556   # cross   == traditional cross compilation, target system != build system; special toolchain needed
13557   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13558   #
13559   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13560     # We're doing a proper cross-compilation
13561     COMPILE_TYPE="cross"
13562   else
13563     COMPILE_TYPE="native"
13564   fi
13565 
13566   if test "x$with_target_bits" != x; then
13567     if test "x$COMPILE_TYPE" = "xcross"; then
13568       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13569     fi
13570 
13571     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13572       # A reduced build is requested
13573       COMPILE_TYPE="reduced"
13574       OPENJDK_TARGET_CPU_BITS=32
13575       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13576         OPENJDK_TARGET_CPU=x86
13577       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13578         OPENJDK_TARGET_CPU=sparc
13579       else
13580         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13581       fi
13582     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13583       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
13584     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13585       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13586 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13587     else
13588       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13589     fi
13590   fi
13591 
13592 
13593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13594 $as_echo_n "checking compilation type... " >&6; }
13595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13596 $as_echo "$COMPILE_TYPE" >&6; }
13597 
13598 
13599   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13600     REQUIRED_OS_NAME=SunOS
13601     REQUIRED_OS_VERSION=5.10
13602   fi
13603   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13604     REQUIRED_OS_NAME=Linux
13605     REQUIRED_OS_VERSION=2.6
13606   fi
13607   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13608     REQUIRED_OS_NAME=Windows
13609     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13610       REQUIRED_OS_VERSION=5.2
13611     else
13612       REQUIRED_OS_VERSION=5.1
13613     fi
13614   fi
13615   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13616     REQUIRED_OS_NAME=Darwin
13617     REQUIRED_OS_VERSION=11.2
13618   fi
13619 
13620 
13621 
13622 
13623 
13624   # Also store the legacy naming of the cpu.
13625   # Ie i586 and amd64 instead of x86 and x86_64
13626   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13627   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13628     OPENJDK_TARGET_CPU_LEGACY="i586"
13629   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13630     # On all platforms except MacOSX replace x86_64 with amd64.
13631     OPENJDK_TARGET_CPU_LEGACY="amd64"
13632   fi
13633 
13634 
13635   # And the second legacy naming of the cpu.
13636   # Ie i386 and amd64 instead of x86 and x86_64.
13637   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13638   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13639     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13640   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13641     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13642   fi
13643 
13644 
13645   # This is the name of the cpu (but using i386 and amd64 instead of
13646   # x86 and x86_64, respectively), preceeded by a /, to be used when
13647   # locating libraries. On macosx, it's empty, though.
13648   OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13649   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13650     OPENJDK_TARGET_CPU_LIBDIR=""
13651   fi
13652 
13653 
13654   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13655   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13656   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13657   OPENJDK_TARGET_CPU_ISADIR=""
13658   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13659     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13660       OPENJDK_TARGET_CPU_ISADIR="/amd64"
13661     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13662       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13663     fi
13664   fi
13665 
13666 
13667   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13668   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13669   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13670     # On linux only, we replace x86 with i386.
13671     OPENJDK_TARGET_CPU_OSARCH="i386"
13672   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13673     # On all platforms except macosx, we replace x86_64 with amd64.
13674     OPENJDK_TARGET_CPU_OSARCH="amd64"
13675   fi
13676 
13677 
13678   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13679   if test "x$OPENJDK_TARGET_CPU" = xx86; then
13680     OPENJDK_TARGET_CPU_JLI="i386"
13681   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13682     # On all platforms except macosx, we replace x86_64 with amd64.
13683     OPENJDK_TARGET_CPU_JLI="amd64"
13684   fi
13685   # Now setup the -D flags for building libjli.
13686   OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13687   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13688     if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13689       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13690     elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13691       OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13692     fi
13693   fi
13694 
13695 
13696   # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13697   if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13698     OPENJDK_TARGET_OS_API_DIR="solaris"
13699   fi
13700   if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13701     OPENJDK_TARGET_OS_API_DIR="windows"
13702   fi
13703 
13704 
13705   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13706       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13707   else
13708       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13709   fi
13710 
13711 
13712   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13713     A_LP64="LP64:="
13714     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13715     # unpack200.exe
13716     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13717       ADD_LP64="-D_LP64=1"
13718     fi
13719   fi
13720   LP64=$A_LP64
13721 
13722 
13723   if test "x$COMPILE_TYPE" = "xcross"; then
13724     # FIXME: ... or should this include reduced builds..?
13725     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13726   else
13727     DEFINE_CROSS_COMPILE_ARCH=""
13728   fi
13729 
13730 
13731   # ZERO_ARCHDEF is used to enable architecture-specific code
13732   case "${OPENJDK_TARGET_CPU}" in
13733     ppc*)    ZERO_ARCHDEF=PPC   ;;
13734     s390*)   ZERO_ARCHDEF=S390  ;;
13735     sparc*)  ZERO_ARCHDEF=SPARC ;;
13736     x86_64*) ZERO_ARCHDEF=AMD64 ;;
13737     x86)     ZERO_ARCHDEF=IA32  ;;
13738     *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13739   esac
13740 
13741 
13742 
13743 
13744 # Continue setting up basic stuff. Most remaining code require fundamental tools.
13745 
13746   # Locate the directory of this script.
13747   SCRIPT="$0"
13748   AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
13749 
13750   # Where is the source? It is located two levels above the configure script.
13751   CURDIR="$PWD"
13752   cd "$AUTOCONF_DIR/../.."
13753   SRC_ROOT="`$THEPWDCMD -L`"
13754 
13755   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13756     PATH_SEP=";"
13757 
13758   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13759   if test $SRC_ROOT_LENGTH -gt 100; then
13760     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13761   fi
13762 
13763   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13764     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13765 $as_echo_n "checking cygwin release... " >&6; }
13766     CYGWIN_VERSION=`$UNAME -r`
13767     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13768 $as_echo "$CYGWIN_VERSION" >&6; }
13769     WINDOWS_ENV_VENDOR='cygwin'
13770     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13771 
13772     CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13773     if test "x$CYGWIN_VERSION_OK" = x; then
13774       { $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
13775 $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;}
13776       as_fn_error $? "Cannot continue" "$LINENO" 5
13777     fi
13778     if test "x$CYGPATH" = x; then
13779       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13780     fi
13781     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13782 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13783     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13784     cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13785     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13786     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13787     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13788 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
13789     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13790     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13791     if test "x$test_cygdrive_prefix" = x; then
13792       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13793     fi
13794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13795     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13796 $as_echo_n "checking msys release... " >&6; }
13797     MSYS_VERSION=`$UNAME -r`
13798     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13799 $as_echo "$MSYS_VERSION" >&6; }
13800 
13801     WINDOWS_ENV_VENDOR='msys'
13802     WINDOWS_ENV_VERSION="$MSYS_VERSION"
13803 
13804     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13805 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
13806     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13807     MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13808 
13809   windows_path="$MSYS_ROOT_PATH"
13810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13811     unix_path=`$CYGPATH -u "$windows_path"`
13812     MSYS_ROOT_PATH="$unix_path"
13813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13815     MSYS_ROOT_PATH="$unix_path"
13816   fi
13817 
13818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13819 $as_echo "$MSYS_ROOT_PATH" >&6; }
13820     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13821   else
13822     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13823   fi
13824 
13825   # Test if windows or unix (cygwin/msys) find is first in path.
13826   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13827 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13828   FIND_BINARY_OUTPUT=`find --version 2>&1`
13829   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13830     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13831 $as_echo "unix style" >&6; }
13832   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13833     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13834 $as_echo "Windows" >&6; }
13835     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13836 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13837     { $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
13838 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13839     as_fn_error $? "Cannot continue" "$LINENO" 5
13840   else
13841     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13842 $as_echo "unknown" >&6; }
13843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13844 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13845   fi
13846 
13847   else
13848     PATH_SEP=":"
13849   fi
13850 
13851 
13852 
13853   cd "$CURDIR"
13854 
13855 
13856   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13857 
13858   # Input might be given as Windows format, start by converting to
13859   # unix format.
13860   path="$SRC_ROOT"
13861   new_path=`$CYGPATH -u "$path"`
13862 
13863   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13864   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13865   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13866   # "foo.exe" is OK but "foo" is an error.
13867   #
13868   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13869   # It is also a way to make sure we got the proper file name for the real test later on.
13870   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13871   if test "x$test_shortpath" = x; then
13872     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13873 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13874     as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
13875   fi
13876 
13877   # Call helper function which possibly converts this using DOS-style short mode.
13878   # If so, the updated path is stored in $new_path.
13879 
13880   input_path="$new_path"
13881   # Check if we need to convert this using DOS-style short mode. If the path
13882   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13883   # take no chances and rewrite it.
13884   # Note: m4 eats our [], so we need to use [ and ] instead.
13885   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13886   if test "x$has_forbidden_chars" != x; then
13887     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13888     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13889     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13890     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13891       # Going to short mode and back again did indeed matter. Since short mode is
13892       # case insensitive, let's make it lowercase to improve readability.
13893       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13894       # Now convert it back to Unix-stile (cygpath)
13895       input_path=`$CYGPATH -u "$shortmode_path"`
13896       new_path="$input_path"
13897     fi
13898   fi
13899 
13900   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13901   if test "x$test_cygdrive_prefix" = x; then
13902     # As a simple fix, exclude /usr/bin since it's not a real path.
13903     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13904       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13905       # a path prefixed by /cygdrive for fixpath to work.
13906       new_path="$CYGWIN_ROOT_PATH$input_path"
13907     fi
13908   fi
13909 
13910 
13911   if test "x$path" != "x$new_path"; then
13912     SRC_ROOT="$new_path"
13913     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13914 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13915   fi
13916 
13917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13918 
13919   path="$SRC_ROOT"
13920   has_colon=`$ECHO $path | $GREP ^.:`
13921   new_path="$path"
13922   if test "x$has_colon" = x; then
13923     # Not in mixed or Windows style, start by that.
13924     new_path=`cmd //c echo $path`
13925   fi
13926 
13927 
13928   input_path="$new_path"
13929   # Check if we need to convert this using DOS-style short mode. If the path
13930   # contains just simple characters, use it. Otherwise (spaces, weird characters),
13931   # take no chances and rewrite it.
13932   # Note: m4 eats our [], so we need to use [ and ] instead.
13933   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13934   if test "x$has_forbidden_chars" != x; then
13935     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13936     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13937   fi
13938 
13939 
13940   windows_path="$new_path"
13941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13942     unix_path=`$CYGPATH -u "$windows_path"`
13943     new_path="$unix_path"
13944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13946     new_path="$unix_path"
13947   fi
13948 
13949   if test "x$path" != "x$new_path"; then
13950     SRC_ROOT="$new_path"
13951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
13952 $as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
13953   fi
13954 
13955   # Save the first 10 bytes of this path to the storage, so fixpath can work.
13956   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13957 
13958   else
13959     # We're on a posix platform. Hooray! :)
13960     path="$SRC_ROOT"
13961     has_space=`$ECHO "$path" | $GREP " "`
13962     if test "x$has_space" != x; then
13963       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
13964 $as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
13965       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13966     fi
13967 
13968     # Use eval to expand a potential ~
13969     eval path="$path"
13970     if test ! -f "$path" && test ! -d "$path"; then
13971       as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
13972     fi
13973 
13974     SRC_ROOT="`cd "$path"; $THEPWDCMD -L`"
13975   fi
13976 
13977 
13978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13979 
13980   # Input might be given as Windows format, start by converting to
13981   # unix format.
13982   path="$CURDIR"
13983   new_path=`$CYGPATH -u "$path"`
13984 
13985   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13986   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13987   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13988   # "foo.exe" is OK but "foo" is an error.
13989   #
13990   # This test is therefore slightly more accurate than "test -f" to check for file precense.
13991   # It is also a way to make sure we got the proper file name for the real test later on.
13992   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13993   if test "x$test_shortpath" = x; then
13994     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13995 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13996     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13997   fi
13998 
13999   # Call helper function which possibly converts this using DOS-style short mode.
14000   # If so, the updated path is stored in $new_path.
14001 
14002   input_path="$new_path"
14003   # Check if we need to convert this using DOS-style short mode. If the path
14004   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14005   # take no chances and rewrite it.
14006   # Note: m4 eats our [], so we need to use [ and ] instead.
14007   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14008   if test "x$has_forbidden_chars" != x; then
14009     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14010     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14011     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14012     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14013       # Going to short mode and back again did indeed matter. Since short mode is
14014       # case insensitive, let's make it lowercase to improve readability.
14015       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14016       # Now convert it back to Unix-stile (cygpath)
14017       input_path=`$CYGPATH -u "$shortmode_path"`
14018       new_path="$input_path"
14019     fi
14020   fi
14021 
14022   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14023   if test "x$test_cygdrive_prefix" = x; then
14024     # As a simple fix, exclude /usr/bin since it's not a real path.
14025     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14026       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14027       # a path prefixed by /cygdrive for fixpath to work.
14028       new_path="$CYGWIN_ROOT_PATH$input_path"
14029     fi
14030   fi
14031 
14032 
14033   if test "x$path" != "x$new_path"; then
14034     CURDIR="$new_path"
14035     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14036 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14037   fi
14038 
14039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14040 
14041   path="$CURDIR"
14042   has_colon=`$ECHO $path | $GREP ^.:`
14043   new_path="$path"
14044   if test "x$has_colon" = x; then
14045     # Not in mixed or Windows style, start by that.
14046     new_path=`cmd //c echo $path`
14047   fi
14048 
14049 
14050   input_path="$new_path"
14051   # Check if we need to convert this using DOS-style short mode. If the path
14052   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14053   # take no chances and rewrite it.
14054   # Note: m4 eats our [], so we need to use [ and ] instead.
14055   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14056   if test "x$has_forbidden_chars" != x; then
14057     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14058     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14059   fi
14060 
14061 
14062   windows_path="$new_path"
14063   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14064     unix_path=`$CYGPATH -u "$windows_path"`
14065     new_path="$unix_path"
14066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14067     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14068     new_path="$unix_path"
14069   fi
14070 
14071   if test "x$path" != "x$new_path"; then
14072     CURDIR="$new_path"
14073     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14074 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14075   fi
14076 
14077   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14078   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14079 
14080   else
14081     # We're on a posix platform. Hooray! :)
14082     path="$CURDIR"
14083     has_space=`$ECHO "$path" | $GREP " "`
14084     if test "x$has_space" != x; then
14085       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14086 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14087       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14088     fi
14089 
14090     # Use eval to expand a potential ~
14091     eval path="$path"
14092     if test ! -f "$path" && test ! -d "$path"; then
14093       as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14094     fi
14095 
14096     CURDIR="`cd "$path"; $THEPWDCMD -L`"
14097   fi
14098 
14099 
14100   if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14101     # Add extra search paths on solaris for utilities like ar and as etc...
14102     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14103   fi
14104 
14105   # You can force the sys-root if the sys-root encoded into the cross compiler tools
14106   # is not correct.
14107 
14108 # Check whether --with-sys-root was given.
14109 if test "${with_sys_root+set}" = set; then :
14110   withval=$with_sys_root;
14111 fi
14112 
14113 
14114   if test "x$with_sys_root" != x; then
14115     SYS_ROOT=$with_sys_root
14116   else
14117     SYS_ROOT=/
14118   fi
14119 
14120 
14121 
14122 # Check whether --with-tools-dir was given.
14123 if test "${with_tools_dir+set}" = set; then :
14124   withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14125 
14126 fi
14127 
14128 
14129 
14130 # Check whether --with-devkit was given.
14131 if test "${with_devkit+set}" = set; then :
14132   withval=$with_devkit;
14133         if test "x$with_sys_root" != x; then
14134           as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14135         fi
14136 
14137   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14138 
14139   # Input might be given as Windows format, start by converting to
14140   # unix format.
14141   path="$with_devkit"
14142   new_path=`$CYGPATH -u "$path"`
14143 
14144   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14145   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14146   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14147   # "foo.exe" is OK but "foo" is an error.
14148   #
14149   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14150   # It is also a way to make sure we got the proper file name for the real test later on.
14151   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14152   if test "x$test_shortpath" = x; then
14153     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14154 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14155     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14156   fi
14157 
14158   # Call helper function which possibly converts this using DOS-style short mode.
14159   # If so, the updated path is stored in $new_path.
14160 
14161   input_path="$new_path"
14162   # Check if we need to convert this using DOS-style short mode. If the path
14163   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14164   # take no chances and rewrite it.
14165   # Note: m4 eats our [], so we need to use [ and ] instead.
14166   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14167   if test "x$has_forbidden_chars" != x; then
14168     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14169     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14170     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14171     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14172       # Going to short mode and back again did indeed matter. Since short mode is
14173       # case insensitive, let's make it lowercase to improve readability.
14174       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14175       # Now convert it back to Unix-stile (cygpath)
14176       input_path=`$CYGPATH -u "$shortmode_path"`
14177       new_path="$input_path"
14178     fi
14179   fi
14180 
14181   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14182   if test "x$test_cygdrive_prefix" = x; then
14183     # As a simple fix, exclude /usr/bin since it's not a real path.
14184     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14185       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14186       # a path prefixed by /cygdrive for fixpath to work.
14187       new_path="$CYGWIN_ROOT_PATH$input_path"
14188     fi
14189   fi
14190 
14191 
14192   if test "x$path" != "x$new_path"; then
14193     with_devkit="$new_path"
14194     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14195 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14196   fi
14197 
14198   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14199 
14200   path="$with_devkit"
14201   has_colon=`$ECHO $path | $GREP ^.:`
14202   new_path="$path"
14203   if test "x$has_colon" = x; then
14204     # Not in mixed or Windows style, start by that.
14205     new_path=`cmd //c echo $path`
14206   fi
14207 
14208 
14209   input_path="$new_path"
14210   # Check if we need to convert this using DOS-style short mode. If the path
14211   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14212   # take no chances and rewrite it.
14213   # Note: m4 eats our [], so we need to use [ and ] instead.
14214   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14215   if test "x$has_forbidden_chars" != x; then
14216     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14217     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14218   fi
14219 
14220 
14221   windows_path="$new_path"
14222   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14223     unix_path=`$CYGPATH -u "$windows_path"`
14224     new_path="$unix_path"
14225   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14226     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14227     new_path="$unix_path"
14228   fi
14229 
14230   if test "x$path" != "x$new_path"; then
14231     with_devkit="$new_path"
14232     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14233 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14234   fi
14235 
14236   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14237   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14238 
14239   else
14240     # We're on a posix platform. Hooray! :)
14241     path="$with_devkit"
14242     has_space=`$ECHO "$path" | $GREP " "`
14243     if test "x$has_space" != x; then
14244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14245 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14246       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14247     fi
14248 
14249     # Use eval to expand a potential ~
14250     eval path="$path"
14251     if test ! -f "$path" && test ! -d "$path"; then
14252       as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14253     fi
14254 
14255     with_devkit="`cd "$path"; $THEPWDCMD -L`"
14256   fi
14257 
14258 
14259   if test "x$TOOLS_DIR" = x; then
14260     TOOLS_DIR="$with_devkit/bin"
14261   else
14262     TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14263   fi
14264 
14265         if test -d "$with_devkit/$host_alias/libc"; then
14266           SYS_ROOT=$with_devkit/$host_alias/libc
14267         elif test -d "$with_devkit/$host/sys-root"; then
14268           SYS_ROOT=$with_devkit/$host/sys-root
14269         fi
14270 
14271 fi
14272 
14273 
14274 
14275   # Setup default logging of stdout and stderr to build.log in the output root.
14276   BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14277   BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14278   BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14279 
14280 
14281 
14282 
14283 
14284 # Check if it's a pure open build or if custom sources are to be used.
14285 
14286   # Check whether --enable-openjdk-only was given.
14287 if test "${enable_openjdk_only+set}" = set; then :
14288   enableval=$enable_openjdk_only;
14289 else
14290   enable_openjdk_only="no"
14291 fi
14292 
14293 
14294   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14295 $as_echo_n "checking for presence of closed sources... " >&6; }
14296   if test -d "$SRC_ROOT/jdk/src/closed"; then
14297     CLOSED_SOURCE_PRESENT=yes
14298   else
14299     CLOSED_SOURCE_PRESENT=no
14300   fi
14301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14302 $as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14303 
14304   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14305 $as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14306   SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14308 $as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14309 
14310   if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14311     OPENJDK=true
14312     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14313       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14314 $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14315     fi
14316   else
14317     if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14318       OPENJDK=true
14319     else
14320       OPENJDK=false
14321     fi
14322   fi
14323 
14324   if test "x$OPENJDK" = "xtrue"; then
14325     SET_OPENJDK="OPENJDK=true"
14326   fi
14327 
14328 
14329 
14330 
14331 # These are needed to be able to create a configuration name (and thus the output directory)
14332 
14333   ###############################################################################
14334   #
14335   # Check which variant of the JDK that we want to build.
14336   # Currently we have:
14337   #    normal:   standard edition
14338   # but the custom make system may add other variants
14339   #
14340   # Effectively the JDK variant gives a name to a specific set of
14341   # modules to compile into the JDK. In the future, these modules
14342   # might even be Jigsaw modules.
14343   #
14344   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14345 $as_echo_n "checking which variant of the JDK to build... " >&6; }
14346 
14347 # Check whether --with-jdk-variant was given.
14348 if test "${with_jdk_variant+set}" = set; then :
14349   withval=$with_jdk_variant;
14350 fi
14351 
14352 
14353   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14354     JDK_VARIANT="normal"
14355   else
14356     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14357   fi
14358 
14359 
14360 
14361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14362 $as_echo "$JDK_VARIANT" >&6; }
14363 
14364 
14365 ###############################################################################
14366 #
14367 # Check which interpreter of the JVM we want to build.
14368 # Currently we have:
14369 #    template: Template interpreter (the default)
14370 #    cpp     : C++ interpreter
14371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14372 $as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14373 
14374 # Check whether --with-jvm-interpreter was given.
14375 if test "${with_jvm_interpreter+set}" = set; then :
14376   withval=$with_jvm_interpreter;
14377 fi
14378 
14379 
14380 if test "x$with_jvm_interpreter" = x; then
14381      with_jvm_interpreter="template"
14382 fi
14383 
14384 JVM_INTERPRETER="$with_jvm_interpreter"
14385 
14386 if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14387    as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14388 fi
14389 
14390 
14391 
14392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14393 $as_echo "$with_jvm_interpreter" >&6; }
14394 
14395 
14396 
14397   ###############################################################################
14398   #
14399   # Check which variants of the JVM that we want to build.
14400   # Currently we have:
14401   #    server: normal interpreter and a tiered C1/C2 compiler
14402   #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14403   #    minimal1: reduced form of client with optional VM services and features stripped out
14404   #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14405   #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14406   #    zero: no machine code interpreter, no compiler
14407   #    zeroshark: zero interpreter and shark/llvm compiler backend
14408 #    core: interpreter only, no compiler (only works on some platforms)
14409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14410 $as_echo_n "checking which variants of the JVM to build... " >&6; }
14411 
14412 # Check whether --with-jvm-variants was given.
14413 if test "${with_jvm_variants+set}" = set; then :
14414   withval=$with_jvm_variants;
14415 fi
14416 
14417 
14418   if test "x$with_jvm_variants" = x; then
14419     with_jvm_variants="server"
14420   fi
14421 
14422   JVM_VARIANTS=",$with_jvm_variants,"
14423   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,//'`
14424 
14425   if test "x$TEST_VARIANTS" != "x,"; then
14426      as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14427   fi
14428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14429 $as_echo "$with_jvm_variants" >&6; }
14430 
14431   JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14432   JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14433   JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14434   JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14435   JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14436   JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14437   JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14438 
14439   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14440     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14441       as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14442     fi
14443   fi
14444   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14445     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14446       as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14447     fi
14448   fi
14449   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14450     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14451       as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14452     fi
14453   fi
14454 
14455   # Replace the commas with AND for use in the build directory name.
14456   ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14457   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/'`
14458   if test "x$COUNT_VARIANTS" != "x,1"; then
14459     BUILDING_MULTIPLE_JVM_VARIANTS=yes
14460   else
14461     BUILDING_MULTIPLE_JVM_VARIANTS=no
14462   fi
14463 
14464 
14465 
14466 
14467 
14468 
14469 
14470 
14471 
14472 
14473   INCLUDE_SA=true
14474   if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14475     INCLUDE_SA=false
14476   fi
14477   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14478     INCLUDE_SA=false
14479   fi
14480   if test "x$VAR_CPU" = xppc64 ; then
14481     INCLUDE_SA=false
14482   fi
14483 
14484 
14485   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14486     MACOSX_UNIVERSAL="true"
14487   fi
14488 
14489 
14490 
14491 
14492   ###############################################################################
14493   #
14494   # Set the debug level
14495   #    release: no debug information, all optimizations, no asserts.
14496   #    fastdebug: debug information (-g), all optimizations, all asserts
14497   #    slowdebug: debug information (-g), no optimizations, all asserts
14498   #
14499   DEBUG_LEVEL="release"
14500   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14501 $as_echo_n "checking which debug level to use... " >&6; }
14502   # Check whether --enable-debug was given.
14503 if test "${enable_debug+set}" = set; then :
14504   enableval=$enable_debug;
14505         ENABLE_DEBUG="${enableval}"
14506         DEBUG_LEVEL="fastdebug"
14507 
14508 else
14509   ENABLE_DEBUG="no"
14510 fi
14511 
14512 
14513 
14514 # Check whether --with-debug-level was given.
14515 if test "${with_debug_level+set}" = set; then :
14516   withval=$with_debug_level;
14517         DEBUG_LEVEL="${withval}"
14518         if test "x$ENABLE_DEBUG" = xyes; then
14519           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14520         fi
14521 
14522 fi
14523 
14524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14525 $as_echo "$DEBUG_LEVEL" >&6; }
14526 
14527   if test "x$DEBUG_LEVEL" != xrelease && \
14528       test "x$DEBUG_LEVEL" != xfastdebug && \
14529       test "x$DEBUG_LEVEL" != xslowdebug; then
14530     as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14531   fi
14532 
14533 
14534   ###############################################################################
14535   #
14536   # Setup legacy vars/targets and new vars to deal with different debug levels.
14537   #
14538 
14539   case $DEBUG_LEVEL in
14540     release )
14541       VARIANT="OPT"
14542       FASTDEBUG="false"
14543       DEBUG_CLASSFILES="false"
14544       BUILD_VARIANT_RELEASE=""
14545       HOTSPOT_DEBUG_LEVEL="product"
14546       HOTSPOT_EXPORT="product"
14547       ;;
14548     fastdebug )
14549       VARIANT="DBG"
14550       FASTDEBUG="true"
14551       DEBUG_CLASSFILES="true"
14552       BUILD_VARIANT_RELEASE="-fastdebug"
14553       HOTSPOT_DEBUG_LEVEL="fastdebug"
14554       HOTSPOT_EXPORT="fastdebug"
14555       ;;
14556     slowdebug )
14557       VARIANT="DBG"
14558       FASTDEBUG="false"
14559       DEBUG_CLASSFILES="true"
14560       BUILD_VARIANT_RELEASE="-debug"
14561       HOTSPOT_DEBUG_LEVEL="jvmg"
14562       HOTSPOT_EXPORT="debug"
14563       ;;
14564   esac
14565 
14566   #####
14567   # Generate the legacy makefile targets for hotspot.
14568   # The hotspot api for selecting the build artifacts, really, needs to be improved.
14569   # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14570   # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14571   # But until then ...
14572   HOTSPOT_TARGET=""
14573 
14574   if test "x$JVM_VARIANT_SERVER" = xtrue; then
14575     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14576   fi
14577 
14578   if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14579     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14580   fi
14581 
14582   if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14583     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14584   fi
14585 
14586   if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14587     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14588   fi
14589 
14590   if test "x$JVM_VARIANT_ZERO" = xtrue; then
14591     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14592   fi
14593 
14594   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14595     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14596   fi
14597 
14598   if test "x$JVM_VARIANT_CORE" = xtrue; then
14599     HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14600   fi
14601 
14602   HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14603 
14604   # On Macosx universal binaries are produced, but they only contain
14605   # 64 bit intel. This invalidates control of which jvms are built
14606   # from configure, but only server is valid anyway. Fix this
14607   # when hotspot makefiles are rewritten.
14608   if test "x$MACOSX_UNIVERSAL" = xtrue; then
14609     HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14610   fi
14611 
14612   #####
14613 
14614 
14615 
14616 
14617 
14618 
14619 
14620 
14621 # With basic setup done, call the custom early hook.
14622 
14623 
14624 # To properly create a configuration name, we need to have the OpenJDK target
14625 # and options (variants and debug level) parsed.
14626 
14627 
14628 
14629 # Check whether --with-conf-name was given.
14630 if test "${with_conf_name+set}" = set; then :
14631   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14632 fi
14633 
14634 
14635   # Test from where we are running configure, in or outside of src root.
14636   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14637       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14638       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14639     # We are running configure from the src root.
14640     # Create a default ./build/target-variant-debuglevel output root.
14641     if test "x${CONF_NAME}" = x; then
14642       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14643     fi
14644     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14645     $MKDIR -p "$OUTPUT_ROOT"
14646     if test ! -d "$OUTPUT_ROOT"; then
14647       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14648     fi
14649   else
14650     # We are running configure from outside of the src dir.
14651     # Then use the current directory as output dir!
14652     # If configuration is situated in normal build directory, just use the build
14653     # directory name as configuration name, otherwise use the complete path.
14654     if test "x${CONF_NAME}" = x; then
14655       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14656     fi
14657     OUTPUT_ROOT="$CURDIR"
14658 
14659     # WARNING: This might be a bad thing to do. You need to be sure you want to
14660     # have a configuration in this directory. Do some sanity checks!
14661 
14662     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14663       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14664       # other files
14665       files_present=`$LS $OUTPUT_ROOT`
14666       # Configure has already touched config.log and confdefs.h in the current dir when this check
14667       # is performed.
14668       filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14669       | $TR -d '\n'`
14670       if test "x$filtered_files" != x; then
14671         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14672 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
14673         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14674 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14675         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14676 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14677         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14678 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14679         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14680 $as_echo "$as_me: seriously mess up just about everything." >&6;}
14681         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14682 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14683         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14684 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14685         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14686       fi
14687     fi
14688   fi
14689   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14690 $as_echo_n "checking what configuration name to use... " >&6; }
14691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14692 $as_echo "$CONF_NAME" >&6; }
14693 
14694 
14695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14696 
14697   # Input might be given as Windows format, start by converting to
14698   # unix format.
14699   path="$OUTPUT_ROOT"
14700   new_path=`$CYGPATH -u "$path"`
14701 
14702   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14703   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14704   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14705   # "foo.exe" is OK but "foo" is an error.
14706   #
14707   # This test is therefore slightly more accurate than "test -f" to check for file precense.
14708   # It is also a way to make sure we got the proper file name for the real test later on.
14709   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14710   if test "x$test_shortpath" = x; then
14711     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14712 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14713     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14714   fi
14715 
14716   # Call helper function which possibly converts this using DOS-style short mode.
14717   # If so, the updated path is stored in $new_path.
14718 
14719   input_path="$new_path"
14720   # Check if we need to convert this using DOS-style short mode. If the path
14721   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14722   # take no chances and rewrite it.
14723   # Note: m4 eats our [], so we need to use [ and ] instead.
14724   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14725   if test "x$has_forbidden_chars" != x; then
14726     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14727     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14728     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14729     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14730       # Going to short mode and back again did indeed matter. Since short mode is
14731       # case insensitive, let's make it lowercase to improve readability.
14732       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14733       # Now convert it back to Unix-stile (cygpath)
14734       input_path=`$CYGPATH -u "$shortmode_path"`
14735       new_path="$input_path"
14736     fi
14737   fi
14738 
14739   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14740   if test "x$test_cygdrive_prefix" = x; then
14741     # As a simple fix, exclude /usr/bin since it's not a real path.
14742     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14743       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14744       # a path prefixed by /cygdrive for fixpath to work.
14745       new_path="$CYGWIN_ROOT_PATH$input_path"
14746     fi
14747   fi
14748 
14749 
14750   if test "x$path" != "x$new_path"; then
14751     OUTPUT_ROOT="$new_path"
14752     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14753 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14754   fi
14755 
14756   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14757 
14758   path="$OUTPUT_ROOT"
14759   has_colon=`$ECHO $path | $GREP ^.:`
14760   new_path="$path"
14761   if test "x$has_colon" = x; then
14762     # Not in mixed or Windows style, start by that.
14763     new_path=`cmd //c echo $path`
14764   fi
14765 
14766 
14767   input_path="$new_path"
14768   # Check if we need to convert this using DOS-style short mode. If the path
14769   # contains just simple characters, use it. Otherwise (spaces, weird characters),
14770   # take no chances and rewrite it.
14771   # Note: m4 eats our [], so we need to use [ and ] instead.
14772   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14773   if test "x$has_forbidden_chars" != x; then
14774     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14775     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14776   fi
14777 
14778 
14779   windows_path="$new_path"
14780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14781     unix_path=`$CYGPATH -u "$windows_path"`
14782     new_path="$unix_path"
14783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14785     new_path="$unix_path"
14786   fi
14787 
14788   if test "x$path" != "x$new_path"; then
14789     OUTPUT_ROOT="$new_path"
14790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14791 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14792   fi
14793 
14794   # Save the first 10 bytes of this path to the storage, so fixpath can work.
14795   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14796 
14797   else
14798     # We're on a posix platform. Hooray! :)
14799     path="$OUTPUT_ROOT"
14800     has_space=`$ECHO "$path" | $GREP " "`
14801     if test "x$has_space" != x; then
14802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14803 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14804       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14805     fi
14806 
14807     # Use eval to expand a potential ~
14808     eval path="$path"
14809     if test ! -f "$path" && test ! -d "$path"; then
14810       as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14811     fi
14812 
14813     OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14814   fi
14815 
14816 
14817   SPEC=$OUTPUT_ROOT/spec.gmk
14818 
14819   CONF_NAME=$CONF_NAME
14820 
14821   OUTPUT_ROOT=$OUTPUT_ROOT
14822 
14823 
14824   # Most of the probed defines are put into config.h
14825   ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14826 
14827   # The spec.gmk file contains all variables for the make system.
14828   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14829 
14830   # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14831   ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14832 
14833   # The bootcycle-spec.gmk file contains support for boot cycle builds.
14834   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14835 
14836   # The compare.sh is used to compare the build output to other builds.
14837   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14838 
14839   # Spec.sh is currently used by compare-objects.sh
14840   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14841 
14842   # The generated Makefile knows where the spec.gmk is and where the source is.
14843   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14844   # which will look for generated configurations
14845   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14846 
14847 
14848   # Save the arguments given to us
14849   echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
14850 
14851 
14852 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
14853 
14854   for ac_prog in apt-get yum port pkgutil pkgadd
14855 do
14856   # Extract the first word of "$ac_prog", so it can be a program name with args.
14857 set dummy $ac_prog; ac_word=$2
14858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14859 $as_echo_n "checking for $ac_word... " >&6; }
14860 if ${ac_cv_prog_PKGHANDLER+:} false; then :
14861   $as_echo_n "(cached) " >&6
14862 else
14863   if test -n "$PKGHANDLER"; then
14864   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
14865 else
14866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14867 for as_dir in $PATH
14868 do
14869   IFS=$as_save_IFS
14870   test -z "$as_dir" && as_dir=.
14871     for ac_exec_ext in '' $ac_executable_extensions; do
14872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14873     ac_cv_prog_PKGHANDLER="$ac_prog"
14874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14875     break 2
14876   fi
14877 done
14878   done
14879 IFS=$as_save_IFS
14880 
14881 fi
14882 fi
14883 PKGHANDLER=$ac_cv_prog_PKGHANDLER
14884 if test -n "$PKGHANDLER"; then
14885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
14886 $as_echo "$PKGHANDLER" >&6; }
14887 else
14888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14889 $as_echo "no" >&6; }
14890 fi
14891 
14892 
14893   test -n "$PKGHANDLER" && break
14894 done
14895 
14896 
14897 
14898 # Setup tools that requires more complex handling, or that is not needed by the configure script.
14899 
14900 
14901   # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
14902   if test "x$MAKE" != x; then
14903     # User has supplied a make, test it.
14904     if test ! -f "$MAKE"; then
14905       as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
14906     fi
14907 
14908   MAKE_CANDIDATE=""$MAKE""
14909   DESCRIPTION="user supplied MAKE=$MAKE"
14910   if test "x$MAKE_CANDIDATE" != x; then
14911     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
14912 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
14913     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
14914     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
14915     if test "x$IS_GNU_MAKE" = x; then
14916       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
14917 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
14918     else
14919       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
14920       if test "x$IS_MODERN_MAKE" = x; then
14921         { $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
14922 $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;}
14923       else
14924         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
14925           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14926             MAKE_EXPECTED_ENV='cygwin'
14927           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14928             MAKE_EXPECTED_ENV='msys'
14929           else
14930             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
14931           fi
14932           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
14933           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
14934         else
14935           # Not relevant for non-Windows
14936           IS_MAKE_CORRECT_ENV=true
14937         fi
14938         if test "x$IS_MAKE_CORRECT_ENV" = x; then
14939           { $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
14940 $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;}
14941         else
14942           FOUND_MAKE=$MAKE_CANDIDATE
14943 
14944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14945 
14946   # First separate the path from the arguments. This will split at the first
14947   # space.
14948   complete="$FOUND_MAKE"
14949   path="${complete%% *}"
14950   tmp="$complete EOL"
14951   arguments="${tmp#* }"
14952 
14953   # Input might be given as Windows format, start by converting to
14954   # unix format.
14955   new_path=`$CYGPATH -u "$path"`
14956 
14957   # Now try to locate executable using which
14958   new_path=`$WHICH "$new_path" 2> /dev/null`
14959   # bat and cmd files are not always considered executable in cygwin causing which
14960   # to not find them
14961   if test "x$new_path" = x \
14962       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14963       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14964     new_path=`$CYGPATH -u "$path"`
14965   fi
14966   if test "x$new_path" = x; then
14967     # Oops. Which didn't find the executable.
14968     # The splitting of arguments from the executable at a space might have been incorrect,
14969     # since paths with space are more likely in Windows. Give it another try with the whole
14970     # argument.
14971     path="$complete"
14972     arguments="EOL"
14973     new_path=`$CYGPATH -u "$path"`
14974     new_path=`$WHICH "$new_path" 2> /dev/null`
14975     # bat and cmd files are not always considered executable in cygwin causing which
14976     # to not find them
14977     if test "x$new_path" = x \
14978         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
14979         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
14980       new_path=`$CYGPATH -u "$path"`
14981     fi
14982     if test "x$new_path" = x; then
14983       # It's still not found. Now this is an unrecoverable error.
14984       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
14985 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
14986       has_space=`$ECHO "$complete" | $GREP " "`
14987       if test "x$has_space" != x; then
14988         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
14989 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
14990       fi
14991       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
14992     fi
14993   fi
14994 
14995   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14996   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14997   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14998   # "foo.exe" is OK but "foo" is an error.
14999   #
15000   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15001   # It is also a way to make sure we got the proper file name for the real test later on.
15002   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15003   if test "x$test_shortpath" = x; then
15004     # Short path failed, file does not exist as specified.
15005     # Try adding .exe or .cmd
15006     if test -f "${new_path}.exe"; then
15007       input_to_shortpath="${new_path}.exe"
15008     elif test -f "${new_path}.cmd"; then
15009       input_to_shortpath="${new_path}.cmd"
15010     else
15011       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15012 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15013       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15014 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15015       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15016     fi
15017   else
15018     input_to_shortpath="$new_path"
15019   fi
15020 
15021   # Call helper function which possibly converts this using DOS-style short mode.
15022   # If so, the updated path is stored in $new_path.
15023   new_path="$input_to_shortpath"
15024 
15025   input_path="$input_to_shortpath"
15026   # Check if we need to convert this using DOS-style short mode. If the path
15027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15028   # take no chances and rewrite it.
15029   # Note: m4 eats our [], so we need to use [ and ] instead.
15030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15031   if test "x$has_forbidden_chars" != x; then
15032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15033     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15034     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15035     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15036       # Going to short mode and back again did indeed matter. Since short mode is
15037       # case insensitive, let's make it lowercase to improve readability.
15038       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15039       # Now convert it back to Unix-stile (cygpath)
15040       input_path=`$CYGPATH -u "$shortmode_path"`
15041       new_path="$input_path"
15042     fi
15043   fi
15044 
15045   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15046   if test "x$test_cygdrive_prefix" = x; then
15047     # As a simple fix, exclude /usr/bin since it's not a real path.
15048     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15049       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15050       # a path prefixed by /cygdrive for fixpath to work.
15051       new_path="$CYGWIN_ROOT_PATH$input_path"
15052     fi
15053   fi
15054 
15055   # remove trailing .exe if any
15056   new_path="${new_path/%.exe/}"
15057 
15058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15059 
15060   # First separate the path from the arguments. This will split at the first
15061   # space.
15062   complete="$FOUND_MAKE"
15063   path="${complete%% *}"
15064   tmp="$complete EOL"
15065   arguments="${tmp#* }"
15066 
15067   # Input might be given as Windows format, start by converting to
15068   # unix format.
15069   new_path="$path"
15070 
15071   windows_path="$new_path"
15072   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15073     unix_path=`$CYGPATH -u "$windows_path"`
15074     new_path="$unix_path"
15075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15076     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15077     new_path="$unix_path"
15078   fi
15079 
15080 
15081   # Now try to locate executable using which
15082   new_path=`$WHICH "$new_path" 2> /dev/null`
15083 
15084   if test "x$new_path" = x; then
15085     # Oops. Which didn't find the executable.
15086     # The splitting of arguments from the executable at a space might have been incorrect,
15087     # since paths with space are more likely in Windows. Give it another try with the whole
15088     # argument.
15089     path="$complete"
15090     arguments="EOL"
15091     new_path="$path"
15092 
15093   windows_path="$new_path"
15094   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15095     unix_path=`$CYGPATH -u "$windows_path"`
15096     new_path="$unix_path"
15097   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15098     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15099     new_path="$unix_path"
15100   fi
15101 
15102 
15103     new_path=`$WHICH "$new_path" 2> /dev/null`
15104 
15105     if test "x$new_path" = x; then
15106       # It's still not found. Now this is an unrecoverable error.
15107       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15108 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15109       has_space=`$ECHO "$complete" | $GREP " "`
15110       if test "x$has_space" != x; then
15111         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15112 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15113       fi
15114       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15115     fi
15116   fi
15117 
15118   # Now new_path has a complete unix path to the binary
15119   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15120     # Keep paths in /bin as-is, but remove trailing .exe if any
15121     new_path="${new_path/%.exe/}"
15122     # Do not save /bin paths to all_fixpath_prefixes!
15123   else
15124     # Not in mixed or Windows style, start by that.
15125     new_path=`cmd //c echo $new_path`
15126 
15127   input_path="$new_path"
15128   # Check if we need to convert this using DOS-style short mode. If the path
15129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15130   # take no chances and rewrite it.
15131   # Note: m4 eats our [], so we need to use [ and ] instead.
15132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15133   if test "x$has_forbidden_chars" != x; then
15134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15136   fi
15137 
15138     # Output is in $new_path
15139 
15140   windows_path="$new_path"
15141   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15142     unix_path=`$CYGPATH -u "$windows_path"`
15143     new_path="$unix_path"
15144   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15145     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15146     new_path="$unix_path"
15147   fi
15148 
15149     # remove trailing .exe if any
15150     new_path="${new_path/%.exe/}"
15151 
15152     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15153     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15154   fi
15155 
15156   else
15157     # We're on a posix platform. Hooray! :)
15158     # First separate the path from the arguments. This will split at the first
15159     # space.
15160     complete="$FOUND_MAKE"
15161     path="${complete%% *}"
15162     tmp="$complete EOL"
15163     arguments="${tmp#* }"
15164 
15165     # Cannot rely on the command "which" here since it doesn't always work.
15166     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15167     if test -z "$is_absolute_path"; then
15168       # Path to executable is not absolute. Find it.
15169       IFS_save="$IFS"
15170       IFS=:
15171       for p in $PATH; do
15172         if test -f "$p/$path" && test -x "$p/$path"; then
15173           new_path="$p/$path"
15174           break
15175         fi
15176       done
15177       IFS="$IFS_save"
15178     else
15179       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15180 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15181       new_path="$path"
15182     fi
15183 
15184     if test "x$new_path" = x; then
15185       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15186 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15187       has_space=`$ECHO "$complete" | $GREP " "`
15188       if test "x$has_space" != x; then
15189         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15190 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15191       fi
15192       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15193     fi
15194   fi
15195 
15196   # Now join together the path and the arguments once again
15197   if test "x$arguments" != xEOL; then
15198     new_complete="$new_path ${arguments% *}"
15199   else
15200     new_complete="$new_path"
15201   fi
15202 
15203   if test "x$complete" != "x$new_complete"; then
15204     FOUND_MAKE="$new_complete"
15205     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15206 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15207   fi
15208 
15209         fi
15210       fi
15211     fi
15212   fi
15213 
15214     if test "x$FOUND_MAKE" = x; then
15215       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15216     fi
15217   else
15218     # Try our hardest to locate a correct version of GNU make
15219     for ac_prog in gmake
15220 do
15221   # Extract the first word of "$ac_prog", so it can be a program name with args.
15222 set dummy $ac_prog; ac_word=$2
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224 $as_echo_n "checking for $ac_word... " >&6; }
15225 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15226   $as_echo_n "(cached) " >&6
15227 else
15228   case $CHECK_GMAKE in
15229   [\\/]* | ?:[\\/]*)
15230   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15231   ;;
15232   *)
15233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234 for as_dir in $PATH
15235 do
15236   IFS=$as_save_IFS
15237   test -z "$as_dir" && as_dir=.
15238     for ac_exec_ext in '' $ac_executable_extensions; do
15239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242     break 2
15243   fi
15244 done
15245   done
15246 IFS=$as_save_IFS
15247 
15248   ;;
15249 esac
15250 fi
15251 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15252 if test -n "$CHECK_GMAKE"; then
15253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15254 $as_echo "$CHECK_GMAKE" >&6; }
15255 else
15256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257 $as_echo "no" >&6; }
15258 fi
15259 
15260 
15261   test -n "$CHECK_GMAKE" && break
15262 done
15263 
15264 
15265   MAKE_CANDIDATE=""$CHECK_GMAKE""
15266   DESCRIPTION="gmake in PATH"
15267   if test "x$MAKE_CANDIDATE" != x; then
15268     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15269 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15270     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15271     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15272     if test "x$IS_GNU_MAKE" = x; then
15273       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15274 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15275     else
15276       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15277       if test "x$IS_MODERN_MAKE" = x; then
15278         { $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
15279 $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;}
15280       else
15281         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15282           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15283             MAKE_EXPECTED_ENV='cygwin'
15284           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15285             MAKE_EXPECTED_ENV='msys'
15286           else
15287             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15288           fi
15289           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15290           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15291         else
15292           # Not relevant for non-Windows
15293           IS_MAKE_CORRECT_ENV=true
15294         fi
15295         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15296           { $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
15297 $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;}
15298         else
15299           FOUND_MAKE=$MAKE_CANDIDATE
15300 
15301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15302 
15303   # First separate the path from the arguments. This will split at the first
15304   # space.
15305   complete="$FOUND_MAKE"
15306   path="${complete%% *}"
15307   tmp="$complete EOL"
15308   arguments="${tmp#* }"
15309 
15310   # Input might be given as Windows format, start by converting to
15311   # unix format.
15312   new_path=`$CYGPATH -u "$path"`
15313 
15314   # Now try to locate executable using which
15315   new_path=`$WHICH "$new_path" 2> /dev/null`
15316   # bat and cmd files are not always considered executable in cygwin causing which
15317   # to not find them
15318   if test "x$new_path" = x \
15319       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15320       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15321     new_path=`$CYGPATH -u "$path"`
15322   fi
15323   if test "x$new_path" = x; then
15324     # Oops. Which didn't find the executable.
15325     # The splitting of arguments from the executable at a space might have been incorrect,
15326     # since paths with space are more likely in Windows. Give it another try with the whole
15327     # argument.
15328     path="$complete"
15329     arguments="EOL"
15330     new_path=`$CYGPATH -u "$path"`
15331     new_path=`$WHICH "$new_path" 2> /dev/null`
15332     # bat and cmd files are not always considered executable in cygwin causing which
15333     # to not find them
15334     if test "x$new_path" = x \
15335         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15336         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15337       new_path=`$CYGPATH -u "$path"`
15338     fi
15339     if test "x$new_path" = x; then
15340       # It's still not found. Now this is an unrecoverable error.
15341       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15342 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15343       has_space=`$ECHO "$complete" | $GREP " "`
15344       if test "x$has_space" != x; then
15345         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15346 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15347       fi
15348       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15349     fi
15350   fi
15351 
15352   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15353   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15354   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15355   # "foo.exe" is OK but "foo" is an error.
15356   #
15357   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15358   # It is also a way to make sure we got the proper file name for the real test later on.
15359   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15360   if test "x$test_shortpath" = x; then
15361     # Short path failed, file does not exist as specified.
15362     # Try adding .exe or .cmd
15363     if test -f "${new_path}.exe"; then
15364       input_to_shortpath="${new_path}.exe"
15365     elif test -f "${new_path}.cmd"; then
15366       input_to_shortpath="${new_path}.cmd"
15367     else
15368       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15369 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15370       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15371 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15372       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15373     fi
15374   else
15375     input_to_shortpath="$new_path"
15376   fi
15377 
15378   # Call helper function which possibly converts this using DOS-style short mode.
15379   # If so, the updated path is stored in $new_path.
15380   new_path="$input_to_shortpath"
15381 
15382   input_path="$input_to_shortpath"
15383   # Check if we need to convert this using DOS-style short mode. If the path
15384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15385   # take no chances and rewrite it.
15386   # Note: m4 eats our [], so we need to use [ and ] instead.
15387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15388   if test "x$has_forbidden_chars" != x; then
15389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15390     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15391     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15392     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15393       # Going to short mode and back again did indeed matter. Since short mode is
15394       # case insensitive, let's make it lowercase to improve readability.
15395       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15396       # Now convert it back to Unix-stile (cygpath)
15397       input_path=`$CYGPATH -u "$shortmode_path"`
15398       new_path="$input_path"
15399     fi
15400   fi
15401 
15402   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15403   if test "x$test_cygdrive_prefix" = x; then
15404     # As a simple fix, exclude /usr/bin since it's not a real path.
15405     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15406       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15407       # a path prefixed by /cygdrive for fixpath to work.
15408       new_path="$CYGWIN_ROOT_PATH$input_path"
15409     fi
15410   fi
15411 
15412   # remove trailing .exe if any
15413   new_path="${new_path/%.exe/}"
15414 
15415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15416 
15417   # First separate the path from the arguments. This will split at the first
15418   # space.
15419   complete="$FOUND_MAKE"
15420   path="${complete%% *}"
15421   tmp="$complete EOL"
15422   arguments="${tmp#* }"
15423 
15424   # Input might be given as Windows format, start by converting to
15425   # unix format.
15426   new_path="$path"
15427 
15428   windows_path="$new_path"
15429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15430     unix_path=`$CYGPATH -u "$windows_path"`
15431     new_path="$unix_path"
15432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15434     new_path="$unix_path"
15435   fi
15436 
15437 
15438   # Now try to locate executable using which
15439   new_path=`$WHICH "$new_path" 2> /dev/null`
15440 
15441   if test "x$new_path" = x; then
15442     # Oops. Which didn't find the executable.
15443     # The splitting of arguments from the executable at a space might have been incorrect,
15444     # since paths with space are more likely in Windows. Give it another try with the whole
15445     # argument.
15446     path="$complete"
15447     arguments="EOL"
15448     new_path="$path"
15449 
15450   windows_path="$new_path"
15451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15452     unix_path=`$CYGPATH -u "$windows_path"`
15453     new_path="$unix_path"
15454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15456     new_path="$unix_path"
15457   fi
15458 
15459 
15460     new_path=`$WHICH "$new_path" 2> /dev/null`
15461 
15462     if test "x$new_path" = x; then
15463       # It's still not found. Now this is an unrecoverable error.
15464       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15465 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15466       has_space=`$ECHO "$complete" | $GREP " "`
15467       if test "x$has_space" != x; then
15468         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15469 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15470       fi
15471       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15472     fi
15473   fi
15474 
15475   # Now new_path has a complete unix path to the binary
15476   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15477     # Keep paths in /bin as-is, but remove trailing .exe if any
15478     new_path="${new_path/%.exe/}"
15479     # Do not save /bin paths to all_fixpath_prefixes!
15480   else
15481     # Not in mixed or Windows style, start by that.
15482     new_path=`cmd //c echo $new_path`
15483 
15484   input_path="$new_path"
15485   # Check if we need to convert this using DOS-style short mode. If the path
15486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15487   # take no chances and rewrite it.
15488   # Note: m4 eats our [], so we need to use [ and ] instead.
15489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15490   if test "x$has_forbidden_chars" != x; then
15491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15492     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15493   fi
15494 
15495     # Output is in $new_path
15496 
15497   windows_path="$new_path"
15498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15499     unix_path=`$CYGPATH -u "$windows_path"`
15500     new_path="$unix_path"
15501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15503     new_path="$unix_path"
15504   fi
15505 
15506     # remove trailing .exe if any
15507     new_path="${new_path/%.exe/}"
15508 
15509     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15510     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15511   fi
15512 
15513   else
15514     # We're on a posix platform. Hooray! :)
15515     # First separate the path from the arguments. This will split at the first
15516     # space.
15517     complete="$FOUND_MAKE"
15518     path="${complete%% *}"
15519     tmp="$complete EOL"
15520     arguments="${tmp#* }"
15521 
15522     # Cannot rely on the command "which" here since it doesn't always work.
15523     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15524     if test -z "$is_absolute_path"; then
15525       # Path to executable is not absolute. Find it.
15526       IFS_save="$IFS"
15527       IFS=:
15528       for p in $PATH; do
15529         if test -f "$p/$path" && test -x "$p/$path"; then
15530           new_path="$p/$path"
15531           break
15532         fi
15533       done
15534       IFS="$IFS_save"
15535     else
15536       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15537 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15538       new_path="$path"
15539     fi
15540 
15541     if test "x$new_path" = x; then
15542       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15543 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15544       has_space=`$ECHO "$complete" | $GREP " "`
15545       if test "x$has_space" != x; then
15546         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15547 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15548       fi
15549       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15550     fi
15551   fi
15552 
15553   # Now join together the path and the arguments once again
15554   if test "x$arguments" != xEOL; then
15555     new_complete="$new_path ${arguments% *}"
15556   else
15557     new_complete="$new_path"
15558   fi
15559 
15560   if test "x$complete" != "x$new_complete"; then
15561     FOUND_MAKE="$new_complete"
15562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15563 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15564   fi
15565 
15566         fi
15567       fi
15568     fi
15569   fi
15570 
15571 
15572     if test "x$FOUND_MAKE" = x; then
15573       for ac_prog in make
15574 do
15575   # Extract the first word of "$ac_prog", so it can be a program name with args.
15576 set dummy $ac_prog; ac_word=$2
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15578 $as_echo_n "checking for $ac_word... " >&6; }
15579 if ${ac_cv_path_CHECK_MAKE+:} false; then :
15580   $as_echo_n "(cached) " >&6
15581 else
15582   case $CHECK_MAKE in
15583   [\\/]* | ?:[\\/]*)
15584   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15585   ;;
15586   *)
15587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15588 for as_dir in $PATH
15589 do
15590   IFS=$as_save_IFS
15591   test -z "$as_dir" && as_dir=.
15592     for ac_exec_ext in '' $ac_executable_extensions; do
15593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15594     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15596     break 2
15597   fi
15598 done
15599   done
15600 IFS=$as_save_IFS
15601 
15602   ;;
15603 esac
15604 fi
15605 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15606 if test -n "$CHECK_MAKE"; then
15607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15608 $as_echo "$CHECK_MAKE" >&6; }
15609 else
15610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15611 $as_echo "no" >&6; }
15612 fi
15613 
15614 
15615   test -n "$CHECK_MAKE" && break
15616 done
15617 
15618 
15619   MAKE_CANDIDATE=""$CHECK_MAKE""
15620   DESCRIPTION="make in PATH"
15621   if test "x$MAKE_CANDIDATE" != x; then
15622     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15623 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15624     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15625     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15626     if test "x$IS_GNU_MAKE" = x; then
15627       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15628 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15629     else
15630       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15631       if test "x$IS_MODERN_MAKE" = x; then
15632         { $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
15633 $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;}
15634       else
15635         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15636           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15637             MAKE_EXPECTED_ENV='cygwin'
15638           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15639             MAKE_EXPECTED_ENV='msys'
15640           else
15641             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15642           fi
15643           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15644           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15645         else
15646           # Not relevant for non-Windows
15647           IS_MAKE_CORRECT_ENV=true
15648         fi
15649         if test "x$IS_MAKE_CORRECT_ENV" = x; then
15650           { $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
15651 $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;}
15652         else
15653           FOUND_MAKE=$MAKE_CANDIDATE
15654 
15655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15656 
15657   # First separate the path from the arguments. This will split at the first
15658   # space.
15659   complete="$FOUND_MAKE"
15660   path="${complete%% *}"
15661   tmp="$complete EOL"
15662   arguments="${tmp#* }"
15663 
15664   # Input might be given as Windows format, start by converting to
15665   # unix format.
15666   new_path=`$CYGPATH -u "$path"`
15667 
15668   # Now try to locate executable using which
15669   new_path=`$WHICH "$new_path" 2> /dev/null`
15670   # bat and cmd files are not always considered executable in cygwin causing which
15671   # to not find them
15672   if test "x$new_path" = x \
15673       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15674       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15675     new_path=`$CYGPATH -u "$path"`
15676   fi
15677   if test "x$new_path" = x; then
15678     # Oops. Which didn't find the executable.
15679     # The splitting of arguments from the executable at a space might have been incorrect,
15680     # since paths with space are more likely in Windows. Give it another try with the whole
15681     # argument.
15682     path="$complete"
15683     arguments="EOL"
15684     new_path=`$CYGPATH -u "$path"`
15685     new_path=`$WHICH "$new_path" 2> /dev/null`
15686     # bat and cmd files are not always considered executable in cygwin causing which
15687     # to not find them
15688     if test "x$new_path" = x \
15689         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15690         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15691       new_path=`$CYGPATH -u "$path"`
15692     fi
15693     if test "x$new_path" = x; then
15694       # It's still not found. Now this is an unrecoverable error.
15695       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15696 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15697       has_space=`$ECHO "$complete" | $GREP " "`
15698       if test "x$has_space" != x; then
15699         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15700 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15701       fi
15702       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15703     fi
15704   fi
15705 
15706   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15707   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15708   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15709   # "foo.exe" is OK but "foo" is an error.
15710   #
15711   # This test is therefore slightly more accurate than "test -f" to check for file presence.
15712   # It is also a way to make sure we got the proper file name for the real test later on.
15713   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15714   if test "x$test_shortpath" = x; then
15715     # Short path failed, file does not exist as specified.
15716     # Try adding .exe or .cmd
15717     if test -f "${new_path}.exe"; then
15718       input_to_shortpath="${new_path}.exe"
15719     elif test -f "${new_path}.cmd"; then
15720       input_to_shortpath="${new_path}.cmd"
15721     else
15722       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15723 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15724       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15725 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15726       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15727     fi
15728   else
15729     input_to_shortpath="$new_path"
15730   fi
15731 
15732   # Call helper function which possibly converts this using DOS-style short mode.
15733   # If so, the updated path is stored in $new_path.
15734   new_path="$input_to_shortpath"
15735 
15736   input_path="$input_to_shortpath"
15737   # Check if we need to convert this using DOS-style short mode. If the path
15738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15739   # take no chances and rewrite it.
15740   # Note: m4 eats our [], so we need to use [ and ] instead.
15741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15742   if test "x$has_forbidden_chars" != x; then
15743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15744     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15745     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15746     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15747       # Going to short mode and back again did indeed matter. Since short mode is
15748       # case insensitive, let's make it lowercase to improve readability.
15749       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15750       # Now convert it back to Unix-stile (cygpath)
15751       input_path=`$CYGPATH -u "$shortmode_path"`
15752       new_path="$input_path"
15753     fi
15754   fi
15755 
15756   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15757   if test "x$test_cygdrive_prefix" = x; then
15758     # As a simple fix, exclude /usr/bin since it's not a real path.
15759     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15760       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15761       # a path prefixed by /cygdrive for fixpath to work.
15762       new_path="$CYGWIN_ROOT_PATH$input_path"
15763     fi
15764   fi
15765 
15766   # remove trailing .exe if any
15767   new_path="${new_path/%.exe/}"
15768 
15769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15770 
15771   # First separate the path from the arguments. This will split at the first
15772   # space.
15773   complete="$FOUND_MAKE"
15774   path="${complete%% *}"
15775   tmp="$complete EOL"
15776   arguments="${tmp#* }"
15777 
15778   # Input might be given as Windows format, start by converting to
15779   # unix format.
15780   new_path="$path"
15781 
15782   windows_path="$new_path"
15783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15784     unix_path=`$CYGPATH -u "$windows_path"`
15785     new_path="$unix_path"
15786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15788     new_path="$unix_path"
15789   fi
15790 
15791 
15792   # Now try to locate executable using which
15793   new_path=`$WHICH "$new_path" 2> /dev/null`
15794 
15795   if test "x$new_path" = x; then
15796     # Oops. Which didn't find the executable.
15797     # The splitting of arguments from the executable at a space might have been incorrect,
15798     # since paths with space are more likely in Windows. Give it another try with the whole
15799     # argument.
15800     path="$complete"
15801     arguments="EOL"
15802     new_path="$path"
15803 
15804   windows_path="$new_path"
15805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15806     unix_path=`$CYGPATH -u "$windows_path"`
15807     new_path="$unix_path"
15808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15810     new_path="$unix_path"
15811   fi
15812 
15813 
15814     new_path=`$WHICH "$new_path" 2> /dev/null`
15815 
15816     if test "x$new_path" = x; then
15817       # It's still not found. Now this is an unrecoverable error.
15818       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15819 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15820       has_space=`$ECHO "$complete" | $GREP " "`
15821       if test "x$has_space" != x; then
15822         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15823 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15824       fi
15825       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15826     fi
15827   fi
15828 
15829   # Now new_path has a complete unix path to the binary
15830   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15831     # Keep paths in /bin as-is, but remove trailing .exe if any
15832     new_path="${new_path/%.exe/}"
15833     # Do not save /bin paths to all_fixpath_prefixes!
15834   else
15835     # Not in mixed or Windows style, start by that.
15836     new_path=`cmd //c echo $new_path`
15837 
15838   input_path="$new_path"
15839   # Check if we need to convert this using DOS-style short mode. If the path
15840   # contains just simple characters, use it. Otherwise (spaces, weird characters),
15841   # take no chances and rewrite it.
15842   # Note: m4 eats our [], so we need to use [ and ] instead.
15843   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15844   if test "x$has_forbidden_chars" != x; then
15845     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15846     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15847   fi
15848 
15849     # Output is in $new_path
15850 
15851   windows_path="$new_path"
15852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15853     unix_path=`$CYGPATH -u "$windows_path"`
15854     new_path="$unix_path"
15855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15857     new_path="$unix_path"
15858   fi
15859 
15860     # remove trailing .exe if any
15861     new_path="${new_path/%.exe/}"
15862 
15863     # Save the first 10 bytes of this path to the storage, so fixpath can work.
15864     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15865   fi
15866 
15867   else
15868     # We're on a posix platform. Hooray! :)
15869     # First separate the path from the arguments. This will split at the first
15870     # space.
15871     complete="$FOUND_MAKE"
15872     path="${complete%% *}"
15873     tmp="$complete EOL"
15874     arguments="${tmp#* }"
15875 
15876     # Cannot rely on the command "which" here since it doesn't always work.
15877     is_absolute_path=`$ECHO "$path" | $GREP ^/`
15878     if test -z "$is_absolute_path"; then
15879       # Path to executable is not absolute. Find it.
15880       IFS_save="$IFS"
15881       IFS=:
15882       for p in $PATH; do
15883         if test -f "$p/$path" && test -x "$p/$path"; then
15884           new_path="$p/$path"
15885           break
15886         fi
15887       done
15888       IFS="$IFS_save"
15889     else
15890       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
15891 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
15892       new_path="$path"
15893     fi
15894 
15895     if test "x$new_path" = x; then
15896       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15897 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15898       has_space=`$ECHO "$complete" | $GREP " "`
15899       if test "x$has_space" != x; then
15900         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15901 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15902       fi
15903       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15904     fi
15905   fi
15906 
15907   # Now join together the path and the arguments once again
15908   if test "x$arguments" != xEOL; then
15909     new_complete="$new_path ${arguments% *}"
15910   else
15911     new_complete="$new_path"
15912   fi
15913 
15914   if test "x$complete" != "x$new_complete"; then
15915     FOUND_MAKE="$new_complete"
15916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15917 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15918   fi
15919 
15920         fi
15921       fi
15922     fi
15923   fi
15924 
15925     fi
15926 
15927     if test "x$FOUND_MAKE" = x; then
15928       if test "x$TOOLS_DIR" != x; then
15929         # We have a tools-dir, check that as well before giving up.
15930         OLD_PATH=$PATH
15931         PATH=$TOOLS_DIR:$PATH
15932         for ac_prog in gmake
15933 do
15934   # Extract the first word of "$ac_prog", so it can be a program name with args.
15935 set dummy $ac_prog; ac_word=$2
15936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15937 $as_echo_n "checking for $ac_word... " >&6; }
15938 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
15939   $as_echo_n "(cached) " >&6
15940 else
15941   case $CHECK_TOOLSDIR_GMAKE in
15942   [\\/]* | ?:[\\/]*)
15943   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
15944   ;;
15945   *)
15946   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15947 for as_dir in $PATH
15948 do
15949   IFS=$as_save_IFS
15950   test -z "$as_dir" && as_dir=.
15951     for ac_exec_ext in '' $ac_executable_extensions; do
15952   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15953     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15954     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15955     break 2
15956   fi
15957 done
15958   done
15959 IFS=$as_save_IFS
15960 
15961   ;;
15962 esac
15963 fi
15964 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
15965 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
15966   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
15967 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
15968 else
15969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15970 $as_echo "no" >&6; }
15971 fi
15972 
15973 
15974   test -n "$CHECK_TOOLSDIR_GMAKE" && break
15975 done
15976 
15977 
15978   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
15979   DESCRIPTION="gmake in tools-dir"
15980   if test "x$MAKE_CANDIDATE" != x; then
15981     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15982 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15983     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15984     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15985     if test "x$IS_GNU_MAKE" = x; then
15986       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15987 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15988     else
15989       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15990       if test "x$IS_MODERN_MAKE" = x; then
15991         { $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
15992 $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;}
15993       else
15994         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15995           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15996             MAKE_EXPECTED_ENV='cygwin'
15997           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15998             MAKE_EXPECTED_ENV='msys'
15999           else
16000             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16001           fi
16002           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16003           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16004         else
16005           # Not relevant for non-Windows
16006           IS_MAKE_CORRECT_ENV=true
16007         fi
16008         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16009           { $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
16010 $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;}
16011         else
16012           FOUND_MAKE=$MAKE_CANDIDATE
16013 
16014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16015 
16016   # First separate the path from the arguments. This will split at the first
16017   # space.
16018   complete="$FOUND_MAKE"
16019   path="${complete%% *}"
16020   tmp="$complete EOL"
16021   arguments="${tmp#* }"
16022 
16023   # Input might be given as Windows format, start by converting to
16024   # unix format.
16025   new_path=`$CYGPATH -u "$path"`
16026 
16027   # Now try to locate executable using which
16028   new_path=`$WHICH "$new_path" 2> /dev/null`
16029   # bat and cmd files are not always considered executable in cygwin causing which
16030   # to not find them
16031   if test "x$new_path" = x \
16032       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16033       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16034     new_path=`$CYGPATH -u "$path"`
16035   fi
16036   if test "x$new_path" = x; then
16037     # Oops. Which didn't find the executable.
16038     # The splitting of arguments from the executable at a space might have been incorrect,
16039     # since paths with space are more likely in Windows. Give it another try with the whole
16040     # argument.
16041     path="$complete"
16042     arguments="EOL"
16043     new_path=`$CYGPATH -u "$path"`
16044     new_path=`$WHICH "$new_path" 2> /dev/null`
16045     # bat and cmd files are not always considered executable in cygwin causing which
16046     # to not find them
16047     if test "x$new_path" = x \
16048         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16049         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16050       new_path=`$CYGPATH -u "$path"`
16051     fi
16052     if test "x$new_path" = x; then
16053       # It's still not found. Now this is an unrecoverable error.
16054       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16055 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16056       has_space=`$ECHO "$complete" | $GREP " "`
16057       if test "x$has_space" != x; then
16058         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16059 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16060       fi
16061       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16062     fi
16063   fi
16064 
16065   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16066   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16067   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16068   # "foo.exe" is OK but "foo" is an error.
16069   #
16070   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16071   # It is also a way to make sure we got the proper file name for the real test later on.
16072   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16073   if test "x$test_shortpath" = x; then
16074     # Short path failed, file does not exist as specified.
16075     # Try adding .exe or .cmd
16076     if test -f "${new_path}.exe"; then
16077       input_to_shortpath="${new_path}.exe"
16078     elif test -f "${new_path}.cmd"; then
16079       input_to_shortpath="${new_path}.cmd"
16080     else
16081       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16082 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16083       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16084 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16085       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16086     fi
16087   else
16088     input_to_shortpath="$new_path"
16089   fi
16090 
16091   # Call helper function which possibly converts this using DOS-style short mode.
16092   # If so, the updated path is stored in $new_path.
16093   new_path="$input_to_shortpath"
16094 
16095   input_path="$input_to_shortpath"
16096   # Check if we need to convert this using DOS-style short mode. If the path
16097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16098   # take no chances and rewrite it.
16099   # Note: m4 eats our [], so we need to use [ and ] instead.
16100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16101   if test "x$has_forbidden_chars" != x; then
16102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16106       # Going to short mode and back again did indeed matter. Since short mode is
16107       # case insensitive, let's make it lowercase to improve readability.
16108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16109       # Now convert it back to Unix-stile (cygpath)
16110       input_path=`$CYGPATH -u "$shortmode_path"`
16111       new_path="$input_path"
16112     fi
16113   fi
16114 
16115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16116   if test "x$test_cygdrive_prefix" = x; then
16117     # As a simple fix, exclude /usr/bin since it's not a real path.
16118     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16120       # a path prefixed by /cygdrive for fixpath to work.
16121       new_path="$CYGWIN_ROOT_PATH$input_path"
16122     fi
16123   fi
16124 
16125   # remove trailing .exe if any
16126   new_path="${new_path/%.exe/}"
16127 
16128   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16129 
16130   # First separate the path from the arguments. This will split at the first
16131   # space.
16132   complete="$FOUND_MAKE"
16133   path="${complete%% *}"
16134   tmp="$complete EOL"
16135   arguments="${tmp#* }"
16136 
16137   # Input might be given as Windows format, start by converting to
16138   # unix format.
16139   new_path="$path"
16140 
16141   windows_path="$new_path"
16142   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16143     unix_path=`$CYGPATH -u "$windows_path"`
16144     new_path="$unix_path"
16145   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16146     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16147     new_path="$unix_path"
16148   fi
16149 
16150 
16151   # Now try to locate executable using which
16152   new_path=`$WHICH "$new_path" 2> /dev/null`
16153 
16154   if test "x$new_path" = x; then
16155     # Oops. Which didn't find the executable.
16156     # The splitting of arguments from the executable at a space might have been incorrect,
16157     # since paths with space are more likely in Windows. Give it another try with the whole
16158     # argument.
16159     path="$complete"
16160     arguments="EOL"
16161     new_path="$path"
16162 
16163   windows_path="$new_path"
16164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16165     unix_path=`$CYGPATH -u "$windows_path"`
16166     new_path="$unix_path"
16167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16169     new_path="$unix_path"
16170   fi
16171 
16172 
16173     new_path=`$WHICH "$new_path" 2> /dev/null`
16174 
16175     if test "x$new_path" = x; then
16176       # It's still not found. Now this is an unrecoverable error.
16177       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16178 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16179       has_space=`$ECHO "$complete" | $GREP " "`
16180       if test "x$has_space" != x; then
16181         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16182 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16183       fi
16184       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16185     fi
16186   fi
16187 
16188   # Now new_path has a complete unix path to the binary
16189   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16190     # Keep paths in /bin as-is, but remove trailing .exe if any
16191     new_path="${new_path/%.exe/}"
16192     # Do not save /bin paths to all_fixpath_prefixes!
16193   else
16194     # Not in mixed or Windows style, start by that.
16195     new_path=`cmd //c echo $new_path`
16196 
16197   input_path="$new_path"
16198   # Check if we need to convert this using DOS-style short mode. If the path
16199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16200   # take no chances and rewrite it.
16201   # Note: m4 eats our [], so we need to use [ and ] instead.
16202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16203   if test "x$has_forbidden_chars" != x; then
16204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16205     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16206   fi
16207 
16208     # Output is in $new_path
16209 
16210   windows_path="$new_path"
16211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16212     unix_path=`$CYGPATH -u "$windows_path"`
16213     new_path="$unix_path"
16214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16216     new_path="$unix_path"
16217   fi
16218 
16219     # remove trailing .exe if any
16220     new_path="${new_path/%.exe/}"
16221 
16222     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16223     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16224   fi
16225 
16226   else
16227     # We're on a posix platform. Hooray! :)
16228     # First separate the path from the arguments. This will split at the first
16229     # space.
16230     complete="$FOUND_MAKE"
16231     path="${complete%% *}"
16232     tmp="$complete EOL"
16233     arguments="${tmp#* }"
16234 
16235     # Cannot rely on the command "which" here since it doesn't always work.
16236     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16237     if test -z "$is_absolute_path"; then
16238       # Path to executable is not absolute. Find it.
16239       IFS_save="$IFS"
16240       IFS=:
16241       for p in $PATH; do
16242         if test -f "$p/$path" && test -x "$p/$path"; then
16243           new_path="$p/$path"
16244           break
16245         fi
16246       done
16247       IFS="$IFS_save"
16248     else
16249       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16250 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16251       new_path="$path"
16252     fi
16253 
16254     if test "x$new_path" = x; then
16255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16256 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16257       has_space=`$ECHO "$complete" | $GREP " "`
16258       if test "x$has_space" != x; then
16259         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16260 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16261       fi
16262       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16263     fi
16264   fi
16265 
16266   # Now join together the path and the arguments once again
16267   if test "x$arguments" != xEOL; then
16268     new_complete="$new_path ${arguments% *}"
16269   else
16270     new_complete="$new_path"
16271   fi
16272 
16273   if test "x$complete" != "x$new_complete"; then
16274     FOUND_MAKE="$new_complete"
16275     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16276 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16277   fi
16278 
16279         fi
16280       fi
16281     fi
16282   fi
16283 
16284         if test "x$FOUND_MAKE" = x; then
16285           for ac_prog in make
16286 do
16287   # Extract the first word of "$ac_prog", so it can be a program name with args.
16288 set dummy $ac_prog; ac_word=$2
16289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16290 $as_echo_n "checking for $ac_word... " >&6; }
16291 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16292   $as_echo_n "(cached) " >&6
16293 else
16294   case $CHECK_TOOLSDIR_MAKE in
16295   [\\/]* | ?:[\\/]*)
16296   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16297   ;;
16298   *)
16299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16300 for as_dir in $PATH
16301 do
16302   IFS=$as_save_IFS
16303   test -z "$as_dir" && as_dir=.
16304     for ac_exec_ext in '' $ac_executable_extensions; do
16305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16306     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16308     break 2
16309   fi
16310 done
16311   done
16312 IFS=$as_save_IFS
16313 
16314   ;;
16315 esac
16316 fi
16317 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16318 if test -n "$CHECK_TOOLSDIR_MAKE"; then
16319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16320 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16321 else
16322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16323 $as_echo "no" >&6; }
16324 fi
16325 
16326 
16327   test -n "$CHECK_TOOLSDIR_MAKE" && break
16328 done
16329 
16330 
16331   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16332   DESCRIPTION="make in tools-dir"
16333   if test "x$MAKE_CANDIDATE" != x; then
16334     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16335 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16336     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16337     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16338     if test "x$IS_GNU_MAKE" = x; then
16339       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16340 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16341     else
16342       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16343       if test "x$IS_MODERN_MAKE" = x; then
16344         { $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
16345 $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;}
16346       else
16347         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16348           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349             MAKE_EXPECTED_ENV='cygwin'
16350           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16351             MAKE_EXPECTED_ENV='msys'
16352           else
16353             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16354           fi
16355           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16356           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16357         else
16358           # Not relevant for non-Windows
16359           IS_MAKE_CORRECT_ENV=true
16360         fi
16361         if test "x$IS_MAKE_CORRECT_ENV" = x; then
16362           { $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
16363 $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;}
16364         else
16365           FOUND_MAKE=$MAKE_CANDIDATE
16366 
16367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16368 
16369   # First separate the path from the arguments. This will split at the first
16370   # space.
16371   complete="$FOUND_MAKE"
16372   path="${complete%% *}"
16373   tmp="$complete EOL"
16374   arguments="${tmp#* }"
16375 
16376   # Input might be given as Windows format, start by converting to
16377   # unix format.
16378   new_path=`$CYGPATH -u "$path"`
16379 
16380   # Now try to locate executable using which
16381   new_path=`$WHICH "$new_path" 2> /dev/null`
16382   # bat and cmd files are not always considered executable in cygwin causing which
16383   # to not find them
16384   if test "x$new_path" = x \
16385       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16386       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16387     new_path=`$CYGPATH -u "$path"`
16388   fi
16389   if test "x$new_path" = x; then
16390     # Oops. Which didn't find the executable.
16391     # The splitting of arguments from the executable at a space might have been incorrect,
16392     # since paths with space are more likely in Windows. Give it another try with the whole
16393     # argument.
16394     path="$complete"
16395     arguments="EOL"
16396     new_path=`$CYGPATH -u "$path"`
16397     new_path=`$WHICH "$new_path" 2> /dev/null`
16398     # bat and cmd files are not always considered executable in cygwin causing which
16399     # to not find them
16400     if test "x$new_path" = x \
16401         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16402         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16403       new_path=`$CYGPATH -u "$path"`
16404     fi
16405     if test "x$new_path" = x; then
16406       # It's still not found. Now this is an unrecoverable error.
16407       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16408 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16409       has_space=`$ECHO "$complete" | $GREP " "`
16410       if test "x$has_space" != x; then
16411         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16412 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16413       fi
16414       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16415     fi
16416   fi
16417 
16418   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16419   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16420   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16421   # "foo.exe" is OK but "foo" is an error.
16422   #
16423   # This test is therefore slightly more accurate than "test -f" to check for file presence.
16424   # It is also a way to make sure we got the proper file name for the real test later on.
16425   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16426   if test "x$test_shortpath" = x; then
16427     # Short path failed, file does not exist as specified.
16428     # Try adding .exe or .cmd
16429     if test -f "${new_path}.exe"; then
16430       input_to_shortpath="${new_path}.exe"
16431     elif test -f "${new_path}.cmd"; then
16432       input_to_shortpath="${new_path}.cmd"
16433     else
16434       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16435 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16436       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16437 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16438       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16439     fi
16440   else
16441     input_to_shortpath="$new_path"
16442   fi
16443 
16444   # Call helper function which possibly converts this using DOS-style short mode.
16445   # If so, the updated path is stored in $new_path.
16446   new_path="$input_to_shortpath"
16447 
16448   input_path="$input_to_shortpath"
16449   # Check if we need to convert this using DOS-style short mode. If the path
16450   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16451   # take no chances and rewrite it.
16452   # Note: m4 eats our [], so we need to use [ and ] instead.
16453   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16454   if test "x$has_forbidden_chars" != x; then
16455     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16456     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16457     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16458     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16459       # Going to short mode and back again did indeed matter. Since short mode is
16460       # case insensitive, let's make it lowercase to improve readability.
16461       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16462       # Now convert it back to Unix-stile (cygpath)
16463       input_path=`$CYGPATH -u "$shortmode_path"`
16464       new_path="$input_path"
16465     fi
16466   fi
16467 
16468   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16469   if test "x$test_cygdrive_prefix" = x; then
16470     # As a simple fix, exclude /usr/bin since it's not a real path.
16471     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16472       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16473       # a path prefixed by /cygdrive for fixpath to work.
16474       new_path="$CYGWIN_ROOT_PATH$input_path"
16475     fi
16476   fi
16477 
16478   # remove trailing .exe if any
16479   new_path="${new_path/%.exe/}"
16480 
16481   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482 
16483   # First separate the path from the arguments. This will split at the first
16484   # space.
16485   complete="$FOUND_MAKE"
16486   path="${complete%% *}"
16487   tmp="$complete EOL"
16488   arguments="${tmp#* }"
16489 
16490   # Input might be given as Windows format, start by converting to
16491   # unix format.
16492   new_path="$path"
16493 
16494   windows_path="$new_path"
16495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16496     unix_path=`$CYGPATH -u "$windows_path"`
16497     new_path="$unix_path"
16498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16500     new_path="$unix_path"
16501   fi
16502 
16503 
16504   # Now try to locate executable using which
16505   new_path=`$WHICH "$new_path" 2> /dev/null`
16506 
16507   if test "x$new_path" = x; then
16508     # Oops. Which didn't find the executable.
16509     # The splitting of arguments from the executable at a space might have been incorrect,
16510     # since paths with space are more likely in Windows. Give it another try with the whole
16511     # argument.
16512     path="$complete"
16513     arguments="EOL"
16514     new_path="$path"
16515 
16516   windows_path="$new_path"
16517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16518     unix_path=`$CYGPATH -u "$windows_path"`
16519     new_path="$unix_path"
16520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16522     new_path="$unix_path"
16523   fi
16524 
16525 
16526     new_path=`$WHICH "$new_path" 2> /dev/null`
16527 
16528     if test "x$new_path" = x; then
16529       # It's still not found. Now this is an unrecoverable error.
16530       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16531 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16532       has_space=`$ECHO "$complete" | $GREP " "`
16533       if test "x$has_space" != x; then
16534         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16535 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16536       fi
16537       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16538     fi
16539   fi
16540 
16541   # Now new_path has a complete unix path to the binary
16542   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16543     # Keep paths in /bin as-is, but remove trailing .exe if any
16544     new_path="${new_path/%.exe/}"
16545     # Do not save /bin paths to all_fixpath_prefixes!
16546   else
16547     # Not in mixed or Windows style, start by that.
16548     new_path=`cmd //c echo $new_path`
16549 
16550   input_path="$new_path"
16551   # Check if we need to convert this using DOS-style short mode. If the path
16552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16553   # take no chances and rewrite it.
16554   # Note: m4 eats our [], so we need to use [ and ] instead.
16555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16556   if test "x$has_forbidden_chars" != x; then
16557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16559   fi
16560 
16561     # Output is in $new_path
16562 
16563   windows_path="$new_path"
16564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16565     unix_path=`$CYGPATH -u "$windows_path"`
16566     new_path="$unix_path"
16567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16569     new_path="$unix_path"
16570   fi
16571 
16572     # remove trailing .exe if any
16573     new_path="${new_path/%.exe/}"
16574 
16575     # Save the first 10 bytes of this path to the storage, so fixpath can work.
16576     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16577   fi
16578 
16579   else
16580     # We're on a posix platform. Hooray! :)
16581     # First separate the path from the arguments. This will split at the first
16582     # space.
16583     complete="$FOUND_MAKE"
16584     path="${complete%% *}"
16585     tmp="$complete EOL"
16586     arguments="${tmp#* }"
16587 
16588     # Cannot rely on the command "which" here since it doesn't always work.
16589     is_absolute_path=`$ECHO "$path" | $GREP ^/`
16590     if test -z "$is_absolute_path"; then
16591       # Path to executable is not absolute. Find it.
16592       IFS_save="$IFS"
16593       IFS=:
16594       for p in $PATH; do
16595         if test -f "$p/$path" && test -x "$p/$path"; then
16596           new_path="$p/$path"
16597           break
16598         fi
16599       done
16600       IFS="$IFS_save"
16601     else
16602       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
16603 $as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
16604       new_path="$path"
16605     fi
16606 
16607     if test "x$new_path" = x; then
16608       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16609 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16610       has_space=`$ECHO "$complete" | $GREP " "`
16611       if test "x$has_space" != x; then
16612         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16613 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16614       fi
16615       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16616     fi
16617   fi
16618 
16619   # Now join together the path and the arguments once again
16620   if test "x$arguments" != xEOL; then
16621     new_complete="$new_path ${arguments% *}"
16622   else
16623     new_complete="$new_path"
16624   fi
16625 
16626   if test "x$complete" != "x$new_complete"; then
16627     FOUND_MAKE="$new_complete"
16628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16629 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16630   fi
16631 
16632         fi
16633       fi
16634     fi
16635   fi
16636 
16637         fi
16638         PATH=$OLD_PATH
16639       fi
16640     fi
16641 
16642     if test "x$FOUND_MAKE" = x; then
16643       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
16644     fi
16645   fi
16646 
16647   MAKE=$FOUND_MAKE
16648 
16649   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16650 $as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16651 
16652 
16653 
16654   # Test if find supports -delete
16655   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16656 $as_echo_n "checking if find supports -delete... " >&6; }
16657   FIND_DELETE="-delete"
16658 
16659   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16660 
16661   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16662 
16663   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16664   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16665     # No, it does not.
16666     rm $DELETEDIR/TestIfFindSupportsDelete
16667     FIND_DELETE="-exec rm \{\} \+"
16668     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16669 $as_echo "no" >&6; }
16670   else
16671     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16672 $as_echo "yes" >&6; }
16673   fi
16674   rmdir $DELETEDIR
16675 
16676 
16677 
16678   # These tools might not be installed by default,
16679   # need hint on how to install them.
16680 
16681 
16682 
16683   # Publish this variable in the help.
16684 
16685 
16686   if test "x$UNZIP" = x; then
16687     # The variable is not set by user, try to locate tool using the code snippet
16688     for ac_prog in unzip
16689 do
16690   # Extract the first word of "$ac_prog", so it can be a program name with args.
16691 set dummy $ac_prog; ac_word=$2
16692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16693 $as_echo_n "checking for $ac_word... " >&6; }
16694 if ${ac_cv_path_UNZIP+:} false; then :
16695   $as_echo_n "(cached) " >&6
16696 else
16697   case $UNZIP in
16698   [\\/]* | ?:[\\/]*)
16699   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16700   ;;
16701   *)
16702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16703 for as_dir in $PATH
16704 do
16705   IFS=$as_save_IFS
16706   test -z "$as_dir" && as_dir=.
16707     for ac_exec_ext in '' $ac_executable_extensions; do
16708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16709     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16711     break 2
16712   fi
16713 done
16714   done
16715 IFS=$as_save_IFS
16716 
16717   ;;
16718 esac
16719 fi
16720 UNZIP=$ac_cv_path_UNZIP
16721 if test -n "$UNZIP"; then
16722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16723 $as_echo "$UNZIP" >&6; }
16724 else
16725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16726 $as_echo "no" >&6; }
16727 fi
16728 
16729 
16730   test -n "$UNZIP" && break
16731 done
16732 
16733   else
16734     # The variable is set, but is it from the command line or the environment?
16735 
16736     # Try to remove the string !UNZIP! from our list.
16737     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16738     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16739       # If it failed, the variable was not from the command line. Ignore it,
16740       # but warn the user (except for BASH, which is always set by the calling BASH).
16741       if test "xUNZIP" != xBASH; then
16742         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16743 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16744       fi
16745       # Try to locate tool using the code snippet
16746       for ac_prog in unzip
16747 do
16748   # Extract the first word of "$ac_prog", so it can be a program name with args.
16749 set dummy $ac_prog; ac_word=$2
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16751 $as_echo_n "checking for $ac_word... " >&6; }
16752 if ${ac_cv_path_UNZIP+:} false; then :
16753   $as_echo_n "(cached) " >&6
16754 else
16755   case $UNZIP in
16756   [\\/]* | ?:[\\/]*)
16757   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16758   ;;
16759   *)
16760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16761 for as_dir in $PATH
16762 do
16763   IFS=$as_save_IFS
16764   test -z "$as_dir" && as_dir=.
16765     for ac_exec_ext in '' $ac_executable_extensions; do
16766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16767     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16769     break 2
16770   fi
16771 done
16772   done
16773 IFS=$as_save_IFS
16774 
16775   ;;
16776 esac
16777 fi
16778 UNZIP=$ac_cv_path_UNZIP
16779 if test -n "$UNZIP"; then
16780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16781 $as_echo "$UNZIP" >&6; }
16782 else
16783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16784 $as_echo "no" >&6; }
16785 fi
16786 
16787 
16788   test -n "$UNZIP" && break
16789 done
16790 
16791     else
16792       # If it succeeded, then it was overridden by the user. We will use it
16793       # for the tool.
16794 
16795       # First remove it from the list of overridden variables, so we can test
16796       # for unknown variables in the end.
16797       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16798 
16799       # Check if the provided tool contains a complete path.
16800       tool_specified="$UNZIP"
16801       tool_basename="${tool_specified##*/}"
16802       if test "x$tool_basename" = "x$tool_specified"; then
16803         # A command without a complete path is provided, search $PATH.
16804         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16805 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16806         # Extract the first word of "$tool_basename", so it can be a program name with args.
16807 set dummy $tool_basename; ac_word=$2
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16809 $as_echo_n "checking for $ac_word... " >&6; }
16810 if ${ac_cv_path_UNZIP+:} false; then :
16811   $as_echo_n "(cached) " >&6
16812 else
16813   case $UNZIP in
16814   [\\/]* | ?:[\\/]*)
16815   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16816   ;;
16817   *)
16818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16819 for as_dir in $PATH
16820 do
16821   IFS=$as_save_IFS
16822   test -z "$as_dir" && as_dir=.
16823     for ac_exec_ext in '' $ac_executable_extensions; do
16824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16825     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16827     break 2
16828   fi
16829 done
16830   done
16831 IFS=$as_save_IFS
16832 
16833   ;;
16834 esac
16835 fi
16836 UNZIP=$ac_cv_path_UNZIP
16837 if test -n "$UNZIP"; then
16838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16839 $as_echo "$UNZIP" >&6; }
16840 else
16841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16842 $as_echo "no" >&6; }
16843 fi
16844 
16845 
16846         if test "x$UNZIP" = x; then
16847           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16848         fi
16849       else
16850         # Otherwise we believe it is a complete path. Use it as it is.
16851         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16852 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16853         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16854 $as_echo_n "checking for UNZIP... " >&6; }
16855         if test ! -x "$tool_specified"; then
16856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16857 $as_echo "not found" >&6; }
16858           as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
16859         fi
16860         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
16861 $as_echo "$tool_specified" >&6; }
16862       fi
16863     fi
16864   fi
16865 
16866 
16867 
16868   if test "x$UNZIP" = x; then
16869     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
16870   fi
16871 
16872 
16873 
16874 
16875 
16876   # Publish this variable in the help.
16877 
16878 
16879   if test "x$ZIP" = x; then
16880     # The variable is not set by user, try to locate tool using the code snippet
16881     for ac_prog in zip
16882 do
16883   # Extract the first word of "$ac_prog", so it can be a program name with args.
16884 set dummy $ac_prog; ac_word=$2
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16886 $as_echo_n "checking for $ac_word... " >&6; }
16887 if ${ac_cv_path_ZIP+:} false; then :
16888   $as_echo_n "(cached) " >&6
16889 else
16890   case $ZIP in
16891   [\\/]* | ?:[\\/]*)
16892   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16893   ;;
16894   *)
16895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16896 for as_dir in $PATH
16897 do
16898   IFS=$as_save_IFS
16899   test -z "$as_dir" && as_dir=.
16900     for ac_exec_ext in '' $ac_executable_extensions; do
16901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16902     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16904     break 2
16905   fi
16906 done
16907   done
16908 IFS=$as_save_IFS
16909 
16910   ;;
16911 esac
16912 fi
16913 ZIP=$ac_cv_path_ZIP
16914 if test -n "$ZIP"; then
16915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16916 $as_echo "$ZIP" >&6; }
16917 else
16918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16919 $as_echo "no" >&6; }
16920 fi
16921 
16922 
16923   test -n "$ZIP" && break
16924 done
16925 
16926   else
16927     # The variable is set, but is it from the command line or the environment?
16928 
16929     # Try to remove the string !ZIP! from our list.
16930     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
16931     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16932       # If it failed, the variable was not from the command line. Ignore it,
16933       # but warn the user (except for BASH, which is always set by the calling BASH).
16934       if test "xZIP" != xBASH; then
16935         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
16936 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
16937       fi
16938       # Try to locate tool using the code snippet
16939       for ac_prog in zip
16940 do
16941   # Extract the first word of "$ac_prog", so it can be a program name with args.
16942 set dummy $ac_prog; ac_word=$2
16943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16944 $as_echo_n "checking for $ac_word... " >&6; }
16945 if ${ac_cv_path_ZIP+:} false; then :
16946   $as_echo_n "(cached) " >&6
16947 else
16948   case $ZIP in
16949   [\\/]* | ?:[\\/]*)
16950   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
16951   ;;
16952   *)
16953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16954 for as_dir in $PATH
16955 do
16956   IFS=$as_save_IFS
16957   test -z "$as_dir" && as_dir=.
16958     for ac_exec_ext in '' $ac_executable_extensions; do
16959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16960     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
16961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16962     break 2
16963   fi
16964 done
16965   done
16966 IFS=$as_save_IFS
16967 
16968   ;;
16969 esac
16970 fi
16971 ZIP=$ac_cv_path_ZIP
16972 if test -n "$ZIP"; then
16973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
16974 $as_echo "$ZIP" >&6; }
16975 else
16976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16977 $as_echo "no" >&6; }
16978 fi
16979 
16980 
16981   test -n "$ZIP" && break
16982 done
16983 
16984     else
16985       # If it succeeded, then it was overridden by the user. We will use it
16986       # for the tool.
16987 
16988       # First remove it from the list of overridden variables, so we can test
16989       # for unknown variables in the end.
16990       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16991 
16992       # Check if the provided tool contains a complete path.
16993       tool_specified="$ZIP"
16994       tool_basename="${tool_specified##*/}"
16995       if test "x$tool_basename" = "x$tool_specified"; then
16996         # A command without a complete path is provided, search $PATH.
16997         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
16998 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
16999         # Extract the first word of "$tool_basename", so it can be a program name with args.
17000 set dummy $tool_basename; ac_word=$2
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17002 $as_echo_n "checking for $ac_word... " >&6; }
17003 if ${ac_cv_path_ZIP+:} false; then :
17004   $as_echo_n "(cached) " >&6
17005 else
17006   case $ZIP in
17007   [\\/]* | ?:[\\/]*)
17008   ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17009   ;;
17010   *)
17011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17012 for as_dir in $PATH
17013 do
17014   IFS=$as_save_IFS
17015   test -z "$as_dir" && as_dir=.
17016     for ac_exec_ext in '' $ac_executable_extensions; do
17017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17018     ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17020     break 2
17021   fi
17022 done
17023   done
17024 IFS=$as_save_IFS
17025 
17026   ;;
17027 esac
17028 fi
17029 ZIP=$ac_cv_path_ZIP
17030 if test -n "$ZIP"; then
17031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17032 $as_echo "$ZIP" >&6; }
17033 else
17034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17035 $as_echo "no" >&6; }
17036 fi
17037 
17038 
17039         if test "x$ZIP" = x; then
17040           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17041         fi
17042       else
17043         # Otherwise we believe it is a complete path. Use it as it is.
17044         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17045 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17047 $as_echo_n "checking for ZIP... " >&6; }
17048         if test ! -x "$tool_specified"; then
17049           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17050 $as_echo "not found" >&6; }
17051           as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17052         fi
17053         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17054 $as_echo "$tool_specified" >&6; }
17055       fi
17056     fi
17057   fi
17058 
17059 
17060 
17061   if test "x$ZIP" = x; then
17062     as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17063   fi
17064 
17065 
17066 
17067   # Non-required basic tools
17068 
17069 
17070 
17071   # Publish this variable in the help.
17072 
17073 
17074   if test "x$LDD" = x; then
17075     # The variable is not set by user, try to locate tool using the code snippet
17076     for ac_prog in ldd
17077 do
17078   # Extract the first word of "$ac_prog", so it can be a program name with args.
17079 set dummy $ac_prog; ac_word=$2
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17081 $as_echo_n "checking for $ac_word... " >&6; }
17082 if ${ac_cv_path_LDD+:} false; then :
17083   $as_echo_n "(cached) " >&6
17084 else
17085   case $LDD in
17086   [\\/]* | ?:[\\/]*)
17087   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17088   ;;
17089   *)
17090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17091 for as_dir in $PATH
17092 do
17093   IFS=$as_save_IFS
17094   test -z "$as_dir" && as_dir=.
17095     for ac_exec_ext in '' $ac_executable_extensions; do
17096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17097     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17099     break 2
17100   fi
17101 done
17102   done
17103 IFS=$as_save_IFS
17104 
17105   ;;
17106 esac
17107 fi
17108 LDD=$ac_cv_path_LDD
17109 if test -n "$LDD"; then
17110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17111 $as_echo "$LDD" >&6; }
17112 else
17113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17114 $as_echo "no" >&6; }
17115 fi
17116 
17117 
17118   test -n "$LDD" && break
17119 done
17120 
17121   else
17122     # The variable is set, but is it from the command line or the environment?
17123 
17124     # Try to remove the string !LDD! from our list.
17125     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17126     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17127       # If it failed, the variable was not from the command line. Ignore it,
17128       # but warn the user (except for BASH, which is always set by the calling BASH).
17129       if test "xLDD" != xBASH; then
17130         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17131 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17132       fi
17133       # Try to locate tool using the code snippet
17134       for ac_prog in ldd
17135 do
17136   # Extract the first word of "$ac_prog", so it can be a program name with args.
17137 set dummy $ac_prog; ac_word=$2
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17139 $as_echo_n "checking for $ac_word... " >&6; }
17140 if ${ac_cv_path_LDD+:} false; then :
17141   $as_echo_n "(cached) " >&6
17142 else
17143   case $LDD in
17144   [\\/]* | ?:[\\/]*)
17145   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17146   ;;
17147   *)
17148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17149 for as_dir in $PATH
17150 do
17151   IFS=$as_save_IFS
17152   test -z "$as_dir" && as_dir=.
17153     for ac_exec_ext in '' $ac_executable_extensions; do
17154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17155     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17157     break 2
17158   fi
17159 done
17160   done
17161 IFS=$as_save_IFS
17162 
17163   ;;
17164 esac
17165 fi
17166 LDD=$ac_cv_path_LDD
17167 if test -n "$LDD"; then
17168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17169 $as_echo "$LDD" >&6; }
17170 else
17171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17172 $as_echo "no" >&6; }
17173 fi
17174 
17175 
17176   test -n "$LDD" && break
17177 done
17178 
17179     else
17180       # If it succeeded, then it was overridden by the user. We will use it
17181       # for the tool.
17182 
17183       # First remove it from the list of overridden variables, so we can test
17184       # for unknown variables in the end.
17185       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17186 
17187       # Check if the provided tool contains a complete path.
17188       tool_specified="$LDD"
17189       tool_basename="${tool_specified##*/}"
17190       if test "x$tool_basename" = "x$tool_specified"; then
17191         # A command without a complete path is provided, search $PATH.
17192         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17193 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17194         # Extract the first word of "$tool_basename", so it can be a program name with args.
17195 set dummy $tool_basename; ac_word=$2
17196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17197 $as_echo_n "checking for $ac_word... " >&6; }
17198 if ${ac_cv_path_LDD+:} false; then :
17199   $as_echo_n "(cached) " >&6
17200 else
17201   case $LDD in
17202   [\\/]* | ?:[\\/]*)
17203   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17204   ;;
17205   *)
17206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17207 for as_dir in $PATH
17208 do
17209   IFS=$as_save_IFS
17210   test -z "$as_dir" && as_dir=.
17211     for ac_exec_ext in '' $ac_executable_extensions; do
17212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17213     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17215     break 2
17216   fi
17217 done
17218   done
17219 IFS=$as_save_IFS
17220 
17221   ;;
17222 esac
17223 fi
17224 LDD=$ac_cv_path_LDD
17225 if test -n "$LDD"; then
17226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17227 $as_echo "$LDD" >&6; }
17228 else
17229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17230 $as_echo "no" >&6; }
17231 fi
17232 
17233 
17234         if test "x$LDD" = x; then
17235           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17236         fi
17237       else
17238         # Otherwise we believe it is a complete path. Use it as it is.
17239         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17240 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17241         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17242 $as_echo_n "checking for LDD... " >&6; }
17243         if test ! -x "$tool_specified"; then
17244           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17245 $as_echo "not found" >&6; }
17246           as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17247         fi
17248         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17249 $as_echo "$tool_specified" >&6; }
17250       fi
17251     fi
17252   fi
17253 
17254 
17255   if test "x$LDD" = "x"; then
17256     # List shared lib dependencies is used for
17257     # debug output and checking for forbidden dependencies.
17258     # We can build without it.
17259     LDD="true"
17260   fi
17261 
17262 
17263   # Publish this variable in the help.
17264 
17265 
17266   if test "x$OTOOL" = x; then
17267     # The variable is not set by user, try to locate tool using the code snippet
17268     for ac_prog in otool
17269 do
17270   # Extract the first word of "$ac_prog", so it can be a program name with args.
17271 set dummy $ac_prog; ac_word=$2
17272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17273 $as_echo_n "checking for $ac_word... " >&6; }
17274 if ${ac_cv_path_OTOOL+:} false; then :
17275   $as_echo_n "(cached) " >&6
17276 else
17277   case $OTOOL in
17278   [\\/]* | ?:[\\/]*)
17279   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17280   ;;
17281   *)
17282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17283 for as_dir in $PATH
17284 do
17285   IFS=$as_save_IFS
17286   test -z "$as_dir" && as_dir=.
17287     for ac_exec_ext in '' $ac_executable_extensions; do
17288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17289     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17291     break 2
17292   fi
17293 done
17294   done
17295 IFS=$as_save_IFS
17296 
17297   ;;
17298 esac
17299 fi
17300 OTOOL=$ac_cv_path_OTOOL
17301 if test -n "$OTOOL"; then
17302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17303 $as_echo "$OTOOL" >&6; }
17304 else
17305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17306 $as_echo "no" >&6; }
17307 fi
17308 
17309 
17310   test -n "$OTOOL" && break
17311 done
17312 
17313   else
17314     # The variable is set, but is it from the command line or the environment?
17315 
17316     # Try to remove the string !OTOOL! from our list.
17317     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17318     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17319       # If it failed, the variable was not from the command line. Ignore it,
17320       # but warn the user (except for BASH, which is always set by the calling BASH).
17321       if test "xOTOOL" != xBASH; then
17322         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17323 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17324       fi
17325       # Try to locate tool using the code snippet
17326       for ac_prog in otool
17327 do
17328   # Extract the first word of "$ac_prog", so it can be a program name with args.
17329 set dummy $ac_prog; ac_word=$2
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17331 $as_echo_n "checking for $ac_word... " >&6; }
17332 if ${ac_cv_path_OTOOL+:} false; then :
17333   $as_echo_n "(cached) " >&6
17334 else
17335   case $OTOOL in
17336   [\\/]* | ?:[\\/]*)
17337   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17338   ;;
17339   *)
17340   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17341 for as_dir in $PATH
17342 do
17343   IFS=$as_save_IFS
17344   test -z "$as_dir" && as_dir=.
17345     for ac_exec_ext in '' $ac_executable_extensions; do
17346   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17347     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17348     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17349     break 2
17350   fi
17351 done
17352   done
17353 IFS=$as_save_IFS
17354 
17355   ;;
17356 esac
17357 fi
17358 OTOOL=$ac_cv_path_OTOOL
17359 if test -n "$OTOOL"; then
17360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17361 $as_echo "$OTOOL" >&6; }
17362 else
17363   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17364 $as_echo "no" >&6; }
17365 fi
17366 
17367 
17368   test -n "$OTOOL" && break
17369 done
17370 
17371     else
17372       # If it succeeded, then it was overridden by the user. We will use it
17373       # for the tool.
17374 
17375       # First remove it from the list of overridden variables, so we can test
17376       # for unknown variables in the end.
17377       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17378 
17379       # Check if the provided tool contains a complete path.
17380       tool_specified="$OTOOL"
17381       tool_basename="${tool_specified##*/}"
17382       if test "x$tool_basename" = "x$tool_specified"; then
17383         # A command without a complete path is provided, search $PATH.
17384         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17385 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17386         # Extract the first word of "$tool_basename", so it can be a program name with args.
17387 set dummy $tool_basename; ac_word=$2
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17389 $as_echo_n "checking for $ac_word... " >&6; }
17390 if ${ac_cv_path_OTOOL+:} false; then :
17391   $as_echo_n "(cached) " >&6
17392 else
17393   case $OTOOL in
17394   [\\/]* | ?:[\\/]*)
17395   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17396   ;;
17397   *)
17398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17399 for as_dir in $PATH
17400 do
17401   IFS=$as_save_IFS
17402   test -z "$as_dir" && as_dir=.
17403     for ac_exec_ext in '' $ac_executable_extensions; do
17404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17405     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17407     break 2
17408   fi
17409 done
17410   done
17411 IFS=$as_save_IFS
17412 
17413   ;;
17414 esac
17415 fi
17416 OTOOL=$ac_cv_path_OTOOL
17417 if test -n "$OTOOL"; then
17418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17419 $as_echo "$OTOOL" >&6; }
17420 else
17421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17422 $as_echo "no" >&6; }
17423 fi
17424 
17425 
17426         if test "x$OTOOL" = x; then
17427           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17428         fi
17429       else
17430         # Otherwise we believe it is a complete path. Use it as it is.
17431         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17432 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17434 $as_echo_n "checking for OTOOL... " >&6; }
17435         if test ! -x "$tool_specified"; then
17436           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17437 $as_echo "not found" >&6; }
17438           as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17439         fi
17440         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17441 $as_echo "$tool_specified" >&6; }
17442       fi
17443     fi
17444   fi
17445 
17446 
17447   if test "x$OTOOL" = "x"; then
17448     OTOOL="true"
17449   fi
17450 
17451 
17452   # Publish this variable in the help.
17453 
17454 
17455   if test "x$READELF" = x; then
17456     # The variable is not set by user, try to locate tool using the code snippet
17457     for ac_prog in greadelf readelf
17458 do
17459   # Extract the first word of "$ac_prog", so it can be a program name with args.
17460 set dummy $ac_prog; ac_word=$2
17461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17462 $as_echo_n "checking for $ac_word... " >&6; }
17463 if ${ac_cv_path_READELF+:} false; then :
17464   $as_echo_n "(cached) " >&6
17465 else
17466   case $READELF in
17467   [\\/]* | ?:[\\/]*)
17468   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17469   ;;
17470   *)
17471   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17472 for as_dir in $PATH
17473 do
17474   IFS=$as_save_IFS
17475   test -z "$as_dir" && as_dir=.
17476     for ac_exec_ext in '' $ac_executable_extensions; do
17477   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17478     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17480     break 2
17481   fi
17482 done
17483   done
17484 IFS=$as_save_IFS
17485 
17486   ;;
17487 esac
17488 fi
17489 READELF=$ac_cv_path_READELF
17490 if test -n "$READELF"; then
17491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17492 $as_echo "$READELF" >&6; }
17493 else
17494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17495 $as_echo "no" >&6; }
17496 fi
17497 
17498 
17499   test -n "$READELF" && break
17500 done
17501 
17502   else
17503     # The variable is set, but is it from the command line or the environment?
17504 
17505     # Try to remove the string !READELF! from our list.
17506     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17507     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17508       # If it failed, the variable was not from the command line. Ignore it,
17509       # but warn the user (except for BASH, which is always set by the calling BASH).
17510       if test "xREADELF" != xBASH; then
17511         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17512 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17513       fi
17514       # Try to locate tool using the code snippet
17515       for ac_prog in greadelf readelf
17516 do
17517   # Extract the first word of "$ac_prog", so it can be a program name with args.
17518 set dummy $ac_prog; ac_word=$2
17519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17520 $as_echo_n "checking for $ac_word... " >&6; }
17521 if ${ac_cv_path_READELF+:} false; then :
17522   $as_echo_n "(cached) " >&6
17523 else
17524   case $READELF in
17525   [\\/]* | ?:[\\/]*)
17526   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17527   ;;
17528   *)
17529   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17530 for as_dir in $PATH
17531 do
17532   IFS=$as_save_IFS
17533   test -z "$as_dir" && as_dir=.
17534     for ac_exec_ext in '' $ac_executable_extensions; do
17535   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17536     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17537     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17538     break 2
17539   fi
17540 done
17541   done
17542 IFS=$as_save_IFS
17543 
17544   ;;
17545 esac
17546 fi
17547 READELF=$ac_cv_path_READELF
17548 if test -n "$READELF"; then
17549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17550 $as_echo "$READELF" >&6; }
17551 else
17552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17553 $as_echo "no" >&6; }
17554 fi
17555 
17556 
17557   test -n "$READELF" && break
17558 done
17559 
17560     else
17561       # If it succeeded, then it was overridden by the user. We will use it
17562       # for the tool.
17563 
17564       # First remove it from the list of overridden variables, so we can test
17565       # for unknown variables in the end.
17566       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17567 
17568       # Check if the provided tool contains a complete path.
17569       tool_specified="$READELF"
17570       tool_basename="${tool_specified##*/}"
17571       if test "x$tool_basename" = "x$tool_specified"; then
17572         # A command without a complete path is provided, search $PATH.
17573         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17574 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17575         # Extract the first word of "$tool_basename", so it can be a program name with args.
17576 set dummy $tool_basename; ac_word=$2
17577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17578 $as_echo_n "checking for $ac_word... " >&6; }
17579 if ${ac_cv_path_READELF+:} false; then :
17580   $as_echo_n "(cached) " >&6
17581 else
17582   case $READELF in
17583   [\\/]* | ?:[\\/]*)
17584   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17585   ;;
17586   *)
17587   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17588 for as_dir in $PATH
17589 do
17590   IFS=$as_save_IFS
17591   test -z "$as_dir" && as_dir=.
17592     for ac_exec_ext in '' $ac_executable_extensions; do
17593   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17594     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17595     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17596     break 2
17597   fi
17598 done
17599   done
17600 IFS=$as_save_IFS
17601 
17602   ;;
17603 esac
17604 fi
17605 READELF=$ac_cv_path_READELF
17606 if test -n "$READELF"; then
17607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17608 $as_echo "$READELF" >&6; }
17609 else
17610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17611 $as_echo "no" >&6; }
17612 fi
17613 
17614 
17615         if test "x$READELF" = x; then
17616           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17617         fi
17618       else
17619         # Otherwise we believe it is a complete path. Use it as it is.
17620         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17621 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17622         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17623 $as_echo_n "checking for READELF... " >&6; }
17624         if test ! -x "$tool_specified"; then
17625           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17626 $as_echo "not found" >&6; }
17627           as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17628         fi
17629         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17630 $as_echo "$tool_specified" >&6; }
17631       fi
17632     fi
17633   fi
17634 
17635 
17636 
17637 
17638   # Publish this variable in the help.
17639 
17640 
17641   if test "x$HG" = x; then
17642     # The variable is not set by user, try to locate tool using the code snippet
17643     for ac_prog in hg
17644 do
17645   # Extract the first word of "$ac_prog", so it can be a program name with args.
17646 set dummy $ac_prog; ac_word=$2
17647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17648 $as_echo_n "checking for $ac_word... " >&6; }
17649 if ${ac_cv_path_HG+:} false; then :
17650   $as_echo_n "(cached) " >&6
17651 else
17652   case $HG in
17653   [\\/]* | ?:[\\/]*)
17654   ac_cv_path_HG="$HG" # Let the user override the test with a path.
17655   ;;
17656   *)
17657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17658 for as_dir in $PATH
17659 do
17660   IFS=$as_save_IFS
17661   test -z "$as_dir" && as_dir=.
17662     for ac_exec_ext in '' $ac_executable_extensions; do
17663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17664     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17666     break 2
17667   fi
17668 done
17669   done
17670 IFS=$as_save_IFS
17671 
17672   ;;
17673 esac
17674 fi
17675 HG=$ac_cv_path_HG
17676 if test -n "$HG"; then
17677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17678 $as_echo "$HG" >&6; }
17679 else
17680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17681 $as_echo "no" >&6; }
17682 fi
17683 
17684 
17685   test -n "$HG" && break
17686 done
17687 
17688   else
17689     # The variable is set, but is it from the command line or the environment?
17690 
17691     # Try to remove the string !HG! from our list.
17692     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17693     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17694       # If it failed, the variable was not from the command line. Ignore it,
17695       # but warn the user (except for BASH, which is always set by the calling BASH).
17696       if test "xHG" != xBASH; then
17697         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17698 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17699       fi
17700       # Try to locate tool using the code snippet
17701       for ac_prog in hg
17702 do
17703   # Extract the first word of "$ac_prog", so it can be a program name with args.
17704 set dummy $ac_prog; ac_word=$2
17705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17706 $as_echo_n "checking for $ac_word... " >&6; }
17707 if ${ac_cv_path_HG+:} false; then :
17708   $as_echo_n "(cached) " >&6
17709 else
17710   case $HG in
17711   [\\/]* | ?:[\\/]*)
17712   ac_cv_path_HG="$HG" # Let the user override the test with a path.
17713   ;;
17714   *)
17715   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17716 for as_dir in $PATH
17717 do
17718   IFS=$as_save_IFS
17719   test -z "$as_dir" && as_dir=.
17720     for ac_exec_ext in '' $ac_executable_extensions; do
17721   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17722     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17723     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17724     break 2
17725   fi
17726 done
17727   done
17728 IFS=$as_save_IFS
17729 
17730   ;;
17731 esac
17732 fi
17733 HG=$ac_cv_path_HG
17734 if test -n "$HG"; then
17735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17736 $as_echo "$HG" >&6; }
17737 else
17738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17739 $as_echo "no" >&6; }
17740 fi
17741 
17742 
17743   test -n "$HG" && break
17744 done
17745 
17746     else
17747       # If it succeeded, then it was overridden by the user. We will use it
17748       # for the tool.
17749 
17750       # First remove it from the list of overridden variables, so we can test
17751       # for unknown variables in the end.
17752       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17753 
17754       # Check if the provided tool contains a complete path.
17755       tool_specified="$HG"
17756       tool_basename="${tool_specified##*/}"
17757       if test "x$tool_basename" = "x$tool_specified"; then
17758         # A command without a complete path is provided, search $PATH.
17759         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17760 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17761         # Extract the first word of "$tool_basename", so it can be a program name with args.
17762 set dummy $tool_basename; ac_word=$2
17763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17764 $as_echo_n "checking for $ac_word... " >&6; }
17765 if ${ac_cv_path_HG+:} false; then :
17766   $as_echo_n "(cached) " >&6
17767 else
17768   case $HG in
17769   [\\/]* | ?:[\\/]*)
17770   ac_cv_path_HG="$HG" # Let the user override the test with a path.
17771   ;;
17772   *)
17773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17774 for as_dir in $PATH
17775 do
17776   IFS=$as_save_IFS
17777   test -z "$as_dir" && as_dir=.
17778     for ac_exec_ext in '' $ac_executable_extensions; do
17779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17780     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17782     break 2
17783   fi
17784 done
17785   done
17786 IFS=$as_save_IFS
17787 
17788   ;;
17789 esac
17790 fi
17791 HG=$ac_cv_path_HG
17792 if test -n "$HG"; then
17793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17794 $as_echo "$HG" >&6; }
17795 else
17796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17797 $as_echo "no" >&6; }
17798 fi
17799 
17800 
17801         if test "x$HG" = x; then
17802           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17803         fi
17804       else
17805         # Otherwise we believe it is a complete path. Use it as it is.
17806         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17807 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17809 $as_echo_n "checking for HG... " >&6; }
17810         if test ! -x "$tool_specified"; then
17811           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17812 $as_echo "not found" >&6; }
17813           as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17814         fi
17815         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17816 $as_echo "$tool_specified" >&6; }
17817       fi
17818     fi
17819   fi
17820 
17821 
17822 
17823 
17824   # Publish this variable in the help.
17825 
17826 
17827   if test "x$STAT" = x; then
17828     # The variable is not set by user, try to locate tool using the code snippet
17829     for ac_prog in stat
17830 do
17831   # Extract the first word of "$ac_prog", so it can be a program name with args.
17832 set dummy $ac_prog; ac_word=$2
17833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17834 $as_echo_n "checking for $ac_word... " >&6; }
17835 if ${ac_cv_path_STAT+:} false; then :
17836   $as_echo_n "(cached) " >&6
17837 else
17838   case $STAT in
17839   [\\/]* | ?:[\\/]*)
17840   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17841   ;;
17842   *)
17843   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17844 for as_dir in $PATH
17845 do
17846   IFS=$as_save_IFS
17847   test -z "$as_dir" && as_dir=.
17848     for ac_exec_ext in '' $ac_executable_extensions; do
17849   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17850     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17851     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17852     break 2
17853   fi
17854 done
17855   done
17856 IFS=$as_save_IFS
17857 
17858   ;;
17859 esac
17860 fi
17861 STAT=$ac_cv_path_STAT
17862 if test -n "$STAT"; then
17863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17864 $as_echo "$STAT" >&6; }
17865 else
17866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17867 $as_echo "no" >&6; }
17868 fi
17869 
17870 
17871   test -n "$STAT" && break
17872 done
17873 
17874   else
17875     # The variable is set, but is it from the command line or the environment?
17876 
17877     # Try to remove the string !STAT! from our list.
17878     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
17879     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17880       # If it failed, the variable was not from the command line. Ignore it,
17881       # but warn the user (except for BASH, which is always set by the calling BASH).
17882       if test "xSTAT" != xBASH; then
17883         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
17884 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
17885       fi
17886       # Try to locate tool using the code snippet
17887       for ac_prog in stat
17888 do
17889   # Extract the first word of "$ac_prog", so it can be a program name with args.
17890 set dummy $ac_prog; ac_word=$2
17891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17892 $as_echo_n "checking for $ac_word... " >&6; }
17893 if ${ac_cv_path_STAT+:} false; then :
17894   $as_echo_n "(cached) " >&6
17895 else
17896   case $STAT in
17897   [\\/]* | ?:[\\/]*)
17898   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17899   ;;
17900   *)
17901   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17902 for as_dir in $PATH
17903 do
17904   IFS=$as_save_IFS
17905   test -z "$as_dir" && as_dir=.
17906     for ac_exec_ext in '' $ac_executable_extensions; do
17907   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17908     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17909     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17910     break 2
17911   fi
17912 done
17913   done
17914 IFS=$as_save_IFS
17915 
17916   ;;
17917 esac
17918 fi
17919 STAT=$ac_cv_path_STAT
17920 if test -n "$STAT"; then
17921   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17922 $as_echo "$STAT" >&6; }
17923 else
17924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17925 $as_echo "no" >&6; }
17926 fi
17927 
17928 
17929   test -n "$STAT" && break
17930 done
17931 
17932     else
17933       # If it succeeded, then it was overridden by the user. We will use it
17934       # for the tool.
17935 
17936       # First remove it from the list of overridden variables, so we can test
17937       # for unknown variables in the end.
17938       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17939 
17940       # Check if the provided tool contains a complete path.
17941       tool_specified="$STAT"
17942       tool_basename="${tool_specified##*/}"
17943       if test "x$tool_basename" = "x$tool_specified"; then
17944         # A command without a complete path is provided, search $PATH.
17945         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
17946 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
17947         # Extract the first word of "$tool_basename", so it can be a program name with args.
17948 set dummy $tool_basename; ac_word=$2
17949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17950 $as_echo_n "checking for $ac_word... " >&6; }
17951 if ${ac_cv_path_STAT+:} false; then :
17952   $as_echo_n "(cached) " >&6
17953 else
17954   case $STAT in
17955   [\\/]* | ?:[\\/]*)
17956   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17957   ;;
17958   *)
17959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17960 for as_dir in $PATH
17961 do
17962   IFS=$as_save_IFS
17963   test -z "$as_dir" && as_dir=.
17964     for ac_exec_ext in '' $ac_executable_extensions; do
17965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17966     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17968     break 2
17969   fi
17970 done
17971   done
17972 IFS=$as_save_IFS
17973 
17974   ;;
17975 esac
17976 fi
17977 STAT=$ac_cv_path_STAT
17978 if test -n "$STAT"; then
17979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
17980 $as_echo "$STAT" >&6; }
17981 else
17982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17983 $as_echo "no" >&6; }
17984 fi
17985 
17986 
17987         if test "x$STAT" = x; then
17988           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17989         fi
17990       else
17991         # Otherwise we believe it is a complete path. Use it as it is.
17992         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
17993 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
17994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
17995 $as_echo_n "checking for STAT... " >&6; }
17996         if test ! -x "$tool_specified"; then
17997           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17998 $as_echo "not found" >&6; }
17999           as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18000         fi
18001         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18002 $as_echo "$tool_specified" >&6; }
18003       fi
18004     fi
18005   fi
18006 
18007 
18008 
18009 
18010   # Publish this variable in the help.
18011 
18012 
18013   if test "x$TIME" = x; then
18014     # The variable is not set by user, try to locate tool using the code snippet
18015     for ac_prog in time
18016 do
18017   # Extract the first word of "$ac_prog", so it can be a program name with args.
18018 set dummy $ac_prog; ac_word=$2
18019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18020 $as_echo_n "checking for $ac_word... " >&6; }
18021 if ${ac_cv_path_TIME+:} false; then :
18022   $as_echo_n "(cached) " >&6
18023 else
18024   case $TIME in
18025   [\\/]* | ?:[\\/]*)
18026   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18027   ;;
18028   *)
18029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18030 for as_dir in $PATH
18031 do
18032   IFS=$as_save_IFS
18033   test -z "$as_dir" && as_dir=.
18034     for ac_exec_ext in '' $ac_executable_extensions; do
18035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18036     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18038     break 2
18039   fi
18040 done
18041   done
18042 IFS=$as_save_IFS
18043 
18044   ;;
18045 esac
18046 fi
18047 TIME=$ac_cv_path_TIME
18048 if test -n "$TIME"; then
18049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18050 $as_echo "$TIME" >&6; }
18051 else
18052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18053 $as_echo "no" >&6; }
18054 fi
18055 
18056 
18057   test -n "$TIME" && break
18058 done
18059 
18060   else
18061     # The variable is set, but is it from the command line or the environment?
18062 
18063     # Try to remove the string !TIME! from our list.
18064     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18065     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18066       # If it failed, the variable was not from the command line. Ignore it,
18067       # but warn the user (except for BASH, which is always set by the calling BASH).
18068       if test "xTIME" != xBASH; then
18069         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18070 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18071       fi
18072       # Try to locate tool using the code snippet
18073       for ac_prog in time
18074 do
18075   # Extract the first word of "$ac_prog", so it can be a program name with args.
18076 set dummy $ac_prog; ac_word=$2
18077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18078 $as_echo_n "checking for $ac_word... " >&6; }
18079 if ${ac_cv_path_TIME+:} false; then :
18080   $as_echo_n "(cached) " >&6
18081 else
18082   case $TIME in
18083   [\\/]* | ?:[\\/]*)
18084   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18085   ;;
18086   *)
18087   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18088 for as_dir in $PATH
18089 do
18090   IFS=$as_save_IFS
18091   test -z "$as_dir" && as_dir=.
18092     for ac_exec_ext in '' $ac_executable_extensions; do
18093   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18094     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18096     break 2
18097   fi
18098 done
18099   done
18100 IFS=$as_save_IFS
18101 
18102   ;;
18103 esac
18104 fi
18105 TIME=$ac_cv_path_TIME
18106 if test -n "$TIME"; then
18107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18108 $as_echo "$TIME" >&6; }
18109 else
18110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18111 $as_echo "no" >&6; }
18112 fi
18113 
18114 
18115   test -n "$TIME" && break
18116 done
18117 
18118     else
18119       # If it succeeded, then it was overridden by the user. We will use it
18120       # for the tool.
18121 
18122       # First remove it from the list of overridden variables, so we can test
18123       # for unknown variables in the end.
18124       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18125 
18126       # Check if the provided tool contains a complete path.
18127       tool_specified="$TIME"
18128       tool_basename="${tool_specified##*/}"
18129       if test "x$tool_basename" = "x$tool_specified"; then
18130         # A command without a complete path is provided, search $PATH.
18131         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18132 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18133         # Extract the first word of "$tool_basename", so it can be a program name with args.
18134 set dummy $tool_basename; ac_word=$2
18135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18136 $as_echo_n "checking for $ac_word... " >&6; }
18137 if ${ac_cv_path_TIME+:} false; then :
18138   $as_echo_n "(cached) " >&6
18139 else
18140   case $TIME in
18141   [\\/]* | ?:[\\/]*)
18142   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18143   ;;
18144   *)
18145   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18146 for as_dir in $PATH
18147 do
18148   IFS=$as_save_IFS
18149   test -z "$as_dir" && as_dir=.
18150     for ac_exec_ext in '' $ac_executable_extensions; do
18151   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18152     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18153     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18154     break 2
18155   fi
18156 done
18157   done
18158 IFS=$as_save_IFS
18159 
18160   ;;
18161 esac
18162 fi
18163 TIME=$ac_cv_path_TIME
18164 if test -n "$TIME"; then
18165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18166 $as_echo "$TIME" >&6; }
18167 else
18168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18169 $as_echo "no" >&6; }
18170 fi
18171 
18172 
18173         if test "x$TIME" = x; then
18174           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18175         fi
18176       else
18177         # Otherwise we believe it is a complete path. Use it as it is.
18178         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18179 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18180         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18181 $as_echo_n "checking for TIME... " >&6; }
18182         if test ! -x "$tool_specified"; then
18183           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18184 $as_echo "not found" >&6; }
18185           as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18186         fi
18187         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18188 $as_echo "$tool_specified" >&6; }
18189       fi
18190     fi
18191   fi
18192 
18193 
18194   # Check if it's GNU time
18195   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18196   if test "x$IS_GNU_TIME" != x; then
18197     IS_GNU_TIME=yes
18198   else
18199     IS_GNU_TIME=no
18200   fi
18201 
18202 
18203   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18204 
18205 
18206 
18207   # Publish this variable in the help.
18208 
18209 
18210   if test "x$COMM" = x; then
18211     # The variable is not set by user, try to locate tool using the code snippet
18212     for ac_prog in comm
18213 do
18214   # Extract the first word of "$ac_prog", so it can be a program name with args.
18215 set dummy $ac_prog; ac_word=$2
18216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18217 $as_echo_n "checking for $ac_word... " >&6; }
18218 if ${ac_cv_path_COMM+:} false; then :
18219   $as_echo_n "(cached) " >&6
18220 else
18221   case $COMM in
18222   [\\/]* | ?:[\\/]*)
18223   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18224   ;;
18225   *)
18226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18227 for as_dir in $PATH
18228 do
18229   IFS=$as_save_IFS
18230   test -z "$as_dir" && as_dir=.
18231     for ac_exec_ext in '' $ac_executable_extensions; do
18232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18233     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18235     break 2
18236   fi
18237 done
18238   done
18239 IFS=$as_save_IFS
18240 
18241   ;;
18242 esac
18243 fi
18244 COMM=$ac_cv_path_COMM
18245 if test -n "$COMM"; then
18246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18247 $as_echo "$COMM" >&6; }
18248 else
18249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18250 $as_echo "no" >&6; }
18251 fi
18252 
18253 
18254   test -n "$COMM" && break
18255 done
18256 
18257   else
18258     # The variable is set, but is it from the command line or the environment?
18259 
18260     # Try to remove the string !COMM! from our list.
18261     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18262     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18263       # If it failed, the variable was not from the command line. Ignore it,
18264       # but warn the user (except for BASH, which is always set by the calling BASH).
18265       if test "xCOMM" != xBASH; then
18266         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18267 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18268       fi
18269       # Try to locate tool using the code snippet
18270       for ac_prog in comm
18271 do
18272   # Extract the first word of "$ac_prog", so it can be a program name with args.
18273 set dummy $ac_prog; ac_word=$2
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18275 $as_echo_n "checking for $ac_word... " >&6; }
18276 if ${ac_cv_path_COMM+:} false; then :
18277   $as_echo_n "(cached) " >&6
18278 else
18279   case $COMM in
18280   [\\/]* | ?:[\\/]*)
18281   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18282   ;;
18283   *)
18284   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18285 for as_dir in $PATH
18286 do
18287   IFS=$as_save_IFS
18288   test -z "$as_dir" && as_dir=.
18289     for ac_exec_ext in '' $ac_executable_extensions; do
18290   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18291     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18292     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18293     break 2
18294   fi
18295 done
18296   done
18297 IFS=$as_save_IFS
18298 
18299   ;;
18300 esac
18301 fi
18302 COMM=$ac_cv_path_COMM
18303 if test -n "$COMM"; then
18304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18305 $as_echo "$COMM" >&6; }
18306 else
18307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18308 $as_echo "no" >&6; }
18309 fi
18310 
18311 
18312   test -n "$COMM" && break
18313 done
18314 
18315     else
18316       # If it succeeded, then it was overridden by the user. We will use it
18317       # for the tool.
18318 
18319       # First remove it from the list of overridden variables, so we can test
18320       # for unknown variables in the end.
18321       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18322 
18323       # Check if the provided tool contains a complete path.
18324       tool_specified="$COMM"
18325       tool_basename="${tool_specified##*/}"
18326       if test "x$tool_basename" = "x$tool_specified"; then
18327         # A command without a complete path is provided, search $PATH.
18328         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18329 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18330         # Extract the first word of "$tool_basename", so it can be a program name with args.
18331 set dummy $tool_basename; ac_word=$2
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18333 $as_echo_n "checking for $ac_word... " >&6; }
18334 if ${ac_cv_path_COMM+:} false; then :
18335   $as_echo_n "(cached) " >&6
18336 else
18337   case $COMM in
18338   [\\/]* | ?:[\\/]*)
18339   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18340   ;;
18341   *)
18342   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18343 for as_dir in $PATH
18344 do
18345   IFS=$as_save_IFS
18346   test -z "$as_dir" && as_dir=.
18347     for ac_exec_ext in '' $ac_executable_extensions; do
18348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18349     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18351     break 2
18352   fi
18353 done
18354   done
18355 IFS=$as_save_IFS
18356 
18357   ;;
18358 esac
18359 fi
18360 COMM=$ac_cv_path_COMM
18361 if test -n "$COMM"; then
18362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18363 $as_echo "$COMM" >&6; }
18364 else
18365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18366 $as_echo "no" >&6; }
18367 fi
18368 
18369 
18370         if test "x$COMM" = x; then
18371           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18372         fi
18373       else
18374         # Otherwise we believe it is a complete path. Use it as it is.
18375         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18376 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18377         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18378 $as_echo_n "checking for COMM... " >&6; }
18379         if test ! -x "$tool_specified"; then
18380           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18381 $as_echo "not found" >&6; }
18382           as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18383         fi
18384         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18385 $as_echo "$tool_specified" >&6; }
18386       fi
18387     fi
18388   fi
18389 
18390 
18391 
18392   if test "x$COMM" = x; then
18393     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18394   fi
18395 
18396 
18397   fi
18398 
18399   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18400 
18401 
18402 
18403   # Publish this variable in the help.
18404 
18405 
18406   if test "x$DSYMUTIL" = x; then
18407     # The variable is not set by user, try to locate tool using the code snippet
18408     for ac_prog in dsymutil
18409 do
18410   # Extract the first word of "$ac_prog", so it can be a program name with args.
18411 set dummy $ac_prog; ac_word=$2
18412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18413 $as_echo_n "checking for $ac_word... " >&6; }
18414 if ${ac_cv_path_DSYMUTIL+:} false; then :
18415   $as_echo_n "(cached) " >&6
18416 else
18417   case $DSYMUTIL in
18418   [\\/]* | ?:[\\/]*)
18419   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18420   ;;
18421   *)
18422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18423 for as_dir in $PATH
18424 do
18425   IFS=$as_save_IFS
18426   test -z "$as_dir" && as_dir=.
18427     for ac_exec_ext in '' $ac_executable_extensions; do
18428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18429     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18431     break 2
18432   fi
18433 done
18434   done
18435 IFS=$as_save_IFS
18436 
18437   ;;
18438 esac
18439 fi
18440 DSYMUTIL=$ac_cv_path_DSYMUTIL
18441 if test -n "$DSYMUTIL"; then
18442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18443 $as_echo "$DSYMUTIL" >&6; }
18444 else
18445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18446 $as_echo "no" >&6; }
18447 fi
18448 
18449 
18450   test -n "$DSYMUTIL" && break
18451 done
18452 
18453   else
18454     # The variable is set, but is it from the command line or the environment?
18455 
18456     # Try to remove the string !DSYMUTIL! from our list.
18457     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18458     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18459       # If it failed, the variable was not from the command line. Ignore it,
18460       # but warn the user (except for BASH, which is always set by the calling BASH).
18461       if test "xDSYMUTIL" != xBASH; then
18462         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18463 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18464       fi
18465       # Try to locate tool using the code snippet
18466       for ac_prog in dsymutil
18467 do
18468   # Extract the first word of "$ac_prog", so it can be a program name with args.
18469 set dummy $ac_prog; ac_word=$2
18470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18471 $as_echo_n "checking for $ac_word... " >&6; }
18472 if ${ac_cv_path_DSYMUTIL+:} false; then :
18473   $as_echo_n "(cached) " >&6
18474 else
18475   case $DSYMUTIL in
18476   [\\/]* | ?:[\\/]*)
18477   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18478   ;;
18479   *)
18480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18481 for as_dir in $PATH
18482 do
18483   IFS=$as_save_IFS
18484   test -z "$as_dir" && as_dir=.
18485     for ac_exec_ext in '' $ac_executable_extensions; do
18486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18487     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18489     break 2
18490   fi
18491 done
18492   done
18493 IFS=$as_save_IFS
18494 
18495   ;;
18496 esac
18497 fi
18498 DSYMUTIL=$ac_cv_path_DSYMUTIL
18499 if test -n "$DSYMUTIL"; then
18500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18501 $as_echo "$DSYMUTIL" >&6; }
18502 else
18503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18504 $as_echo "no" >&6; }
18505 fi
18506 
18507 
18508   test -n "$DSYMUTIL" && break
18509 done
18510 
18511     else
18512       # If it succeeded, then it was overridden by the user. We will use it
18513       # for the tool.
18514 
18515       # First remove it from the list of overridden variables, so we can test
18516       # for unknown variables in the end.
18517       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18518 
18519       # Check if the provided tool contains a complete path.
18520       tool_specified="$DSYMUTIL"
18521       tool_basename="${tool_specified##*/}"
18522       if test "x$tool_basename" = "x$tool_specified"; then
18523         # A command without a complete path is provided, search $PATH.
18524         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18525 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18526         # Extract the first word of "$tool_basename", so it can be a program name with args.
18527 set dummy $tool_basename; ac_word=$2
18528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18529 $as_echo_n "checking for $ac_word... " >&6; }
18530 if ${ac_cv_path_DSYMUTIL+:} false; then :
18531   $as_echo_n "(cached) " >&6
18532 else
18533   case $DSYMUTIL in
18534   [\\/]* | ?:[\\/]*)
18535   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18536   ;;
18537   *)
18538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18539 for as_dir in $PATH
18540 do
18541   IFS=$as_save_IFS
18542   test -z "$as_dir" && as_dir=.
18543     for ac_exec_ext in '' $ac_executable_extensions; do
18544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18545     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18547     break 2
18548   fi
18549 done
18550   done
18551 IFS=$as_save_IFS
18552 
18553   ;;
18554 esac
18555 fi
18556 DSYMUTIL=$ac_cv_path_DSYMUTIL
18557 if test -n "$DSYMUTIL"; then
18558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18559 $as_echo "$DSYMUTIL" >&6; }
18560 else
18561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18562 $as_echo "no" >&6; }
18563 fi
18564 
18565 
18566         if test "x$DSYMUTIL" = x; then
18567           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18568         fi
18569       else
18570         # Otherwise we believe it is a complete path. Use it as it is.
18571         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18572 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18573         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18574 $as_echo_n "checking for DSYMUTIL... " >&6; }
18575         if test ! -x "$tool_specified"; then
18576           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18577 $as_echo "not found" >&6; }
18578           as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18579         fi
18580         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18581 $as_echo "$tool_specified" >&6; }
18582       fi
18583     fi
18584   fi
18585 
18586 
18587 
18588   if test "x$DSYMUTIL" = x; then
18589     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18590   fi
18591 
18592 
18593 
18594 
18595 
18596   # Publish this variable in the help.
18597 
18598 
18599   if test "x$XATTR" = x; then
18600     # The variable is not set by user, try to locate tool using the code snippet
18601     for ac_prog in xattr
18602 do
18603   # Extract the first word of "$ac_prog", so it can be a program name with args.
18604 set dummy $ac_prog; ac_word=$2
18605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18606 $as_echo_n "checking for $ac_word... " >&6; }
18607 if ${ac_cv_path_XATTR+:} false; then :
18608   $as_echo_n "(cached) " >&6
18609 else
18610   case $XATTR in
18611   [\\/]* | ?:[\\/]*)
18612   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18613   ;;
18614   *)
18615   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18616 for as_dir in $PATH
18617 do
18618   IFS=$as_save_IFS
18619   test -z "$as_dir" && as_dir=.
18620     for ac_exec_ext in '' $ac_executable_extensions; do
18621   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18622     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18623     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18624     break 2
18625   fi
18626 done
18627   done
18628 IFS=$as_save_IFS
18629 
18630   ;;
18631 esac
18632 fi
18633 XATTR=$ac_cv_path_XATTR
18634 if test -n "$XATTR"; then
18635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18636 $as_echo "$XATTR" >&6; }
18637 else
18638   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18639 $as_echo "no" >&6; }
18640 fi
18641 
18642 
18643   test -n "$XATTR" && break
18644 done
18645 
18646   else
18647     # The variable is set, but is it from the command line or the environment?
18648 
18649     # Try to remove the string !XATTR! from our list.
18650     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18651     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18652       # If it failed, the variable was not from the command line. Ignore it,
18653       # but warn the user (except for BASH, which is always set by the calling BASH).
18654       if test "xXATTR" != xBASH; then
18655         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18656 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18657       fi
18658       # Try to locate tool using the code snippet
18659       for ac_prog in xattr
18660 do
18661   # Extract the first word of "$ac_prog", so it can be a program name with args.
18662 set dummy $ac_prog; ac_word=$2
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18664 $as_echo_n "checking for $ac_word... " >&6; }
18665 if ${ac_cv_path_XATTR+:} false; then :
18666   $as_echo_n "(cached) " >&6
18667 else
18668   case $XATTR in
18669   [\\/]* | ?:[\\/]*)
18670   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18671   ;;
18672   *)
18673   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18674 for as_dir in $PATH
18675 do
18676   IFS=$as_save_IFS
18677   test -z "$as_dir" && as_dir=.
18678     for ac_exec_ext in '' $ac_executable_extensions; do
18679   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18680     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18681     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18682     break 2
18683   fi
18684 done
18685   done
18686 IFS=$as_save_IFS
18687 
18688   ;;
18689 esac
18690 fi
18691 XATTR=$ac_cv_path_XATTR
18692 if test -n "$XATTR"; then
18693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18694 $as_echo "$XATTR" >&6; }
18695 else
18696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18697 $as_echo "no" >&6; }
18698 fi
18699 
18700 
18701   test -n "$XATTR" && break
18702 done
18703 
18704     else
18705       # If it succeeded, then it was overridden by the user. We will use it
18706       # for the tool.
18707 
18708       # First remove it from the list of overridden variables, so we can test
18709       # for unknown variables in the end.
18710       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18711 
18712       # Check if the provided tool contains a complete path.
18713       tool_specified="$XATTR"
18714       tool_basename="${tool_specified##*/}"
18715       if test "x$tool_basename" = "x$tool_specified"; then
18716         # A command without a complete path is provided, search $PATH.
18717         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18718 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18719         # Extract the first word of "$tool_basename", so it can be a program name with args.
18720 set dummy $tool_basename; ac_word=$2
18721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18722 $as_echo_n "checking for $ac_word... " >&6; }
18723 if ${ac_cv_path_XATTR+:} false; then :
18724   $as_echo_n "(cached) " >&6
18725 else
18726   case $XATTR in
18727   [\\/]* | ?:[\\/]*)
18728   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18729   ;;
18730   *)
18731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18732 for as_dir in $PATH
18733 do
18734   IFS=$as_save_IFS
18735   test -z "$as_dir" && as_dir=.
18736     for ac_exec_ext in '' $ac_executable_extensions; do
18737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18738     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18740     break 2
18741   fi
18742 done
18743   done
18744 IFS=$as_save_IFS
18745 
18746   ;;
18747 esac
18748 fi
18749 XATTR=$ac_cv_path_XATTR
18750 if test -n "$XATTR"; then
18751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18752 $as_echo "$XATTR" >&6; }
18753 else
18754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18755 $as_echo "no" >&6; }
18756 fi
18757 
18758 
18759         if test "x$XATTR" = x; then
18760           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18761         fi
18762       else
18763         # Otherwise we believe it is a complete path. Use it as it is.
18764         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18765 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18766         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18767 $as_echo_n "checking for XATTR... " >&6; }
18768         if test ! -x "$tool_specified"; then
18769           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18770 $as_echo "not found" >&6; }
18771           as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18772         fi
18773         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18774 $as_echo "$tool_specified" >&6; }
18775       fi
18776     fi
18777   fi
18778 
18779 
18780 
18781   if test "x$XATTR" = x; then
18782     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18783   fi
18784 
18785 
18786 
18787 
18788   # Publish this variable in the help.
18789 
18790 
18791   if test "x$CODESIGN" = x; then
18792     # The variable is not set by user, try to locate tool using the code snippet
18793     for ac_prog in codesign
18794 do
18795   # Extract the first word of "$ac_prog", so it can be a program name with args.
18796 set dummy $ac_prog; ac_word=$2
18797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18798 $as_echo_n "checking for $ac_word... " >&6; }
18799 if ${ac_cv_path_CODESIGN+:} false; then :
18800   $as_echo_n "(cached) " >&6
18801 else
18802   case $CODESIGN in
18803   [\\/]* | ?:[\\/]*)
18804   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18805   ;;
18806   *)
18807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18808 for as_dir in $PATH
18809 do
18810   IFS=$as_save_IFS
18811   test -z "$as_dir" && as_dir=.
18812     for ac_exec_ext in '' $ac_executable_extensions; do
18813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18814     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18816     break 2
18817   fi
18818 done
18819   done
18820 IFS=$as_save_IFS
18821 
18822   ;;
18823 esac
18824 fi
18825 CODESIGN=$ac_cv_path_CODESIGN
18826 if test -n "$CODESIGN"; then
18827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18828 $as_echo "$CODESIGN" >&6; }
18829 else
18830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18831 $as_echo "no" >&6; }
18832 fi
18833 
18834 
18835   test -n "$CODESIGN" && break
18836 done
18837 
18838   else
18839     # The variable is set, but is it from the command line or the environment?
18840 
18841     # Try to remove the string !CODESIGN! from our list.
18842     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18843     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18844       # If it failed, the variable was not from the command line. Ignore it,
18845       # but warn the user (except for BASH, which is always set by the calling BASH).
18846       if test "xCODESIGN" != xBASH; then
18847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18848 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18849       fi
18850       # Try to locate tool using the code snippet
18851       for ac_prog in codesign
18852 do
18853   # Extract the first word of "$ac_prog", so it can be a program name with args.
18854 set dummy $ac_prog; ac_word=$2
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18856 $as_echo_n "checking for $ac_word... " >&6; }
18857 if ${ac_cv_path_CODESIGN+:} false; then :
18858   $as_echo_n "(cached) " >&6
18859 else
18860   case $CODESIGN in
18861   [\\/]* | ?:[\\/]*)
18862   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18863   ;;
18864   *)
18865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18866 for as_dir in $PATH
18867 do
18868   IFS=$as_save_IFS
18869   test -z "$as_dir" && as_dir=.
18870     for ac_exec_ext in '' $ac_executable_extensions; do
18871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18872     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18874     break 2
18875   fi
18876 done
18877   done
18878 IFS=$as_save_IFS
18879 
18880   ;;
18881 esac
18882 fi
18883 CODESIGN=$ac_cv_path_CODESIGN
18884 if test -n "$CODESIGN"; then
18885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18886 $as_echo "$CODESIGN" >&6; }
18887 else
18888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18889 $as_echo "no" >&6; }
18890 fi
18891 
18892 
18893   test -n "$CODESIGN" && break
18894 done
18895 
18896     else
18897       # If it succeeded, then it was overridden by the user. We will use it
18898       # for the tool.
18899 
18900       # First remove it from the list of overridden variables, so we can test
18901       # for unknown variables in the end.
18902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18903 
18904       # Check if the provided tool contains a complete path.
18905       tool_specified="$CODESIGN"
18906       tool_basename="${tool_specified##*/}"
18907       if test "x$tool_basename" = "x$tool_specified"; then
18908         # A command without a complete path is provided, search $PATH.
18909         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
18910 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
18911         # Extract the first word of "$tool_basename", so it can be a program name with args.
18912 set dummy $tool_basename; ac_word=$2
18913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18914 $as_echo_n "checking for $ac_word... " >&6; }
18915 if ${ac_cv_path_CODESIGN+:} false; then :
18916   $as_echo_n "(cached) " >&6
18917 else
18918   case $CODESIGN in
18919   [\\/]* | ?:[\\/]*)
18920   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18921   ;;
18922   *)
18923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18924 for as_dir in $PATH
18925 do
18926   IFS=$as_save_IFS
18927   test -z "$as_dir" && as_dir=.
18928     for ac_exec_ext in '' $ac_executable_extensions; do
18929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18930     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18932     break 2
18933   fi
18934 done
18935   done
18936 IFS=$as_save_IFS
18937 
18938   ;;
18939 esac
18940 fi
18941 CODESIGN=$ac_cv_path_CODESIGN
18942 if test -n "$CODESIGN"; then
18943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18944 $as_echo "$CODESIGN" >&6; }
18945 else
18946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18947 $as_echo "no" >&6; }
18948 fi
18949 
18950 
18951         if test "x$CODESIGN" = x; then
18952           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18953         fi
18954       else
18955         # Otherwise we believe it is a complete path. Use it as it is.
18956         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
18957 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
18958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
18959 $as_echo_n "checking for CODESIGN... " >&6; }
18960         if test ! -x "$tool_specified"; then
18961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18962 $as_echo "not found" >&6; }
18963           as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
18964         fi
18965         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18966 $as_echo "$tool_specified" >&6; }
18967       fi
18968     fi
18969   fi
18970 
18971 
18972     if test "x$CODESIGN" != "x"; then
18973       # Verify that the openjdk_codesign certificate is present
18974       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
18975 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
18976       rm -f codesign-testfile
18977       touch codesign-testfile
18978       codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
18979       rm -f codesign-testfile
18980       if test "x$CODESIGN" = x; then
18981         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18982 $as_echo "no" >&6; }
18983       else
18984         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18985 $as_echo "yes" >&6; }
18986       fi
18987     fi
18988   fi
18989 
18990 
18991 # Check if pkg-config is available.
18992 
18993 
18994 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
18995         if test -n "$ac_tool_prefix"; then
18996   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
18997 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
18998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18999 $as_echo_n "checking for $ac_word... " >&6; }
19000 if ${ac_cv_path_PKG_CONFIG+:} false; then :
19001   $as_echo_n "(cached) " >&6
19002 else
19003   case $PKG_CONFIG in
19004   [\\/]* | ?:[\\/]*)
19005   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19006   ;;
19007   *)
19008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19009 for as_dir in $PATH
19010 do
19011   IFS=$as_save_IFS
19012   test -z "$as_dir" && as_dir=.
19013     for ac_exec_ext in '' $ac_executable_extensions; do
19014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19015     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19017     break 2
19018   fi
19019 done
19020   done
19021 IFS=$as_save_IFS
19022 
19023   ;;
19024 esac
19025 fi
19026 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19027 if test -n "$PKG_CONFIG"; then
19028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19029 $as_echo "$PKG_CONFIG" >&6; }
19030 else
19031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19032 $as_echo "no" >&6; }
19033 fi
19034 
19035 
19036 fi
19037 if test -z "$ac_cv_path_PKG_CONFIG"; then
19038   ac_pt_PKG_CONFIG=$PKG_CONFIG
19039   # Extract the first word of "pkg-config", so it can be a program name with args.
19040 set dummy pkg-config; ac_word=$2
19041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19042 $as_echo_n "checking for $ac_word... " >&6; }
19043 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19044   $as_echo_n "(cached) " >&6
19045 else
19046   case $ac_pt_PKG_CONFIG in
19047   [\\/]* | ?:[\\/]*)
19048   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19049   ;;
19050   *)
19051   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19052 for as_dir in $PATH
19053 do
19054   IFS=$as_save_IFS
19055   test -z "$as_dir" && as_dir=.
19056     for ac_exec_ext in '' $ac_executable_extensions; do
19057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19058     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19060     break 2
19061   fi
19062 done
19063   done
19064 IFS=$as_save_IFS
19065 
19066   ;;
19067 esac
19068 fi
19069 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19070 if test -n "$ac_pt_PKG_CONFIG"; then
19071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19072 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
19073 else
19074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19075 $as_echo "no" >&6; }
19076 fi
19077 
19078   if test "x$ac_pt_PKG_CONFIG" = x; then
19079     PKG_CONFIG=""
19080   else
19081     case $cross_compiling:$ac_tool_warned in
19082 yes:)
19083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19084 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19085 ac_tool_warned=yes ;;
19086 esac
19087     PKG_CONFIG=$ac_pt_PKG_CONFIG
19088   fi
19089 else
19090   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19091 fi
19092 
19093 fi
19094 if test -n "$PKG_CONFIG"; then
19095         _pkg_min_version=0.9.0
19096         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19097 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19098         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19099                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19100 $as_echo "yes" >&6; }
19101         else
19102                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19103 $as_echo "no" >&6; }
19104                 PKG_CONFIG=""
19105         fi
19106 
19107 fi
19108 
19109 # After basic tools have been setup, we can check build os specific details.
19110 
19111   ###############################################################################
19112 
19113   # Note that this is the build platform OS version!
19114 
19115   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19116   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19117   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19118   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19119 
19120 
19121 
19122 
19123 
19124 # Setup builddeps, for automatic downloading of tools we need.
19125 # This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19126 # boot-jdk setup, but we need to have basic tools setup first.
19127 
19128 
19129 # Check whether --with-builddeps-conf was given.
19130 if test "${with_builddeps_conf+set}" = set; then :
19131   withval=$with_builddeps_conf;
19132 fi
19133 
19134 
19135 
19136 # Check whether --with-builddeps-server was given.
19137 if test "${with_builddeps_server+set}" = set; then :
19138   withval=$with_builddeps_server;
19139 fi
19140 
19141 
19142 
19143 # Check whether --with-builddeps-dir was given.
19144 if test "${with_builddeps_dir+set}" = set; then :
19145   withval=$with_builddeps_dir;
19146 else
19147   with_builddeps_dir=/localhome/builddeps
19148 fi
19149 
19150 
19151 
19152 # Check whether --with-builddeps-group was given.
19153 if test "${with_builddeps_group+set}" = set; then :
19154   withval=$with_builddeps_group;
19155 fi
19156 
19157 
19158 
19159 
19160   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19161     if test "x$with_builddeps_conf" != x; then
19162       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19163 $as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19164       builddepsfile=$with_builddeps_conf
19165       if test -s $builddepsfile; then
19166         . $builddepsfile
19167         { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19168 $as_echo "loaded!" >&6; }
19169       else
19170         as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19171       fi
19172     else
19173       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19174 $as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19175       builddepsfile=`mktemp`
19176       touch $builddepsfile
19177       # Put all found confs into a single file.
19178       find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19179       # Source the file to acquire the variables
19180       if test -s $builddepsfile; then
19181         . $builddepsfile
19182         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19183 $as_echo "found at least one!" >&6; }
19184       else
19185         as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19186       fi
19187     fi
19188     # Create build and target names that use _ instead of "-" and ".".
19189     # This is necessary to use them in variable names.
19190     build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19191     target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19192     # Extract rewrite information for build and target
19193     eval rewritten_build=\${REWRITE_${build_var}}
19194     if test "x$rewritten_build" = x; then
19195       rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19196       echo Build stays the same $rewritten_build
19197     else
19198       echo Rewriting build for builddeps into $rewritten_build
19199     fi
19200     eval rewritten_target=\${REWRITE_${target_var}}
19201     if test "x$rewritten_target" = x; then
19202       rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19203       echo Target stays the same $rewritten_target
19204     else
19205       echo Rewriting target for builddeps into $rewritten_target
19206     fi
19207     rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19208     rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19209   fi
19210   for ac_prog in 7z unzip
19211 do
19212   # Extract the first word of "$ac_prog", so it can be a program name with args.
19213 set dummy $ac_prog; ac_word=$2
19214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19215 $as_echo_n "checking for $ac_word... " >&6; }
19216 if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19217   $as_echo_n "(cached) " >&6
19218 else
19219   if test -n "$BDEPS_UNZIP"; then
19220   ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19221 else
19222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19223 for as_dir in $PATH
19224 do
19225   IFS=$as_save_IFS
19226   test -z "$as_dir" && as_dir=.
19227     for ac_exec_ext in '' $ac_executable_extensions; do
19228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19229     ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19231     break 2
19232   fi
19233 done
19234   done
19235 IFS=$as_save_IFS
19236 
19237 fi
19238 fi
19239 BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19240 if test -n "$BDEPS_UNZIP"; then
19241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19242 $as_echo "$BDEPS_UNZIP" >&6; }
19243 else
19244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19245 $as_echo "no" >&6; }
19246 fi
19247 
19248 
19249   test -n "$BDEPS_UNZIP" && break
19250 done
19251 
19252   if test "x$BDEPS_UNZIP" = x7z; then
19253     BDEPS_UNZIP="7z x"
19254   fi
19255 
19256   for ac_prog in wget lftp ftp
19257 do
19258   # Extract the first word of "$ac_prog", so it can be a program name with args.
19259 set dummy $ac_prog; ac_word=$2
19260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19261 $as_echo_n "checking for $ac_word... " >&6; }
19262 if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19263   $as_echo_n "(cached) " >&6
19264 else
19265   if test -n "$BDEPS_FTP"; then
19266   ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19267 else
19268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19269 for as_dir in $PATH
19270 do
19271   IFS=$as_save_IFS
19272   test -z "$as_dir" && as_dir=.
19273     for ac_exec_ext in '' $ac_executable_extensions; do
19274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19275     ac_cv_prog_BDEPS_FTP="$ac_prog"
19276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19277     break 2
19278   fi
19279 done
19280   done
19281 IFS=$as_save_IFS
19282 
19283 fi
19284 fi
19285 BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19286 if test -n "$BDEPS_FTP"; then
19287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19288 $as_echo "$BDEPS_FTP" >&6; }
19289 else
19290   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19291 $as_echo "no" >&6; }
19292 fi
19293 
19294 
19295   test -n "$BDEPS_FTP" && break
19296 done
19297 
19298 
19299 
19300 ###############################################################################
19301 #
19302 # Determine OpenJDK variants, options and version numbers.
19303 #
19304 ###############################################################################
19305 
19306 # We need build & target for this.
19307 
19308 
19309   ###############################################################################
19310   #
19311   # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19312   # We always build headless support.
19313   #
19314   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19315 $as_echo_n "checking headful support... " >&6; }
19316   # Check whether --enable-headful was given.
19317 if test "${enable_headful+set}" = set; then :
19318   enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19319 else
19320   SUPPORT_HEADFUL=yes
19321 fi
19322 
19323 
19324   SUPPORT_HEADLESS=yes
19325   BUILD_HEADLESS="BUILD_HEADLESS:=true"
19326 
19327   if test "x$SUPPORT_HEADFUL" = xyes; then
19328     # We are building both headful and headless.
19329     headful_msg="include support for both headful and headless"
19330   fi
19331 
19332   if test "x$SUPPORT_HEADFUL" = xno; then
19333     # Thus we are building headless only.
19334     BUILD_HEADLESS="BUILD_HEADLESS:=true"
19335     headful_msg="headless only"
19336   fi
19337 
19338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19339 $as_echo "$headful_msg" >&6; }
19340 
19341 
19342 
19343 
19344 
19345   # Control wether Hotspot runs Queens test after build.
19346   # Check whether --enable-hotspot-test-in-build was given.
19347 if test "${enable_hotspot_test_in_build+set}" = set; then :
19348   enableval=$enable_hotspot_test_in_build;
19349 else
19350   enable_hotspot_test_in_build=no
19351 fi
19352 
19353   if test "x$enable_hotspot_test_in_build" = "xyes"; then
19354     TEST_IN_BUILD=true
19355   else
19356     TEST_IN_BUILD=false
19357   fi
19358 
19359 
19360   ###############################################################################
19361   #
19362   # Choose cacerts source file
19363   #
19364 
19365 # Check whether --with-cacerts-file was given.
19366 if test "${with_cacerts_file+set}" = set; then :
19367   withval=$with_cacerts_file;
19368 fi
19369 
19370   if test "x$with_cacerts_file" != x; then
19371     CACERTS_FILE=$with_cacerts_file
19372   else
19373     CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19374   fi
19375 
19376 
19377   ###############################################################################
19378   #
19379   # Enable or disable unlimited crypto
19380   #
19381   # Check whether --enable-unlimited-crypto was given.
19382 if test "${enable_unlimited_crypto+set}" = set; then :
19383   enableval=$enable_unlimited_crypto;
19384 else
19385   enable_unlimited_crypto=no
19386 fi
19387 
19388   if test "x$enable_unlimited_crypto" = "xyes"; then
19389     UNLIMITED_CRYPTO=true
19390   else
19391     UNLIMITED_CRYPTO=false
19392   fi
19393 
19394 
19395   ###############################################################################
19396   #
19397   # Enable or disable the elliptic curve crypto implementation
19398   #
19399 
19400 
19401   ###############################################################################
19402   #
19403   # --enable-rmiconnector-iiop
19404   #
19405   # Check whether --enable-rmiconnector-iiop was given.
19406 if test "${enable_rmiconnector_iiop+set}" = set; then :
19407   enableval=$enable_rmiconnector_iiop;
19408 fi
19409 
19410   if test "x$enable_rmiconnector_iiop" = "xyes"; then
19411     RMICONNECTOR_IIOP=true
19412   else
19413     RMICONNECTOR_IIOP=false
19414   fi
19415 
19416 
19417   ###############################################################################
19418   #
19419   # Compress jars
19420   #
19421   COMPRESS_JARS=false
19422 
19423 
19424 
19425 
19426   # Source the version numbers
19427   . $AUTOCONF_DIR/version-numbers
19428 
19429   # Get the settings from parameters
19430 
19431 # Check whether --with-milestone was given.
19432 if test "${with_milestone+set}" = set; then :
19433   withval=$with_milestone;
19434 fi
19435 
19436   if test "x$with_milestone" = xyes; then
19437     as_fn_error $? "Milestone must have a value" "$LINENO" 5
19438   elif test "x$with_milestone" != x; then
19439     MILESTONE="$with_milestone"
19440   fi
19441   if test "x$MILESTONE" = x; then
19442     MILESTONE=internal
19443   fi
19444 
19445 
19446 # Check whether --with-update-version was given.
19447 if test "${with_update_version+set}" = set; then :
19448   withval=$with_update_version;
19449 fi
19450 
19451   if test "x$with_update_version" = xyes; then
19452     as_fn_error $? "Update version must have a value" "$LINENO" 5
19453   elif test "x$with_update_version" != x; then
19454     JDK_UPDATE_VERSION="$with_update_version"
19455     # On macosx 10.7, it's not possible to set --with-update-version=0X due
19456     # to a bug in expr (which reduces it to just X). To work around this, we
19457     # always add a 0 to one digit update versions.
19458     if test "${#JDK_UPDATE_VERSION}" = "1"; then
19459       JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19460     fi
19461   fi
19462 
19463 
19464 # Check whether --with-user-release-suffix was given.
19465 if test "${with_user_release_suffix+set}" = set; then :
19466   withval=$with_user_release_suffix;
19467 fi
19468 
19469   if test "x$with_user_release_suffix" = xyes; then
19470     as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19471   elif test "x$with_user_release_suffix" != x; then
19472     USER_RELEASE_SUFFIX="$with_user_release_suffix"
19473   fi
19474 
19475 
19476 # Check whether --with-build-number was given.
19477 if test "${with_build_number+set}" = set; then :
19478   withval=$with_build_number;
19479 fi
19480 
19481   if test "x$with_build_number" = xyes; then
19482     as_fn_error $? "Build number must have a value" "$LINENO" 5
19483   elif test "x$with_build_number" != x; then
19484     JDK_BUILD_NUMBER="$with_build_number"
19485   fi
19486   # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19487   if test "x$JDK_BUILD_NUMBER" = x; then
19488     JDK_BUILD_NUMBER=b00
19489     if test "x$USER_RELEASE_SUFFIX" = x; then
19490       BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19491       # Avoid [:alnum:] since it depends on the locale.
19492       CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19493       USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19494     fi
19495   fi
19496 
19497   # Now set the JDK version, milestone, build number etc.
19498 
19499 
19500 
19501 
19502 
19503 
19504 
19505 
19506 
19507 
19508 
19509 
19510 
19511 
19512 
19513   COPYRIGHT_YEAR=`date +'%Y'`
19514 
19515 
19516   if test "x$JDK_UPDATE_VERSION" != x; then
19517     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19518   else
19519     JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19520   fi
19521 
19522 
19523   COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19524 
19525 
19526 
19527 ###############################################################################
19528 #
19529 # Setup BootJDK, used to bootstrap the build.
19530 #
19531 ###############################################################################
19532 
19533 
19534   BOOT_JDK_FOUND=no
19535 
19536 # Check whether --with-boot-jdk was given.
19537 if test "${with_boot_jdk+set}" = set; then :
19538   withval=$with_boot_jdk;
19539 fi
19540 
19541 
19542   # We look for the Boot JDK through various means, going from more certain to
19543   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19544   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19545   # must check if this is indeed valid; otherwise we'll continue looking.
19546 
19547   # Test: Is bootjdk explicitely set by command line arguments?
19548 
19549   if test "x$BOOT_JDK_FOUND" = xno; then
19550     # Now execute the test
19551 
19552   if test "x$with_boot_jdk" != x; then
19553     BOOT_JDK=$with_boot_jdk
19554     BOOT_JDK_FOUND=maybe
19555     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19556 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19557   fi
19558 
19559 
19560     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19561     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19562       # Do we have a bin/java?
19563       if test ! -x "$BOOT_JDK/bin/java"; then
19564         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19565 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19566         BOOT_JDK_FOUND=no
19567       else
19568         # Do we have a bin/javac?
19569         if test ! -x "$BOOT_JDK/bin/javac"; then
19570           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19572           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19573 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19574           BOOT_JDK_FOUND=no
19575         else
19576           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19577           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19578             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19580             BOOT_JDK_FOUND=no
19581           else
19582             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19583             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19584 
19585             # Extra M4 quote needed to protect [] in grep expression.
19586             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19587             if test "x$FOUND_CORRECT_VERSION" = x; then
19588               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19589 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19590               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19591 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19592               BOOT_JDK_FOUND=no
19593             else
19594               # We're done! :-)
19595               BOOT_JDK_FOUND=yes
19596 
19597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19598 
19599   # Input might be given as Windows format, start by converting to
19600   # unix format.
19601   path="$BOOT_JDK"
19602   new_path=`$CYGPATH -u "$path"`
19603 
19604   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19605   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19606   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19607   # "foo.exe" is OK but "foo" is an error.
19608   #
19609   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19610   # It is also a way to make sure we got the proper file name for the real test later on.
19611   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19612   if test "x$test_shortpath" = x; then
19613     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19614 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19615     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19616   fi
19617 
19618   # Call helper function which possibly converts this using DOS-style short mode.
19619   # If so, the updated path is stored in $new_path.
19620 
19621   input_path="$new_path"
19622   # Check if we need to convert this using DOS-style short mode. If the path
19623   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19624   # take no chances and rewrite it.
19625   # Note: m4 eats our [], so we need to use [ and ] instead.
19626   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19627   if test "x$has_forbidden_chars" != x; then
19628     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19629     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19630     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19631     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19632       # Going to short mode and back again did indeed matter. Since short mode is
19633       # case insensitive, let's make it lowercase to improve readability.
19634       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19635       # Now convert it back to Unix-stile (cygpath)
19636       input_path=`$CYGPATH -u "$shortmode_path"`
19637       new_path="$input_path"
19638     fi
19639   fi
19640 
19641   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19642   if test "x$test_cygdrive_prefix" = x; then
19643     # As a simple fix, exclude /usr/bin since it's not a real path.
19644     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19645       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19646       # a path prefixed by /cygdrive for fixpath to work.
19647       new_path="$CYGWIN_ROOT_PATH$input_path"
19648     fi
19649   fi
19650 
19651 
19652   if test "x$path" != "x$new_path"; then
19653     BOOT_JDK="$new_path"
19654     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19655 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19656   fi
19657 
19658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19659 
19660   path="$BOOT_JDK"
19661   has_colon=`$ECHO $path | $GREP ^.:`
19662   new_path="$path"
19663   if test "x$has_colon" = x; then
19664     # Not in mixed or Windows style, start by that.
19665     new_path=`cmd //c echo $path`
19666   fi
19667 
19668 
19669   input_path="$new_path"
19670   # Check if we need to convert this using DOS-style short mode. If the path
19671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19672   # take no chances and rewrite it.
19673   # Note: m4 eats our [], so we need to use [ and ] instead.
19674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19675   if test "x$has_forbidden_chars" != x; then
19676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19678   fi
19679 
19680 
19681   windows_path="$new_path"
19682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19683     unix_path=`$CYGPATH -u "$windows_path"`
19684     new_path="$unix_path"
19685   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19686     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19687     new_path="$unix_path"
19688   fi
19689 
19690   if test "x$path" != "x$new_path"; then
19691     BOOT_JDK="$new_path"
19692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19693 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19694   fi
19695 
19696   # Save the first 10 bytes of this path to the storage, so fixpath can work.
19697   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19698 
19699   else
19700     # We're on a posix platform. Hooray! :)
19701     path="$BOOT_JDK"
19702     has_space=`$ECHO "$path" | $GREP " "`
19703     if test "x$has_space" != x; then
19704       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19705 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19706       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19707     fi
19708 
19709     # Use eval to expand a potential ~
19710     eval path="$path"
19711     if test ! -f "$path" && test ! -d "$path"; then
19712       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19713     fi
19714 
19715     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19716   fi
19717 
19718               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19719 $as_echo_n "checking for Boot JDK... " >&6; }
19720               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19721 $as_echo "$BOOT_JDK" >&6; }
19722               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19723 $as_echo_n "checking Boot JDK version... " >&6; }
19724               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19725               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19726 $as_echo "$BOOT_JDK_VERSION" >&6; }
19727             fi # end check jdk version
19728           fi # end check rt.jar
19729         fi # end check javac
19730       fi # end check java
19731     fi # end check boot jdk found
19732   fi
19733 
19734   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19735     # Having specified an argument which is incorrect will produce an instant failure;
19736     # we should not go on looking
19737     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19738   fi
19739 
19740   # Test: Is bootjdk available from builddeps?
19741 
19742   if test "x$BOOT_JDK_FOUND" = xno; then
19743     # Now execute the test
19744 
19745 
19746 
19747   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19748     # Source the builddeps file again, to make sure it uses the latest variables!
19749     . $builddepsfile
19750     # Look for a target and build machine specific resource!
19751     eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19752     if test "x$resource" = x; then
19753       # Ok, lets instead look for a target specific resource
19754       eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19755     fi
19756     if test "x$resource" = x; then
19757       # Ok, lets instead look for a build specific resource
19758       eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19759     fi
19760     if test "x$resource" = x; then
19761       # Ok, lets instead look for a generic resource
19762       # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19763       resource=${builddep_bootjdk}
19764     fi
19765     if test "x$resource" != x; then
19766       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19767 $as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19768       # If the resource in the builddeps.conf file is an existing directory,
19769       # for example /java/linux/cups
19770       if test -d ${resource}; then
19771         depdir=${resource}
19772       else
19773 
19774   # bootjdk is for example mymodule
19775   # $resource is for example libs/general/libmymod_1_2_3.zip
19776   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19777   # $with_builddeps_dir is for example /localhome/builddeps
19778   # depdir is the name of the variable into which we store the depdir, eg MYMOD
19779   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19780   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19781   filename=`basename $resource`
19782   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19783   filebase=${filename%%.*}
19784   extension=${filename#*.}
19785   installdir=$with_builddeps_dir/$filebase
19786   if test ! -f $installdir/$filename.unpacked; then
19787     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19788 $as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19789     if test ! -d $installdir; then
19790       mkdir -p $installdir
19791     fi
19792     if test ! -d $installdir; then
19793       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19794     fi
19795     tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19796     touch $tmpfile
19797     if test ! -f $tmpfile; then
19798       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19799     fi
19800 
19801   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19802   # $tmpfile is the local file name for the downloaded file.
19803   VALID_TOOL=no
19804   if test "x$BDEPS_FTP" = xwget; then
19805     VALID_TOOL=yes
19806     wget -O $tmpfile $with_builddeps_server/$resource
19807   fi
19808   if test "x$BDEPS_FTP" = xlftp; then
19809     VALID_TOOL=yes
19810     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19811   fi
19812   if test "x$BDEPS_FTP" = xftp; then
19813     VALID_TOOL=yes
19814     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19815     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19816     FTPUSERPWD=${FTPSERVER%%@*}
19817     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19818       FTPUSER=${userpwd%%:*}
19819       FTPPWD=${userpwd#*@}
19820       FTPSERVER=${FTPSERVER#*@}
19821     else
19822       FTPUSER=ftp
19823       FTPPWD=ftp
19824     fi
19825     # the "pass" command does not work on some
19826     # ftp clients (read ftp.exe) but if it works,
19827     # passive mode is better!
19828     ( \
19829         echo "user $FTPUSER $FTPPWD"        ; \
19830         echo "pass"                         ; \
19831         echo "bin"                          ; \
19832         echo "get $FTPPATH $tmpfile"              ; \
19833     ) | ftp -in $FTPSERVER
19834   fi
19835   if test "x$VALID_TOOL" != xyes; then
19836     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19837   fi
19838 
19839     mv $tmpfile $installdir/$filename
19840     if test ! -s $installdir/$filename; then
19841       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19842     fi
19843     case "$extension" in
19844       zip)  echo "Unzipping $installdir/$filename..."
19845         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19846         ;;
19847       tar.gz) echo "Untaring $installdir/$filename..."
19848         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19849         ;;
19850       tgz) echo "Untaring $installdir/$filename..."
19851         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19852         ;;
19853       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19854         ;;
19855     esac
19856   fi
19857   if test -f $installdir/$filename.unpacked; then
19858     depdir=$installdir
19859   fi
19860 
19861       fi
19862       # Source the builddeps file again, because in the previous command, the depdir
19863       # was updated to point at the current build dependency install directory.
19864       . $builddepsfile
19865       # Now extract variables from the builddeps.conf files.
19866       theroot=${builddep_bootjdk_ROOT}
19867       thecflags=${builddep_bootjdk_CFLAGS}
19868       thelibs=${builddep_bootjdk_LIBS}
19869       if test "x$depdir" = x; then
19870         as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
19871       fi
19872       BOOT_JDK=$depdir
19873       if test "x$theroot" != x; then
19874         BOOT_JDK="$theroot"
19875       fi
19876       if test "x$thecflags" != x; then
19877         BOOT_JDK_CFLAGS="$thecflags"
19878       fi
19879       if test "x$thelibs" != x; then
19880         BOOT_JDK_LIBS="$thelibs"
19881       fi
19882       BOOT_JDK_FOUND=maybe
19883       else BOOT_JDK_FOUND=no
19884 
19885     fi
19886     else BOOT_JDK_FOUND=no
19887 
19888   fi
19889 
19890 
19891 
19892     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19893     if test "x$BOOT_JDK_FOUND" = xmaybe; then
19894       # Do we have a bin/java?
19895       if test ! -x "$BOOT_JDK/bin/java"; then
19896         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19897 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19898         BOOT_JDK_FOUND=no
19899       else
19900         # Do we have a bin/javac?
19901         if test ! -x "$BOOT_JDK/bin/javac"; then
19902           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19903 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19904           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19905 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19906           BOOT_JDK_FOUND=no
19907         else
19908           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19909           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19910             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19911 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19912             BOOT_JDK_FOUND=no
19913           else
19914             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19915             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19916 
19917             # Extra M4 quote needed to protect [] in grep expression.
19918             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19919             if test "x$FOUND_CORRECT_VERSION" = x; then
19920               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19921 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19922               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19923 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19924               BOOT_JDK_FOUND=no
19925             else
19926               # We're done! :-)
19927               BOOT_JDK_FOUND=yes
19928 
19929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19930 
19931   # Input might be given as Windows format, start by converting to
19932   # unix format.
19933   path="$BOOT_JDK"
19934   new_path=`$CYGPATH -u "$path"`
19935 
19936   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19937   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19938   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19939   # "foo.exe" is OK but "foo" is an error.
19940   #
19941   # This test is therefore slightly more accurate than "test -f" to check for file precense.
19942   # It is also a way to make sure we got the proper file name for the real test later on.
19943   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19944   if test "x$test_shortpath" = x; then
19945     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19946 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19947     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19948   fi
19949 
19950   # Call helper function which possibly converts this using DOS-style short mode.
19951   # If so, the updated path is stored in $new_path.
19952 
19953   input_path="$new_path"
19954   # Check if we need to convert this using DOS-style short mode. If the path
19955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19956   # take no chances and rewrite it.
19957   # Note: m4 eats our [], so we need to use [ and ] instead.
19958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19959   if test "x$has_forbidden_chars" != x; then
19960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19961     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19962     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19963     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19964       # Going to short mode and back again did indeed matter. Since short mode is
19965       # case insensitive, let's make it lowercase to improve readability.
19966       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19967       # Now convert it back to Unix-stile (cygpath)
19968       input_path=`$CYGPATH -u "$shortmode_path"`
19969       new_path="$input_path"
19970     fi
19971   fi
19972 
19973   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19974   if test "x$test_cygdrive_prefix" = x; then
19975     # As a simple fix, exclude /usr/bin since it's not a real path.
19976     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19977       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19978       # a path prefixed by /cygdrive for fixpath to work.
19979       new_path="$CYGWIN_ROOT_PATH$input_path"
19980     fi
19981   fi
19982 
19983 
19984   if test "x$path" != "x$new_path"; then
19985     BOOT_JDK="$new_path"
19986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19987 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19988   fi
19989 
19990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19991 
19992   path="$BOOT_JDK"
19993   has_colon=`$ECHO $path | $GREP ^.:`
19994   new_path="$path"
19995   if test "x$has_colon" = x; then
19996     # Not in mixed or Windows style, start by that.
19997     new_path=`cmd //c echo $path`
19998   fi
19999 
20000 
20001   input_path="$new_path"
20002   # Check if we need to convert this using DOS-style short mode. If the path
20003   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20004   # take no chances and rewrite it.
20005   # Note: m4 eats our [], so we need to use [ and ] instead.
20006   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20007   if test "x$has_forbidden_chars" != x; then
20008     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20009     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20010   fi
20011 
20012 
20013   windows_path="$new_path"
20014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20015     unix_path=`$CYGPATH -u "$windows_path"`
20016     new_path="$unix_path"
20017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20019     new_path="$unix_path"
20020   fi
20021 
20022   if test "x$path" != "x$new_path"; then
20023     BOOT_JDK="$new_path"
20024     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20025 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20026   fi
20027 
20028   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20029   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20030 
20031   else
20032     # We're on a posix platform. Hooray! :)
20033     path="$BOOT_JDK"
20034     has_space=`$ECHO "$path" | $GREP " "`
20035     if test "x$has_space" != x; then
20036       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20037 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20038       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20039     fi
20040 
20041     # Use eval to expand a potential ~
20042     eval path="$path"
20043     if test ! -f "$path" && test ! -d "$path"; then
20044       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20045     fi
20046 
20047     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20048   fi
20049 
20050               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20051 $as_echo_n "checking for Boot JDK... " >&6; }
20052               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20053 $as_echo "$BOOT_JDK" >&6; }
20054               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20055 $as_echo_n "checking Boot JDK version... " >&6; }
20056               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20057               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20058 $as_echo "$BOOT_JDK_VERSION" >&6; }
20059             fi # end check jdk version
20060           fi # end check rt.jar
20061         fi # end check javac
20062       fi # end check java
20063     fi # end check boot jdk found
20064   fi
20065 
20066 
20067   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20068 
20069   if test "x$BOOT_JDK_FOUND" = xno; then
20070     # Now execute the test
20071 
20072   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20073     # First check at user selected default
20074 
20075   if test "x$BOOT_JDK_FOUND" = xno; then
20076     # Now execute the test
20077 
20078   if test -x /usr/libexec/java_home; then
20079     BOOT_JDK=`/usr/libexec/java_home `
20080     BOOT_JDK_FOUND=maybe
20081     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20082 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20083   fi
20084 
20085 
20086     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20087     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20088       # Do we have a bin/java?
20089       if test ! -x "$BOOT_JDK/bin/java"; then
20090         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20091 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20092         BOOT_JDK_FOUND=no
20093       else
20094         # Do we have a bin/javac?
20095         if test ! -x "$BOOT_JDK/bin/javac"; then
20096           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20097 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20098           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20099 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20100           BOOT_JDK_FOUND=no
20101         else
20102           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20103           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20104             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20106             BOOT_JDK_FOUND=no
20107           else
20108             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20109             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20110 
20111             # Extra M4 quote needed to protect [] in grep expression.
20112             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20113             if test "x$FOUND_CORRECT_VERSION" = x; then
20114               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20115 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20116               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20117 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20118               BOOT_JDK_FOUND=no
20119             else
20120               # We're done! :-)
20121               BOOT_JDK_FOUND=yes
20122 
20123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20124 
20125   # Input might be given as Windows format, start by converting to
20126   # unix format.
20127   path="$BOOT_JDK"
20128   new_path=`$CYGPATH -u "$path"`
20129 
20130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20133   # "foo.exe" is OK but "foo" is an error.
20134   #
20135   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20136   # It is also a way to make sure we got the proper file name for the real test later on.
20137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20138   if test "x$test_shortpath" = x; then
20139     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20140 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20141     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20142   fi
20143 
20144   # Call helper function which possibly converts this using DOS-style short mode.
20145   # If so, the updated path is stored in $new_path.
20146 
20147   input_path="$new_path"
20148   # Check if we need to convert this using DOS-style short mode. If the path
20149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20150   # take no chances and rewrite it.
20151   # Note: m4 eats our [], so we need to use [ and ] instead.
20152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20153   if test "x$has_forbidden_chars" != x; then
20154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20158       # Going to short mode and back again did indeed matter. Since short mode is
20159       # case insensitive, let's make it lowercase to improve readability.
20160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20161       # Now convert it back to Unix-stile (cygpath)
20162       input_path=`$CYGPATH -u "$shortmode_path"`
20163       new_path="$input_path"
20164     fi
20165   fi
20166 
20167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20168   if test "x$test_cygdrive_prefix" = x; then
20169     # As a simple fix, exclude /usr/bin since it's not a real path.
20170     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20172       # a path prefixed by /cygdrive for fixpath to work.
20173       new_path="$CYGWIN_ROOT_PATH$input_path"
20174     fi
20175   fi
20176 
20177 
20178   if test "x$path" != "x$new_path"; then
20179     BOOT_JDK="$new_path"
20180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20181 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20182   fi
20183 
20184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20185 
20186   path="$BOOT_JDK"
20187   has_colon=`$ECHO $path | $GREP ^.:`
20188   new_path="$path"
20189   if test "x$has_colon" = x; then
20190     # Not in mixed or Windows style, start by that.
20191     new_path=`cmd //c echo $path`
20192   fi
20193 
20194 
20195   input_path="$new_path"
20196   # Check if we need to convert this using DOS-style short mode. If the path
20197   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20198   # take no chances and rewrite it.
20199   # Note: m4 eats our [], so we need to use [ and ] instead.
20200   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20201   if test "x$has_forbidden_chars" != x; then
20202     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20203     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20204   fi
20205 
20206 
20207   windows_path="$new_path"
20208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20209     unix_path=`$CYGPATH -u "$windows_path"`
20210     new_path="$unix_path"
20211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20213     new_path="$unix_path"
20214   fi
20215 
20216   if test "x$path" != "x$new_path"; then
20217     BOOT_JDK="$new_path"
20218     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20219 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20220   fi
20221 
20222   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20223   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20224 
20225   else
20226     # We're on a posix platform. Hooray! :)
20227     path="$BOOT_JDK"
20228     has_space=`$ECHO "$path" | $GREP " "`
20229     if test "x$has_space" != x; then
20230       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20231 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20232       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20233     fi
20234 
20235     # Use eval to expand a potential ~
20236     eval path="$path"
20237     if test ! -f "$path" && test ! -d "$path"; then
20238       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20239     fi
20240 
20241     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20242   fi
20243 
20244               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20245 $as_echo_n "checking for Boot JDK... " >&6; }
20246               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20247 $as_echo "$BOOT_JDK" >&6; }
20248               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20249 $as_echo_n "checking Boot JDK version... " >&6; }
20250               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20251               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20252 $as_echo "$BOOT_JDK_VERSION" >&6; }
20253             fi # end check jdk version
20254           fi # end check rt.jar
20255         fi # end check javac
20256       fi # end check java
20257     fi # end check boot jdk found
20258   fi
20259 
20260     # If that did not work out (e.g. too old), try explicit versions instead
20261 
20262   if test "x$BOOT_JDK_FOUND" = xno; then
20263     # Now execute the test
20264 
20265   if test -x /usr/libexec/java_home; then
20266     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20267     BOOT_JDK_FOUND=maybe
20268     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20269 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20270   fi
20271 
20272 
20273     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20274     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20275       # Do we have a bin/java?
20276       if test ! -x "$BOOT_JDK/bin/java"; then
20277         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20278 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20279         BOOT_JDK_FOUND=no
20280       else
20281         # Do we have a bin/javac?
20282         if test ! -x "$BOOT_JDK/bin/javac"; then
20283           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20284 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20285           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20286 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20287           BOOT_JDK_FOUND=no
20288         else
20289           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20290           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20291             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20292 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20293             BOOT_JDK_FOUND=no
20294           else
20295             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20296             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20297 
20298             # Extra M4 quote needed to protect [] in grep expression.
20299             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20300             if test "x$FOUND_CORRECT_VERSION" = x; then
20301               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20302 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20303               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20304 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20305               BOOT_JDK_FOUND=no
20306             else
20307               # We're done! :-)
20308               BOOT_JDK_FOUND=yes
20309 
20310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20311 
20312   # Input might be given as Windows format, start by converting to
20313   # unix format.
20314   path="$BOOT_JDK"
20315   new_path=`$CYGPATH -u "$path"`
20316 
20317   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20318   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20319   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20320   # "foo.exe" is OK but "foo" is an error.
20321   #
20322   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20323   # It is also a way to make sure we got the proper file name for the real test later on.
20324   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20325   if test "x$test_shortpath" = x; then
20326     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20327 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20328     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20329   fi
20330 
20331   # Call helper function which possibly converts this using DOS-style short mode.
20332   # If so, the updated path is stored in $new_path.
20333 
20334   input_path="$new_path"
20335   # Check if we need to convert this using DOS-style short mode. If the path
20336   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20337   # take no chances and rewrite it.
20338   # Note: m4 eats our [], so we need to use [ and ] instead.
20339   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20340   if test "x$has_forbidden_chars" != x; then
20341     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20342     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20343     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20344     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20345       # Going to short mode and back again did indeed matter. Since short mode is
20346       # case insensitive, let's make it lowercase to improve readability.
20347       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20348       # Now convert it back to Unix-stile (cygpath)
20349       input_path=`$CYGPATH -u "$shortmode_path"`
20350       new_path="$input_path"
20351     fi
20352   fi
20353 
20354   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20355   if test "x$test_cygdrive_prefix" = x; then
20356     # As a simple fix, exclude /usr/bin since it's not a real path.
20357     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20358       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20359       # a path prefixed by /cygdrive for fixpath to work.
20360       new_path="$CYGWIN_ROOT_PATH$input_path"
20361     fi
20362   fi
20363 
20364 
20365   if test "x$path" != "x$new_path"; then
20366     BOOT_JDK="$new_path"
20367     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20368 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20369   fi
20370 
20371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20372 
20373   path="$BOOT_JDK"
20374   has_colon=`$ECHO $path | $GREP ^.:`
20375   new_path="$path"
20376   if test "x$has_colon" = x; then
20377     # Not in mixed or Windows style, start by that.
20378     new_path=`cmd //c echo $path`
20379   fi
20380 
20381 
20382   input_path="$new_path"
20383   # Check if we need to convert this using DOS-style short mode. If the path
20384   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20385   # take no chances and rewrite it.
20386   # Note: m4 eats our [], so we need to use [ and ] instead.
20387   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20388   if test "x$has_forbidden_chars" != x; then
20389     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20390     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20391   fi
20392 
20393 
20394   windows_path="$new_path"
20395   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20396     unix_path=`$CYGPATH -u "$windows_path"`
20397     new_path="$unix_path"
20398   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20399     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20400     new_path="$unix_path"
20401   fi
20402 
20403   if test "x$path" != "x$new_path"; then
20404     BOOT_JDK="$new_path"
20405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20406 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20407   fi
20408 
20409   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20410   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20411 
20412   else
20413     # We're on a posix platform. Hooray! :)
20414     path="$BOOT_JDK"
20415     has_space=`$ECHO "$path" | $GREP " "`
20416     if test "x$has_space" != x; then
20417       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20418 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20419       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20420     fi
20421 
20422     # Use eval to expand a potential ~
20423     eval path="$path"
20424     if test ! -f "$path" && test ! -d "$path"; then
20425       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20426     fi
20427 
20428     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20429   fi
20430 
20431               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20432 $as_echo_n "checking for Boot JDK... " >&6; }
20433               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20434 $as_echo "$BOOT_JDK" >&6; }
20435               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20436 $as_echo_n "checking Boot JDK version... " >&6; }
20437               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20438               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20439 $as_echo "$BOOT_JDK_VERSION" >&6; }
20440             fi # end check jdk version
20441           fi # end check rt.jar
20442         fi # end check javac
20443       fi # end check java
20444     fi # end check boot jdk found
20445   fi
20446 
20447 
20448   if test "x$BOOT_JDK_FOUND" = xno; then
20449     # Now execute the test
20450 
20451   if test -x /usr/libexec/java_home; then
20452     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20453     BOOT_JDK_FOUND=maybe
20454     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20455 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20456   fi
20457 
20458 
20459     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20460     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20461       # Do we have a bin/java?
20462       if test ! -x "$BOOT_JDK/bin/java"; then
20463         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20465         BOOT_JDK_FOUND=no
20466       else
20467         # Do we have a bin/javac?
20468         if test ! -x "$BOOT_JDK/bin/javac"; then
20469           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20470 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20471           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20472 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20473           BOOT_JDK_FOUND=no
20474         else
20475           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20476           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20477             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20478 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20479             BOOT_JDK_FOUND=no
20480           else
20481             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20482             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20483 
20484             # Extra M4 quote needed to protect [] in grep expression.
20485             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20486             if test "x$FOUND_CORRECT_VERSION" = x; then
20487               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20489               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20490 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20491               BOOT_JDK_FOUND=no
20492             else
20493               # We're done! :-)
20494               BOOT_JDK_FOUND=yes
20495 
20496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20497 
20498   # Input might be given as Windows format, start by converting to
20499   # unix format.
20500   path="$BOOT_JDK"
20501   new_path=`$CYGPATH -u "$path"`
20502 
20503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20506   # "foo.exe" is OK but "foo" is an error.
20507   #
20508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20509   # It is also a way to make sure we got the proper file name for the real test later on.
20510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20511   if test "x$test_shortpath" = x; then
20512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20513 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20514     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20515   fi
20516 
20517   # Call helper function which possibly converts this using DOS-style short mode.
20518   # If so, the updated path is stored in $new_path.
20519 
20520   input_path="$new_path"
20521   # Check if we need to convert this using DOS-style short mode. If the path
20522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20523   # take no chances and rewrite it.
20524   # Note: m4 eats our [], so we need to use [ and ] instead.
20525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20526   if test "x$has_forbidden_chars" != x; then
20527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20531       # Going to short mode and back again did indeed matter. Since short mode is
20532       # case insensitive, let's make it lowercase to improve readability.
20533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20534       # Now convert it back to Unix-stile (cygpath)
20535       input_path=`$CYGPATH -u "$shortmode_path"`
20536       new_path="$input_path"
20537     fi
20538   fi
20539 
20540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20541   if test "x$test_cygdrive_prefix" = x; then
20542     # As a simple fix, exclude /usr/bin since it's not a real path.
20543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20545       # a path prefixed by /cygdrive for fixpath to work.
20546       new_path="$CYGWIN_ROOT_PATH$input_path"
20547     fi
20548   fi
20549 
20550 
20551   if test "x$path" != "x$new_path"; then
20552     BOOT_JDK="$new_path"
20553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20554 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20555   fi
20556 
20557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20558 
20559   path="$BOOT_JDK"
20560   has_colon=`$ECHO $path | $GREP ^.:`
20561   new_path="$path"
20562   if test "x$has_colon" = x; then
20563     # Not in mixed or Windows style, start by that.
20564     new_path=`cmd //c echo $path`
20565   fi
20566 
20567 
20568   input_path="$new_path"
20569   # Check if we need to convert this using DOS-style short mode. If the path
20570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20571   # take no chances and rewrite it.
20572   # Note: m4 eats our [], so we need to use [ and ] instead.
20573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20574   if test "x$has_forbidden_chars" != x; then
20575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20577   fi
20578 
20579 
20580   windows_path="$new_path"
20581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20582     unix_path=`$CYGPATH -u "$windows_path"`
20583     new_path="$unix_path"
20584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20586     new_path="$unix_path"
20587   fi
20588 
20589   if test "x$path" != "x$new_path"; then
20590     BOOT_JDK="$new_path"
20591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20593   fi
20594 
20595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20597 
20598   else
20599     # We're on a posix platform. Hooray! :)
20600     path="$BOOT_JDK"
20601     has_space=`$ECHO "$path" | $GREP " "`
20602     if test "x$has_space" != x; then
20603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20604 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20605       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20606     fi
20607 
20608     # Use eval to expand a potential ~
20609     eval path="$path"
20610     if test ! -f "$path" && test ! -d "$path"; then
20611       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20612     fi
20613 
20614     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20615   fi
20616 
20617               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20618 $as_echo_n "checking for Boot JDK... " >&6; }
20619               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20620 $as_echo "$BOOT_JDK" >&6; }
20621               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20622 $as_echo_n "checking Boot JDK version... " >&6; }
20623               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20624               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20625 $as_echo "$BOOT_JDK_VERSION" >&6; }
20626             fi # end check jdk version
20627           fi # end check rt.jar
20628         fi # end check javac
20629       fi # end check java
20630     fi # end check boot jdk found
20631   fi
20632 
20633 
20634   if test "x$BOOT_JDK_FOUND" = xno; then
20635     # Now execute the test
20636 
20637   if test -x /usr/libexec/java_home; then
20638     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20639     BOOT_JDK_FOUND=maybe
20640     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20641 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20642   fi
20643 
20644 
20645     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20646     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20647       # Do we have a bin/java?
20648       if test ! -x "$BOOT_JDK/bin/java"; then
20649         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20651         BOOT_JDK_FOUND=no
20652       else
20653         # Do we have a bin/javac?
20654         if test ! -x "$BOOT_JDK/bin/javac"; then
20655           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20656 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20657           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20658 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20659           BOOT_JDK_FOUND=no
20660         else
20661           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20662           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20663             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20664 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20665             BOOT_JDK_FOUND=no
20666           else
20667             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20668             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20669 
20670             # Extra M4 quote needed to protect [] in grep expression.
20671             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20672             if test "x$FOUND_CORRECT_VERSION" = x; then
20673               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20674 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20675               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20676 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20677               BOOT_JDK_FOUND=no
20678             else
20679               # We're done! :-)
20680               BOOT_JDK_FOUND=yes
20681 
20682   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20683 
20684   # Input might be given as Windows format, start by converting to
20685   # unix format.
20686   path="$BOOT_JDK"
20687   new_path=`$CYGPATH -u "$path"`
20688 
20689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20692   # "foo.exe" is OK but "foo" is an error.
20693   #
20694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20695   # It is also a way to make sure we got the proper file name for the real test later on.
20696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20697   if test "x$test_shortpath" = x; then
20698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20699 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20700     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20701   fi
20702 
20703   # Call helper function which possibly converts this using DOS-style short mode.
20704   # If so, the updated path is stored in $new_path.
20705 
20706   input_path="$new_path"
20707   # Check if we need to convert this using DOS-style short mode. If the path
20708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20709   # take no chances and rewrite it.
20710   # Note: m4 eats our [], so we need to use [ and ] instead.
20711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20712   if test "x$has_forbidden_chars" != x; then
20713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20717       # Going to short mode and back again did indeed matter. Since short mode is
20718       # case insensitive, let's make it lowercase to improve readability.
20719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20720       # Now convert it back to Unix-stile (cygpath)
20721       input_path=`$CYGPATH -u "$shortmode_path"`
20722       new_path="$input_path"
20723     fi
20724   fi
20725 
20726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20727   if test "x$test_cygdrive_prefix" = x; then
20728     # As a simple fix, exclude /usr/bin since it's not a real path.
20729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20731       # a path prefixed by /cygdrive for fixpath to work.
20732       new_path="$CYGWIN_ROOT_PATH$input_path"
20733     fi
20734   fi
20735 
20736 
20737   if test "x$path" != "x$new_path"; then
20738     BOOT_JDK="$new_path"
20739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20740 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20741   fi
20742 
20743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20744 
20745   path="$BOOT_JDK"
20746   has_colon=`$ECHO $path | $GREP ^.:`
20747   new_path="$path"
20748   if test "x$has_colon" = x; then
20749     # Not in mixed or Windows style, start by that.
20750     new_path=`cmd //c echo $path`
20751   fi
20752 
20753 
20754   input_path="$new_path"
20755   # Check if we need to convert this using DOS-style short mode. If the path
20756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20757   # take no chances and rewrite it.
20758   # Note: m4 eats our [], so we need to use [ and ] instead.
20759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20760   if test "x$has_forbidden_chars" != x; then
20761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20763   fi
20764 
20765 
20766   windows_path="$new_path"
20767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20768     unix_path=`$CYGPATH -u "$windows_path"`
20769     new_path="$unix_path"
20770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20772     new_path="$unix_path"
20773   fi
20774 
20775   if test "x$path" != "x$new_path"; then
20776     BOOT_JDK="$new_path"
20777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20778 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20779   fi
20780 
20781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20783 
20784   else
20785     # We're on a posix platform. Hooray! :)
20786     path="$BOOT_JDK"
20787     has_space=`$ECHO "$path" | $GREP " "`
20788     if test "x$has_space" != x; then
20789       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20790 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20791       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20792     fi
20793 
20794     # Use eval to expand a potential ~
20795     eval path="$path"
20796     if test ! -f "$path" && test ! -d "$path"; then
20797       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20798     fi
20799 
20800     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20801   fi
20802 
20803               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20804 $as_echo_n "checking for Boot JDK... " >&6; }
20805               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20806 $as_echo "$BOOT_JDK" >&6; }
20807               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20808 $as_echo_n "checking Boot JDK version... " >&6; }
20809               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20810               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20811 $as_echo "$BOOT_JDK_VERSION" >&6; }
20812             fi # end check jdk version
20813           fi # end check rt.jar
20814         fi # end check javac
20815       fi # end check java
20816     fi # end check boot jdk found
20817   fi
20818 
20819   fi
20820 
20821 
20822     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20823     if test "x$BOOT_JDK_FOUND" = xmaybe; then
20824       # Do we have a bin/java?
20825       if test ! -x "$BOOT_JDK/bin/java"; then
20826         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20827 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20828         BOOT_JDK_FOUND=no
20829       else
20830         # Do we have a bin/javac?
20831         if test ! -x "$BOOT_JDK/bin/javac"; then
20832           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20833 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20834           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20835 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20836           BOOT_JDK_FOUND=no
20837         else
20838           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20839           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20840             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20841 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20842             BOOT_JDK_FOUND=no
20843           else
20844             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20845             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20846 
20847             # Extra M4 quote needed to protect [] in grep expression.
20848             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20849             if test "x$FOUND_CORRECT_VERSION" = x; then
20850               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20851 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20852               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20853 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20854               BOOT_JDK_FOUND=no
20855             else
20856               # We're done! :-)
20857               BOOT_JDK_FOUND=yes
20858 
20859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20860 
20861   # Input might be given as Windows format, start by converting to
20862   # unix format.
20863   path="$BOOT_JDK"
20864   new_path=`$CYGPATH -u "$path"`
20865 
20866   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20867   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20868   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20869   # "foo.exe" is OK but "foo" is an error.
20870   #
20871   # This test is therefore slightly more accurate than "test -f" to check for file precense.
20872   # It is also a way to make sure we got the proper file name for the real test later on.
20873   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20874   if test "x$test_shortpath" = x; then
20875     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20876 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20877     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20878   fi
20879 
20880   # Call helper function which possibly converts this using DOS-style short mode.
20881   # If so, the updated path is stored in $new_path.
20882 
20883   input_path="$new_path"
20884   # Check if we need to convert this using DOS-style short mode. If the path
20885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20886   # take no chances and rewrite it.
20887   # Note: m4 eats our [], so we need to use [ and ] instead.
20888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20889   if test "x$has_forbidden_chars" != x; then
20890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20891     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20892     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20893     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20894       # Going to short mode and back again did indeed matter. Since short mode is
20895       # case insensitive, let's make it lowercase to improve readability.
20896       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20897       # Now convert it back to Unix-stile (cygpath)
20898       input_path=`$CYGPATH -u "$shortmode_path"`
20899       new_path="$input_path"
20900     fi
20901   fi
20902 
20903   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20904   if test "x$test_cygdrive_prefix" = x; then
20905     # As a simple fix, exclude /usr/bin since it's not a real path.
20906     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20907       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20908       # a path prefixed by /cygdrive for fixpath to work.
20909       new_path="$CYGWIN_ROOT_PATH$input_path"
20910     fi
20911   fi
20912 
20913 
20914   if test "x$path" != "x$new_path"; then
20915     BOOT_JDK="$new_path"
20916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20917 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20918   fi
20919 
20920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20921 
20922   path="$BOOT_JDK"
20923   has_colon=`$ECHO $path | $GREP ^.:`
20924   new_path="$path"
20925   if test "x$has_colon" = x; then
20926     # Not in mixed or Windows style, start by that.
20927     new_path=`cmd //c echo $path`
20928   fi
20929 
20930 
20931   input_path="$new_path"
20932   # Check if we need to convert this using DOS-style short mode. If the path
20933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20934   # take no chances and rewrite it.
20935   # Note: m4 eats our [], so we need to use [ and ] instead.
20936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20937   if test "x$has_forbidden_chars" != x; then
20938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20939     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20940   fi
20941 
20942 
20943   windows_path="$new_path"
20944   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20945     unix_path=`$CYGPATH -u "$windows_path"`
20946     new_path="$unix_path"
20947   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20948     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20949     new_path="$unix_path"
20950   fi
20951 
20952   if test "x$path" != "x$new_path"; then
20953     BOOT_JDK="$new_path"
20954     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20955 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20956   fi
20957 
20958   # Save the first 10 bytes of this path to the storage, so fixpath can work.
20959   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20960 
20961   else
20962     # We're on a posix platform. Hooray! :)
20963     path="$BOOT_JDK"
20964     has_space=`$ECHO "$path" | $GREP " "`
20965     if test "x$has_space" != x; then
20966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20967 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20968       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20969     fi
20970 
20971     # Use eval to expand a potential ~
20972     eval path="$path"
20973     if test ! -f "$path" && test ! -d "$path"; then
20974       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20975     fi
20976 
20977     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20978   fi
20979 
20980               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20981 $as_echo_n "checking for Boot JDK... " >&6; }
20982               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20983 $as_echo "$BOOT_JDK" >&6; }
20984               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20985 $as_echo_n "checking Boot JDK version... " >&6; }
20986               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20987               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20988 $as_echo "$BOOT_JDK_VERSION" >&6; }
20989             fi # end check jdk version
20990           fi # end check rt.jar
20991         fi # end check javac
20992       fi # end check java
20993     fi # end check boot jdk found
20994   fi
20995 
20996 
20997   # Test: Is $JAVA_HOME set?
20998 
20999   if test "x$BOOT_JDK_FOUND" = xno; then
21000     # Now execute the test
21001 
21002   if test "x$JAVA_HOME" != x; then
21003     JAVA_HOME_PROCESSED="$JAVA_HOME"
21004 
21005   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21006 
21007   # Input might be given as Windows format, start by converting to
21008   # unix format.
21009   path="$JAVA_HOME_PROCESSED"
21010   new_path=`$CYGPATH -u "$path"`
21011 
21012   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21013   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21014   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21015   # "foo.exe" is OK but "foo" is an error.
21016   #
21017   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21018   # It is also a way to make sure we got the proper file name for the real test later on.
21019   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21020   if test "x$test_shortpath" = x; then
21021     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21022 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21023     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21024   fi
21025 
21026   # Call helper function which possibly converts this using DOS-style short mode.
21027   # If so, the updated path is stored in $new_path.
21028 
21029   input_path="$new_path"
21030   # Check if we need to convert this using DOS-style short mode. If the path
21031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21032   # take no chances and rewrite it.
21033   # Note: m4 eats our [], so we need to use [ and ] instead.
21034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21035   if test "x$has_forbidden_chars" != x; then
21036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21037     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21038     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21039     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21040       # Going to short mode and back again did indeed matter. Since short mode is
21041       # case insensitive, let's make it lowercase to improve readability.
21042       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21043       # Now convert it back to Unix-stile (cygpath)
21044       input_path=`$CYGPATH -u "$shortmode_path"`
21045       new_path="$input_path"
21046     fi
21047   fi
21048 
21049   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21050   if test "x$test_cygdrive_prefix" = x; then
21051     # As a simple fix, exclude /usr/bin since it's not a real path.
21052     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21053       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21054       # a path prefixed by /cygdrive for fixpath to work.
21055       new_path="$CYGWIN_ROOT_PATH$input_path"
21056     fi
21057   fi
21058 
21059 
21060   if test "x$path" != "x$new_path"; then
21061     JAVA_HOME_PROCESSED="$new_path"
21062     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21063 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21064   fi
21065 
21066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21067 
21068   path="$JAVA_HOME_PROCESSED"
21069   has_colon=`$ECHO $path | $GREP ^.:`
21070   new_path="$path"
21071   if test "x$has_colon" = x; then
21072     # Not in mixed or Windows style, start by that.
21073     new_path=`cmd //c echo $path`
21074   fi
21075 
21076 
21077   input_path="$new_path"
21078   # Check if we need to convert this using DOS-style short mode. If the path
21079   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21080   # take no chances and rewrite it.
21081   # Note: m4 eats our [], so we need to use [ and ] instead.
21082   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21083   if test "x$has_forbidden_chars" != x; then
21084     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21085     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21086   fi
21087 
21088 
21089   windows_path="$new_path"
21090   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21091     unix_path=`$CYGPATH -u "$windows_path"`
21092     new_path="$unix_path"
21093   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21094     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21095     new_path="$unix_path"
21096   fi
21097 
21098   if test "x$path" != "x$new_path"; then
21099     JAVA_HOME_PROCESSED="$new_path"
21100     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21101 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21102   fi
21103 
21104   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21105   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21106 
21107   else
21108     # We're on a posix platform. Hooray! :)
21109     path="$JAVA_HOME_PROCESSED"
21110     has_space=`$ECHO "$path" | $GREP " "`
21111     if test "x$has_space" != x; then
21112       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21113 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21114       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21115     fi
21116 
21117     # Use eval to expand a potential ~
21118     eval path="$path"
21119     if test ! -f "$path" && test ! -d "$path"; then
21120       as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21121     fi
21122 
21123     JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21124   fi
21125 
21126     if test ! -d "$JAVA_HOME_PROCESSED"; then
21127       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21128 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21129     else
21130       # Aha, the user has set a JAVA_HOME
21131       # let us use that as the Boot JDK.
21132       BOOT_JDK="$JAVA_HOME_PROCESSED"
21133       BOOT_JDK_FOUND=maybe
21134       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21135 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21136     fi
21137   fi
21138 
21139 
21140     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21141     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21142       # Do we have a bin/java?
21143       if test ! -x "$BOOT_JDK/bin/java"; then
21144         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21145 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21146         BOOT_JDK_FOUND=no
21147       else
21148         # Do we have a bin/javac?
21149         if test ! -x "$BOOT_JDK/bin/javac"; then
21150           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21151 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21152           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21153 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21154           BOOT_JDK_FOUND=no
21155         else
21156           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21157           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21158             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21159 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21160             BOOT_JDK_FOUND=no
21161           else
21162             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21163             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21164 
21165             # Extra M4 quote needed to protect [] in grep expression.
21166             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21167             if test "x$FOUND_CORRECT_VERSION" = x; then
21168               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21169 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21170               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21171 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21172               BOOT_JDK_FOUND=no
21173             else
21174               # We're done! :-)
21175               BOOT_JDK_FOUND=yes
21176 
21177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21178 
21179   # Input might be given as Windows format, start by converting to
21180   # unix format.
21181   path="$BOOT_JDK"
21182   new_path=`$CYGPATH -u "$path"`
21183 
21184   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21185   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21186   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21187   # "foo.exe" is OK but "foo" is an error.
21188   #
21189   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21190   # It is also a way to make sure we got the proper file name for the real test later on.
21191   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21192   if test "x$test_shortpath" = x; then
21193     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21194 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21195     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21196   fi
21197 
21198   # Call helper function which possibly converts this using DOS-style short mode.
21199   # If so, the updated path is stored in $new_path.
21200 
21201   input_path="$new_path"
21202   # Check if we need to convert this using DOS-style short mode. If the path
21203   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21204   # take no chances and rewrite it.
21205   # Note: m4 eats our [], so we need to use [ and ] instead.
21206   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21207   if test "x$has_forbidden_chars" != x; then
21208     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21209     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21210     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21211     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21212       # Going to short mode and back again did indeed matter. Since short mode is
21213       # case insensitive, let's make it lowercase to improve readability.
21214       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21215       # Now convert it back to Unix-stile (cygpath)
21216       input_path=`$CYGPATH -u "$shortmode_path"`
21217       new_path="$input_path"
21218     fi
21219   fi
21220 
21221   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21222   if test "x$test_cygdrive_prefix" = x; then
21223     # As a simple fix, exclude /usr/bin since it's not a real path.
21224     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21225       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21226       # a path prefixed by /cygdrive for fixpath to work.
21227       new_path="$CYGWIN_ROOT_PATH$input_path"
21228     fi
21229   fi
21230 
21231 
21232   if test "x$path" != "x$new_path"; then
21233     BOOT_JDK="$new_path"
21234     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21235 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21236   fi
21237 
21238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21239 
21240   path="$BOOT_JDK"
21241   has_colon=`$ECHO $path | $GREP ^.:`
21242   new_path="$path"
21243   if test "x$has_colon" = x; then
21244     # Not in mixed or Windows style, start by that.
21245     new_path=`cmd //c echo $path`
21246   fi
21247 
21248 
21249   input_path="$new_path"
21250   # Check if we need to convert this using DOS-style short mode. If the path
21251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21252   # take no chances and rewrite it.
21253   # Note: m4 eats our [], so we need to use [ and ] instead.
21254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21255   if test "x$has_forbidden_chars" != x; then
21256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21257     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21258   fi
21259 
21260 
21261   windows_path="$new_path"
21262   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21263     unix_path=`$CYGPATH -u "$windows_path"`
21264     new_path="$unix_path"
21265   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21266     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21267     new_path="$unix_path"
21268   fi
21269 
21270   if test "x$path" != "x$new_path"; then
21271     BOOT_JDK="$new_path"
21272     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21273 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21274   fi
21275 
21276   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21277   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21278 
21279   else
21280     # We're on a posix platform. Hooray! :)
21281     path="$BOOT_JDK"
21282     has_space=`$ECHO "$path" | $GREP " "`
21283     if test "x$has_space" != x; then
21284       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21285 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21286       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21287     fi
21288 
21289     # Use eval to expand a potential ~
21290     eval path="$path"
21291     if test ! -f "$path" && test ! -d "$path"; then
21292       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21293     fi
21294 
21295     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21296   fi
21297 
21298               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21299 $as_echo_n "checking for Boot JDK... " >&6; }
21300               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21301 $as_echo "$BOOT_JDK" >&6; }
21302               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21303 $as_echo_n "checking Boot JDK version... " >&6; }
21304               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21305               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21306 $as_echo "$BOOT_JDK_VERSION" >&6; }
21307             fi # end check jdk version
21308           fi # end check rt.jar
21309         fi # end check javac
21310       fi # end check java
21311     fi # end check boot jdk found
21312   fi
21313 
21314 
21315   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21316 
21317   if test "x$BOOT_JDK_FOUND" = xno; then
21318     # Now execute the test
21319 
21320   # Extract the first word of "javac", so it can be a program name with args.
21321 set dummy javac; ac_word=$2
21322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21323 $as_echo_n "checking for $ac_word... " >&6; }
21324 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21325   $as_echo_n "(cached) " >&6
21326 else
21327   case $JAVAC_CHECK in
21328   [\\/]* | ?:[\\/]*)
21329   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21330   ;;
21331   *)
21332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21333 for as_dir in $PATH
21334 do
21335   IFS=$as_save_IFS
21336   test -z "$as_dir" && as_dir=.
21337     for ac_exec_ext in '' $ac_executable_extensions; do
21338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21339     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21341     break 2
21342   fi
21343 done
21344   done
21345 IFS=$as_save_IFS
21346 
21347   ;;
21348 esac
21349 fi
21350 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21351 if test -n "$JAVAC_CHECK"; then
21352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21353 $as_echo "$JAVAC_CHECK" >&6; }
21354 else
21355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21356 $as_echo "no" >&6; }
21357 fi
21358 
21359 
21360   # Extract the first word of "java", so it can be a program name with args.
21361 set dummy java; ac_word=$2
21362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21363 $as_echo_n "checking for $ac_word... " >&6; }
21364 if ${ac_cv_path_JAVA_CHECK+:} false; then :
21365   $as_echo_n "(cached) " >&6
21366 else
21367   case $JAVA_CHECK in
21368   [\\/]* | ?:[\\/]*)
21369   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21370   ;;
21371   *)
21372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21373 for as_dir in $PATH
21374 do
21375   IFS=$as_save_IFS
21376   test -z "$as_dir" && as_dir=.
21377     for ac_exec_ext in '' $ac_executable_extensions; do
21378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21379     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21381     break 2
21382   fi
21383 done
21384   done
21385 IFS=$as_save_IFS
21386 
21387   ;;
21388 esac
21389 fi
21390 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21391 if test -n "$JAVA_CHECK"; then
21392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21393 $as_echo "$JAVA_CHECK" >&6; }
21394 else
21395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21396 $as_echo "no" >&6; }
21397 fi
21398 
21399 
21400   BINARY="$JAVAC_CHECK"
21401   if test "x$JAVAC_CHECK" = x; then
21402     BINARY="$JAVA_CHECK"
21403   fi
21404   if test "x$BINARY" != x; then
21405     # So there is a java(c) binary, it might be part of a JDK.
21406     # Lets find the JDK/JRE directory by following symbolic links.
21407     # Linux/GNU systems often have links from /usr/bin/java to
21408     # /etc/alternatives/java to the real JDK binary.
21409 
21410   if test "x$OPENJDK_BUILD_OS" != xwindows; then
21411     # Follow a chain of symbolic links. Use readlink
21412     # where it exists, else fall back to horribly
21413     # complicated shell code.
21414     if test "x$READLINK_TESTED" != yes; then
21415       # On MacOSX there is a readlink tool with a different
21416       # purpose than the GNU readlink tool. Check the found readlink.
21417       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21418       if test "x$ISGNU" = x; then
21419         # A readlink that we do not know how to use.
21420         # Are there other non-GNU readlinks out there?
21421         READLINK_TESTED=yes
21422         READLINK=
21423       fi
21424     fi
21425 
21426     if test "x$READLINK" != x; then
21427       BINARY=`$READLINK -f $BINARY`
21428     else
21429       # Save the current directory for restoring afterwards
21430       STARTDIR=$PWD
21431       COUNTER=0
21432       sym_link_dir=`$DIRNAME $BINARY`
21433       sym_link_file=`$BASENAME $BINARY`
21434       cd $sym_link_dir
21435       # Use -P flag to resolve symlinks in directories.
21436       cd `$THEPWDCMD -P`
21437       sym_link_dir=`$THEPWDCMD -P`
21438       # Resolve file symlinks
21439       while test $COUNTER -lt 20; do
21440         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21441         if test "x$ISLINK" == x; then
21442           # This is not a symbolic link! We are done!
21443           break
21444         fi
21445         # Again resolve directory symlinks since the target of the just found
21446         # link could be in a different directory
21447         cd `$DIRNAME $ISLINK`
21448         sym_link_dir=`$THEPWDCMD -P`
21449         sym_link_file=`$BASENAME $ISLINK`
21450         let COUNTER=COUNTER+1
21451       done
21452       cd $STARTDIR
21453       BINARY=$sym_link_dir/$sym_link_file
21454     fi
21455   fi
21456 
21457     BOOT_JDK=`dirname "$BINARY"`
21458     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21459     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21460       # Looks like we found ourselves an JDK
21461       BOOT_JDK_FOUND=maybe
21462       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21463 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21464     fi
21465   fi
21466 
21467 
21468     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21469     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21470       # Do we have a bin/java?
21471       if test ! -x "$BOOT_JDK/bin/java"; then
21472         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21473 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21474         BOOT_JDK_FOUND=no
21475       else
21476         # Do we have a bin/javac?
21477         if test ! -x "$BOOT_JDK/bin/javac"; then
21478           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21479 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21480           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21481 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21482           BOOT_JDK_FOUND=no
21483         else
21484           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21485           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21486             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21487 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21488             BOOT_JDK_FOUND=no
21489           else
21490             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21491             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21492 
21493             # Extra M4 quote needed to protect [] in grep expression.
21494             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21495             if test "x$FOUND_CORRECT_VERSION" = x; then
21496               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21497 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21498               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21499 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21500               BOOT_JDK_FOUND=no
21501             else
21502               # We're done! :-)
21503               BOOT_JDK_FOUND=yes
21504 
21505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21506 
21507   # Input might be given as Windows format, start by converting to
21508   # unix format.
21509   path="$BOOT_JDK"
21510   new_path=`$CYGPATH -u "$path"`
21511 
21512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21515   # "foo.exe" is OK but "foo" is an error.
21516   #
21517   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21518   # It is also a way to make sure we got the proper file name for the real test later on.
21519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21520   if test "x$test_shortpath" = x; then
21521     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21522 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21523     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21524   fi
21525 
21526   # Call helper function which possibly converts this using DOS-style short mode.
21527   # If so, the updated path is stored in $new_path.
21528 
21529   input_path="$new_path"
21530   # Check if we need to convert this using DOS-style short mode. If the path
21531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21532   # take no chances and rewrite it.
21533   # Note: m4 eats our [], so we need to use [ and ] instead.
21534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21535   if test "x$has_forbidden_chars" != x; then
21536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21537     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21538     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21539     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21540       # Going to short mode and back again did indeed matter. Since short mode is
21541       # case insensitive, let's make it lowercase to improve readability.
21542       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21543       # Now convert it back to Unix-stile (cygpath)
21544       input_path=`$CYGPATH -u "$shortmode_path"`
21545       new_path="$input_path"
21546     fi
21547   fi
21548 
21549   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21550   if test "x$test_cygdrive_prefix" = x; then
21551     # As a simple fix, exclude /usr/bin since it's not a real path.
21552     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21553       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21554       # a path prefixed by /cygdrive for fixpath to work.
21555       new_path="$CYGWIN_ROOT_PATH$input_path"
21556     fi
21557   fi
21558 
21559 
21560   if test "x$path" != "x$new_path"; then
21561     BOOT_JDK="$new_path"
21562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21563 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21564   fi
21565 
21566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21567 
21568   path="$BOOT_JDK"
21569   has_colon=`$ECHO $path | $GREP ^.:`
21570   new_path="$path"
21571   if test "x$has_colon" = x; then
21572     # Not in mixed or Windows style, start by that.
21573     new_path=`cmd //c echo $path`
21574   fi
21575 
21576 
21577   input_path="$new_path"
21578   # Check if we need to convert this using DOS-style short mode. If the path
21579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21580   # take no chances and rewrite it.
21581   # Note: m4 eats our [], so we need to use [ and ] instead.
21582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21583   if test "x$has_forbidden_chars" != x; then
21584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21585     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21586   fi
21587 
21588 
21589   windows_path="$new_path"
21590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21591     unix_path=`$CYGPATH -u "$windows_path"`
21592     new_path="$unix_path"
21593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21595     new_path="$unix_path"
21596   fi
21597 
21598   if test "x$path" != "x$new_path"; then
21599     BOOT_JDK="$new_path"
21600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21601 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21602   fi
21603 
21604   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21605   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21606 
21607   else
21608     # We're on a posix platform. Hooray! :)
21609     path="$BOOT_JDK"
21610     has_space=`$ECHO "$path" | $GREP " "`
21611     if test "x$has_space" != x; then
21612       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21613 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21614       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21615     fi
21616 
21617     # Use eval to expand a potential ~
21618     eval path="$path"
21619     if test ! -f "$path" && test ! -d "$path"; then
21620       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21621     fi
21622 
21623     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21624   fi
21625 
21626               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21627 $as_echo_n "checking for Boot JDK... " >&6; }
21628               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21629 $as_echo "$BOOT_JDK" >&6; }
21630               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21631 $as_echo_n "checking Boot JDK version... " >&6; }
21632               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21633               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21634 $as_echo "$BOOT_JDK_VERSION" >&6; }
21635             fi # end check jdk version
21636           fi # end check rt.jar
21637         fi # end check javac
21638       fi # end check java
21639     fi # end check boot jdk found
21640   fi
21641 
21642 
21643   # Test: Is there a JDK installed in default, well-known locations?
21644 
21645   if test "x$BOOT_JDK_FOUND" = xno; then
21646     # Now execute the test
21647 
21648   if test "x$OPENJDK_TARGET_OS" = xwindows; then
21649 
21650   if test "x$BOOT_JDK_FOUND" = xno; then
21651     # Now execute the test
21652 
21653   if test "x$ProgramW6432" != x; then
21654     VIRTUAL_DIR="$ProgramW6432/Java"
21655 
21656   windows_path="$VIRTUAL_DIR"
21657   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21658     unix_path=`$CYGPATH -u "$windows_path"`
21659     VIRTUAL_DIR="$unix_path"
21660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21661     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21662     VIRTUAL_DIR="$unix_path"
21663   fi
21664 
21665 
21666   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21667   BOOT_JDK_SUFFIX=""
21668   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21669   if test "x$ALL_JDKS_FOUND" != x; then
21670     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21671 
21672   if test "x$BOOT_JDK_FOUND" = xno; then
21673     # Now execute the test
21674 
21675         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21676         if test -d "$BOOT_JDK"; then
21677           BOOT_JDK_FOUND=maybe
21678           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21679 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21680         fi
21681 
21682 
21683     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21684     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21685       # Do we have a bin/java?
21686       if test ! -x "$BOOT_JDK/bin/java"; then
21687         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21688 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21689         BOOT_JDK_FOUND=no
21690       else
21691         # Do we have a bin/javac?
21692         if test ! -x "$BOOT_JDK/bin/javac"; then
21693           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21694 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21695           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21696 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21697           BOOT_JDK_FOUND=no
21698         else
21699           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21700           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21701             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21702 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21703             BOOT_JDK_FOUND=no
21704           else
21705             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21706             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21707 
21708             # Extra M4 quote needed to protect [] in grep expression.
21709             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21710             if test "x$FOUND_CORRECT_VERSION" = x; then
21711               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21712 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21713               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21714 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21715               BOOT_JDK_FOUND=no
21716             else
21717               # We're done! :-)
21718               BOOT_JDK_FOUND=yes
21719 
21720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21721 
21722   # Input might be given as Windows format, start by converting to
21723   # unix format.
21724   path="$BOOT_JDK"
21725   new_path=`$CYGPATH -u "$path"`
21726 
21727   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21728   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21729   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21730   # "foo.exe" is OK but "foo" is an error.
21731   #
21732   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21733   # It is also a way to make sure we got the proper file name for the real test later on.
21734   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21735   if test "x$test_shortpath" = x; then
21736     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21737 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21738     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21739   fi
21740 
21741   # Call helper function which possibly converts this using DOS-style short mode.
21742   # If so, the updated path is stored in $new_path.
21743 
21744   input_path="$new_path"
21745   # Check if we need to convert this using DOS-style short mode. If the path
21746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21747   # take no chances and rewrite it.
21748   # Note: m4 eats our [], so we need to use [ and ] instead.
21749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21750   if test "x$has_forbidden_chars" != x; then
21751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21752     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21753     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21754     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21755       # Going to short mode and back again did indeed matter. Since short mode is
21756       # case insensitive, let's make it lowercase to improve readability.
21757       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21758       # Now convert it back to Unix-stile (cygpath)
21759       input_path=`$CYGPATH -u "$shortmode_path"`
21760       new_path="$input_path"
21761     fi
21762   fi
21763 
21764   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21765   if test "x$test_cygdrive_prefix" = x; then
21766     # As a simple fix, exclude /usr/bin since it's not a real path.
21767     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21768       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21769       # a path prefixed by /cygdrive for fixpath to work.
21770       new_path="$CYGWIN_ROOT_PATH$input_path"
21771     fi
21772   fi
21773 
21774 
21775   if test "x$path" != "x$new_path"; then
21776     BOOT_JDK="$new_path"
21777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21778 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21779   fi
21780 
21781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21782 
21783   path="$BOOT_JDK"
21784   has_colon=`$ECHO $path | $GREP ^.:`
21785   new_path="$path"
21786   if test "x$has_colon" = x; then
21787     # Not in mixed or Windows style, start by that.
21788     new_path=`cmd //c echo $path`
21789   fi
21790 
21791 
21792   input_path="$new_path"
21793   # Check if we need to convert this using DOS-style short mode. If the path
21794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21795   # take no chances and rewrite it.
21796   # Note: m4 eats our [], so we need to use [ and ] instead.
21797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21798   if test "x$has_forbidden_chars" != x; then
21799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21800     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21801   fi
21802 
21803 
21804   windows_path="$new_path"
21805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21806     unix_path=`$CYGPATH -u "$windows_path"`
21807     new_path="$unix_path"
21808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21810     new_path="$unix_path"
21811   fi
21812 
21813   if test "x$path" != "x$new_path"; then
21814     BOOT_JDK="$new_path"
21815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21816 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21817   fi
21818 
21819   # Save the first 10 bytes of this path to the storage, so fixpath can work.
21820   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21821 
21822   else
21823     # We're on a posix platform. Hooray! :)
21824     path="$BOOT_JDK"
21825     has_space=`$ECHO "$path" | $GREP " "`
21826     if test "x$has_space" != x; then
21827       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21828 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21829       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21830     fi
21831 
21832     # Use eval to expand a potential ~
21833     eval path="$path"
21834     if test ! -f "$path" && test ! -d "$path"; then
21835       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21836     fi
21837 
21838     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21839   fi
21840 
21841               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21842 $as_echo_n "checking for Boot JDK... " >&6; }
21843               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21844 $as_echo "$BOOT_JDK" >&6; }
21845               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21846 $as_echo_n "checking Boot JDK version... " >&6; }
21847               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21848               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21849 $as_echo "$BOOT_JDK_VERSION" >&6; }
21850             fi # end check jdk version
21851           fi # end check rt.jar
21852         fi # end check javac
21853       fi # end check java
21854     fi # end check boot jdk found
21855   fi
21856 
21857     done
21858   fi
21859 
21860   fi
21861 
21862 
21863     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21864     if test "x$BOOT_JDK_FOUND" = xmaybe; then
21865       # Do we have a bin/java?
21866       if test ! -x "$BOOT_JDK/bin/java"; then
21867         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21868 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21869         BOOT_JDK_FOUND=no
21870       else
21871         # Do we have a bin/javac?
21872         if test ! -x "$BOOT_JDK/bin/javac"; then
21873           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21874 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21875           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21876 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21877           BOOT_JDK_FOUND=no
21878         else
21879           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21880           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21881             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21883             BOOT_JDK_FOUND=no
21884           else
21885             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21886             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21887 
21888             # Extra M4 quote needed to protect [] in grep expression.
21889             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21890             if test "x$FOUND_CORRECT_VERSION" = x; then
21891               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21892 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21893               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21894 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21895               BOOT_JDK_FOUND=no
21896             else
21897               # We're done! :-)
21898               BOOT_JDK_FOUND=yes
21899 
21900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21901 
21902   # Input might be given as Windows format, start by converting to
21903   # unix format.
21904   path="$BOOT_JDK"
21905   new_path=`$CYGPATH -u "$path"`
21906 
21907   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21908   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21909   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21910   # "foo.exe" is OK but "foo" is an error.
21911   #
21912   # This test is therefore slightly more accurate than "test -f" to check for file precense.
21913   # It is also a way to make sure we got the proper file name for the real test later on.
21914   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21915   if test "x$test_shortpath" = x; then
21916     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21917 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21918     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21919   fi
21920 
21921   # Call helper function which possibly converts this using DOS-style short mode.
21922   # If so, the updated path is stored in $new_path.
21923 
21924   input_path="$new_path"
21925   # Check if we need to convert this using DOS-style short mode. If the path
21926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21927   # take no chances and rewrite it.
21928   # Note: m4 eats our [], so we need to use [ and ] instead.
21929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21930   if test "x$has_forbidden_chars" != x; then
21931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21935       # Going to short mode and back again did indeed matter. Since short mode is
21936       # case insensitive, let's make it lowercase to improve readability.
21937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21938       # Now convert it back to Unix-stile (cygpath)
21939       input_path=`$CYGPATH -u "$shortmode_path"`
21940       new_path="$input_path"
21941     fi
21942   fi
21943 
21944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21945   if test "x$test_cygdrive_prefix" = x; then
21946     # As a simple fix, exclude /usr/bin since it's not a real path.
21947     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21949       # a path prefixed by /cygdrive for fixpath to work.
21950       new_path="$CYGWIN_ROOT_PATH$input_path"
21951     fi
21952   fi
21953 
21954 
21955   if test "x$path" != "x$new_path"; then
21956     BOOT_JDK="$new_path"
21957     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21958 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21959   fi
21960 
21961   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21962 
21963   path="$BOOT_JDK"
21964   has_colon=`$ECHO $path | $GREP ^.:`
21965   new_path="$path"
21966   if test "x$has_colon" = x; then
21967     # Not in mixed or Windows style, start by that.
21968     new_path=`cmd //c echo $path`
21969   fi
21970 
21971 
21972   input_path="$new_path"
21973   # Check if we need to convert this using DOS-style short mode. If the path
21974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21975   # take no chances and rewrite it.
21976   # Note: m4 eats our [], so we need to use [ and ] instead.
21977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21978   if test "x$has_forbidden_chars" != x; then
21979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21980     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21981   fi
21982 
21983 
21984   windows_path="$new_path"
21985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21986     unix_path=`$CYGPATH -u "$windows_path"`
21987     new_path="$unix_path"
21988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21990     new_path="$unix_path"
21991   fi
21992 
21993   if test "x$path" != "x$new_path"; then
21994     BOOT_JDK="$new_path"
21995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21996 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21997   fi
21998 
21999   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22000   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22001 
22002   else
22003     # We're on a posix platform. Hooray! :)
22004     path="$BOOT_JDK"
22005     has_space=`$ECHO "$path" | $GREP " "`
22006     if test "x$has_space" != x; then
22007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22008 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22009       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22010     fi
22011 
22012     # Use eval to expand a potential ~
22013     eval path="$path"
22014     if test ! -f "$path" && test ! -d "$path"; then
22015       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22016     fi
22017 
22018     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22019   fi
22020 
22021               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22022 $as_echo_n "checking for Boot JDK... " >&6; }
22023               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22024 $as_echo "$BOOT_JDK" >&6; }
22025               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22026 $as_echo_n "checking Boot JDK version... " >&6; }
22027               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22028               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22029 $as_echo "$BOOT_JDK_VERSION" >&6; }
22030             fi # end check jdk version
22031           fi # end check rt.jar
22032         fi # end check javac
22033       fi # end check java
22034     fi # end check boot jdk found
22035   fi
22036 
22037 
22038   if test "x$BOOT_JDK_FOUND" = xno; then
22039     # Now execute the test
22040 
22041   if test "x$PROGRAMW6432" != x; then
22042     VIRTUAL_DIR="$PROGRAMW6432/Java"
22043 
22044   windows_path="$VIRTUAL_DIR"
22045   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22046     unix_path=`$CYGPATH -u "$windows_path"`
22047     VIRTUAL_DIR="$unix_path"
22048   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22049     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22050     VIRTUAL_DIR="$unix_path"
22051   fi
22052 
22053 
22054   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22055   BOOT_JDK_SUFFIX=""
22056   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22057   if test "x$ALL_JDKS_FOUND" != x; then
22058     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22059 
22060   if test "x$BOOT_JDK_FOUND" = xno; then
22061     # Now execute the test
22062 
22063         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22064         if test -d "$BOOT_JDK"; then
22065           BOOT_JDK_FOUND=maybe
22066           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22067 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22068         fi
22069 
22070 
22071     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22072     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22073       # Do we have a bin/java?
22074       if test ! -x "$BOOT_JDK/bin/java"; then
22075         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22076 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22077         BOOT_JDK_FOUND=no
22078       else
22079         # Do we have a bin/javac?
22080         if test ! -x "$BOOT_JDK/bin/javac"; then
22081           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22082 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22083           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22084 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22085           BOOT_JDK_FOUND=no
22086         else
22087           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22088           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22089             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22090 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22091             BOOT_JDK_FOUND=no
22092           else
22093             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22094             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22095 
22096             # Extra M4 quote needed to protect [] in grep expression.
22097             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22098             if test "x$FOUND_CORRECT_VERSION" = x; then
22099               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22100 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22101               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22102 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22103               BOOT_JDK_FOUND=no
22104             else
22105               # We're done! :-)
22106               BOOT_JDK_FOUND=yes
22107 
22108   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22109 
22110   # Input might be given as Windows format, start by converting to
22111   # unix format.
22112   path="$BOOT_JDK"
22113   new_path=`$CYGPATH -u "$path"`
22114 
22115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22118   # "foo.exe" is OK but "foo" is an error.
22119   #
22120   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22121   # It is also a way to make sure we got the proper file name for the real test later on.
22122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22123   if test "x$test_shortpath" = x; then
22124     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22125 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22126     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22127   fi
22128 
22129   # Call helper function which possibly converts this using DOS-style short mode.
22130   # If so, the updated path is stored in $new_path.
22131 
22132   input_path="$new_path"
22133   # Check if we need to convert this using DOS-style short mode. If the path
22134   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22135   # take no chances and rewrite it.
22136   # Note: m4 eats our [], so we need to use [ and ] instead.
22137   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22138   if test "x$has_forbidden_chars" != x; then
22139     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22140     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22141     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22142     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22143       # Going to short mode and back again did indeed matter. Since short mode is
22144       # case insensitive, let's make it lowercase to improve readability.
22145       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22146       # Now convert it back to Unix-stile (cygpath)
22147       input_path=`$CYGPATH -u "$shortmode_path"`
22148       new_path="$input_path"
22149     fi
22150   fi
22151 
22152   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22153   if test "x$test_cygdrive_prefix" = x; then
22154     # As a simple fix, exclude /usr/bin since it's not a real path.
22155     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22156       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22157       # a path prefixed by /cygdrive for fixpath to work.
22158       new_path="$CYGWIN_ROOT_PATH$input_path"
22159     fi
22160   fi
22161 
22162 
22163   if test "x$path" != "x$new_path"; then
22164     BOOT_JDK="$new_path"
22165     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22166 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22167   fi
22168 
22169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22170 
22171   path="$BOOT_JDK"
22172   has_colon=`$ECHO $path | $GREP ^.:`
22173   new_path="$path"
22174   if test "x$has_colon" = x; then
22175     # Not in mixed or Windows style, start by that.
22176     new_path=`cmd //c echo $path`
22177   fi
22178 
22179 
22180   input_path="$new_path"
22181   # Check if we need to convert this using DOS-style short mode. If the path
22182   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22183   # take no chances and rewrite it.
22184   # Note: m4 eats our [], so we need to use [ and ] instead.
22185   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22186   if test "x$has_forbidden_chars" != x; then
22187     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22188     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22189   fi
22190 
22191 
22192   windows_path="$new_path"
22193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22194     unix_path=`$CYGPATH -u "$windows_path"`
22195     new_path="$unix_path"
22196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22198     new_path="$unix_path"
22199   fi
22200 
22201   if test "x$path" != "x$new_path"; then
22202     BOOT_JDK="$new_path"
22203     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22204 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22205   fi
22206 
22207   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22208   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22209 
22210   else
22211     # We're on a posix platform. Hooray! :)
22212     path="$BOOT_JDK"
22213     has_space=`$ECHO "$path" | $GREP " "`
22214     if test "x$has_space" != x; then
22215       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22216 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22217       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22218     fi
22219 
22220     # Use eval to expand a potential ~
22221     eval path="$path"
22222     if test ! -f "$path" && test ! -d "$path"; then
22223       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22224     fi
22225 
22226     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22227   fi
22228 
22229               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22230 $as_echo_n "checking for Boot JDK... " >&6; }
22231               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22232 $as_echo "$BOOT_JDK" >&6; }
22233               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22234 $as_echo_n "checking Boot JDK version... " >&6; }
22235               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22236               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22237 $as_echo "$BOOT_JDK_VERSION" >&6; }
22238             fi # end check jdk version
22239           fi # end check rt.jar
22240         fi # end check javac
22241       fi # end check java
22242     fi # end check boot jdk found
22243   fi
22244 
22245     done
22246   fi
22247 
22248   fi
22249 
22250 
22251     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22252     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22253       # Do we have a bin/java?
22254       if test ! -x "$BOOT_JDK/bin/java"; then
22255         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22256 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22257         BOOT_JDK_FOUND=no
22258       else
22259         # Do we have a bin/javac?
22260         if test ! -x "$BOOT_JDK/bin/javac"; then
22261           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22262 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22263           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22264 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22265           BOOT_JDK_FOUND=no
22266         else
22267           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22268           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22269             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22271             BOOT_JDK_FOUND=no
22272           else
22273             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22274             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22275 
22276             # Extra M4 quote needed to protect [] in grep expression.
22277             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22278             if test "x$FOUND_CORRECT_VERSION" = x; then
22279               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22280 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22281               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22282 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22283               BOOT_JDK_FOUND=no
22284             else
22285               # We're done! :-)
22286               BOOT_JDK_FOUND=yes
22287 
22288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22289 
22290   # Input might be given as Windows format, start by converting to
22291   # unix format.
22292   path="$BOOT_JDK"
22293   new_path=`$CYGPATH -u "$path"`
22294 
22295   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22296   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22297   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22298   # "foo.exe" is OK but "foo" is an error.
22299   #
22300   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22301   # It is also a way to make sure we got the proper file name for the real test later on.
22302   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22303   if test "x$test_shortpath" = x; then
22304     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22305 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22306     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22307   fi
22308 
22309   # Call helper function which possibly converts this using DOS-style short mode.
22310   # If so, the updated path is stored in $new_path.
22311 
22312   input_path="$new_path"
22313   # Check if we need to convert this using DOS-style short mode. If the path
22314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22315   # take no chances and rewrite it.
22316   # Note: m4 eats our [], so we need to use [ and ] instead.
22317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22318   if test "x$has_forbidden_chars" != x; then
22319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22320     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22321     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22322     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22323       # Going to short mode and back again did indeed matter. Since short mode is
22324       # case insensitive, let's make it lowercase to improve readability.
22325       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22326       # Now convert it back to Unix-stile (cygpath)
22327       input_path=`$CYGPATH -u "$shortmode_path"`
22328       new_path="$input_path"
22329     fi
22330   fi
22331 
22332   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22333   if test "x$test_cygdrive_prefix" = x; then
22334     # As a simple fix, exclude /usr/bin since it's not a real path.
22335     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22336       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22337       # a path prefixed by /cygdrive for fixpath to work.
22338       new_path="$CYGWIN_ROOT_PATH$input_path"
22339     fi
22340   fi
22341 
22342 
22343   if test "x$path" != "x$new_path"; then
22344     BOOT_JDK="$new_path"
22345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22347   fi
22348 
22349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350 
22351   path="$BOOT_JDK"
22352   has_colon=`$ECHO $path | $GREP ^.:`
22353   new_path="$path"
22354   if test "x$has_colon" = x; then
22355     # Not in mixed or Windows style, start by that.
22356     new_path=`cmd //c echo $path`
22357   fi
22358 
22359 
22360   input_path="$new_path"
22361   # Check if we need to convert this using DOS-style short mode. If the path
22362   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22363   # take no chances and rewrite it.
22364   # Note: m4 eats our [], so we need to use [ and ] instead.
22365   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22366   if test "x$has_forbidden_chars" != x; then
22367     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22368     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22369   fi
22370 
22371 
22372   windows_path="$new_path"
22373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22374     unix_path=`$CYGPATH -u "$windows_path"`
22375     new_path="$unix_path"
22376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22378     new_path="$unix_path"
22379   fi
22380 
22381   if test "x$path" != "x$new_path"; then
22382     BOOT_JDK="$new_path"
22383     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22384 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22385   fi
22386 
22387   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22388   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22389 
22390   else
22391     # We're on a posix platform. Hooray! :)
22392     path="$BOOT_JDK"
22393     has_space=`$ECHO "$path" | $GREP " "`
22394     if test "x$has_space" != x; then
22395       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22396 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22397       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22398     fi
22399 
22400     # Use eval to expand a potential ~
22401     eval path="$path"
22402     if test ! -f "$path" && test ! -d "$path"; then
22403       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22404     fi
22405 
22406     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22407   fi
22408 
22409               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22410 $as_echo_n "checking for Boot JDK... " >&6; }
22411               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22412 $as_echo "$BOOT_JDK" >&6; }
22413               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22414 $as_echo_n "checking Boot JDK version... " >&6; }
22415               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22416               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22417 $as_echo "$BOOT_JDK_VERSION" >&6; }
22418             fi # end check jdk version
22419           fi # end check rt.jar
22420         fi # end check javac
22421       fi # end check java
22422     fi # end check boot jdk found
22423   fi
22424 
22425 
22426   if test "x$BOOT_JDK_FOUND" = xno; then
22427     # Now execute the test
22428 
22429   if test "x$PROGRAMFILES" != x; then
22430     VIRTUAL_DIR="$PROGRAMFILES/Java"
22431 
22432   windows_path="$VIRTUAL_DIR"
22433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22434     unix_path=`$CYGPATH -u "$windows_path"`
22435     VIRTUAL_DIR="$unix_path"
22436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22438     VIRTUAL_DIR="$unix_path"
22439   fi
22440 
22441 
22442   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22443   BOOT_JDK_SUFFIX=""
22444   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22445   if test "x$ALL_JDKS_FOUND" != x; then
22446     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22447 
22448   if test "x$BOOT_JDK_FOUND" = xno; then
22449     # Now execute the test
22450 
22451         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22452         if test -d "$BOOT_JDK"; then
22453           BOOT_JDK_FOUND=maybe
22454           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22455 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22456         fi
22457 
22458 
22459     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22460     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22461       # Do we have a bin/java?
22462       if test ! -x "$BOOT_JDK/bin/java"; then
22463         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22464 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22465         BOOT_JDK_FOUND=no
22466       else
22467         # Do we have a bin/javac?
22468         if test ! -x "$BOOT_JDK/bin/javac"; then
22469           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22470 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22471           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22472 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22473           BOOT_JDK_FOUND=no
22474         else
22475           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22476           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22477             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22478 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22479             BOOT_JDK_FOUND=no
22480           else
22481             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22482             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22483 
22484             # Extra M4 quote needed to protect [] in grep expression.
22485             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22486             if test "x$FOUND_CORRECT_VERSION" = x; then
22487               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22489               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22490 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22491               BOOT_JDK_FOUND=no
22492             else
22493               # We're done! :-)
22494               BOOT_JDK_FOUND=yes
22495 
22496   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22497 
22498   # Input might be given as Windows format, start by converting to
22499   # unix format.
22500   path="$BOOT_JDK"
22501   new_path=`$CYGPATH -u "$path"`
22502 
22503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22506   # "foo.exe" is OK but "foo" is an error.
22507   #
22508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22509   # It is also a way to make sure we got the proper file name for the real test later on.
22510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22511   if test "x$test_shortpath" = x; then
22512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22513 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22514     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22515   fi
22516 
22517   # Call helper function which possibly converts this using DOS-style short mode.
22518   # If so, the updated path is stored in $new_path.
22519 
22520   input_path="$new_path"
22521   # Check if we need to convert this using DOS-style short mode. If the path
22522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22523   # take no chances and rewrite it.
22524   # Note: m4 eats our [], so we need to use [ and ] instead.
22525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22526   if test "x$has_forbidden_chars" != x; then
22527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22531       # Going to short mode and back again did indeed matter. Since short mode is
22532       # case insensitive, let's make it lowercase to improve readability.
22533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22534       # Now convert it back to Unix-stile (cygpath)
22535       input_path=`$CYGPATH -u "$shortmode_path"`
22536       new_path="$input_path"
22537     fi
22538   fi
22539 
22540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22541   if test "x$test_cygdrive_prefix" = x; then
22542     # As a simple fix, exclude /usr/bin since it's not a real path.
22543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22545       # a path prefixed by /cygdrive for fixpath to work.
22546       new_path="$CYGWIN_ROOT_PATH$input_path"
22547     fi
22548   fi
22549 
22550 
22551   if test "x$path" != "x$new_path"; then
22552     BOOT_JDK="$new_path"
22553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22554 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22555   fi
22556 
22557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22558 
22559   path="$BOOT_JDK"
22560   has_colon=`$ECHO $path | $GREP ^.:`
22561   new_path="$path"
22562   if test "x$has_colon" = x; then
22563     # Not in mixed or Windows style, start by that.
22564     new_path=`cmd //c echo $path`
22565   fi
22566 
22567 
22568   input_path="$new_path"
22569   # Check if we need to convert this using DOS-style short mode. If the path
22570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22571   # take no chances and rewrite it.
22572   # Note: m4 eats our [], so we need to use [ and ] instead.
22573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22574   if test "x$has_forbidden_chars" != x; then
22575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22577   fi
22578 
22579 
22580   windows_path="$new_path"
22581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22582     unix_path=`$CYGPATH -u "$windows_path"`
22583     new_path="$unix_path"
22584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22586     new_path="$unix_path"
22587   fi
22588 
22589   if test "x$path" != "x$new_path"; then
22590     BOOT_JDK="$new_path"
22591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22592 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22593   fi
22594 
22595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22597 
22598   else
22599     # We're on a posix platform. Hooray! :)
22600     path="$BOOT_JDK"
22601     has_space=`$ECHO "$path" | $GREP " "`
22602     if test "x$has_space" != x; then
22603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22604 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22605       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22606     fi
22607 
22608     # Use eval to expand a potential ~
22609     eval path="$path"
22610     if test ! -f "$path" && test ! -d "$path"; then
22611       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22612     fi
22613 
22614     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22615   fi
22616 
22617               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22618 $as_echo_n "checking for Boot JDK... " >&6; }
22619               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22620 $as_echo "$BOOT_JDK" >&6; }
22621               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22622 $as_echo_n "checking Boot JDK version... " >&6; }
22623               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22624               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22625 $as_echo "$BOOT_JDK_VERSION" >&6; }
22626             fi # end check jdk version
22627           fi # end check rt.jar
22628         fi # end check javac
22629       fi # end check java
22630     fi # end check boot jdk found
22631   fi
22632 
22633     done
22634   fi
22635 
22636   fi
22637 
22638 
22639     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22640     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22641       # Do we have a bin/java?
22642       if test ! -x "$BOOT_JDK/bin/java"; then
22643         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22644 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22645         BOOT_JDK_FOUND=no
22646       else
22647         # Do we have a bin/javac?
22648         if test ! -x "$BOOT_JDK/bin/javac"; then
22649           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22650 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22651           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22652 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22653           BOOT_JDK_FOUND=no
22654         else
22655           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22656           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22657             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22658 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22659             BOOT_JDK_FOUND=no
22660           else
22661             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22662             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22663 
22664             # Extra M4 quote needed to protect [] in grep expression.
22665             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22666             if test "x$FOUND_CORRECT_VERSION" = x; then
22667               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22668 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22669               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22670 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22671               BOOT_JDK_FOUND=no
22672             else
22673               # We're done! :-)
22674               BOOT_JDK_FOUND=yes
22675 
22676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22677 
22678   # Input might be given as Windows format, start by converting to
22679   # unix format.
22680   path="$BOOT_JDK"
22681   new_path=`$CYGPATH -u "$path"`
22682 
22683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22686   # "foo.exe" is OK but "foo" is an error.
22687   #
22688   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22689   # It is also a way to make sure we got the proper file name for the real test later on.
22690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22691   if test "x$test_shortpath" = x; then
22692     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22693 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22694     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22695   fi
22696 
22697   # Call helper function which possibly converts this using DOS-style short mode.
22698   # If so, the updated path is stored in $new_path.
22699 
22700   input_path="$new_path"
22701   # Check if we need to convert this using DOS-style short mode. If the path
22702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22703   # take no chances and rewrite it.
22704   # Note: m4 eats our [], so we need to use [ and ] instead.
22705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22706   if test "x$has_forbidden_chars" != x; then
22707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22711       # Going to short mode and back again did indeed matter. Since short mode is
22712       # case insensitive, let's make it lowercase to improve readability.
22713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22714       # Now convert it back to Unix-stile (cygpath)
22715       input_path=`$CYGPATH -u "$shortmode_path"`
22716       new_path="$input_path"
22717     fi
22718   fi
22719 
22720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22721   if test "x$test_cygdrive_prefix" = x; then
22722     # As a simple fix, exclude /usr/bin since it's not a real path.
22723     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22725       # a path prefixed by /cygdrive for fixpath to work.
22726       new_path="$CYGWIN_ROOT_PATH$input_path"
22727     fi
22728   fi
22729 
22730 
22731   if test "x$path" != "x$new_path"; then
22732     BOOT_JDK="$new_path"
22733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22734 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22735   fi
22736 
22737   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22738 
22739   path="$BOOT_JDK"
22740   has_colon=`$ECHO $path | $GREP ^.:`
22741   new_path="$path"
22742   if test "x$has_colon" = x; then
22743     # Not in mixed or Windows style, start by that.
22744     new_path=`cmd //c echo $path`
22745   fi
22746 
22747 
22748   input_path="$new_path"
22749   # Check if we need to convert this using DOS-style short mode. If the path
22750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22751   # take no chances and rewrite it.
22752   # Note: m4 eats our [], so we need to use [ and ] instead.
22753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22754   if test "x$has_forbidden_chars" != x; then
22755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22757   fi
22758 
22759 
22760   windows_path="$new_path"
22761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22762     unix_path=`$CYGPATH -u "$windows_path"`
22763     new_path="$unix_path"
22764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22766     new_path="$unix_path"
22767   fi
22768 
22769   if test "x$path" != "x$new_path"; then
22770     BOOT_JDK="$new_path"
22771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22772 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22773   fi
22774 
22775   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22776   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22777 
22778   else
22779     # We're on a posix platform. Hooray! :)
22780     path="$BOOT_JDK"
22781     has_space=`$ECHO "$path" | $GREP " "`
22782     if test "x$has_space" != x; then
22783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22784 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22785       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22786     fi
22787 
22788     # Use eval to expand a potential ~
22789     eval path="$path"
22790     if test ! -f "$path" && test ! -d "$path"; then
22791       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22792     fi
22793 
22794     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22795   fi
22796 
22797               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22798 $as_echo_n "checking for Boot JDK... " >&6; }
22799               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22800 $as_echo "$BOOT_JDK" >&6; }
22801               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22802 $as_echo_n "checking Boot JDK version... " >&6; }
22803               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22804               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22805 $as_echo "$BOOT_JDK_VERSION" >&6; }
22806             fi # end check jdk version
22807           fi # end check rt.jar
22808         fi # end check javac
22809       fi # end check java
22810     fi # end check boot jdk found
22811   fi
22812 
22813 
22814   if test "x$BOOT_JDK_FOUND" = xno; then
22815     # Now execute the test
22816 
22817   if test "x$ProgramFiles" != x; then
22818     VIRTUAL_DIR="$ProgramFiles/Java"
22819 
22820   windows_path="$VIRTUAL_DIR"
22821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22822     unix_path=`$CYGPATH -u "$windows_path"`
22823     VIRTUAL_DIR="$unix_path"
22824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22826     VIRTUAL_DIR="$unix_path"
22827   fi
22828 
22829 
22830   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22831   BOOT_JDK_SUFFIX=""
22832   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22833   if test "x$ALL_JDKS_FOUND" != x; then
22834     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22835 
22836   if test "x$BOOT_JDK_FOUND" = xno; then
22837     # Now execute the test
22838 
22839         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22840         if test -d "$BOOT_JDK"; then
22841           BOOT_JDK_FOUND=maybe
22842           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22843 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22844         fi
22845 
22846 
22847     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22848     if test "x$BOOT_JDK_FOUND" = xmaybe; then
22849       # Do we have a bin/java?
22850       if test ! -x "$BOOT_JDK/bin/java"; then
22851         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22852 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22853         BOOT_JDK_FOUND=no
22854       else
22855         # Do we have a bin/javac?
22856         if test ! -x "$BOOT_JDK/bin/javac"; then
22857           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22858 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22859           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22860 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22861           BOOT_JDK_FOUND=no
22862         else
22863           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22864           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22865             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22867             BOOT_JDK_FOUND=no
22868           else
22869             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22870             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22871 
22872             # Extra M4 quote needed to protect [] in grep expression.
22873             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22874             if test "x$FOUND_CORRECT_VERSION" = x; then
22875               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22876 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22877               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22878 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22879               BOOT_JDK_FOUND=no
22880             else
22881               # We're done! :-)
22882               BOOT_JDK_FOUND=yes
22883 
22884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22885 
22886   # Input might be given as Windows format, start by converting to
22887   # unix format.
22888   path="$BOOT_JDK"
22889   new_path=`$CYGPATH -u "$path"`
22890 
22891   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22892   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22893   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22894   # "foo.exe" is OK but "foo" is an error.
22895   #
22896   # This test is therefore slightly more accurate than "test -f" to check for file precense.
22897   # It is also a way to make sure we got the proper file name for the real test later on.
22898   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22899   if test "x$test_shortpath" = x; then
22900     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22901 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22902     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22903   fi
22904 
22905   # Call helper function which possibly converts this using DOS-style short mode.
22906   # If so, the updated path is stored in $new_path.
22907 
22908   input_path="$new_path"
22909   # Check if we need to convert this using DOS-style short mode. If the path
22910   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22911   # take no chances and rewrite it.
22912   # Note: m4 eats our [], so we need to use [ and ] instead.
22913   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22914   if test "x$has_forbidden_chars" != x; then
22915     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22916     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22917     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22918     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22919       # Going to short mode and back again did indeed matter. Since short mode is
22920       # case insensitive, let's make it lowercase to improve readability.
22921       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22922       # Now convert it back to Unix-stile (cygpath)
22923       input_path=`$CYGPATH -u "$shortmode_path"`
22924       new_path="$input_path"
22925     fi
22926   fi
22927 
22928   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22929   if test "x$test_cygdrive_prefix" = x; then
22930     # As a simple fix, exclude /usr/bin since it's not a real path.
22931     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22932       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22933       # a path prefixed by /cygdrive for fixpath to work.
22934       new_path="$CYGWIN_ROOT_PATH$input_path"
22935     fi
22936   fi
22937 
22938 
22939   if test "x$path" != "x$new_path"; then
22940     BOOT_JDK="$new_path"
22941     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22942 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22943   fi
22944 
22945   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22946 
22947   path="$BOOT_JDK"
22948   has_colon=`$ECHO $path | $GREP ^.:`
22949   new_path="$path"
22950   if test "x$has_colon" = x; then
22951     # Not in mixed or Windows style, start by that.
22952     new_path=`cmd //c echo $path`
22953   fi
22954 
22955 
22956   input_path="$new_path"
22957   # Check if we need to convert this using DOS-style short mode. If the path
22958   # contains just simple characters, use it. Otherwise (spaces, weird characters),
22959   # take no chances and rewrite it.
22960   # Note: m4 eats our [], so we need to use [ and ] instead.
22961   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22962   if test "x$has_forbidden_chars" != x; then
22963     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22964     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22965   fi
22966 
22967 
22968   windows_path="$new_path"
22969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22970     unix_path=`$CYGPATH -u "$windows_path"`
22971     new_path="$unix_path"
22972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22974     new_path="$unix_path"
22975   fi
22976 
22977   if test "x$path" != "x$new_path"; then
22978     BOOT_JDK="$new_path"
22979     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22980 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22981   fi
22982 
22983   # Save the first 10 bytes of this path to the storage, so fixpath can work.
22984   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22985 
22986   else
22987     # We're on a posix platform. Hooray! :)
22988     path="$BOOT_JDK"
22989     has_space=`$ECHO "$path" | $GREP " "`
22990     if test "x$has_space" != x; then
22991       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22992 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22993       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22994     fi
22995 
22996     # Use eval to expand a potential ~
22997     eval path="$path"
22998     if test ! -f "$path" && test ! -d "$path"; then
22999       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23000     fi
23001 
23002     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23003   fi
23004 
23005               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23006 $as_echo_n "checking for Boot JDK... " >&6; }
23007               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23008 $as_echo "$BOOT_JDK" >&6; }
23009               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23010 $as_echo_n "checking Boot JDK version... " >&6; }
23011               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23012               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23013 $as_echo "$BOOT_JDK_VERSION" >&6; }
23014             fi # end check jdk version
23015           fi # end check rt.jar
23016         fi # end check javac
23017       fi # end check java
23018     fi # end check boot jdk found
23019   fi
23020 
23021     done
23022   fi
23023 
23024   fi
23025 
23026 
23027     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23028     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23029       # Do we have a bin/java?
23030       if test ! -x "$BOOT_JDK/bin/java"; then
23031         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23033         BOOT_JDK_FOUND=no
23034       else
23035         # Do we have a bin/javac?
23036         if test ! -x "$BOOT_JDK/bin/javac"; then
23037           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23038 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23039           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23040 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23041           BOOT_JDK_FOUND=no
23042         else
23043           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23044           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23045             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23046 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23047             BOOT_JDK_FOUND=no
23048           else
23049             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23050             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23051 
23052             # Extra M4 quote needed to protect [] in grep expression.
23053             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23054             if test "x$FOUND_CORRECT_VERSION" = x; then
23055               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23057               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23058 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23059               BOOT_JDK_FOUND=no
23060             else
23061               # We're done! :-)
23062               BOOT_JDK_FOUND=yes
23063 
23064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23065 
23066   # Input might be given as Windows format, start by converting to
23067   # unix format.
23068   path="$BOOT_JDK"
23069   new_path=`$CYGPATH -u "$path"`
23070 
23071   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23072   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23073   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23074   # "foo.exe" is OK but "foo" is an error.
23075   #
23076   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23077   # It is also a way to make sure we got the proper file name for the real test later on.
23078   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23079   if test "x$test_shortpath" = x; then
23080     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23081 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23082     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23083   fi
23084 
23085   # Call helper function which possibly converts this using DOS-style short mode.
23086   # If so, the updated path is stored in $new_path.
23087 
23088   input_path="$new_path"
23089   # Check if we need to convert this using DOS-style short mode. If the path
23090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23091   # take no chances and rewrite it.
23092   # Note: m4 eats our [], so we need to use [ and ] instead.
23093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23094   if test "x$has_forbidden_chars" != x; then
23095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23099       # Going to short mode and back again did indeed matter. Since short mode is
23100       # case insensitive, let's make it lowercase to improve readability.
23101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23102       # Now convert it back to Unix-stile (cygpath)
23103       input_path=`$CYGPATH -u "$shortmode_path"`
23104       new_path="$input_path"
23105     fi
23106   fi
23107 
23108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23109   if test "x$test_cygdrive_prefix" = x; then
23110     # As a simple fix, exclude /usr/bin since it's not a real path.
23111     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23113       # a path prefixed by /cygdrive for fixpath to work.
23114       new_path="$CYGWIN_ROOT_PATH$input_path"
23115     fi
23116   fi
23117 
23118 
23119   if test "x$path" != "x$new_path"; then
23120     BOOT_JDK="$new_path"
23121     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23122 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23123   fi
23124 
23125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23126 
23127   path="$BOOT_JDK"
23128   has_colon=`$ECHO $path | $GREP ^.:`
23129   new_path="$path"
23130   if test "x$has_colon" = x; then
23131     # Not in mixed or Windows style, start by that.
23132     new_path=`cmd //c echo $path`
23133   fi
23134 
23135 
23136   input_path="$new_path"
23137   # Check if we need to convert this using DOS-style short mode. If the path
23138   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23139   # take no chances and rewrite it.
23140   # Note: m4 eats our [], so we need to use [ and ] instead.
23141   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23142   if test "x$has_forbidden_chars" != x; then
23143     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23144     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23145   fi
23146 
23147 
23148   windows_path="$new_path"
23149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23150     unix_path=`$CYGPATH -u "$windows_path"`
23151     new_path="$unix_path"
23152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23154     new_path="$unix_path"
23155   fi
23156 
23157   if test "x$path" != "x$new_path"; then
23158     BOOT_JDK="$new_path"
23159     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23160 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23161   fi
23162 
23163   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23164   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23165 
23166   else
23167     # We're on a posix platform. Hooray! :)
23168     path="$BOOT_JDK"
23169     has_space=`$ECHO "$path" | $GREP " "`
23170     if test "x$has_space" != x; then
23171       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23172 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23173       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23174     fi
23175 
23176     # Use eval to expand a potential ~
23177     eval path="$path"
23178     if test ! -f "$path" && test ! -d "$path"; then
23179       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23180     fi
23181 
23182     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23183   fi
23184 
23185               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23186 $as_echo_n "checking for Boot JDK... " >&6; }
23187               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23188 $as_echo "$BOOT_JDK" >&6; }
23189               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23190 $as_echo_n "checking Boot JDK version... " >&6; }
23191               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23192               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23193 $as_echo "$BOOT_JDK_VERSION" >&6; }
23194             fi # end check jdk version
23195           fi # end check rt.jar
23196         fi # end check javac
23197       fi # end check java
23198     fi # end check boot jdk found
23199   fi
23200 
23201 
23202   if test "x$BOOT_JDK_FOUND" = xno; then
23203     # Now execute the test
23204 
23205   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23206   BOOT_JDK_SUFFIX=""
23207   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23208   if test "x$ALL_JDKS_FOUND" != x; then
23209     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23210 
23211   if test "x$BOOT_JDK_FOUND" = xno; then
23212     # Now execute the test
23213 
23214         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23215         if test -d "$BOOT_JDK"; then
23216           BOOT_JDK_FOUND=maybe
23217           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23218 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23219         fi
23220 
23221 
23222     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23223     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23224       # Do we have a bin/java?
23225       if test ! -x "$BOOT_JDK/bin/java"; then
23226         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23227 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23228         BOOT_JDK_FOUND=no
23229       else
23230         # Do we have a bin/javac?
23231         if test ! -x "$BOOT_JDK/bin/javac"; then
23232           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23233 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23234           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23235 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23236           BOOT_JDK_FOUND=no
23237         else
23238           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23239           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23240             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23241 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23242             BOOT_JDK_FOUND=no
23243           else
23244             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23245             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23246 
23247             # Extra M4 quote needed to protect [] in grep expression.
23248             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23249             if test "x$FOUND_CORRECT_VERSION" = x; then
23250               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23251 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23252               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23253 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23254               BOOT_JDK_FOUND=no
23255             else
23256               # We're done! :-)
23257               BOOT_JDK_FOUND=yes
23258 
23259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23260 
23261   # Input might be given as Windows format, start by converting to
23262   # unix format.
23263   path="$BOOT_JDK"
23264   new_path=`$CYGPATH -u "$path"`
23265 
23266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23269   # "foo.exe" is OK but "foo" is an error.
23270   #
23271   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23272   # It is also a way to make sure we got the proper file name for the real test later on.
23273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23274   if test "x$test_shortpath" = x; then
23275     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23276 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23277     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23278   fi
23279 
23280   # Call helper function which possibly converts this using DOS-style short mode.
23281   # If so, the updated path is stored in $new_path.
23282 
23283   input_path="$new_path"
23284   # Check if we need to convert this using DOS-style short mode. If the path
23285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23286   # take no chances and rewrite it.
23287   # Note: m4 eats our [], so we need to use [ and ] instead.
23288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23289   if test "x$has_forbidden_chars" != x; then
23290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23291     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23292     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23293     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23294       # Going to short mode and back again did indeed matter. Since short mode is
23295       # case insensitive, let's make it lowercase to improve readability.
23296       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23297       # Now convert it back to Unix-stile (cygpath)
23298       input_path=`$CYGPATH -u "$shortmode_path"`
23299       new_path="$input_path"
23300     fi
23301   fi
23302 
23303   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23304   if test "x$test_cygdrive_prefix" = x; then
23305     # As a simple fix, exclude /usr/bin since it's not a real path.
23306     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23307       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23308       # a path prefixed by /cygdrive for fixpath to work.
23309       new_path="$CYGWIN_ROOT_PATH$input_path"
23310     fi
23311   fi
23312 
23313 
23314   if test "x$path" != "x$new_path"; then
23315     BOOT_JDK="$new_path"
23316     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23317 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23318   fi
23319 
23320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23321 
23322   path="$BOOT_JDK"
23323   has_colon=`$ECHO $path | $GREP ^.:`
23324   new_path="$path"
23325   if test "x$has_colon" = x; then
23326     # Not in mixed or Windows style, start by that.
23327     new_path=`cmd //c echo $path`
23328   fi
23329 
23330 
23331   input_path="$new_path"
23332   # Check if we need to convert this using DOS-style short mode. If the path
23333   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23334   # take no chances and rewrite it.
23335   # Note: m4 eats our [], so we need to use [ and ] instead.
23336   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23337   if test "x$has_forbidden_chars" != x; then
23338     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23339     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23340   fi
23341 
23342 
23343   windows_path="$new_path"
23344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23345     unix_path=`$CYGPATH -u "$windows_path"`
23346     new_path="$unix_path"
23347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23349     new_path="$unix_path"
23350   fi
23351 
23352   if test "x$path" != "x$new_path"; then
23353     BOOT_JDK="$new_path"
23354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23355 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23356   fi
23357 
23358   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23359   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23360 
23361   else
23362     # We're on a posix platform. Hooray! :)
23363     path="$BOOT_JDK"
23364     has_space=`$ECHO "$path" | $GREP " "`
23365     if test "x$has_space" != x; then
23366       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23367 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23368       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23369     fi
23370 
23371     # Use eval to expand a potential ~
23372     eval path="$path"
23373     if test ! -f "$path" && test ! -d "$path"; then
23374       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23375     fi
23376 
23377     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23378   fi
23379 
23380               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23381 $as_echo_n "checking for Boot JDK... " >&6; }
23382               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23383 $as_echo "$BOOT_JDK" >&6; }
23384               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23385 $as_echo_n "checking Boot JDK version... " >&6; }
23386               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23387               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23388 $as_echo "$BOOT_JDK_VERSION" >&6; }
23389             fi # end check jdk version
23390           fi # end check rt.jar
23391         fi # end check javac
23392       fi # end check java
23393     fi # end check boot jdk found
23394   fi
23395 
23396     done
23397   fi
23398 
23399 
23400     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23401     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23402       # Do we have a bin/java?
23403       if test ! -x "$BOOT_JDK/bin/java"; then
23404         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23405 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23406         BOOT_JDK_FOUND=no
23407       else
23408         # Do we have a bin/javac?
23409         if test ! -x "$BOOT_JDK/bin/javac"; then
23410           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23411 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23412           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23413 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23414           BOOT_JDK_FOUND=no
23415         else
23416           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23417           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23418             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23420             BOOT_JDK_FOUND=no
23421           else
23422             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23423             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23424 
23425             # Extra M4 quote needed to protect [] in grep expression.
23426             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23427             if test "x$FOUND_CORRECT_VERSION" = x; then
23428               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23430               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23431 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23432               BOOT_JDK_FOUND=no
23433             else
23434               # We're done! :-)
23435               BOOT_JDK_FOUND=yes
23436 
23437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23438 
23439   # Input might be given as Windows format, start by converting to
23440   # unix format.
23441   path="$BOOT_JDK"
23442   new_path=`$CYGPATH -u "$path"`
23443 
23444   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23445   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23446   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23447   # "foo.exe" is OK but "foo" is an error.
23448   #
23449   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23450   # It is also a way to make sure we got the proper file name for the real test later on.
23451   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23452   if test "x$test_shortpath" = x; then
23453     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23454 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23455     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23456   fi
23457 
23458   # Call helper function which possibly converts this using DOS-style short mode.
23459   # If so, the updated path is stored in $new_path.
23460 
23461   input_path="$new_path"
23462   # Check if we need to convert this using DOS-style short mode. If the path
23463   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23464   # take no chances and rewrite it.
23465   # Note: m4 eats our [], so we need to use [ and ] instead.
23466   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23467   if test "x$has_forbidden_chars" != x; then
23468     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23469     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23470     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23471     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23472       # Going to short mode and back again did indeed matter. Since short mode is
23473       # case insensitive, let's make it lowercase to improve readability.
23474       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23475       # Now convert it back to Unix-stile (cygpath)
23476       input_path=`$CYGPATH -u "$shortmode_path"`
23477       new_path="$input_path"
23478     fi
23479   fi
23480 
23481   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23482   if test "x$test_cygdrive_prefix" = x; then
23483     # As a simple fix, exclude /usr/bin since it's not a real path.
23484     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23485       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23486       # a path prefixed by /cygdrive for fixpath to work.
23487       new_path="$CYGWIN_ROOT_PATH$input_path"
23488     fi
23489   fi
23490 
23491 
23492   if test "x$path" != "x$new_path"; then
23493     BOOT_JDK="$new_path"
23494     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23495 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23496   fi
23497 
23498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23499 
23500   path="$BOOT_JDK"
23501   has_colon=`$ECHO $path | $GREP ^.:`
23502   new_path="$path"
23503   if test "x$has_colon" = x; then
23504     # Not in mixed or Windows style, start by that.
23505     new_path=`cmd //c echo $path`
23506   fi
23507 
23508 
23509   input_path="$new_path"
23510   # Check if we need to convert this using DOS-style short mode. If the path
23511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23512   # take no chances and rewrite it.
23513   # Note: m4 eats our [], so we need to use [ and ] instead.
23514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23515   if test "x$has_forbidden_chars" != x; then
23516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23517     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23518   fi
23519 
23520 
23521   windows_path="$new_path"
23522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23523     unix_path=`$CYGPATH -u "$windows_path"`
23524     new_path="$unix_path"
23525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23526     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23527     new_path="$unix_path"
23528   fi
23529 
23530   if test "x$path" != "x$new_path"; then
23531     BOOT_JDK="$new_path"
23532     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23533 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23534   fi
23535 
23536   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23537   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23538 
23539   else
23540     # We're on a posix platform. Hooray! :)
23541     path="$BOOT_JDK"
23542     has_space=`$ECHO "$path" | $GREP " "`
23543     if test "x$has_space" != x; then
23544       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23545 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23546       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23547     fi
23548 
23549     # Use eval to expand a potential ~
23550     eval path="$path"
23551     if test ! -f "$path" && test ! -d "$path"; then
23552       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23553     fi
23554 
23555     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23556   fi
23557 
23558               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23559 $as_echo_n "checking for Boot JDK... " >&6; }
23560               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23561 $as_echo "$BOOT_JDK" >&6; }
23562               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23563 $as_echo_n "checking Boot JDK version... " >&6; }
23564               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23565               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23566 $as_echo "$BOOT_JDK_VERSION" >&6; }
23567             fi # end check jdk version
23568           fi # end check rt.jar
23569         fi # end check javac
23570       fi # end check java
23571     fi # end check boot jdk found
23572   fi
23573 
23574   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23575 
23576   if test "x$BOOT_JDK_FOUND" = xno; then
23577     # Now execute the test
23578 
23579   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23580   BOOT_JDK_SUFFIX="/Contents/Home"
23581   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23582   if test "x$ALL_JDKS_FOUND" != x; then
23583     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23584 
23585   if test "x$BOOT_JDK_FOUND" = xno; then
23586     # Now execute the test
23587 
23588         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23589         if test -d "$BOOT_JDK"; then
23590           BOOT_JDK_FOUND=maybe
23591           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23592 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23593         fi
23594 
23595 
23596     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23597     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23598       # Do we have a bin/java?
23599       if test ! -x "$BOOT_JDK/bin/java"; then
23600         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23601 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23602         BOOT_JDK_FOUND=no
23603       else
23604         # Do we have a bin/javac?
23605         if test ! -x "$BOOT_JDK/bin/javac"; then
23606           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23608           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23609 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23610           BOOT_JDK_FOUND=no
23611         else
23612           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23613           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23614             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23615 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23616             BOOT_JDK_FOUND=no
23617           else
23618             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23619             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23620 
23621             # Extra M4 quote needed to protect [] in grep expression.
23622             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23623             if test "x$FOUND_CORRECT_VERSION" = x; then
23624               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23626               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23627 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23628               BOOT_JDK_FOUND=no
23629             else
23630               # We're done! :-)
23631               BOOT_JDK_FOUND=yes
23632 
23633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23634 
23635   # Input might be given as Windows format, start by converting to
23636   # unix format.
23637   path="$BOOT_JDK"
23638   new_path=`$CYGPATH -u "$path"`
23639 
23640   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23641   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23642   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23643   # "foo.exe" is OK but "foo" is an error.
23644   #
23645   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23646   # It is also a way to make sure we got the proper file name for the real test later on.
23647   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23648   if test "x$test_shortpath" = x; then
23649     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23650 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23651     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23652   fi
23653 
23654   # Call helper function which possibly converts this using DOS-style short mode.
23655   # If so, the updated path is stored in $new_path.
23656 
23657   input_path="$new_path"
23658   # Check if we need to convert this using DOS-style short mode. If the path
23659   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23660   # take no chances and rewrite it.
23661   # Note: m4 eats our [], so we need to use [ and ] instead.
23662   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23663   if test "x$has_forbidden_chars" != x; then
23664     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23665     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23666     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23667     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23668       # Going to short mode and back again did indeed matter. Since short mode is
23669       # case insensitive, let's make it lowercase to improve readability.
23670       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23671       # Now convert it back to Unix-stile (cygpath)
23672       input_path=`$CYGPATH -u "$shortmode_path"`
23673       new_path="$input_path"
23674     fi
23675   fi
23676 
23677   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23678   if test "x$test_cygdrive_prefix" = x; then
23679     # As a simple fix, exclude /usr/bin since it's not a real path.
23680     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23681       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23682       # a path prefixed by /cygdrive for fixpath to work.
23683       new_path="$CYGWIN_ROOT_PATH$input_path"
23684     fi
23685   fi
23686 
23687 
23688   if test "x$path" != "x$new_path"; then
23689     BOOT_JDK="$new_path"
23690     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23691 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23692   fi
23693 
23694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23695 
23696   path="$BOOT_JDK"
23697   has_colon=`$ECHO $path | $GREP ^.:`
23698   new_path="$path"
23699   if test "x$has_colon" = x; then
23700     # Not in mixed or Windows style, start by that.
23701     new_path=`cmd //c echo $path`
23702   fi
23703 
23704 
23705   input_path="$new_path"
23706   # Check if we need to convert this using DOS-style short mode. If the path
23707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23708   # take no chances and rewrite it.
23709   # Note: m4 eats our [], so we need to use [ and ] instead.
23710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23711   if test "x$has_forbidden_chars" != x; then
23712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23713     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23714   fi
23715 
23716 
23717   windows_path="$new_path"
23718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23719     unix_path=`$CYGPATH -u "$windows_path"`
23720     new_path="$unix_path"
23721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23723     new_path="$unix_path"
23724   fi
23725 
23726   if test "x$path" != "x$new_path"; then
23727     BOOT_JDK="$new_path"
23728     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23729 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23730   fi
23731 
23732   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23733   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23734 
23735   else
23736     # We're on a posix platform. Hooray! :)
23737     path="$BOOT_JDK"
23738     has_space=`$ECHO "$path" | $GREP " "`
23739     if test "x$has_space" != x; then
23740       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23741 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23742       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23743     fi
23744 
23745     # Use eval to expand a potential ~
23746     eval path="$path"
23747     if test ! -f "$path" && test ! -d "$path"; then
23748       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23749     fi
23750 
23751     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23752   fi
23753 
23754               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23755 $as_echo_n "checking for Boot JDK... " >&6; }
23756               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23757 $as_echo "$BOOT_JDK" >&6; }
23758               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23759 $as_echo_n "checking Boot JDK version... " >&6; }
23760               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23761               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23762 $as_echo "$BOOT_JDK_VERSION" >&6; }
23763             fi # end check jdk version
23764           fi # end check rt.jar
23765         fi # end check javac
23766       fi # end check java
23767     fi # end check boot jdk found
23768   fi
23769 
23770     done
23771   fi
23772 
23773 
23774     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23775     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23776       # Do we have a bin/java?
23777       if test ! -x "$BOOT_JDK/bin/java"; then
23778         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23779 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23780         BOOT_JDK_FOUND=no
23781       else
23782         # Do we have a bin/javac?
23783         if test ! -x "$BOOT_JDK/bin/javac"; then
23784           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23785 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23786           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23787 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23788           BOOT_JDK_FOUND=no
23789         else
23790           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23791           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23792             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23793 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23794             BOOT_JDK_FOUND=no
23795           else
23796             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23797             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23798 
23799             # Extra M4 quote needed to protect [] in grep expression.
23800             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23801             if test "x$FOUND_CORRECT_VERSION" = x; then
23802               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23803 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23804               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23805 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23806               BOOT_JDK_FOUND=no
23807             else
23808               # We're done! :-)
23809               BOOT_JDK_FOUND=yes
23810 
23811   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23812 
23813   # Input might be given as Windows format, start by converting to
23814   # unix format.
23815   path="$BOOT_JDK"
23816   new_path=`$CYGPATH -u "$path"`
23817 
23818   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23819   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23820   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23821   # "foo.exe" is OK but "foo" is an error.
23822   #
23823   # This test is therefore slightly more accurate than "test -f" to check for file precense.
23824   # It is also a way to make sure we got the proper file name for the real test later on.
23825   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23826   if test "x$test_shortpath" = x; then
23827     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23828 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23829     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23830   fi
23831 
23832   # Call helper function which possibly converts this using DOS-style short mode.
23833   # If so, the updated path is stored in $new_path.
23834 
23835   input_path="$new_path"
23836   # Check if we need to convert this using DOS-style short mode. If the path
23837   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23838   # take no chances and rewrite it.
23839   # Note: m4 eats our [], so we need to use [ and ] instead.
23840   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23841   if test "x$has_forbidden_chars" != x; then
23842     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23843     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23844     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23845     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23846       # Going to short mode and back again did indeed matter. Since short mode is
23847       # case insensitive, let's make it lowercase to improve readability.
23848       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23849       # Now convert it back to Unix-stile (cygpath)
23850       input_path=`$CYGPATH -u "$shortmode_path"`
23851       new_path="$input_path"
23852     fi
23853   fi
23854 
23855   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23856   if test "x$test_cygdrive_prefix" = x; then
23857     # As a simple fix, exclude /usr/bin since it's not a real path.
23858     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23859       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23860       # a path prefixed by /cygdrive for fixpath to work.
23861       new_path="$CYGWIN_ROOT_PATH$input_path"
23862     fi
23863   fi
23864 
23865 
23866   if test "x$path" != "x$new_path"; then
23867     BOOT_JDK="$new_path"
23868     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23869 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23870   fi
23871 
23872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23873 
23874   path="$BOOT_JDK"
23875   has_colon=`$ECHO $path | $GREP ^.:`
23876   new_path="$path"
23877   if test "x$has_colon" = x; then
23878     # Not in mixed or Windows style, start by that.
23879     new_path=`cmd //c echo $path`
23880   fi
23881 
23882 
23883   input_path="$new_path"
23884   # Check if we need to convert this using DOS-style short mode. If the path
23885   # contains just simple characters, use it. Otherwise (spaces, weird characters),
23886   # take no chances and rewrite it.
23887   # Note: m4 eats our [], so we need to use [ and ] instead.
23888   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23889   if test "x$has_forbidden_chars" != x; then
23890     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23891     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23892   fi
23893 
23894 
23895   windows_path="$new_path"
23896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23897     unix_path=`$CYGPATH -u "$windows_path"`
23898     new_path="$unix_path"
23899   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23900     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23901     new_path="$unix_path"
23902   fi
23903 
23904   if test "x$path" != "x$new_path"; then
23905     BOOT_JDK="$new_path"
23906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23907 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23908   fi
23909 
23910   # Save the first 10 bytes of this path to the storage, so fixpath can work.
23911   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23912 
23913   else
23914     # We're on a posix platform. Hooray! :)
23915     path="$BOOT_JDK"
23916     has_space=`$ECHO "$path" | $GREP " "`
23917     if test "x$has_space" != x; then
23918       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23919 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23920       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23921     fi
23922 
23923     # Use eval to expand a potential ~
23924     eval path="$path"
23925     if test ! -f "$path" && test ! -d "$path"; then
23926       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23927     fi
23928 
23929     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23930   fi
23931 
23932               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23933 $as_echo_n "checking for Boot JDK... " >&6; }
23934               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23935 $as_echo "$BOOT_JDK" >&6; }
23936               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23937 $as_echo_n "checking Boot JDK version... " >&6; }
23938               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23939               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23940 $as_echo "$BOOT_JDK_VERSION" >&6; }
23941             fi # end check jdk version
23942           fi # end check rt.jar
23943         fi # end check javac
23944       fi # end check java
23945     fi # end check boot jdk found
23946   fi
23947 
23948 
23949   if test "x$BOOT_JDK_FOUND" = xno; then
23950     # Now execute the test
23951 
23952   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
23953   BOOT_JDK_SUFFIX="/Contents/Home"
23954   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23955   if test "x$ALL_JDKS_FOUND" != x; then
23956     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23957 
23958   if test "x$BOOT_JDK_FOUND" = xno; then
23959     # Now execute the test
23960 
23961         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23962         if test -d "$BOOT_JDK"; then
23963           BOOT_JDK_FOUND=maybe
23964           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23965 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23966         fi
23967 
23968 
23969     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23970     if test "x$BOOT_JDK_FOUND" = xmaybe; then
23971       # Do we have a bin/java?
23972       if test ! -x "$BOOT_JDK/bin/java"; then
23973         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23974 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23975         BOOT_JDK_FOUND=no
23976       else
23977         # Do we have a bin/javac?
23978         if test ! -x "$BOOT_JDK/bin/javac"; then
23979           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23980 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23981           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23982 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23983           BOOT_JDK_FOUND=no
23984         else
23985           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23986           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23987             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23988 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23989             BOOT_JDK_FOUND=no
23990           else
23991             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23992             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23993 
23994             # Extra M4 quote needed to protect [] in grep expression.
23995             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23996             if test "x$FOUND_CORRECT_VERSION" = x; then
23997               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23999               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24000 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24001               BOOT_JDK_FOUND=no
24002             else
24003               # We're done! :-)
24004               BOOT_JDK_FOUND=yes
24005 
24006   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24007 
24008   # Input might be given as Windows format, start by converting to
24009   # unix format.
24010   path="$BOOT_JDK"
24011   new_path=`$CYGPATH -u "$path"`
24012 
24013   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24014   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24015   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24016   # "foo.exe" is OK but "foo" is an error.
24017   #
24018   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24019   # It is also a way to make sure we got the proper file name for the real test later on.
24020   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24021   if test "x$test_shortpath" = x; then
24022     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24023 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24024     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24025   fi
24026 
24027   # Call helper function which possibly converts this using DOS-style short mode.
24028   # If so, the updated path is stored in $new_path.
24029 
24030   input_path="$new_path"
24031   # Check if we need to convert this using DOS-style short mode. If the path
24032   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24033   # take no chances and rewrite it.
24034   # Note: m4 eats our [], so we need to use [ and ] instead.
24035   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24036   if test "x$has_forbidden_chars" != x; then
24037     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24038     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24039     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24040     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24041       # Going to short mode and back again did indeed matter. Since short mode is
24042       # case insensitive, let's make it lowercase to improve readability.
24043       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24044       # Now convert it back to Unix-stile (cygpath)
24045       input_path=`$CYGPATH -u "$shortmode_path"`
24046       new_path="$input_path"
24047     fi
24048   fi
24049 
24050   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24051   if test "x$test_cygdrive_prefix" = x; then
24052     # As a simple fix, exclude /usr/bin since it's not a real path.
24053     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24054       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24055       # a path prefixed by /cygdrive for fixpath to work.
24056       new_path="$CYGWIN_ROOT_PATH$input_path"
24057     fi
24058   fi
24059 
24060 
24061   if test "x$path" != "x$new_path"; then
24062     BOOT_JDK="$new_path"
24063     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24064 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24065   fi
24066 
24067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24068 
24069   path="$BOOT_JDK"
24070   has_colon=`$ECHO $path | $GREP ^.:`
24071   new_path="$path"
24072   if test "x$has_colon" = x; then
24073     # Not in mixed or Windows style, start by that.
24074     new_path=`cmd //c echo $path`
24075   fi
24076 
24077 
24078   input_path="$new_path"
24079   # Check if we need to convert this using DOS-style short mode. If the path
24080   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24081   # take no chances and rewrite it.
24082   # Note: m4 eats our [], so we need to use [ and ] instead.
24083   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24084   if test "x$has_forbidden_chars" != x; then
24085     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24086     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24087   fi
24088 
24089 
24090   windows_path="$new_path"
24091   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24092     unix_path=`$CYGPATH -u "$windows_path"`
24093     new_path="$unix_path"
24094   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24095     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24096     new_path="$unix_path"
24097   fi
24098 
24099   if test "x$path" != "x$new_path"; then
24100     BOOT_JDK="$new_path"
24101     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24102 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24103   fi
24104 
24105   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24106   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24107 
24108   else
24109     # We're on a posix platform. Hooray! :)
24110     path="$BOOT_JDK"
24111     has_space=`$ECHO "$path" | $GREP " "`
24112     if test "x$has_space" != x; then
24113       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24114 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24115       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24116     fi
24117 
24118     # Use eval to expand a potential ~
24119     eval path="$path"
24120     if test ! -f "$path" && test ! -d "$path"; then
24121       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24122     fi
24123 
24124     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24125   fi
24126 
24127               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24128 $as_echo_n "checking for Boot JDK... " >&6; }
24129               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24130 $as_echo "$BOOT_JDK" >&6; }
24131               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24132 $as_echo_n "checking Boot JDK version... " >&6; }
24133               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24134               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24135 $as_echo "$BOOT_JDK_VERSION" >&6; }
24136             fi # end check jdk version
24137           fi # end check rt.jar
24138         fi # end check javac
24139       fi # end check java
24140     fi # end check boot jdk found
24141   fi
24142 
24143     done
24144   fi
24145 
24146 
24147     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24148     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24149       # Do we have a bin/java?
24150       if test ! -x "$BOOT_JDK/bin/java"; then
24151         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24152 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24153         BOOT_JDK_FOUND=no
24154       else
24155         # Do we have a bin/javac?
24156         if test ! -x "$BOOT_JDK/bin/javac"; then
24157           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24158 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24159           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24160 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24161           BOOT_JDK_FOUND=no
24162         else
24163           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24164           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24165             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24167             BOOT_JDK_FOUND=no
24168           else
24169             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24170             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24171 
24172             # Extra M4 quote needed to protect [] in grep expression.
24173             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24174             if test "x$FOUND_CORRECT_VERSION" = x; then
24175               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24176 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24177               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24178 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24179               BOOT_JDK_FOUND=no
24180             else
24181               # We're done! :-)
24182               BOOT_JDK_FOUND=yes
24183 
24184   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24185 
24186   # Input might be given as Windows format, start by converting to
24187   # unix format.
24188   path="$BOOT_JDK"
24189   new_path=`$CYGPATH -u "$path"`
24190 
24191   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24192   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24193   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24194   # "foo.exe" is OK but "foo" is an error.
24195   #
24196   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24197   # It is also a way to make sure we got the proper file name for the real test later on.
24198   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24199   if test "x$test_shortpath" = x; then
24200     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24201 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24202     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24203   fi
24204 
24205   # Call helper function which possibly converts this using DOS-style short mode.
24206   # If so, the updated path is stored in $new_path.
24207 
24208   input_path="$new_path"
24209   # Check if we need to convert this using DOS-style short mode. If the path
24210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24211   # take no chances and rewrite it.
24212   # Note: m4 eats our [], so we need to use [ and ] instead.
24213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24214   if test "x$has_forbidden_chars" != x; then
24215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24216     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24217     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24218     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24219       # Going to short mode and back again did indeed matter. Since short mode is
24220       # case insensitive, let's make it lowercase to improve readability.
24221       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24222       # Now convert it back to Unix-stile (cygpath)
24223       input_path=`$CYGPATH -u "$shortmode_path"`
24224       new_path="$input_path"
24225     fi
24226   fi
24227 
24228   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24229   if test "x$test_cygdrive_prefix" = x; then
24230     # As a simple fix, exclude /usr/bin since it's not a real path.
24231     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24232       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24233       # a path prefixed by /cygdrive for fixpath to work.
24234       new_path="$CYGWIN_ROOT_PATH$input_path"
24235     fi
24236   fi
24237 
24238 
24239   if test "x$path" != "x$new_path"; then
24240     BOOT_JDK="$new_path"
24241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24242 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24243   fi
24244 
24245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24246 
24247   path="$BOOT_JDK"
24248   has_colon=`$ECHO $path | $GREP ^.:`
24249   new_path="$path"
24250   if test "x$has_colon" = x; then
24251     # Not in mixed or Windows style, start by that.
24252     new_path=`cmd //c echo $path`
24253   fi
24254 
24255 
24256   input_path="$new_path"
24257   # Check if we need to convert this using DOS-style short mode. If the path
24258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24259   # take no chances and rewrite it.
24260   # Note: m4 eats our [], so we need to use [ and ] instead.
24261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24262   if test "x$has_forbidden_chars" != x; then
24263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24264     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24265   fi
24266 
24267 
24268   windows_path="$new_path"
24269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24270     unix_path=`$CYGPATH -u "$windows_path"`
24271     new_path="$unix_path"
24272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24274     new_path="$unix_path"
24275   fi
24276 
24277   if test "x$path" != "x$new_path"; then
24278     BOOT_JDK="$new_path"
24279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24280 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24281   fi
24282 
24283   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24284   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24285 
24286   else
24287     # We're on a posix platform. Hooray! :)
24288     path="$BOOT_JDK"
24289     has_space=`$ECHO "$path" | $GREP " "`
24290     if test "x$has_space" != x; then
24291       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24292 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24293       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24294     fi
24295 
24296     # Use eval to expand a potential ~
24297     eval path="$path"
24298     if test ! -f "$path" && test ! -d "$path"; then
24299       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24300     fi
24301 
24302     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24303   fi
24304 
24305               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24306 $as_echo_n "checking for Boot JDK... " >&6; }
24307               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24308 $as_echo "$BOOT_JDK" >&6; }
24309               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24310 $as_echo_n "checking Boot JDK version... " >&6; }
24311               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24312               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24313 $as_echo "$BOOT_JDK_VERSION" >&6; }
24314             fi # end check jdk version
24315           fi # end check rt.jar
24316         fi # end check javac
24317       fi # end check java
24318     fi # end check boot jdk found
24319   fi
24320 
24321   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24322 
24323   if test "x$BOOT_JDK_FOUND" = xno; then
24324     # Now execute the test
24325 
24326   BOOT_JDK_PREFIX="/usr/lib/jvm"
24327   BOOT_JDK_SUFFIX=""
24328   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24329   if test "x$ALL_JDKS_FOUND" != x; then
24330     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24331 
24332   if test "x$BOOT_JDK_FOUND" = xno; then
24333     # Now execute the test
24334 
24335         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24336         if test -d "$BOOT_JDK"; then
24337           BOOT_JDK_FOUND=maybe
24338           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24339 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24340         fi
24341 
24342 
24343     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24344     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24345       # Do we have a bin/java?
24346       if test ! -x "$BOOT_JDK/bin/java"; then
24347         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24348 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24349         BOOT_JDK_FOUND=no
24350       else
24351         # Do we have a bin/javac?
24352         if test ! -x "$BOOT_JDK/bin/javac"; then
24353           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24354 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24355           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24356 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24357           BOOT_JDK_FOUND=no
24358         else
24359           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24360           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24361             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24363             BOOT_JDK_FOUND=no
24364           else
24365             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24366             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24367 
24368             # Extra M4 quote needed to protect [] in grep expression.
24369             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24370             if test "x$FOUND_CORRECT_VERSION" = x; then
24371               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24372 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24373               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24374 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24375               BOOT_JDK_FOUND=no
24376             else
24377               # We're done! :-)
24378               BOOT_JDK_FOUND=yes
24379 
24380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24381 
24382   # Input might be given as Windows format, start by converting to
24383   # unix format.
24384   path="$BOOT_JDK"
24385   new_path=`$CYGPATH -u "$path"`
24386 
24387   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24388   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24389   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24390   # "foo.exe" is OK but "foo" is an error.
24391   #
24392   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24393   # It is also a way to make sure we got the proper file name for the real test later on.
24394   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24395   if test "x$test_shortpath" = x; then
24396     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24397 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24398     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24399   fi
24400 
24401   # Call helper function which possibly converts this using DOS-style short mode.
24402   # If so, the updated path is stored in $new_path.
24403 
24404   input_path="$new_path"
24405   # Check if we need to convert this using DOS-style short mode. If the path
24406   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24407   # take no chances and rewrite it.
24408   # Note: m4 eats our [], so we need to use [ and ] instead.
24409   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24410   if test "x$has_forbidden_chars" != x; then
24411     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24412     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24413     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24414     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24415       # Going to short mode and back again did indeed matter. Since short mode is
24416       # case insensitive, let's make it lowercase to improve readability.
24417       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24418       # Now convert it back to Unix-stile (cygpath)
24419       input_path=`$CYGPATH -u "$shortmode_path"`
24420       new_path="$input_path"
24421     fi
24422   fi
24423 
24424   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24425   if test "x$test_cygdrive_prefix" = x; then
24426     # As a simple fix, exclude /usr/bin since it's not a real path.
24427     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24428       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24429       # a path prefixed by /cygdrive for fixpath to work.
24430       new_path="$CYGWIN_ROOT_PATH$input_path"
24431     fi
24432   fi
24433 
24434 
24435   if test "x$path" != "x$new_path"; then
24436     BOOT_JDK="$new_path"
24437     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24438 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24439   fi
24440 
24441   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24442 
24443   path="$BOOT_JDK"
24444   has_colon=`$ECHO $path | $GREP ^.:`
24445   new_path="$path"
24446   if test "x$has_colon" = x; then
24447     # Not in mixed or Windows style, start by that.
24448     new_path=`cmd //c echo $path`
24449   fi
24450 
24451 
24452   input_path="$new_path"
24453   # Check if we need to convert this using DOS-style short mode. If the path
24454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24455   # take no chances and rewrite it.
24456   # Note: m4 eats our [], so we need to use [ and ] instead.
24457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24458   if test "x$has_forbidden_chars" != x; then
24459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24460     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24461   fi
24462 
24463 
24464   windows_path="$new_path"
24465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24466     unix_path=`$CYGPATH -u "$windows_path"`
24467     new_path="$unix_path"
24468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24470     new_path="$unix_path"
24471   fi
24472 
24473   if test "x$path" != "x$new_path"; then
24474     BOOT_JDK="$new_path"
24475     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24476 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24477   fi
24478 
24479   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24480   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24481 
24482   else
24483     # We're on a posix platform. Hooray! :)
24484     path="$BOOT_JDK"
24485     has_space=`$ECHO "$path" | $GREP " "`
24486     if test "x$has_space" != x; then
24487       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24488 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24489       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24490     fi
24491 
24492     # Use eval to expand a potential ~
24493     eval path="$path"
24494     if test ! -f "$path" && test ! -d "$path"; then
24495       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24496     fi
24497 
24498     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24499   fi
24500 
24501               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24502 $as_echo_n "checking for Boot JDK... " >&6; }
24503               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24504 $as_echo "$BOOT_JDK" >&6; }
24505               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24506 $as_echo_n "checking Boot JDK version... " >&6; }
24507               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24508               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24509 $as_echo "$BOOT_JDK_VERSION" >&6; }
24510             fi # end check jdk version
24511           fi # end check rt.jar
24512         fi # end check javac
24513       fi # end check java
24514     fi # end check boot jdk found
24515   fi
24516 
24517     done
24518   fi
24519 
24520 
24521     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24522     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24523       # Do we have a bin/java?
24524       if test ! -x "$BOOT_JDK/bin/java"; then
24525         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24526 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24527         BOOT_JDK_FOUND=no
24528       else
24529         # Do we have a bin/javac?
24530         if test ! -x "$BOOT_JDK/bin/javac"; then
24531           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24532 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24533           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24534 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24535           BOOT_JDK_FOUND=no
24536         else
24537           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24538           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24539             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24540 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24541             BOOT_JDK_FOUND=no
24542           else
24543             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24544             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24545 
24546             # Extra M4 quote needed to protect [] in grep expression.
24547             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24548             if test "x$FOUND_CORRECT_VERSION" = x; then
24549               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24550 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24551               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24552 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24553               BOOT_JDK_FOUND=no
24554             else
24555               # We're done! :-)
24556               BOOT_JDK_FOUND=yes
24557 
24558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24559 
24560   # Input might be given as Windows format, start by converting to
24561   # unix format.
24562   path="$BOOT_JDK"
24563   new_path=`$CYGPATH -u "$path"`
24564 
24565   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24566   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24567   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24568   # "foo.exe" is OK but "foo" is an error.
24569   #
24570   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24571   # It is also a way to make sure we got the proper file name for the real test later on.
24572   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24573   if test "x$test_shortpath" = x; then
24574     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24575 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24576     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24577   fi
24578 
24579   # Call helper function which possibly converts this using DOS-style short mode.
24580   # If so, the updated path is stored in $new_path.
24581 
24582   input_path="$new_path"
24583   # Check if we need to convert this using DOS-style short mode. If the path
24584   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24585   # take no chances and rewrite it.
24586   # Note: m4 eats our [], so we need to use [ and ] instead.
24587   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24588   if test "x$has_forbidden_chars" != x; then
24589     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24590     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24591     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24592     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24593       # Going to short mode and back again did indeed matter. Since short mode is
24594       # case insensitive, let's make it lowercase to improve readability.
24595       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24596       # Now convert it back to Unix-stile (cygpath)
24597       input_path=`$CYGPATH -u "$shortmode_path"`
24598       new_path="$input_path"
24599     fi
24600   fi
24601 
24602   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24603   if test "x$test_cygdrive_prefix" = x; then
24604     # As a simple fix, exclude /usr/bin since it's not a real path.
24605     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24606       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24607       # a path prefixed by /cygdrive for fixpath to work.
24608       new_path="$CYGWIN_ROOT_PATH$input_path"
24609     fi
24610   fi
24611 
24612 
24613   if test "x$path" != "x$new_path"; then
24614     BOOT_JDK="$new_path"
24615     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24616 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24617   fi
24618 
24619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24620 
24621   path="$BOOT_JDK"
24622   has_colon=`$ECHO $path | $GREP ^.:`
24623   new_path="$path"
24624   if test "x$has_colon" = x; then
24625     # Not in mixed or Windows style, start by that.
24626     new_path=`cmd //c echo $path`
24627   fi
24628 
24629 
24630   input_path="$new_path"
24631   # Check if we need to convert this using DOS-style short mode. If the path
24632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24633   # take no chances and rewrite it.
24634   # Note: m4 eats our [], so we need to use [ and ] instead.
24635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24636   if test "x$has_forbidden_chars" != x; then
24637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24638     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24639   fi
24640 
24641 
24642   windows_path="$new_path"
24643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24644     unix_path=`$CYGPATH -u "$windows_path"`
24645     new_path="$unix_path"
24646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24648     new_path="$unix_path"
24649   fi
24650 
24651   if test "x$path" != "x$new_path"; then
24652     BOOT_JDK="$new_path"
24653     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24654 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24655   fi
24656 
24657   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24658   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24659 
24660   else
24661     # We're on a posix platform. Hooray! :)
24662     path="$BOOT_JDK"
24663     has_space=`$ECHO "$path" | $GREP " "`
24664     if test "x$has_space" != x; then
24665       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24666 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24667       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24668     fi
24669 
24670     # Use eval to expand a potential ~
24671     eval path="$path"
24672     if test ! -f "$path" && test ! -d "$path"; then
24673       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24674     fi
24675 
24676     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24677   fi
24678 
24679               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24680 $as_echo_n "checking for Boot JDK... " >&6; }
24681               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24682 $as_echo "$BOOT_JDK" >&6; }
24683               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24684 $as_echo_n "checking Boot JDK version... " >&6; }
24685               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24686               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24687 $as_echo "$BOOT_JDK_VERSION" >&6; }
24688             fi # end check jdk version
24689           fi # end check rt.jar
24690         fi # end check javac
24691       fi # end check java
24692     fi # end check boot jdk found
24693   fi
24694 
24695   fi
24696 
24697 
24698     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24699     if test "x$BOOT_JDK_FOUND" = xmaybe; then
24700       # Do we have a bin/java?
24701       if test ! -x "$BOOT_JDK/bin/java"; then
24702         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24703 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24704         BOOT_JDK_FOUND=no
24705       else
24706         # Do we have a bin/javac?
24707         if test ! -x "$BOOT_JDK/bin/javac"; then
24708           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24709 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24710           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24711 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24712           BOOT_JDK_FOUND=no
24713         else
24714           # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24715           if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24716             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24717 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24718             BOOT_JDK_FOUND=no
24719           else
24720             # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24721             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24722 
24723             # Extra M4 quote needed to protect [] in grep expression.
24724             FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24725             if test "x$FOUND_CORRECT_VERSION" = x; then
24726               { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24727 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24728               { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24729 $as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24730               BOOT_JDK_FOUND=no
24731             else
24732               # We're done! :-)
24733               BOOT_JDK_FOUND=yes
24734 
24735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24736 
24737   # Input might be given as Windows format, start by converting to
24738   # unix format.
24739   path="$BOOT_JDK"
24740   new_path=`$CYGPATH -u "$path"`
24741 
24742   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24743   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24744   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24745   # "foo.exe" is OK but "foo" is an error.
24746   #
24747   # This test is therefore slightly more accurate than "test -f" to check for file precense.
24748   # It is also a way to make sure we got the proper file name for the real test later on.
24749   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24750   if test "x$test_shortpath" = x; then
24751     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24752 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24753     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24754   fi
24755 
24756   # Call helper function which possibly converts this using DOS-style short mode.
24757   # If so, the updated path is stored in $new_path.
24758 
24759   input_path="$new_path"
24760   # Check if we need to convert this using DOS-style short mode. If the path
24761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24762   # take no chances and rewrite it.
24763   # Note: m4 eats our [], so we need to use [ and ] instead.
24764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24765   if test "x$has_forbidden_chars" != x; then
24766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24770       # Going to short mode and back again did indeed matter. Since short mode is
24771       # case insensitive, let's make it lowercase to improve readability.
24772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24773       # Now convert it back to Unix-stile (cygpath)
24774       input_path=`$CYGPATH -u "$shortmode_path"`
24775       new_path="$input_path"
24776     fi
24777   fi
24778 
24779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24780   if test "x$test_cygdrive_prefix" = x; then
24781     # As a simple fix, exclude /usr/bin since it's not a real path.
24782     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24784       # a path prefixed by /cygdrive for fixpath to work.
24785       new_path="$CYGWIN_ROOT_PATH$input_path"
24786     fi
24787   fi
24788 
24789 
24790   if test "x$path" != "x$new_path"; then
24791     BOOT_JDK="$new_path"
24792     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24793 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24794   fi
24795 
24796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24797 
24798   path="$BOOT_JDK"
24799   has_colon=`$ECHO $path | $GREP ^.:`
24800   new_path="$path"
24801   if test "x$has_colon" = x; then
24802     # Not in mixed or Windows style, start by that.
24803     new_path=`cmd //c echo $path`
24804   fi
24805 
24806 
24807   input_path="$new_path"
24808   # Check if we need to convert this using DOS-style short mode. If the path
24809   # contains just simple characters, use it. Otherwise (spaces, weird characters),
24810   # take no chances and rewrite it.
24811   # Note: m4 eats our [], so we need to use [ and ] instead.
24812   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24813   if test "x$has_forbidden_chars" != x; then
24814     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24815     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24816   fi
24817 
24818 
24819   windows_path="$new_path"
24820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24821     unix_path=`$CYGPATH -u "$windows_path"`
24822     new_path="$unix_path"
24823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24825     new_path="$unix_path"
24826   fi
24827 
24828   if test "x$path" != "x$new_path"; then
24829     BOOT_JDK="$new_path"
24830     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24831 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24832   fi
24833 
24834   # Save the first 10 bytes of this path to the storage, so fixpath can work.
24835   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24836 
24837   else
24838     # We're on a posix platform. Hooray! :)
24839     path="$BOOT_JDK"
24840     has_space=`$ECHO "$path" | $GREP " "`
24841     if test "x$has_space" != x; then
24842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24843 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24844       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24845     fi
24846 
24847     # Use eval to expand a potential ~
24848     eval path="$path"
24849     if test ! -f "$path" && test ! -d "$path"; then
24850       as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24851     fi
24852 
24853     BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24854   fi
24855 
24856               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24857 $as_echo_n "checking for Boot JDK... " >&6; }
24858               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24859 $as_echo "$BOOT_JDK" >&6; }
24860               { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24861 $as_echo_n "checking Boot JDK version... " >&6; }
24862               BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24863               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24864 $as_echo "$BOOT_JDK_VERSION" >&6; }
24865             fi # end check jdk version
24866           fi # end check rt.jar
24867         fi # end check javac
24868       fi # end check java
24869     fi # end check boot jdk found
24870   fi
24871 
24872 
24873   # If we haven't found anything yet, we've truly lost. Give up.
24874   if test "x$BOOT_JDK_FOUND" = xno; then
24875 
24876   # Print a helpful message on how to acquire the necessary build dependency.
24877   # openjdk is the help tag: freetype, cups, pulse, alsa etc
24878   MISSING_DEPENDENCY=openjdk
24879 
24880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24881     cygwin_help $MISSING_DEPENDENCY
24882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24883     msys_help $MISSING_DEPENDENCY
24884   else
24885     PKGHANDLER_COMMAND=
24886 
24887     case $PKGHANDLER in
24888       apt-get)
24889         apt_help     $MISSING_DEPENDENCY ;;
24890       yum)
24891         yum_help     $MISSING_DEPENDENCY ;;
24892       port)
24893         port_help    $MISSING_DEPENDENCY ;;
24894       pkgutil)
24895         pkgutil_help $MISSING_DEPENDENCY ;;
24896       pkgadd)
24897         pkgadd_help  $MISSING_DEPENDENCY ;;
24898     esac
24899 
24900     if test "x$PKGHANDLER_COMMAND" != x; then
24901       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24902     fi
24903   fi
24904 
24905     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
24906 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
24907     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
24908 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24909     as_fn_error $? "Cannot continue" "$LINENO" 5
24910   fi
24911 
24912   # Setup proper paths for what we found
24913   BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
24914   if test ! -f "$BOOT_RTJAR"; then
24915     # On MacOSX it is called classes.jar
24916     BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
24917     if test -f "$BOOT_RTJAR"; then
24918       # Remove the ..
24919       BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
24920     fi
24921   fi
24922   BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
24923   BOOT_JDK="$BOOT_JDK"
24924 
24925 
24926 
24927 
24928   # Setup tools from the Boot JDK.
24929 
24930   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
24931 
24932   # Publish this variable in the help.
24933 
24934 
24935   if test "x$JAVA" = x; then
24936     # The variable is not set by user, try to locate tool using the code snippet
24937 
24938       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24939 $as_echo_n "checking for java in Boot JDK... " >&6; }
24940       JAVA=$BOOT_JDK/bin/java
24941       if test ! -x $JAVA; then
24942         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24943 $as_echo "not found" >&6; }
24944         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24945 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24946         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24947       fi
24948       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24949 $as_echo "ok" >&6; }
24950 
24951 
24952   else
24953     # The variable is set, but is it from the command line or the environment?
24954 
24955     # Try to remove the string !JAVA! from our list.
24956     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
24957     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24958       # If it failed, the variable was not from the command line. Ignore it,
24959       # but warn the user (except for BASH, which is always set by the calling BASH).
24960       if test "xJAVA" != xBASH; then
24961         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
24962 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
24963       fi
24964       # Try to locate tool using the code snippet
24965 
24966       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
24967 $as_echo_n "checking for java in Boot JDK... " >&6; }
24968       JAVA=$BOOT_JDK/bin/java
24969       if test ! -x $JAVA; then
24970         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24971 $as_echo "not found" >&6; }
24972         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
24973 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
24974         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
24975       fi
24976       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
24977 $as_echo "ok" >&6; }
24978 
24979 
24980     else
24981       # If it succeeded, then it was overridden by the user. We will use it
24982       # for the tool.
24983 
24984       # First remove it from the list of overridden variables, so we can test
24985       # for unknown variables in the end.
24986       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24987 
24988       # Check if the provided tool contains a complete path.
24989       tool_specified="$JAVA"
24990       tool_basename="${tool_specified##*/}"
24991       if test "x$tool_basename" = "x$tool_specified"; then
24992         # A command without a complete path is provided, search $PATH.
24993         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
24994 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
24995         # Extract the first word of "$tool_basename", so it can be a program name with args.
24996 set dummy $tool_basename; ac_word=$2
24997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24998 $as_echo_n "checking for $ac_word... " >&6; }
24999 if ${ac_cv_path_JAVA+:} false; then :
25000   $as_echo_n "(cached) " >&6
25001 else
25002   case $JAVA in
25003   [\\/]* | ?:[\\/]*)
25004   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25005   ;;
25006   *)
25007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25008 for as_dir in $PATH
25009 do
25010   IFS=$as_save_IFS
25011   test -z "$as_dir" && as_dir=.
25012     for ac_exec_ext in '' $ac_executable_extensions; do
25013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25014     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25016     break 2
25017   fi
25018 done
25019   done
25020 IFS=$as_save_IFS
25021 
25022   ;;
25023 esac
25024 fi
25025 JAVA=$ac_cv_path_JAVA
25026 if test -n "$JAVA"; then
25027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25028 $as_echo "$JAVA" >&6; }
25029 else
25030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25031 $as_echo "no" >&6; }
25032 fi
25033 
25034 
25035         if test "x$JAVA" = x; then
25036           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25037         fi
25038       else
25039         # Otherwise we believe it is a complete path. Use it as it is.
25040         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25041 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25042         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25043 $as_echo_n "checking for JAVA... " >&6; }
25044         if test ! -x "$tool_specified"; then
25045           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25046 $as_echo "not found" >&6; }
25047           as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25048         fi
25049         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25050 $as_echo "$tool_specified" >&6; }
25051       fi
25052     fi
25053   fi
25054 
25055 
25056 
25057   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25058 
25059   # Publish this variable in the help.
25060 
25061 
25062   if test "x$JAVAC" = x; then
25063     # The variable is not set by user, try to locate tool using the code snippet
25064 
25065       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25066 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25067       JAVAC=$BOOT_JDK/bin/javac
25068       if test ! -x $JAVAC; then
25069         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25070 $as_echo "not found" >&6; }
25071         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25072 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25073         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25074       fi
25075       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25076 $as_echo "ok" >&6; }
25077 
25078 
25079   else
25080     # The variable is set, but is it from the command line or the environment?
25081 
25082     # Try to remove the string !JAVAC! from our list.
25083     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25084     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25085       # If it failed, the variable was not from the command line. Ignore it,
25086       # but warn the user (except for BASH, which is always set by the calling BASH).
25087       if test "xJAVAC" != xBASH; then
25088         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25089 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25090       fi
25091       # Try to locate tool using the code snippet
25092 
25093       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25094 $as_echo_n "checking for javac in Boot JDK... " >&6; }
25095       JAVAC=$BOOT_JDK/bin/javac
25096       if test ! -x $JAVAC; then
25097         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25098 $as_echo "not found" >&6; }
25099         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25100 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25101         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25102       fi
25103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25104 $as_echo "ok" >&6; }
25105 
25106 
25107     else
25108       # If it succeeded, then it was overridden by the user. We will use it
25109       # for the tool.
25110 
25111       # First remove it from the list of overridden variables, so we can test
25112       # for unknown variables in the end.
25113       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25114 
25115       # Check if the provided tool contains a complete path.
25116       tool_specified="$JAVAC"
25117       tool_basename="${tool_specified##*/}"
25118       if test "x$tool_basename" = "x$tool_specified"; then
25119         # A command without a complete path is provided, search $PATH.
25120         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25121 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25122         # Extract the first word of "$tool_basename", so it can be a program name with args.
25123 set dummy $tool_basename; ac_word=$2
25124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25125 $as_echo_n "checking for $ac_word... " >&6; }
25126 if ${ac_cv_path_JAVAC+:} false; then :
25127   $as_echo_n "(cached) " >&6
25128 else
25129   case $JAVAC in
25130   [\\/]* | ?:[\\/]*)
25131   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25132   ;;
25133   *)
25134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25135 for as_dir in $PATH
25136 do
25137   IFS=$as_save_IFS
25138   test -z "$as_dir" && as_dir=.
25139     for ac_exec_ext in '' $ac_executable_extensions; do
25140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25141     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25143     break 2
25144   fi
25145 done
25146   done
25147 IFS=$as_save_IFS
25148 
25149   ;;
25150 esac
25151 fi
25152 JAVAC=$ac_cv_path_JAVAC
25153 if test -n "$JAVAC"; then
25154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25155 $as_echo "$JAVAC" >&6; }
25156 else
25157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25158 $as_echo "no" >&6; }
25159 fi
25160 
25161 
25162         if test "x$JAVAC" = x; then
25163           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25164         fi
25165       else
25166         # Otherwise we believe it is a complete path. Use it as it is.
25167         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25168 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25169         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25170 $as_echo_n "checking for JAVAC... " >&6; }
25171         if test ! -x "$tool_specified"; then
25172           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25173 $as_echo "not found" >&6; }
25174           as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25175         fi
25176         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25177 $as_echo "$tool_specified" >&6; }
25178       fi
25179     fi
25180   fi
25181 
25182 
25183 
25184   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25185 
25186   # Publish this variable in the help.
25187 
25188 
25189   if test "x$JAVAH" = x; then
25190     # The variable is not set by user, try to locate tool using the code snippet
25191 
25192       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25193 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25194       JAVAH=$BOOT_JDK/bin/javah
25195       if test ! -x $JAVAH; then
25196         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25197 $as_echo "not found" >&6; }
25198         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25199 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25200         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25201       fi
25202       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25203 $as_echo "ok" >&6; }
25204 
25205 
25206   else
25207     # The variable is set, but is it from the command line or the environment?
25208 
25209     # Try to remove the string !JAVAH! from our list.
25210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25212       # If it failed, the variable was not from the command line. Ignore it,
25213       # but warn the user (except for BASH, which is always set by the calling BASH).
25214       if test "xJAVAH" != xBASH; then
25215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25216 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25217       fi
25218       # Try to locate tool using the code snippet
25219 
25220       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25221 $as_echo_n "checking for javah in Boot JDK... " >&6; }
25222       JAVAH=$BOOT_JDK/bin/javah
25223       if test ! -x $JAVAH; then
25224         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25225 $as_echo "not found" >&6; }
25226         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25227 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25228         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25229       fi
25230       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25231 $as_echo "ok" >&6; }
25232 
25233 
25234     else
25235       # If it succeeded, then it was overridden by the user. We will use it
25236       # for the tool.
25237 
25238       # First remove it from the list of overridden variables, so we can test
25239       # for unknown variables in the end.
25240       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25241 
25242       # Check if the provided tool contains a complete path.
25243       tool_specified="$JAVAH"
25244       tool_basename="${tool_specified##*/}"
25245       if test "x$tool_basename" = "x$tool_specified"; then
25246         # A command without a complete path is provided, search $PATH.
25247         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25248 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25249         # Extract the first word of "$tool_basename", so it can be a program name with args.
25250 set dummy $tool_basename; ac_word=$2
25251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25252 $as_echo_n "checking for $ac_word... " >&6; }
25253 if ${ac_cv_path_JAVAH+:} false; then :
25254   $as_echo_n "(cached) " >&6
25255 else
25256   case $JAVAH in
25257   [\\/]* | ?:[\\/]*)
25258   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25259   ;;
25260   *)
25261   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25262 for as_dir in $PATH
25263 do
25264   IFS=$as_save_IFS
25265   test -z "$as_dir" && as_dir=.
25266     for ac_exec_ext in '' $ac_executable_extensions; do
25267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25268     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25270     break 2
25271   fi
25272 done
25273   done
25274 IFS=$as_save_IFS
25275 
25276   ;;
25277 esac
25278 fi
25279 JAVAH=$ac_cv_path_JAVAH
25280 if test -n "$JAVAH"; then
25281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25282 $as_echo "$JAVAH" >&6; }
25283 else
25284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25285 $as_echo "no" >&6; }
25286 fi
25287 
25288 
25289         if test "x$JAVAH" = x; then
25290           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25291         fi
25292       else
25293         # Otherwise we believe it is a complete path. Use it as it is.
25294         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25295 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25297 $as_echo_n "checking for JAVAH... " >&6; }
25298         if test ! -x "$tool_specified"; then
25299           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25300 $as_echo "not found" >&6; }
25301           as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25302         fi
25303         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25304 $as_echo "$tool_specified" >&6; }
25305       fi
25306     fi
25307   fi
25308 
25309 
25310 
25311   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25312 
25313   # Publish this variable in the help.
25314 
25315 
25316   if test "x$JAR" = x; then
25317     # The variable is not set by user, try to locate tool using the code snippet
25318 
25319       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25320 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25321       JAR=$BOOT_JDK/bin/jar
25322       if test ! -x $JAR; then
25323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25324 $as_echo "not found" >&6; }
25325         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25326 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25327         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25328       fi
25329       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25330 $as_echo "ok" >&6; }
25331 
25332 
25333   else
25334     # The variable is set, but is it from the command line or the environment?
25335 
25336     # Try to remove the string !JAR! from our list.
25337     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25338     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25339       # If it failed, the variable was not from the command line. Ignore it,
25340       # but warn the user (except for BASH, which is always set by the calling BASH).
25341       if test "xJAR" != xBASH; then
25342         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25343 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25344       fi
25345       # Try to locate tool using the code snippet
25346 
25347       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25348 $as_echo_n "checking for jar in Boot JDK... " >&6; }
25349       JAR=$BOOT_JDK/bin/jar
25350       if test ! -x $JAR; then
25351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25352 $as_echo "not found" >&6; }
25353         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25354 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25355         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25356       fi
25357       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25358 $as_echo "ok" >&6; }
25359 
25360 
25361     else
25362       # If it succeeded, then it was overridden by the user. We will use it
25363       # for the tool.
25364 
25365       # First remove it from the list of overridden variables, so we can test
25366       # for unknown variables in the end.
25367       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25368 
25369       # Check if the provided tool contains a complete path.
25370       tool_specified="$JAR"
25371       tool_basename="${tool_specified##*/}"
25372       if test "x$tool_basename" = "x$tool_specified"; then
25373         # A command without a complete path is provided, search $PATH.
25374         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25375 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25376         # Extract the first word of "$tool_basename", so it can be a program name with args.
25377 set dummy $tool_basename; ac_word=$2
25378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25379 $as_echo_n "checking for $ac_word... " >&6; }
25380 if ${ac_cv_path_JAR+:} false; then :
25381   $as_echo_n "(cached) " >&6
25382 else
25383   case $JAR in
25384   [\\/]* | ?:[\\/]*)
25385   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25386   ;;
25387   *)
25388   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25389 for as_dir in $PATH
25390 do
25391   IFS=$as_save_IFS
25392   test -z "$as_dir" && as_dir=.
25393     for ac_exec_ext in '' $ac_executable_extensions; do
25394   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25395     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25396     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25397     break 2
25398   fi
25399 done
25400   done
25401 IFS=$as_save_IFS
25402 
25403   ;;
25404 esac
25405 fi
25406 JAR=$ac_cv_path_JAR
25407 if test -n "$JAR"; then
25408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25409 $as_echo "$JAR" >&6; }
25410 else
25411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25412 $as_echo "no" >&6; }
25413 fi
25414 
25415 
25416         if test "x$JAR" = x; then
25417           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25418         fi
25419       else
25420         # Otherwise we believe it is a complete path. Use it as it is.
25421         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25422 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25423         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25424 $as_echo_n "checking for JAR... " >&6; }
25425         if test ! -x "$tool_specified"; then
25426           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25427 $as_echo "not found" >&6; }
25428           as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25429         fi
25430         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25431 $as_echo "$tool_specified" >&6; }
25432       fi
25433     fi
25434   fi
25435 
25436 
25437 
25438   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25439 
25440   # Publish this variable in the help.
25441 
25442 
25443   if test "x$NATIVE2ASCII" = x; then
25444     # The variable is not set by user, try to locate tool using the code snippet
25445 
25446       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25447 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25448       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25449       if test ! -x $NATIVE2ASCII; then
25450         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25451 $as_echo "not found" >&6; }
25452         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25453 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25454         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25455       fi
25456       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25457 $as_echo "ok" >&6; }
25458 
25459 
25460   else
25461     # The variable is set, but is it from the command line or the environment?
25462 
25463     # Try to remove the string !NATIVE2ASCII! from our list.
25464     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25465     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25466       # If it failed, the variable was not from the command line. Ignore it,
25467       # but warn the user (except for BASH, which is always set by the calling BASH).
25468       if test "xNATIVE2ASCII" != xBASH; then
25469         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25470 $as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25471       fi
25472       # Try to locate tool using the code snippet
25473 
25474       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25475 $as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25476       NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25477       if test ! -x $NATIVE2ASCII; then
25478         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25479 $as_echo "not found" >&6; }
25480         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25481 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25482         as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25483       fi
25484       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25485 $as_echo "ok" >&6; }
25486 
25487 
25488     else
25489       # If it succeeded, then it was overridden by the user. We will use it
25490       # for the tool.
25491 
25492       # First remove it from the list of overridden variables, so we can test
25493       # for unknown variables in the end.
25494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25495 
25496       # Check if the provided tool contains a complete path.
25497       tool_specified="$NATIVE2ASCII"
25498       tool_basename="${tool_specified##*/}"
25499       if test "x$tool_basename" = "x$tool_specified"; then
25500         # A command without a complete path is provided, search $PATH.
25501         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25502 $as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25503         # Extract the first word of "$tool_basename", so it can be a program name with args.
25504 set dummy $tool_basename; ac_word=$2
25505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25506 $as_echo_n "checking for $ac_word... " >&6; }
25507 if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25508   $as_echo_n "(cached) " >&6
25509 else
25510   case $NATIVE2ASCII in
25511   [\\/]* | ?:[\\/]*)
25512   ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25513   ;;
25514   *)
25515   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25516 for as_dir in $PATH
25517 do
25518   IFS=$as_save_IFS
25519   test -z "$as_dir" && as_dir=.
25520     for ac_exec_ext in '' $ac_executable_extensions; do
25521   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25522     ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25523     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25524     break 2
25525   fi
25526 done
25527   done
25528 IFS=$as_save_IFS
25529 
25530   ;;
25531 esac
25532 fi
25533 NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25534 if test -n "$NATIVE2ASCII"; then
25535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25536 $as_echo "$NATIVE2ASCII" >&6; }
25537 else
25538   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25539 $as_echo "no" >&6; }
25540 fi
25541 
25542 
25543         if test "x$NATIVE2ASCII" = x; then
25544           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25545         fi
25546       else
25547         # Otherwise we believe it is a complete path. Use it as it is.
25548         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25549 $as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25550         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25551 $as_echo_n "checking for NATIVE2ASCII... " >&6; }
25552         if test ! -x "$tool_specified"; then
25553           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25554 $as_echo "not found" >&6; }
25555           as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25556         fi
25557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25558 $as_echo "$tool_specified" >&6; }
25559       fi
25560     fi
25561   fi
25562 
25563 
25564 
25565   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25566 
25567   # Publish this variable in the help.
25568 
25569 
25570   if test "x$JARSIGNER" = x; then
25571     # The variable is not set by user, try to locate tool using the code snippet
25572 
25573       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25574 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25575       JARSIGNER=$BOOT_JDK/bin/jarsigner
25576       if test ! -x $JARSIGNER; then
25577         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25578 $as_echo "not found" >&6; }
25579         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25580 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25581         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25582       fi
25583       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25584 $as_echo "ok" >&6; }
25585 
25586 
25587   else
25588     # The variable is set, but is it from the command line or the environment?
25589 
25590     # Try to remove the string !JARSIGNER! from our list.
25591     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25592     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25593       # If it failed, the variable was not from the command line. Ignore it,
25594       # but warn the user (except for BASH, which is always set by the calling BASH).
25595       if test "xJARSIGNER" != xBASH; then
25596         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25597 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25598       fi
25599       # Try to locate tool using the code snippet
25600 
25601       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25602 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25603       JARSIGNER=$BOOT_JDK/bin/jarsigner
25604       if test ! -x $JARSIGNER; then
25605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25606 $as_echo "not found" >&6; }
25607         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25608 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25609         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25610       fi
25611       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25612 $as_echo "ok" >&6; }
25613 
25614 
25615     else
25616       # If it succeeded, then it was overridden by the user. We will use it
25617       # for the tool.
25618 
25619       # First remove it from the list of overridden variables, so we can test
25620       # for unknown variables in the end.
25621       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25622 
25623       # Check if the provided tool contains a complete path.
25624       tool_specified="$JARSIGNER"
25625       tool_basename="${tool_specified##*/}"
25626       if test "x$tool_basename" = "x$tool_specified"; then
25627         # A command without a complete path is provided, search $PATH.
25628         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25629 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25630         # Extract the first word of "$tool_basename", so it can be a program name with args.
25631 set dummy $tool_basename; ac_word=$2
25632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25633 $as_echo_n "checking for $ac_word... " >&6; }
25634 if ${ac_cv_path_JARSIGNER+:} false; then :
25635   $as_echo_n "(cached) " >&6
25636 else
25637   case $JARSIGNER in
25638   [\\/]* | ?:[\\/]*)
25639   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25640   ;;
25641   *)
25642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25643 for as_dir in $PATH
25644 do
25645   IFS=$as_save_IFS
25646   test -z "$as_dir" && as_dir=.
25647     for ac_exec_ext in '' $ac_executable_extensions; do
25648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25649     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25651     break 2
25652   fi
25653 done
25654   done
25655 IFS=$as_save_IFS
25656 
25657   ;;
25658 esac
25659 fi
25660 JARSIGNER=$ac_cv_path_JARSIGNER
25661 if test -n "$JARSIGNER"; then
25662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25663 $as_echo "$JARSIGNER" >&6; }
25664 else
25665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25666 $as_echo "no" >&6; }
25667 fi
25668 
25669 
25670         if test "x$JARSIGNER" = x; then
25671           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25672         fi
25673       else
25674         # Otherwise we believe it is a complete path. Use it as it is.
25675         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25676 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25678 $as_echo_n "checking for JARSIGNER... " >&6; }
25679         if test ! -x "$tool_specified"; then
25680           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25681 $as_echo "not found" >&6; }
25682           as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25683         fi
25684         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25685 $as_echo "$tool_specified" >&6; }
25686       fi
25687     fi
25688   fi
25689 
25690 
25691 
25692   # Finally, set some other options...
25693 
25694   # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25695   BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25696 
25697 
25698 
25699 
25700   ##############################################################################
25701   #
25702   # Specify options for anything that is run with the Boot JDK.
25703   #
25704 
25705 # Check whether --with-boot-jdk-jvmargs was given.
25706 if test "${with_boot_jdk_jvmargs+set}" = set; then :
25707   withval=$with_boot_jdk_jvmargs;
25708 fi
25709 
25710 
25711   if test "x$with_boot_jdk_jvmargs" = x; then
25712     # Not all JVM:s accept the same arguments on the command line.
25713     # OpenJDK specific increase in thread stack for JDK build,
25714     # well more specifically, when running javac.
25715     if test "x$BUILD_NUM_BITS" = x32; then
25716       STACK_SIZE=768
25717     else
25718       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25719       # since 64-bit pointers are pushed on the stach. Apparently, we need
25720       # to increase the stack space when javacing the JDK....
25721       STACK_SIZE=1536
25722     fi
25723 
25724     # Minimum amount of heap memory.
25725 
25726   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25727   $ECHO "Command: $JAVA -Xms64M -version" >&5
25728   OUTPUT=`$JAVA -Xms64M -version 2>&1`
25729   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25730   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25731   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25732     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25733     JVM_ARG_OK=true
25734   else
25735     $ECHO "Arg failed:" >&5
25736     $ECHO "$OUTPUT" >&5
25737     JVM_ARG_OK=false
25738   fi
25739 
25740     if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25741       # Why does macosx need more heap? Its the huge JDK batch.
25742 
25743   $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25744   $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25745   OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25746   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25747   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25748   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25749     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25750     JVM_ARG_OK=true
25751   else
25752     $ECHO "Arg failed:" >&5
25753     $ECHO "$OUTPUT" >&5
25754     JVM_ARG_OK=false
25755   fi
25756 
25757     else
25758 
25759   $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25760   $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25761   OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25762   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25763   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25764   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25765     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25766     JVM_ARG_OK=true
25767   else
25768     $ECHO "Arg failed:" >&5
25769     $ECHO "$OUTPUT" >&5
25770     JVM_ARG_OK=false
25771   fi
25772 
25773     fi
25774     # When is adding -client something that speeds up the JVM?
25775     # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25776 
25777   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25778   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25779   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25780   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25781   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25782   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25783     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25784     JVM_ARG_OK=true
25785   else
25786     $ECHO "Arg failed:" >&5
25787     $ECHO "$OUTPUT" >&5
25788     JVM_ARG_OK=false
25789   fi
25790 
25791     # Disable special log output when a debug build is used as Boot JDK...
25792 
25793   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25794   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25795   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25796   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25797   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25798   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25799     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25800     JVM_ARG_OK=true
25801   else
25802     $ECHO "Arg failed:" >&5
25803     $ECHO "$OUTPUT" >&5
25804     JVM_ARG_OK=false
25805   fi
25806 
25807   fi
25808 
25809   BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25810 
25811 
25812 
25813 ###############################################################################
25814 #
25815 # Configure the sources to use. We can add or override individual directories.
25816 #
25817 ###############################################################################
25818 
25819 
25820   # Where are the sources. Any of these can be overridden
25821   # using --with-override-corba and the likes.
25822   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25823   CORBA_TOPDIR="$SRC_ROOT/corba"
25824   JAXP_TOPDIR="$SRC_ROOT/jaxp"
25825   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25826   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25827   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25828   JDK_TOPDIR="$SRC_ROOT/jdk"
25829 
25830 
25831 
25832 
25833 
25834 
25835 
25836 
25837 
25838 
25839   ###############################################################################
25840   #
25841   # Pickup additional source for a component from outside of the source root
25842   # or override source for a component.
25843   #
25844 
25845 # Check whether --with-add-source-root was given.
25846 if test "${with_add_source_root+set}" = set; then :
25847   withval=$with_add_source_root;
25848 fi
25849 
25850 
25851 
25852 # Check whether --with-override-source-root was given.
25853 if test "${with_override_source_root+set}" = set; then :
25854   withval=$with_override_source_root;
25855 fi
25856 
25857 
25858 
25859 # Check whether --with-adds-and-overrides was given.
25860 if test "${with_adds_and_overrides+set}" = set; then :
25861   withval=$with_adds_and_overrides;
25862 fi
25863 
25864 
25865   if test "x$with_adds_and_overrides" != x; then
25866     with_add_source_root="$with_adds_and_overrides/adds"
25867     with_override_source_root="$with_adds_and_overrides/overrides"
25868   fi
25869 
25870   if test "x$with_add_source_root" != x; then
25871     if ! test -d $with_add_source_root; then
25872       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
25873     fi
25874     CURDIR="$PWD"
25875     cd "$with_add_source_root"
25876     ADD_SRC_ROOT="`pwd`"
25877     cd "$CURDIR"
25878     # Verify that the addon source root does not have any root makefiles.
25879     # If it does, then it is usually an error, prevent this.
25880     if test -f $with_add_source_root/langtools/make/Makefile; then
25881       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
25882     fi
25883     if test -f $with_add_source_root/corba/make/Makefile; then
25884       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
25885     fi
25886     if test -f $with_add_source_root/jaxp/make/Makefile; then
25887       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
25888     fi
25889     if test -f $with_add_source_root/jaxws/make/Makefile; then
25890       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
25891     fi
25892     if test -f $with_add_source_root/hotspot/make/Makefile; then
25893       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
25894     fi
25895     if test -f $with_add_source_root/nashorn/make/Makefile; then
25896       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
25897     fi
25898     if test -f $with_add_source_root/jdk/make/Makefile; then
25899       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
25900     fi
25901   fi
25902 
25903 
25904   if test "x$with_override_source_root" != x; then
25905     if ! test -d $with_override_source_root; then
25906       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
25907     fi
25908     CURDIR="$PWD"
25909     cd "$with_override_source_root"
25910     OVERRIDE_SRC_ROOT="`pwd`"
25911     cd "$CURDIR"
25912     if test -f $with_override_source_root/langtools/make/Makefile; then
25913       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
25914     fi
25915     if test -f $with_override_source_root/corba/make/Makefile; then
25916       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
25917     fi
25918     if test -f $with_override_source_root/jaxp/make/Makefile; then
25919       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
25920     fi
25921     if test -f $with_override_source_root/jaxws/make/Makefile; then
25922       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
25923     fi
25924     if test -f $with_override_source_root/hotspot/make/Makefile; then
25925       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
25926     fi
25927     if test -f $with_override_source_root/nashorn/make/Makefile; then
25928       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
25929     fi
25930     if test -f $with_override_source_root/jdk/make/Makefile; then
25931       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
25932     fi
25933   fi
25934 
25935 
25936   ###############################################################################
25937   #
25938   # Override a repo completely, this is used for example when you have 3 small
25939   # development sandboxes of the langtools sources and want to avoid having 3 full
25940   # OpenJDK sources checked out on disk.
25941   #
25942   # Assuming that the 3 langtools sandboxes are located here:
25943   # /home/fredrik/sandbox1/langtools
25944   # /home/fredrik/sandbox2/langtools
25945   # /home/fredrik/sandbox3/langtools
25946   #
25947   # From the source root you create build subdirs manually:
25948   #     mkdir -p build1 build2 build3
25949   # in each build directory run:
25950   #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
25951   #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
25952   #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
25953   #
25954 
25955 
25956 # Check whether --with-override-langtools was given.
25957 if test "${with_override_langtools+set}" = set; then :
25958   withval=$with_override_langtools;
25959 fi
25960 
25961 
25962 
25963 # Check whether --with-override-corba was given.
25964 if test "${with_override_corba+set}" = set; then :
25965   withval=$with_override_corba;
25966 fi
25967 
25968 
25969 
25970 # Check whether --with-override-jaxp was given.
25971 if test "${with_override_jaxp+set}" = set; then :
25972   withval=$with_override_jaxp;
25973 fi
25974 
25975 
25976 
25977 # Check whether --with-override-jaxws was given.
25978 if test "${with_override_jaxws+set}" = set; then :
25979   withval=$with_override_jaxws;
25980 fi
25981 
25982 
25983 
25984 # Check whether --with-override-hotspot was given.
25985 if test "${with_override_hotspot+set}" = set; then :
25986   withval=$with_override_hotspot;
25987 fi
25988 
25989 
25990 
25991 # Check whether --with-override-nashorn was given.
25992 if test "${with_override_nashorn+set}" = set; then :
25993   withval=$with_override_nashorn;
25994 fi
25995 
25996 
25997 
25998 # Check whether --with-override-jdk was given.
25999 if test "${with_override_jdk+set}" = set; then :
26000   withval=$with_override_jdk;
26001 fi
26002 
26003 
26004   if test "x$with_override_langtools" != x; then
26005     CURDIR="$PWD"
26006     cd "$with_override_langtools"
26007     LANGTOOLS_TOPDIR="`pwd`"
26008     cd "$CURDIR"
26009     if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26010       as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26011     fi
26012     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26013 $as_echo_n "checking if langtools should be overridden... " >&6; }
26014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26015 $as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26016   fi
26017   if test "x$with_override_corba" != x; then
26018     CURDIR="$PWD"
26019     cd "$with_override_corba"
26020     CORBA_TOPDIR="`pwd`"
26021     cd "$CURDIR"
26022     if ! test -f $CORBA_TOPDIR/make/Makefile; then
26023       as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26024     fi
26025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26026 $as_echo_n "checking if corba should be overridden... " >&6; }
26027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26028 $as_echo "yes with $CORBA_TOPDIR" >&6; }
26029   fi
26030   if test "x$with_override_jaxp" != x; then
26031     CURDIR="$PWD"
26032     cd "$with_override_jaxp"
26033     JAXP_TOPDIR="`pwd`"
26034     cd "$CURDIR"
26035     if ! test -f $JAXP_TOPDIR/make/Makefile; then
26036       as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26037     fi
26038     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26039 $as_echo_n "checking if jaxp should be overridden... " >&6; }
26040     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26041 $as_echo "yes with $JAXP_TOPDIR" >&6; }
26042   fi
26043   if test "x$with_override_jaxws" != x; then
26044     CURDIR="$PWD"
26045     cd "$with_override_jaxws"
26046     JAXWS_TOPDIR="`pwd`"
26047     cd "$CURDIR"
26048     if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26049       as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26050     fi
26051     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26052 $as_echo_n "checking if jaxws should be overridden... " >&6; }
26053     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26054 $as_echo "yes with $JAXWS_TOPDIR" >&6; }
26055   fi
26056   if test "x$with_override_hotspot" != x; then
26057     CURDIR="$PWD"
26058     cd "$with_override_hotspot"
26059     HOTSPOT_TOPDIR="`pwd`"
26060     cd "$CURDIR"
26061     if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26062       as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26063     fi
26064     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26065 $as_echo_n "checking if hotspot should be overridden... " >&6; }
26066     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26067 $as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26068   fi
26069   if test "x$with_override_nashorn" != x; then
26070     CURDIR="$PWD"
26071     cd "$with_override_nashorn"
26072     NASHORN_TOPDIR="`pwd`"
26073     cd "$CURDIR"
26074     if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26075       as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26076     fi
26077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26078 $as_echo_n "checking if nashorn should be overridden... " >&6; }
26079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26080 $as_echo "yes with $NASHORN_TOPDIR" >&6; }
26081   fi
26082   if test "x$with_override_jdk" != x; then
26083     CURDIR="$PWD"
26084     cd "$with_override_jdk"
26085     JDK_TOPDIR="`pwd`"
26086     cd "$CURDIR"
26087     if ! test -f $JDK_TOPDIR/make/Makefile; then
26088       as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26089     fi
26090     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26091 $as_echo_n "checking if JDK should be overridden... " >&6; }
26092     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26093 $as_echo "yes with $JDK_TOPDIR" >&6; }
26094   fi
26095 
26096 
26097   BUILD_OUTPUT="$OUTPUT_ROOT"
26098 
26099 
26100   HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26101   BUILD_HOTSPOT=true
26102 
26103 
26104 
26105 # Check whether --with-import-hotspot was given.
26106 if test "${with_import_hotspot+set}" = set; then :
26107   withval=$with_import_hotspot;
26108 fi
26109 
26110   if test "x$with_import_hotspot" != x; then
26111     CURDIR="$PWD"
26112     cd "$with_import_hotspot"
26113     HOTSPOT_DIST="`pwd`"
26114     cd "$CURDIR"
26115     if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26116       as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26117     fi
26118     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26119 $as_echo_n "checking if hotspot should be imported... " >&6; }
26120     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26121 $as_echo "yes from $HOTSPOT_DIST" >&6; }
26122     BUILD_HOTSPOT=false
26123   fi
26124 
26125   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26126 
26127 
26128 ###############################################################################
26129 #
26130 # Setup the toolchain (compilers etc), i.e. the tools that need to be
26131 # cross-compilation aware.
26132 #
26133 ###############################################################################
26134 
26135 
26136   ###############################################################################
26137   #
26138   # Configure the development tool paths and potential sysroot.
26139   #
26140   ac_ext=cpp
26141 ac_cpp='$CXXCPP $CPPFLAGS'
26142 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26143 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26144 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26145 
26146 
26147   # The option used to specify the target .o,.a or .so file.
26148   # When compiling, how to specify the to be created object file.
26149   CC_OUT_OPTION='-o$(SPACE)'
26150   # When linking, how to specify the to be created executable.
26151   EXE_OUT_OPTION='-o$(SPACE)'
26152   # When linking, how to specify the to be created dynamically linkable library.
26153   LD_OUT_OPTION='-o$(SPACE)'
26154   # When archiving, how to specify the to be create static archive for object files.
26155   AR_OUT_OPTION='rcs$(SPACE)'
26156 
26157 
26158 
26159 
26160 
26161 # Locate the actual tools
26162 
26163 
26164 # Check whether --with-jtreg was given.
26165 if test "${with_jtreg+set}" = set; then :
26166   withval=$with_jtreg;
26167 else
26168   with_jtreg=no
26169 fi
26170 
26171 
26172   if test "x$with_jtreg" = xno; then
26173     # jtreg disabled
26174     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26175 $as_echo_n "checking for jtreg... " >&6; }
26176     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26177 $as_echo "no" >&6; }
26178   else
26179     if test "x$with_jtreg" != xyes; then
26180       # with path specified.
26181       JT_HOME="$with_jtreg"
26182     fi
26183 
26184     if test "x$JT_HOME" != x; then
26185       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
26186 $as_echo_n "checking for jtreg... " >&6; }
26187 
26188       # use JT_HOME enviroment var.
26189 
26190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26191 
26192   # Input might be given as Windows format, start by converting to
26193   # unix format.
26194   path="$JT_HOME"
26195   new_path=`$CYGPATH -u "$path"`
26196 
26197   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26198   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26199   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26200   # "foo.exe" is OK but "foo" is an error.
26201   #
26202   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26203   # It is also a way to make sure we got the proper file name for the real test later on.
26204   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26205   if test "x$test_shortpath" = x; then
26206     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26207 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26208     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
26209   fi
26210 
26211   # Call helper function which possibly converts this using DOS-style short mode.
26212   # If so, the updated path is stored in $new_path.
26213 
26214   input_path="$new_path"
26215   # Check if we need to convert this using DOS-style short mode. If the path
26216   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26217   # take no chances and rewrite it.
26218   # Note: m4 eats our [], so we need to use [ and ] instead.
26219   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26220   if test "x$has_forbidden_chars" != x; then
26221     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26222     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26223     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26224     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26225       # Going to short mode and back again did indeed matter. Since short mode is
26226       # case insensitive, let's make it lowercase to improve readability.
26227       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26228       # Now convert it back to Unix-stile (cygpath)
26229       input_path=`$CYGPATH -u "$shortmode_path"`
26230       new_path="$input_path"
26231     fi
26232   fi
26233 
26234   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26235   if test "x$test_cygdrive_prefix" = x; then
26236     # As a simple fix, exclude /usr/bin since it's not a real path.
26237     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26238       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26239       # a path prefixed by /cygdrive for fixpath to work.
26240       new_path="$CYGWIN_ROOT_PATH$input_path"
26241     fi
26242   fi
26243 
26244 
26245   if test "x$path" != "x$new_path"; then
26246     JT_HOME="$new_path"
26247     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26248 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26249   fi
26250 
26251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26252 
26253   path="$JT_HOME"
26254   has_colon=`$ECHO $path | $GREP ^.:`
26255   new_path="$path"
26256   if test "x$has_colon" = x; then
26257     # Not in mixed or Windows style, start by that.
26258     new_path=`cmd //c echo $path`
26259   fi
26260 
26261 
26262   input_path="$new_path"
26263   # Check if we need to convert this using DOS-style short mode. If the path
26264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26265   # take no chances and rewrite it.
26266   # Note: m4 eats our [], so we need to use [ and ] instead.
26267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26268   if test "x$has_forbidden_chars" != x; then
26269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26270     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26271   fi
26272 
26273 
26274   windows_path="$new_path"
26275   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26276     unix_path=`$CYGPATH -u "$windows_path"`
26277     new_path="$unix_path"
26278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26279     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26280     new_path="$unix_path"
26281   fi
26282 
26283   if test "x$path" != "x$new_path"; then
26284     JT_HOME="$new_path"
26285     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
26286 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
26287   fi
26288 
26289   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26290   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26291 
26292   else
26293     # We're on a posix platform. Hooray! :)
26294     path="$JT_HOME"
26295     has_space=`$ECHO "$path" | $GREP " "`
26296     if test "x$has_space" != x; then
26297       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
26298 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
26299       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26300     fi
26301 
26302     # Use eval to expand a potential ~
26303     eval path="$path"
26304     if test ! -f "$path" && test ! -d "$path"; then
26305       as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
26306     fi
26307 
26308     JT_HOME="`cd "$path"; $THEPWDCMD -L`"
26309   fi
26310 
26311 
26312       # jtreg win32 script works for everybody
26313       JTREGEXE="$JT_HOME/win32/bin/jtreg"
26314 
26315       if test ! -f "$JTREGEXE"; then
26316         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
26317       fi
26318 
26319       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26320 $as_echo "$JTREGEXE" >&6; }
26321     else
26322       # try to find jtreg on path
26323 
26324 
26325 
26326   # Publish this variable in the help.
26327 
26328 
26329   if test "x$JTREGEXE" = x; then
26330     # The variable is not set by user, try to locate tool using the code snippet
26331     for ac_prog in jtreg
26332 do
26333   # Extract the first word of "$ac_prog", so it can be a program name with args.
26334 set dummy $ac_prog; ac_word=$2
26335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26336 $as_echo_n "checking for $ac_word... " >&6; }
26337 if ${ac_cv_path_JTREGEXE+:} false; then :
26338   $as_echo_n "(cached) " >&6
26339 else
26340   case $JTREGEXE in
26341   [\\/]* | ?:[\\/]*)
26342   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26343   ;;
26344   *)
26345   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26346 for as_dir in $PATH
26347 do
26348   IFS=$as_save_IFS
26349   test -z "$as_dir" && as_dir=.
26350     for ac_exec_ext in '' $ac_executable_extensions; do
26351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26352     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26354     break 2
26355   fi
26356 done
26357   done
26358 IFS=$as_save_IFS
26359 
26360   ;;
26361 esac
26362 fi
26363 JTREGEXE=$ac_cv_path_JTREGEXE
26364 if test -n "$JTREGEXE"; then
26365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26366 $as_echo "$JTREGEXE" >&6; }
26367 else
26368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26369 $as_echo "no" >&6; }
26370 fi
26371 
26372 
26373   test -n "$JTREGEXE" && break
26374 done
26375 
26376   else
26377     # The variable is set, but is it from the command line or the environment?
26378 
26379     # Try to remove the string !JTREGEXE! from our list.
26380     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
26381     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26382       # If it failed, the variable was not from the command line. Ignore it,
26383       # but warn the user (except for BASH, which is always set by the calling BASH).
26384       if test "xJTREGEXE" != xBASH; then
26385         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
26386 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
26387       fi
26388       # Try to locate tool using the code snippet
26389       for ac_prog in jtreg
26390 do
26391   # Extract the first word of "$ac_prog", so it can be a program name with args.
26392 set dummy $ac_prog; ac_word=$2
26393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26394 $as_echo_n "checking for $ac_word... " >&6; }
26395 if ${ac_cv_path_JTREGEXE+:} false; then :
26396   $as_echo_n "(cached) " >&6
26397 else
26398   case $JTREGEXE in
26399   [\\/]* | ?:[\\/]*)
26400   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26401   ;;
26402   *)
26403   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26404 for as_dir in $PATH
26405 do
26406   IFS=$as_save_IFS
26407   test -z "$as_dir" && as_dir=.
26408     for ac_exec_ext in '' $ac_executable_extensions; do
26409   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26410     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26411     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26412     break 2
26413   fi
26414 done
26415   done
26416 IFS=$as_save_IFS
26417 
26418   ;;
26419 esac
26420 fi
26421 JTREGEXE=$ac_cv_path_JTREGEXE
26422 if test -n "$JTREGEXE"; then
26423   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26424 $as_echo "$JTREGEXE" >&6; }
26425 else
26426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26427 $as_echo "no" >&6; }
26428 fi
26429 
26430 
26431   test -n "$JTREGEXE" && break
26432 done
26433 
26434     else
26435       # If it succeeded, then it was overridden by the user. We will use it
26436       # for the tool.
26437 
26438       # First remove it from the list of overridden variables, so we can test
26439       # for unknown variables in the end.
26440       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26441 
26442       # Check if the provided tool contains a complete path.
26443       tool_specified="$JTREGEXE"
26444       tool_basename="${tool_specified##*/}"
26445       if test "x$tool_basename" = "x$tool_specified"; then
26446         # A command without a complete path is provided, search $PATH.
26447         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
26448 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
26449         # Extract the first word of "$tool_basename", so it can be a program name with args.
26450 set dummy $tool_basename; ac_word=$2
26451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26452 $as_echo_n "checking for $ac_word... " >&6; }
26453 if ${ac_cv_path_JTREGEXE+:} false; then :
26454   $as_echo_n "(cached) " >&6
26455 else
26456   case $JTREGEXE in
26457   [\\/]* | ?:[\\/]*)
26458   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
26459   ;;
26460   *)
26461   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26462 for as_dir in $PATH
26463 do
26464   IFS=$as_save_IFS
26465   test -z "$as_dir" && as_dir=.
26466     for ac_exec_ext in '' $ac_executable_extensions; do
26467   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26468     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
26469     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26470     break 2
26471   fi
26472 done
26473   done
26474 IFS=$as_save_IFS
26475 
26476   ;;
26477 esac
26478 fi
26479 JTREGEXE=$ac_cv_path_JTREGEXE
26480 if test -n "$JTREGEXE"; then
26481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
26482 $as_echo "$JTREGEXE" >&6; }
26483 else
26484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26485 $as_echo "no" >&6; }
26486 fi
26487 
26488 
26489         if test "x$JTREGEXE" = x; then
26490           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26491         fi
26492       else
26493         # Otherwise we believe it is a complete path. Use it as it is.
26494         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
26495 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
26496         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
26497 $as_echo_n "checking for JTREGEXE... " >&6; }
26498         if test ! -x "$tool_specified"; then
26499           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26500 $as_echo "not found" >&6; }
26501           as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
26502         fi
26503         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26504 $as_echo "$tool_specified" >&6; }
26505       fi
26506     fi
26507   fi
26508 
26509 
26510 
26511   if test "x$JTREGEXE" = x; then
26512     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
26513   fi
26514 
26515 
26516       JT_HOME="`$DIRNAME $JTREGEXE`"
26517     fi
26518   fi
26519 
26520 
26521 
26522 
26523 
26524   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
26525 
26526   # Store path to cygwin link.exe to help excluding it when searching for
26527   # VS linker. This must be done before changing the PATH when looking for VS.
26528   # Extract the first word of "link", so it can be a program name with args.
26529 set dummy link; ac_word=$2
26530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26531 $as_echo_n "checking for $ac_word... " >&6; }
26532 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26533   $as_echo_n "(cached) " >&6
26534 else
26535   case $CYGWIN_LINK in
26536   [\\/]* | ?:[\\/]*)
26537   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26538   ;;
26539   *)
26540   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26541 for as_dir in $PATH
26542 do
26543   IFS=$as_save_IFS
26544   test -z "$as_dir" && as_dir=.
26545     for ac_exec_ext in '' $ac_executable_extensions; do
26546   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26547     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26548     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26549     break 2
26550   fi
26551 done
26552   done
26553 IFS=$as_save_IFS
26554 
26555   ;;
26556 esac
26557 fi
26558 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26559 if test -n "$CYGWIN_LINK"; then
26560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26561 $as_echo "$CYGWIN_LINK" >&6; }
26562 else
26563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26564 $as_echo "no" >&6; }
26565 fi
26566 
26567 
26568   if test "x$CYGWIN_LINK" != x; then
26569     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26570 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26571     "$CYGWIN_LINK" --version > /dev/null
26572     if test $? -eq 0 ; then
26573       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26574 $as_echo "yes" >&6; }
26575     else
26576       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26577 $as_echo "no" >&6; }
26578       # This might be the VS linker. Don't exclude it later on.
26579       CYGWIN_LINK=""
26580     fi
26581   fi
26582 
26583   # First-hand choice is to locate and run the vsvars bat file.
26584 
26585   if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26586     VCVARSFILE="vc/bin/vcvars32.bat"
26587   else
26588     VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26589   fi
26590 
26591   VS_ENV_CMD=""
26592   VS_ENV_ARGS=""
26593   if test "x$with_toolsdir" != x; then
26594 
26595   if test "x$VS_ENV_CMD" = x; then
26596     VS100BASE="$with_toolsdir/../.."
26597     METHOD="--with-tools-dir"
26598 
26599   windows_path="$VS100BASE"
26600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26601     unix_path=`$CYGPATH -u "$windows_path"`
26602     VS100BASE="$unix_path"
26603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26605     VS100BASE="$unix_path"
26606   fi
26607 
26608     if test -d "$VS100BASE"; then
26609       if test -f "$VS100BASE/$VCVARSFILE"; then
26610         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26611 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26612         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26613       else
26614         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26615 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26616         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26617 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26618       fi
26619     fi
26620   fi
26621 
26622   fi
26623 
26624   if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26625     # Having specified an argument which is incorrect will produce an instant failure;
26626     # we should not go on looking
26627     { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26628 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26629     { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26630 $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26631     as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26632   fi
26633 
26634   if test "x$VS100COMNTOOLS" != x; then
26635 
26636   if test "x$VS_ENV_CMD" = x; then
26637     VS100BASE="$VS100COMNTOOLS/../.."
26638     METHOD="VS100COMNTOOLS variable"
26639 
26640   windows_path="$VS100BASE"
26641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26642     unix_path=`$CYGPATH -u "$windows_path"`
26643     VS100BASE="$unix_path"
26644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26646     VS100BASE="$unix_path"
26647   fi
26648 
26649     if test -d "$VS100BASE"; then
26650       if test -f "$VS100BASE/$VCVARSFILE"; then
26651         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26652 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26653         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26654       else
26655         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26656 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26657         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26658 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26659       fi
26660     fi
26661   fi
26662 
26663   fi
26664   if test "x$PROGRAMFILES" != x; then
26665 
26666   if test "x$VS_ENV_CMD" = x; then
26667     VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26668     METHOD="well-known name"
26669 
26670   windows_path="$VS100BASE"
26671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26672     unix_path=`$CYGPATH -u "$windows_path"`
26673     VS100BASE="$unix_path"
26674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26676     VS100BASE="$unix_path"
26677   fi
26678 
26679     if test -d "$VS100BASE"; then
26680       if test -f "$VS100BASE/$VCVARSFILE"; then
26681         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26682 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26683         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26684       else
26685         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26686 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26687         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26688 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26689       fi
26690     fi
26691   fi
26692 
26693   fi
26694 
26695   if test "x$VS_ENV_CMD" = x; then
26696     VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26697     METHOD="well-known name"
26698 
26699   windows_path="$VS100BASE"
26700   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26701     unix_path=`$CYGPATH -u "$windows_path"`
26702     VS100BASE="$unix_path"
26703   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26704     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26705     VS100BASE="$unix_path"
26706   fi
26707 
26708     if test -d "$VS100BASE"; then
26709       if test -f "$VS100BASE/$VCVARSFILE"; then
26710         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26711 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26712         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26713       else
26714         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26715 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26716         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26717 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26718       fi
26719     fi
26720   fi
26721 
26722 
26723   if test "x$VS_ENV_CMD" = x; then
26724     VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26725     METHOD="well-known name"
26726 
26727   windows_path="$VS100BASE"
26728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26729     unix_path=`$CYGPATH -u "$windows_path"`
26730     VS100BASE="$unix_path"
26731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26733     VS100BASE="$unix_path"
26734   fi
26735 
26736     if test -d "$VS100BASE"; then
26737       if test -f "$VS100BASE/$VCVARSFILE"; then
26738         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26739 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26740         VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26741       else
26742         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26743 $as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26744         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26745 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26746       fi
26747     fi
26748   fi
26749 
26750 
26751   if test "x$ProgramW6432" != x; then
26752 
26753   if test "x$VS_ENV_CMD" = x; then
26754     WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26755     METHOD="well-known name"
26756 
26757   windows_path="$WIN_SDK_BASE"
26758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759     unix_path=`$CYGPATH -u "$windows_path"`
26760     WIN_SDK_BASE="$unix_path"
26761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26763     WIN_SDK_BASE="$unix_path"
26764   fi
26765 
26766     if test -d "$WIN_SDK_BASE"; then
26767       # There have been cases of partial or broken SDK installations. A missing
26768       # lib dir is not going to work.
26769       if test ! -d "$WIN_SDK_BASE/../lib"; then
26770         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26771 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26772         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26773 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26774       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26775         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26776 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26777         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26778         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26779           VS_ENV_ARGS="/x86"
26780         else
26781           VS_ENV_ARGS="/x64"
26782         fi
26783       else
26784         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26785 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26786         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26787 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26788       fi
26789     fi
26790   fi
26791 
26792   fi
26793   if test "x$PROGRAMW6432" != x; then
26794 
26795   if test "x$VS_ENV_CMD" = x; then
26796     WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26797     METHOD="well-known name"
26798 
26799   windows_path="$WIN_SDK_BASE"
26800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26801     unix_path=`$CYGPATH -u "$windows_path"`
26802     WIN_SDK_BASE="$unix_path"
26803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26805     WIN_SDK_BASE="$unix_path"
26806   fi
26807 
26808     if test -d "$WIN_SDK_BASE"; then
26809       # There have been cases of partial or broken SDK installations. A missing
26810       # lib dir is not going to work.
26811       if test ! -d "$WIN_SDK_BASE/../lib"; then
26812         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26813 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26814         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26815 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26816       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26817         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26818 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26819         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26820         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26821           VS_ENV_ARGS="/x86"
26822         else
26823           VS_ENV_ARGS="/x64"
26824         fi
26825       else
26826         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26827 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26828         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26829 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26830       fi
26831     fi
26832   fi
26833 
26834   fi
26835   if test "x$PROGRAMFILES" != x; then
26836 
26837   if test "x$VS_ENV_CMD" = x; then
26838     WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26839     METHOD="well-known name"
26840 
26841   windows_path="$WIN_SDK_BASE"
26842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26843     unix_path=`$CYGPATH -u "$windows_path"`
26844     WIN_SDK_BASE="$unix_path"
26845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26847     WIN_SDK_BASE="$unix_path"
26848   fi
26849 
26850     if test -d "$WIN_SDK_BASE"; then
26851       # There have been cases of partial or broken SDK installations. A missing
26852       # lib dir is not going to work.
26853       if test ! -d "$WIN_SDK_BASE/../lib"; then
26854         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26855 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26856         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26857 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26858       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26859         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26860 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26861         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26862         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26863           VS_ENV_ARGS="/x86"
26864         else
26865           VS_ENV_ARGS="/x64"
26866         fi
26867       else
26868         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26869 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26870         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26871 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26872       fi
26873     fi
26874   fi
26875 
26876   fi
26877 
26878   if test "x$VS_ENV_CMD" = x; then
26879     WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26880     METHOD="well-known name"
26881 
26882   windows_path="$WIN_SDK_BASE"
26883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26884     unix_path=`$CYGPATH -u "$windows_path"`
26885     WIN_SDK_BASE="$unix_path"
26886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26888     WIN_SDK_BASE="$unix_path"
26889   fi
26890 
26891     if test -d "$WIN_SDK_BASE"; then
26892       # There have been cases of partial or broken SDK installations. A missing
26893       # lib dir is not going to work.
26894       if test ! -d "$WIN_SDK_BASE/../lib"; then
26895         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26896 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26897         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26898 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26899       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26900         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26901 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26902         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26903         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26904           VS_ENV_ARGS="/x86"
26905         else
26906           VS_ENV_ARGS="/x64"
26907         fi
26908       else
26909         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26910 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26911         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26912 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26913       fi
26914     fi
26915   fi
26916 
26917 
26918   if test "x$VS_ENV_CMD" = x; then
26919     WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26920     METHOD="well-known name"
26921 
26922   windows_path="$WIN_SDK_BASE"
26923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26924     unix_path=`$CYGPATH -u "$windows_path"`
26925     WIN_SDK_BASE="$unix_path"
26926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26928     WIN_SDK_BASE="$unix_path"
26929   fi
26930 
26931     if test -d "$WIN_SDK_BASE"; then
26932       # There have been cases of partial or broken SDK installations. A missing
26933       # lib dir is not going to work.
26934       if test ! -d "$WIN_SDK_BASE/../lib"; then
26935         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26936 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26937         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26938 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26939       elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26940         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26941 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26942         VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26943         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26944           VS_ENV_ARGS="/x86"
26945         else
26946           VS_ENV_ARGS="/x64"
26947         fi
26948       else
26949         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26950 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26951         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26952 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26953       fi
26954     fi
26955   fi
26956 
26957 
26958   if test "x$VS_ENV_CMD" != x; then
26959     # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26960 
26961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26962 
26963   # First separate the path from the arguments. This will split at the first
26964   # space.
26965   complete="$VS_ENV_CMD"
26966   path="${complete%% *}"
26967   tmp="$complete EOL"
26968   arguments="${tmp#* }"
26969 
26970   # Input might be given as Windows format, start by converting to
26971   # unix format.
26972   new_path=`$CYGPATH -u "$path"`
26973 
26974   # Now try to locate executable using which
26975   new_path=`$WHICH "$new_path" 2> /dev/null`
26976   # bat and cmd files are not always considered executable in cygwin causing which
26977   # to not find them
26978   if test "x$new_path" = x \
26979       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26980       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26981     new_path=`$CYGPATH -u "$path"`
26982   fi
26983   if test "x$new_path" = x; then
26984     # Oops. Which didn't find the executable.
26985     # The splitting of arguments from the executable at a space might have been incorrect,
26986     # since paths with space are more likely in Windows. Give it another try with the whole
26987     # argument.
26988     path="$complete"
26989     arguments="EOL"
26990     new_path=`$CYGPATH -u "$path"`
26991     new_path=`$WHICH "$new_path" 2> /dev/null`
26992     # bat and cmd files are not always considered executable in cygwin causing which
26993     # to not find them
26994     if test "x$new_path" = x \
26995         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26996         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26997       new_path=`$CYGPATH -u "$path"`
26998     fi
26999     if test "x$new_path" = x; then
27000       # It's still not found. Now this is an unrecoverable error.
27001       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27002 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27003       has_space=`$ECHO "$complete" | $GREP " "`
27004       if test "x$has_space" != x; then
27005         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27006 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27007       fi
27008       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27009     fi
27010   fi
27011 
27012   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27013   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27014   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27015   # "foo.exe" is OK but "foo" is an error.
27016   #
27017   # This test is therefore slightly more accurate than "test -f" to check for file presence.
27018   # It is also a way to make sure we got the proper file name for the real test later on.
27019   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27020   if test "x$test_shortpath" = x; then
27021     # Short path failed, file does not exist as specified.
27022     # Try adding .exe or .cmd
27023     if test -f "${new_path}.exe"; then
27024       input_to_shortpath="${new_path}.exe"
27025     elif test -f "${new_path}.cmd"; then
27026       input_to_shortpath="${new_path}.cmd"
27027     else
27028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27029 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27030       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27031 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27032       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27033     fi
27034   else
27035     input_to_shortpath="$new_path"
27036   fi
27037 
27038   # Call helper function which possibly converts this using DOS-style short mode.
27039   # If so, the updated path is stored in $new_path.
27040   new_path="$input_to_shortpath"
27041 
27042   input_path="$input_to_shortpath"
27043   # Check if we need to convert this using DOS-style short mode. If the path
27044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27045   # take no chances and rewrite it.
27046   # Note: m4 eats our [], so we need to use [ and ] instead.
27047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27048   if test "x$has_forbidden_chars" != x; then
27049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27050     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27051     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27052     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27053       # Going to short mode and back again did indeed matter. Since short mode is
27054       # case insensitive, let's make it lowercase to improve readability.
27055       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27056       # Now convert it back to Unix-stile (cygpath)
27057       input_path=`$CYGPATH -u "$shortmode_path"`
27058       new_path="$input_path"
27059     fi
27060   fi
27061 
27062   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27063   if test "x$test_cygdrive_prefix" = x; then
27064     # As a simple fix, exclude /usr/bin since it's not a real path.
27065     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27066       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27067       # a path prefixed by /cygdrive for fixpath to work.
27068       new_path="$CYGWIN_ROOT_PATH$input_path"
27069     fi
27070   fi
27071 
27072   # remove trailing .exe if any
27073   new_path="${new_path/%.exe/}"
27074 
27075   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27076 
27077   # First separate the path from the arguments. This will split at the first
27078   # space.
27079   complete="$VS_ENV_CMD"
27080   path="${complete%% *}"
27081   tmp="$complete EOL"
27082   arguments="${tmp#* }"
27083 
27084   # Input might be given as Windows format, start by converting to
27085   # unix format.
27086   new_path="$path"
27087 
27088   windows_path="$new_path"
27089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27090     unix_path=`$CYGPATH -u "$windows_path"`
27091     new_path="$unix_path"
27092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27094     new_path="$unix_path"
27095   fi
27096 
27097 
27098   # Now try to locate executable using which
27099   new_path=`$WHICH "$new_path" 2> /dev/null`
27100 
27101   if test "x$new_path" = x; then
27102     # Oops. Which didn't find the executable.
27103     # The splitting of arguments from the executable at a space might have been incorrect,
27104     # since paths with space are more likely in Windows. Give it another try with the whole
27105     # argument.
27106     path="$complete"
27107     arguments="EOL"
27108     new_path="$path"
27109 
27110   windows_path="$new_path"
27111   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27112     unix_path=`$CYGPATH -u "$windows_path"`
27113     new_path="$unix_path"
27114   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27115     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27116     new_path="$unix_path"
27117   fi
27118 
27119 
27120     new_path=`$WHICH "$new_path" 2> /dev/null`
27121 
27122     if test "x$new_path" = x; then
27123       # It's still not found. Now this is an unrecoverable error.
27124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27125 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27126       has_space=`$ECHO "$complete" | $GREP " "`
27127       if test "x$has_space" != x; then
27128         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27129 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27130       fi
27131       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27132     fi
27133   fi
27134 
27135   # Now new_path has a complete unix path to the binary
27136   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27137     # Keep paths in /bin as-is, but remove trailing .exe if any
27138     new_path="${new_path/%.exe/}"
27139     # Do not save /bin paths to all_fixpath_prefixes!
27140   else
27141     # Not in mixed or Windows style, start by that.
27142     new_path=`cmd //c echo $new_path`
27143 
27144   input_path="$new_path"
27145   # Check if we need to convert this using DOS-style short mode. If the path
27146   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27147   # take no chances and rewrite it.
27148   # Note: m4 eats our [], so we need to use [ and ] instead.
27149   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27150   if test "x$has_forbidden_chars" != x; then
27151     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27152     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27153   fi
27154 
27155     # Output is in $new_path
27156 
27157   windows_path="$new_path"
27158   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27159     unix_path=`$CYGPATH -u "$windows_path"`
27160     new_path="$unix_path"
27161   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27162     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27163     new_path="$unix_path"
27164   fi
27165 
27166     # remove trailing .exe if any
27167     new_path="${new_path/%.exe/}"
27168 
27169     # Save the first 10 bytes of this path to the storage, so fixpath can work.
27170     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27171   fi
27172 
27173   else
27174     # We're on a posix platform. Hooray! :)
27175     # First separate the path from the arguments. This will split at the first
27176     # space.
27177     complete="$VS_ENV_CMD"
27178     path="${complete%% *}"
27179     tmp="$complete EOL"
27180     arguments="${tmp#* }"
27181 
27182     # Cannot rely on the command "which" here since it doesn't always work.
27183     is_absolute_path=`$ECHO "$path" | $GREP ^/`
27184     if test -z "$is_absolute_path"; then
27185       # Path to executable is not absolute. Find it.
27186       IFS_save="$IFS"
27187       IFS=:
27188       for p in $PATH; do
27189         if test -f "$p/$path" && test -x "$p/$path"; then
27190           new_path="$p/$path"
27191           break
27192         fi
27193       done
27194       IFS="$IFS_save"
27195     else
27196       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
27197 $as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
27198       new_path="$path"
27199     fi
27200 
27201     if test "x$new_path" = x; then
27202       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27203 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27204       has_space=`$ECHO "$complete" | $GREP " "`
27205       if test "x$has_space" != x; then
27206         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27207 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27208       fi
27209       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27210     fi
27211   fi
27212 
27213   # Now join together the path and the arguments once again
27214   if test "x$arguments" != xEOL; then
27215     new_complete="$new_path ${arguments% *}"
27216   else
27217     new_complete="$new_path"
27218   fi
27219 
27220   if test "x$complete" != "x$new_complete"; then
27221     VS_ENV_CMD="$new_complete"
27222     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27223 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27224   fi
27225 
27226 
27227     # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27228     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27229 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27230     cd $OUTPUT_ROOT
27231     # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27232     # to autoconf standards.
27233 
27234     #----
27235 
27236     # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27237     # but calculate the difference in Cygwin environment before/after running it and then
27238     # apply the diff.
27239 
27240     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27241       _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27242       _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27243       _dosbash=`cygpath -a -w -s \`which bash\`.*`
27244     else
27245       _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27246       _dosbash=`cmd //c echo \`which bash\``
27247     fi
27248 
27249     # generate the set of exported vars before/after the vs10 setup
27250     $ECHO "@echo off"                                           >  localdevenvtmp.bat
27251     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27252     $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27253     $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27254 
27255     # Now execute the newly created bat file.
27256     # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27257     cmd /c localdevenvtmp.bat | cat
27258 
27259     # apply the diff (less some non-vs10 vars named by "!")
27260     $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27261     $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27262     $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27263 
27264     # cleanup
27265     $RM localdevenvtmp*
27266     #----
27267     cd $CURDIR
27268     if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27269       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27270 $as_echo "no" >&6; }
27271       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27272 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27273       { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27274 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27275       { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27276 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27277       as_fn_error $? "Cannot continue" "$LINENO" 5
27278     fi
27279 
27280     # Now set all paths and other env variables. This will allow the rest of
27281     # the configure script to find and run the compiler in the proper way.
27282     { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27283 $as_echo "$as_me: Setting extracted environment variables" >&6;}
27284     . $OUTPUT_ROOT/localdevenv.sh
27285   else
27286     # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27287     { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27288 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27289   fi
27290 
27291   # At this point, we should have corrent variables in the environment, or we can't continue.
27292   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27293 $as_echo_n "checking for Visual Studio variables... " >&6; }
27294 
27295   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27296     if test "x$INCLUDE" = x || test "x$LIB" = x; then
27297       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27298 $as_echo "present but broken" >&6; }
27299       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27300     else
27301       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27302 $as_echo "ok" >&6; }
27303       # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27304       VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27305       VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27306       # Remove any paths containing # (typically F#) as that messes up make
27307       PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27308       VS_PATH="$PATH"
27309 
27310 
27311 
27312     fi
27313   else
27314     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27315 $as_echo "not found" >&6; }
27316 
27317     if test "x$VS_ENV_CMD" = x; then
27318       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27319 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27320       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27321 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27322     else
27323       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27324 $as_echo "$as_me: Running the extraction script failed." >&6;}
27325     fi
27326     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27327 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27328     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27329 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27330     as_fn_error $? "Cannot continue" "$LINENO" 5
27331   fi
27332 
27333 
27334 
27335 # Check whether --with-msvcr-dll was given.
27336 if test "${with_msvcr_dll+set}" = set; then :
27337   withval=$with_msvcr_dll;
27338 fi
27339 
27340 
27341   if test "x$with_msvcr_dll" != x; then
27342     # If given explicitely by user, do not probe. If not present, fail directly.
27343 
27344   POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
27345   METHOD="--with-msvcr-dll"
27346   if test -e "$POSSIBLE_MSVCR_DLL"; then
27347     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27348 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27349 
27350     # Need to check if the found msvcr is correct architecture
27351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27352 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27353     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27354     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27355       CORRECT_MSVCR_ARCH=386
27356     else
27357       CORRECT_MSVCR_ARCH=x86-64
27358     fi
27359     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27360       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27361 $as_echo "ok" >&6; }
27362       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27363       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27364 $as_echo_n "checking for msvcr100.dll... " >&6; }
27365       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27366 $as_echo "$MSVCR_DLL" >&6; }
27367     else
27368       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27369 $as_echo "incorrect, ignoring" >&6; }
27370       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27371 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27372     fi
27373   fi
27374 
27375     if test "x$MSVCR_DLL" = x; then
27376       as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
27377     fi
27378   fi
27379 
27380   if test "x$MSVCR_DLL" = x; then
27381     # Probe: Using well-known location from Visual Studio 10.0
27382     if test "x$VCINSTALLDIR" != x; then
27383       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
27384 
27385   windows_path="$CYGWIN_VC_INSTALL_DIR"
27386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27387     unix_path=`$CYGPATH -u "$windows_path"`
27388     CYGWIN_VC_INSTALL_DIR="$unix_path"
27389   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27390     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27391     CYGWIN_VC_INSTALL_DIR="$unix_path"
27392   fi
27393 
27394       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27395         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
27396       else
27397         POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
27398       fi
27399 
27400   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27401   METHOD="well-known location in VCINSTALLDIR"
27402   if test -e "$POSSIBLE_MSVCR_DLL"; then
27403     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27404 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27405 
27406     # Need to check if the found msvcr is correct architecture
27407     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27408 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27409     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27410     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27411       CORRECT_MSVCR_ARCH=386
27412     else
27413       CORRECT_MSVCR_ARCH=x86-64
27414     fi
27415     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27416       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27417 $as_echo "ok" >&6; }
27418       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27419       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27420 $as_echo_n "checking for msvcr100.dll... " >&6; }
27421       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27422 $as_echo "$MSVCR_DLL" >&6; }
27423     else
27424       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27425 $as_echo "incorrect, ignoring" >&6; }
27426       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27427 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27428     fi
27429   fi
27430 
27431     fi
27432   fi
27433 
27434   if test "x$MSVCR_DLL" = x; then
27435     # Probe: Check in the Boot JDK directory.
27436     POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
27437 
27438   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27439   METHOD="well-known location in Boot JDK"
27440   if test -e "$POSSIBLE_MSVCR_DLL"; then
27441     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27442 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27443 
27444     # Need to check if the found msvcr is correct architecture
27445     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27446 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27447     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27448     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27449       CORRECT_MSVCR_ARCH=386
27450     else
27451       CORRECT_MSVCR_ARCH=x86-64
27452     fi
27453     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27454       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27455 $as_echo "ok" >&6; }
27456       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27457       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27458 $as_echo_n "checking for msvcr100.dll... " >&6; }
27459       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27460 $as_echo "$MSVCR_DLL" >&6; }
27461     else
27462       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27463 $as_echo "incorrect, ignoring" >&6; }
27464       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27465 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27466     fi
27467   fi
27468 
27469   fi
27470 
27471   if test "x$MSVCR_DLL" = x; then
27472     # Probe: Look in the Windows system32 directory
27473     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
27474 
27475   windows_path="$CYGWIN_SYSTEMROOT"
27476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27477     unix_path=`$CYGPATH -u "$windows_path"`
27478     CYGWIN_SYSTEMROOT="$unix_path"
27479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27481     CYGWIN_SYSTEMROOT="$unix_path"
27482   fi
27483 
27484     POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
27485 
27486   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27487   METHOD="well-known location in SYSTEMROOT"
27488   if test -e "$POSSIBLE_MSVCR_DLL"; then
27489     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27490 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27491 
27492     # Need to check if the found msvcr is correct architecture
27493     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27494 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27495     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27496     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27497       CORRECT_MSVCR_ARCH=386
27498     else
27499       CORRECT_MSVCR_ARCH=x86-64
27500     fi
27501     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27502       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27503 $as_echo "ok" >&6; }
27504       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27505       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27506 $as_echo_n "checking for msvcr100.dll... " >&6; }
27507       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27508 $as_echo "$MSVCR_DLL" >&6; }
27509     else
27510       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27511 $as_echo "incorrect, ignoring" >&6; }
27512       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27513 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27514     fi
27515   fi
27516 
27517   fi
27518 
27519   if test "x$MSVCR_DLL" = x; then
27520     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
27521     if test "x$VS100COMNTOOLS" != x; then
27522       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
27523 
27524   windows_path="$CYGWIN_VS_TOOLS_DIR"
27525   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27526     unix_path=`$CYGPATH -u "$windows_path"`
27527     CYGWIN_VS_TOOLS_DIR="$unix_path"
27528   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27529     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27530     CYGWIN_VS_TOOLS_DIR="$unix_path"
27531   fi
27532 
27533       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27534         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
27535       else
27536         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
27537       fi
27538 
27539   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27540   METHOD="search of VS100COMNTOOLS"
27541   if test -e "$POSSIBLE_MSVCR_DLL"; then
27542     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27543 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27544 
27545     # Need to check if the found msvcr is correct architecture
27546     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27547 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27548     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27549     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27550       CORRECT_MSVCR_ARCH=386
27551     else
27552       CORRECT_MSVCR_ARCH=x86-64
27553     fi
27554     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27555       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27556 $as_echo "ok" >&6; }
27557       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27558       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27559 $as_echo_n "checking for msvcr100.dll... " >&6; }
27560       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27561 $as_echo "$MSVCR_DLL" >&6; }
27562     else
27563       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27564 $as_echo "incorrect, ignoring" >&6; }
27565       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27566 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27567     fi
27568   fi
27569 
27570     fi
27571   fi
27572 
27573   if test "x$MSVCR_DLL" = x; then
27574     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
27575     # (This was the original behaviour; kept since it might turn up something)
27576     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
27577       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
27578         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
27579       else
27580         POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
27581         if test "x$POSSIBLE_MSVCR_DLL" = x; then
27582           # We're grasping at straws now...
27583           POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
27584         fi
27585       fi
27586 
27587 
27588   POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27589   METHOD="search of VCINSTALLDIR"
27590   if test -e "$POSSIBLE_MSVCR_DLL"; then
27591     { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
27592 $as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
27593 
27594     # Need to check if the found msvcr is correct architecture
27595     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
27596 $as_echo_n "checking found msvcr100.dll architecture... " >&6; }
27597     MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
27598     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27599       CORRECT_MSVCR_ARCH=386
27600     else
27601       CORRECT_MSVCR_ARCH=x86-64
27602     fi
27603     if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
27604       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27605 $as_echo "ok" >&6; }
27606       MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
27607       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27608 $as_echo_n "checking for msvcr100.dll... " >&6; }
27609       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
27610 $as_echo "$MSVCR_DLL" >&6; }
27611     else
27612       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
27613 $as_echo "incorrect, ignoring" >&6; }
27614       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
27615 $as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
27616     fi
27617   fi
27618 
27619     fi
27620   fi
27621 
27622   if test "x$MSVCR_DLL" = x; then
27623     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
27624 $as_echo_n "checking for msvcr100.dll... " >&6; }
27625     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27626 $as_echo "no" >&6; }
27627     as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
27628   fi
27629 
27630 
27631   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27632 
27633   # Input might be given as Windows format, start by converting to
27634   # unix format.
27635   path="$MSVCR_DLL"
27636   new_path=`$CYGPATH -u "$path"`
27637 
27638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27641   # "foo.exe" is OK but "foo" is an error.
27642   #
27643   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27644   # It is also a way to make sure we got the proper file name for the real test later on.
27645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27646   if test "x$test_shortpath" = x; then
27647     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27648 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27649     as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
27650   fi
27651 
27652   # Call helper function which possibly converts this using DOS-style short mode.
27653   # If so, the updated path is stored in $new_path.
27654 
27655   input_path="$new_path"
27656   # Check if we need to convert this using DOS-style short mode. If the path
27657   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27658   # take no chances and rewrite it.
27659   # Note: m4 eats our [], so we need to use [ and ] instead.
27660   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27661   if test "x$has_forbidden_chars" != x; then
27662     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27663     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27664     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27665     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27666       # Going to short mode and back again did indeed matter. Since short mode is
27667       # case insensitive, let's make it lowercase to improve readability.
27668       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27669       # Now convert it back to Unix-stile (cygpath)
27670       input_path=`$CYGPATH -u "$shortmode_path"`
27671       new_path="$input_path"
27672     fi
27673   fi
27674 
27675   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27676   if test "x$test_cygdrive_prefix" = x; then
27677     # As a simple fix, exclude /usr/bin since it's not a real path.
27678     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27679       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27680       # a path prefixed by /cygdrive for fixpath to work.
27681       new_path="$CYGWIN_ROOT_PATH$input_path"
27682     fi
27683   fi
27684 
27685 
27686   if test "x$path" != "x$new_path"; then
27687     MSVCR_DLL="$new_path"
27688     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27689 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27690   fi
27691 
27692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27693 
27694   path="$MSVCR_DLL"
27695   has_colon=`$ECHO $path | $GREP ^.:`
27696   new_path="$path"
27697   if test "x$has_colon" = x; then
27698     # Not in mixed or Windows style, start by that.
27699     new_path=`cmd //c echo $path`
27700   fi
27701 
27702 
27703   input_path="$new_path"
27704   # Check if we need to convert this using DOS-style short mode. If the path
27705   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27706   # take no chances and rewrite it.
27707   # Note: m4 eats our [], so we need to use [ and ] instead.
27708   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27709   if test "x$has_forbidden_chars" != x; then
27710     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27711     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27712   fi
27713 
27714 
27715   windows_path="$new_path"
27716   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717     unix_path=`$CYGPATH -u "$windows_path"`
27718     new_path="$unix_path"
27719   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27720     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27721     new_path="$unix_path"
27722   fi
27723 
27724   if test "x$path" != "x$new_path"; then
27725     MSVCR_DLL="$new_path"
27726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
27727 $as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
27728   fi
27729 
27730   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27731   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27732 
27733   else
27734     # We're on a posix platform. Hooray! :)
27735     path="$MSVCR_DLL"
27736     has_space=`$ECHO "$path" | $GREP " "`
27737     if test "x$has_space" != x; then
27738       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
27739 $as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
27740       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27741     fi
27742 
27743     # Use eval to expand a potential ~
27744     eval path="$path"
27745     if test ! -f "$path" && test ! -d "$path"; then
27746       as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
27747     fi
27748 
27749     MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
27750   fi
27751 
27752 
27753 
27754 
27755 # Check whether --with-dxsdk was given.
27756 if test "${with_dxsdk+set}" = set; then :
27757   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
27758 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
27759 fi
27760 
27761 
27762 
27763 
27764 # Check whether --with-dxsdk-lib was given.
27765 if test "${with_dxsdk_lib+set}" = set; then :
27766   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
27767 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
27768 fi
27769 
27770 
27771 
27772 
27773 # Check whether --with-dxsdk-include was given.
27774 if test "${with_dxsdk_include+set}" = set; then :
27775   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
27776 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
27777 fi
27778 
27779 
27780   fi
27781 
27782 
27783 
27784   # If --build AND --host is set, then the configure script will find any
27785   # cross compilation tools in the PATH. Cross compilation tools
27786   # follows the cross compilation standard where they are prefixed with ${host}.
27787   # For example the binary i686-sun-solaris2.10-gcc
27788   # will cross compile for i686-sun-solaris2.10
27789   # If neither of build and host is not set, then build=host and the
27790   # default compiler found in the path will be used.
27791   # Setting only --host, does not seem to be really supported.
27792   # Please set both --build and --host if you want to cross compile.
27793 
27794   if test "x$COMPILE_TYPE" = "xcross"; then
27795     # Now we to find a C/C++ compiler that can build executables for the build
27796     # platform. We can't use the AC_PROG_CC macro, since it can only be used
27797     # once. Also, we need to do this before adding a tools dir to the path,
27798     # otherwise we might pick up cross-compilers which don't use standard naming.
27799     # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
27800     # to wait until they are properly discovered.
27801 
27802 
27803   # Publish this variable in the help.
27804 
27805 
27806   if test "x$BUILD_CC" = x; then
27807     # The variable is not set by user, try to locate tool using the code snippet
27808     for ac_prog in cl cc gcc
27809 do
27810   # Extract the first word of "$ac_prog", so it can be a program name with args.
27811 set dummy $ac_prog; ac_word=$2
27812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27813 $as_echo_n "checking for $ac_word... " >&6; }
27814 if ${ac_cv_path_BUILD_CC+:} false; then :
27815   $as_echo_n "(cached) " >&6
27816 else
27817   case $BUILD_CC in
27818   [\\/]* | ?:[\\/]*)
27819   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27820   ;;
27821   *)
27822   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27823 for as_dir in $PATH
27824 do
27825   IFS=$as_save_IFS
27826   test -z "$as_dir" && as_dir=.
27827     for ac_exec_ext in '' $ac_executable_extensions; do
27828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27829     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27831     break 2
27832   fi
27833 done
27834   done
27835 IFS=$as_save_IFS
27836 
27837   ;;
27838 esac
27839 fi
27840 BUILD_CC=$ac_cv_path_BUILD_CC
27841 if test -n "$BUILD_CC"; then
27842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27843 $as_echo "$BUILD_CC" >&6; }
27844 else
27845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27846 $as_echo "no" >&6; }
27847 fi
27848 
27849 
27850   test -n "$BUILD_CC" && break
27851 done
27852 
27853   else
27854     # The variable is set, but is it from the command line or the environment?
27855 
27856     # Try to remove the string !BUILD_CC! from our list.
27857     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
27858     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
27859       # If it failed, the variable was not from the command line. Ignore it,
27860       # but warn the user (except for BASH, which is always set by the calling BASH).
27861       if test "xBUILD_CC" != xBASH; then
27862         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
27863 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
27864       fi
27865       # Try to locate tool using the code snippet
27866       for ac_prog in cl cc gcc
27867 do
27868   # Extract the first word of "$ac_prog", so it can be a program name with args.
27869 set dummy $ac_prog; ac_word=$2
27870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27871 $as_echo_n "checking for $ac_word... " >&6; }
27872 if ${ac_cv_path_BUILD_CC+:} false; then :
27873   $as_echo_n "(cached) " >&6
27874 else
27875   case $BUILD_CC in
27876   [\\/]* | ?:[\\/]*)
27877   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27878   ;;
27879   *)
27880   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27881 for as_dir in $PATH
27882 do
27883   IFS=$as_save_IFS
27884   test -z "$as_dir" && as_dir=.
27885     for ac_exec_ext in '' $ac_executable_extensions; do
27886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27887     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27889     break 2
27890   fi
27891 done
27892   done
27893 IFS=$as_save_IFS
27894 
27895   ;;
27896 esac
27897 fi
27898 BUILD_CC=$ac_cv_path_BUILD_CC
27899 if test -n "$BUILD_CC"; then
27900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27901 $as_echo "$BUILD_CC" >&6; }
27902 else
27903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27904 $as_echo "no" >&6; }
27905 fi
27906 
27907 
27908   test -n "$BUILD_CC" && break
27909 done
27910 
27911     else
27912       # If it succeeded, then it was overridden by the user. We will use it
27913       # for the tool.
27914 
27915       # First remove it from the list of overridden variables, so we can test
27916       # for unknown variables in the end.
27917       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
27918 
27919       # Check if the provided tool contains a complete path.
27920       tool_specified="$BUILD_CC"
27921       tool_basename="${tool_specified##*/}"
27922       if test "x$tool_basename" = "x$tool_specified"; then
27923         # A command without a complete path is provided, search $PATH.
27924         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
27925 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
27926         # Extract the first word of "$tool_basename", so it can be a program name with args.
27927 set dummy $tool_basename; ac_word=$2
27928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27929 $as_echo_n "checking for $ac_word... " >&6; }
27930 if ${ac_cv_path_BUILD_CC+:} false; then :
27931   $as_echo_n "(cached) " >&6
27932 else
27933   case $BUILD_CC in
27934   [\\/]* | ?:[\\/]*)
27935   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
27936   ;;
27937   *)
27938   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27939 for as_dir in $PATH
27940 do
27941   IFS=$as_save_IFS
27942   test -z "$as_dir" && as_dir=.
27943     for ac_exec_ext in '' $ac_executable_extensions; do
27944   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27945     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
27946     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27947     break 2
27948   fi
27949 done
27950   done
27951 IFS=$as_save_IFS
27952 
27953   ;;
27954 esac
27955 fi
27956 BUILD_CC=$ac_cv_path_BUILD_CC
27957 if test -n "$BUILD_CC"; then
27958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
27959 $as_echo "$BUILD_CC" >&6; }
27960 else
27961   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27962 $as_echo "no" >&6; }
27963 fi
27964 
27965 
27966         if test "x$BUILD_CC" = x; then
27967           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
27968         fi
27969       else
27970         # Otherwise we believe it is a complete path. Use it as it is.
27971         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
27972 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
27973         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
27974 $as_echo_n "checking for BUILD_CC... " >&6; }
27975         if test ! -x "$tool_specified"; then
27976           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27977 $as_echo "not found" >&6; }
27978           as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
27979         fi
27980         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
27981 $as_echo "$tool_specified" >&6; }
27982       fi
27983     fi
27984   fi
27985 
27986 
27987 
27988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27989 
27990   # First separate the path from the arguments. This will split at the first
27991   # space.
27992   complete="$BUILD_CC"
27993   path="${complete%% *}"
27994   tmp="$complete EOL"
27995   arguments="${tmp#* }"
27996 
27997   # Input might be given as Windows format, start by converting to
27998   # unix format.
27999   new_path=`$CYGPATH -u "$path"`
28000 
28001   # Now try to locate executable using which
28002   new_path=`$WHICH "$new_path" 2> /dev/null`
28003   # bat and cmd files are not always considered executable in cygwin causing which
28004   # to not find them
28005   if test "x$new_path" = x \
28006       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28007       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28008     new_path=`$CYGPATH -u "$path"`
28009   fi
28010   if test "x$new_path" = x; then
28011     # Oops. Which didn't find the executable.
28012     # The splitting of arguments from the executable at a space might have been incorrect,
28013     # since paths with space are more likely in Windows. Give it another try with the whole
28014     # argument.
28015     path="$complete"
28016     arguments="EOL"
28017     new_path=`$CYGPATH -u "$path"`
28018     new_path=`$WHICH "$new_path" 2> /dev/null`
28019     # bat and cmd files are not always considered executable in cygwin causing which
28020     # to not find them
28021     if test "x$new_path" = x \
28022         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28023         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28024       new_path=`$CYGPATH -u "$path"`
28025     fi
28026     if test "x$new_path" = x; then
28027       # It's still not found. Now this is an unrecoverable error.
28028       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28029 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28030       has_space=`$ECHO "$complete" | $GREP " "`
28031       if test "x$has_space" != x; then
28032         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28033 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28034       fi
28035       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28036     fi
28037   fi
28038 
28039   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28040   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28041   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28042   # "foo.exe" is OK but "foo" is an error.
28043   #
28044   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28045   # It is also a way to make sure we got the proper file name for the real test later on.
28046   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28047   if test "x$test_shortpath" = x; then
28048     # Short path failed, file does not exist as specified.
28049     # Try adding .exe or .cmd
28050     if test -f "${new_path}.exe"; then
28051       input_to_shortpath="${new_path}.exe"
28052     elif test -f "${new_path}.cmd"; then
28053       input_to_shortpath="${new_path}.cmd"
28054     else
28055       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
28056 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
28057       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28058 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28059       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28060     fi
28061   else
28062     input_to_shortpath="$new_path"
28063   fi
28064 
28065   # Call helper function which possibly converts this using DOS-style short mode.
28066   # If so, the updated path is stored in $new_path.
28067   new_path="$input_to_shortpath"
28068 
28069   input_path="$input_to_shortpath"
28070   # Check if we need to convert this using DOS-style short mode. If the path
28071   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28072   # take no chances and rewrite it.
28073   # Note: m4 eats our [], so we need to use [ and ] instead.
28074   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28075   if test "x$has_forbidden_chars" != x; then
28076     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28077     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28078     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28079     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28080       # Going to short mode and back again did indeed matter. Since short mode is
28081       # case insensitive, let's make it lowercase to improve readability.
28082       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28083       # Now convert it back to Unix-stile (cygpath)
28084       input_path=`$CYGPATH -u "$shortmode_path"`
28085       new_path="$input_path"
28086     fi
28087   fi
28088 
28089   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28090   if test "x$test_cygdrive_prefix" = x; then
28091     # As a simple fix, exclude /usr/bin since it's not a real path.
28092     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28093       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28094       # a path prefixed by /cygdrive for fixpath to work.
28095       new_path="$CYGWIN_ROOT_PATH$input_path"
28096     fi
28097   fi
28098 
28099   # remove trailing .exe if any
28100   new_path="${new_path/%.exe/}"
28101 
28102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28103 
28104   # First separate the path from the arguments. This will split at the first
28105   # space.
28106   complete="$BUILD_CC"
28107   path="${complete%% *}"
28108   tmp="$complete EOL"
28109   arguments="${tmp#* }"
28110 
28111   # Input might be given as Windows format, start by converting to
28112   # unix format.
28113   new_path="$path"
28114 
28115   windows_path="$new_path"
28116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28117     unix_path=`$CYGPATH -u "$windows_path"`
28118     new_path="$unix_path"
28119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28121     new_path="$unix_path"
28122   fi
28123 
28124 
28125   # Now try to locate executable using which
28126   new_path=`$WHICH "$new_path" 2> /dev/null`
28127 
28128   if test "x$new_path" = x; then
28129     # Oops. Which didn't find the executable.
28130     # The splitting of arguments from the executable at a space might have been incorrect,
28131     # since paths with space are more likely in Windows. Give it another try with the whole
28132     # argument.
28133     path="$complete"
28134     arguments="EOL"
28135     new_path="$path"
28136 
28137   windows_path="$new_path"
28138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28139     unix_path=`$CYGPATH -u "$windows_path"`
28140     new_path="$unix_path"
28141   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28142     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28143     new_path="$unix_path"
28144   fi
28145 
28146 
28147     new_path=`$WHICH "$new_path" 2> /dev/null`
28148 
28149     if test "x$new_path" = x; then
28150       # It's still not found. Now this is an unrecoverable error.
28151       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28152 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28153       has_space=`$ECHO "$complete" | $GREP " "`
28154       if test "x$has_space" != x; then
28155         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28156 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28157       fi
28158       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28159     fi
28160   fi
28161 
28162   # Now new_path has a complete unix path to the binary
28163   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28164     # Keep paths in /bin as-is, but remove trailing .exe if any
28165     new_path="${new_path/%.exe/}"
28166     # Do not save /bin paths to all_fixpath_prefixes!
28167   else
28168     # Not in mixed or Windows style, start by that.
28169     new_path=`cmd //c echo $new_path`
28170 
28171   input_path="$new_path"
28172   # Check if we need to convert this using DOS-style short mode. If the path
28173   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28174   # take no chances and rewrite it.
28175   # Note: m4 eats our [], so we need to use [ and ] instead.
28176   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28177   if test "x$has_forbidden_chars" != x; then
28178     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28179     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28180   fi
28181 
28182     # Output is in $new_path
28183 
28184   windows_path="$new_path"
28185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28186     unix_path=`$CYGPATH -u "$windows_path"`
28187     new_path="$unix_path"
28188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28190     new_path="$unix_path"
28191   fi
28192 
28193     # remove trailing .exe if any
28194     new_path="${new_path/%.exe/}"
28195 
28196     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28197     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28198   fi
28199 
28200   else
28201     # We're on a posix platform. Hooray! :)
28202     # First separate the path from the arguments. This will split at the first
28203     # space.
28204     complete="$BUILD_CC"
28205     path="${complete%% *}"
28206     tmp="$complete EOL"
28207     arguments="${tmp#* }"
28208 
28209     # Cannot rely on the command "which" here since it doesn't always work.
28210     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28211     if test -z "$is_absolute_path"; then
28212       # Path to executable is not absolute. Find it.
28213       IFS_save="$IFS"
28214       IFS=:
28215       for p in $PATH; do
28216         if test -f "$p/$path" && test -x "$p/$path"; then
28217           new_path="$p/$path"
28218           break
28219         fi
28220       done
28221       IFS="$IFS_save"
28222     else
28223       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
28224 $as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
28225       new_path="$path"
28226     fi
28227 
28228     if test "x$new_path" = x; then
28229       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
28230 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
28231       has_space=`$ECHO "$complete" | $GREP " "`
28232       if test "x$has_space" != x; then
28233         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28234 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28235       fi
28236       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
28237     fi
28238   fi
28239 
28240   # Now join together the path and the arguments once again
28241   if test "x$arguments" != xEOL; then
28242     new_complete="$new_path ${arguments% *}"
28243   else
28244     new_complete="$new_path"
28245   fi
28246 
28247   if test "x$complete" != "x$new_complete"; then
28248     BUILD_CC="$new_complete"
28249     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
28250 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
28251   fi
28252 
28253 
28254 
28255   # Publish this variable in the help.
28256 
28257 
28258   if test "x$BUILD_CXX" = x; then
28259     # The variable is not set by user, try to locate tool using the code snippet
28260     for ac_prog in cl CC g++
28261 do
28262   # Extract the first word of "$ac_prog", so it can be a program name with args.
28263 set dummy $ac_prog; ac_word=$2
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28265 $as_echo_n "checking for $ac_word... " >&6; }
28266 if ${ac_cv_path_BUILD_CXX+:} false; then :
28267   $as_echo_n "(cached) " >&6
28268 else
28269   case $BUILD_CXX in
28270   [\\/]* | ?:[\\/]*)
28271   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28272   ;;
28273   *)
28274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28275 for as_dir in $PATH
28276 do
28277   IFS=$as_save_IFS
28278   test -z "$as_dir" && as_dir=.
28279     for ac_exec_ext in '' $ac_executable_extensions; do
28280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28281     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28283     break 2
28284   fi
28285 done
28286   done
28287 IFS=$as_save_IFS
28288 
28289   ;;
28290 esac
28291 fi
28292 BUILD_CXX=$ac_cv_path_BUILD_CXX
28293 if test -n "$BUILD_CXX"; then
28294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28295 $as_echo "$BUILD_CXX" >&6; }
28296 else
28297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28298 $as_echo "no" >&6; }
28299 fi
28300 
28301 
28302   test -n "$BUILD_CXX" && break
28303 done
28304 
28305   else
28306     # The variable is set, but is it from the command line or the environment?
28307 
28308     # Try to remove the string !BUILD_CXX! from our list.
28309     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
28310     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28311       # If it failed, the variable was not from the command line. Ignore it,
28312       # but warn the user (except for BASH, which is always set by the calling BASH).
28313       if test "xBUILD_CXX" != xBASH; then
28314         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
28315 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
28316       fi
28317       # Try to locate tool using the code snippet
28318       for ac_prog in cl CC g++
28319 do
28320   # Extract the first word of "$ac_prog", so it can be a program name with args.
28321 set dummy $ac_prog; ac_word=$2
28322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28323 $as_echo_n "checking for $ac_word... " >&6; }
28324 if ${ac_cv_path_BUILD_CXX+:} false; then :
28325   $as_echo_n "(cached) " >&6
28326 else
28327   case $BUILD_CXX in
28328   [\\/]* | ?:[\\/]*)
28329   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28330   ;;
28331   *)
28332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28333 for as_dir in $PATH
28334 do
28335   IFS=$as_save_IFS
28336   test -z "$as_dir" && as_dir=.
28337     for ac_exec_ext in '' $ac_executable_extensions; do
28338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28339     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28341     break 2
28342   fi
28343 done
28344   done
28345 IFS=$as_save_IFS
28346 
28347   ;;
28348 esac
28349 fi
28350 BUILD_CXX=$ac_cv_path_BUILD_CXX
28351 if test -n "$BUILD_CXX"; then
28352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28353 $as_echo "$BUILD_CXX" >&6; }
28354 else
28355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28356 $as_echo "no" >&6; }
28357 fi
28358 
28359 
28360   test -n "$BUILD_CXX" && break
28361 done
28362 
28363     else
28364       # If it succeeded, then it was overridden by the user. We will use it
28365       # for the tool.
28366 
28367       # First remove it from the list of overridden variables, so we can test
28368       # for unknown variables in the end.
28369       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28370 
28371       # Check if the provided tool contains a complete path.
28372       tool_specified="$BUILD_CXX"
28373       tool_basename="${tool_specified##*/}"
28374       if test "x$tool_basename" = "x$tool_specified"; then
28375         # A command without a complete path is provided, search $PATH.
28376         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
28377 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
28378         # Extract the first word of "$tool_basename", so it can be a program name with args.
28379 set dummy $tool_basename; ac_word=$2
28380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28381 $as_echo_n "checking for $ac_word... " >&6; }
28382 if ${ac_cv_path_BUILD_CXX+:} false; then :
28383   $as_echo_n "(cached) " >&6
28384 else
28385   case $BUILD_CXX in
28386   [\\/]* | ?:[\\/]*)
28387   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
28388   ;;
28389   *)
28390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28391 for as_dir in $PATH
28392 do
28393   IFS=$as_save_IFS
28394   test -z "$as_dir" && as_dir=.
28395     for ac_exec_ext in '' $ac_executable_extensions; do
28396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28397     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
28398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28399     break 2
28400   fi
28401 done
28402   done
28403 IFS=$as_save_IFS
28404 
28405   ;;
28406 esac
28407 fi
28408 BUILD_CXX=$ac_cv_path_BUILD_CXX
28409 if test -n "$BUILD_CXX"; then
28410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
28411 $as_echo "$BUILD_CXX" >&6; }
28412 else
28413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28414 $as_echo "no" >&6; }
28415 fi
28416 
28417 
28418         if test "x$BUILD_CXX" = x; then
28419           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28420         fi
28421       else
28422         # Otherwise we believe it is a complete path. Use it as it is.
28423         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
28424 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
28425         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
28426 $as_echo_n "checking for BUILD_CXX... " >&6; }
28427         if test ! -x "$tool_specified"; then
28428           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28429 $as_echo "not found" >&6; }
28430           as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
28431         fi
28432         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28433 $as_echo "$tool_specified" >&6; }
28434       fi
28435     fi
28436   fi
28437 
28438 
28439 
28440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28441 
28442   # First separate the path from the arguments. This will split at the first
28443   # space.
28444   complete="$BUILD_CXX"
28445   path="${complete%% *}"
28446   tmp="$complete EOL"
28447   arguments="${tmp#* }"
28448 
28449   # Input might be given as Windows format, start by converting to
28450   # unix format.
28451   new_path=`$CYGPATH -u "$path"`
28452 
28453   # Now try to locate executable using which
28454   new_path=`$WHICH "$new_path" 2> /dev/null`
28455   # bat and cmd files are not always considered executable in cygwin causing which
28456   # to not find them
28457   if test "x$new_path" = x \
28458       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28459       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28460     new_path=`$CYGPATH -u "$path"`
28461   fi
28462   if test "x$new_path" = x; then
28463     # Oops. Which didn't find the executable.
28464     # The splitting of arguments from the executable at a space might have been incorrect,
28465     # since paths with space are more likely in Windows. Give it another try with the whole
28466     # argument.
28467     path="$complete"
28468     arguments="EOL"
28469     new_path=`$CYGPATH -u "$path"`
28470     new_path=`$WHICH "$new_path" 2> /dev/null`
28471     # bat and cmd files are not always considered executable in cygwin causing which
28472     # to not find them
28473     if test "x$new_path" = x \
28474         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28475         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28476       new_path=`$CYGPATH -u "$path"`
28477     fi
28478     if test "x$new_path" = x; then
28479       # It's still not found. Now this is an unrecoverable error.
28480       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28481 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28482       has_space=`$ECHO "$complete" | $GREP " "`
28483       if test "x$has_space" != x; then
28484         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28485 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28486       fi
28487       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28488     fi
28489   fi
28490 
28491   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28492   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28493   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28494   # "foo.exe" is OK but "foo" is an error.
28495   #
28496   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28497   # It is also a way to make sure we got the proper file name for the real test later on.
28498   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28499   if test "x$test_shortpath" = x; then
28500     # Short path failed, file does not exist as specified.
28501     # Try adding .exe or .cmd
28502     if test -f "${new_path}.exe"; then
28503       input_to_shortpath="${new_path}.exe"
28504     elif test -f "${new_path}.cmd"; then
28505       input_to_shortpath="${new_path}.cmd"
28506     else
28507       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
28508 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
28509       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28510 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28511       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28512     fi
28513   else
28514     input_to_shortpath="$new_path"
28515   fi
28516 
28517   # Call helper function which possibly converts this using DOS-style short mode.
28518   # If so, the updated path is stored in $new_path.
28519   new_path="$input_to_shortpath"
28520 
28521   input_path="$input_to_shortpath"
28522   # Check if we need to convert this using DOS-style short mode. If the path
28523   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28524   # take no chances and rewrite it.
28525   # Note: m4 eats our [], so we need to use [ and ] instead.
28526   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28527   if test "x$has_forbidden_chars" != x; then
28528     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28529     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28530     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28531     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28532       # Going to short mode and back again did indeed matter. Since short mode is
28533       # case insensitive, let's make it lowercase to improve readability.
28534       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28535       # Now convert it back to Unix-stile (cygpath)
28536       input_path=`$CYGPATH -u "$shortmode_path"`
28537       new_path="$input_path"
28538     fi
28539   fi
28540 
28541   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28542   if test "x$test_cygdrive_prefix" = x; then
28543     # As a simple fix, exclude /usr/bin since it's not a real path.
28544     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28545       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28546       # a path prefixed by /cygdrive for fixpath to work.
28547       new_path="$CYGWIN_ROOT_PATH$input_path"
28548     fi
28549   fi
28550 
28551   # remove trailing .exe if any
28552   new_path="${new_path/%.exe/}"
28553 
28554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28555 
28556   # First separate the path from the arguments. This will split at the first
28557   # space.
28558   complete="$BUILD_CXX"
28559   path="${complete%% *}"
28560   tmp="$complete EOL"
28561   arguments="${tmp#* }"
28562 
28563   # Input might be given as Windows format, start by converting to
28564   # unix format.
28565   new_path="$path"
28566 
28567   windows_path="$new_path"
28568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28569     unix_path=`$CYGPATH -u "$windows_path"`
28570     new_path="$unix_path"
28571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28573     new_path="$unix_path"
28574   fi
28575 
28576 
28577   # Now try to locate executable using which
28578   new_path=`$WHICH "$new_path" 2> /dev/null`
28579 
28580   if test "x$new_path" = x; then
28581     # Oops. Which didn't find the executable.
28582     # The splitting of arguments from the executable at a space might have been incorrect,
28583     # since paths with space are more likely in Windows. Give it another try with the whole
28584     # argument.
28585     path="$complete"
28586     arguments="EOL"
28587     new_path="$path"
28588 
28589   windows_path="$new_path"
28590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28591     unix_path=`$CYGPATH -u "$windows_path"`
28592     new_path="$unix_path"
28593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28595     new_path="$unix_path"
28596   fi
28597 
28598 
28599     new_path=`$WHICH "$new_path" 2> /dev/null`
28600 
28601     if test "x$new_path" = x; then
28602       # It's still not found. Now this is an unrecoverable error.
28603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28604 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28605       has_space=`$ECHO "$complete" | $GREP " "`
28606       if test "x$has_space" != x; then
28607         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28608 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28609       fi
28610       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28611     fi
28612   fi
28613 
28614   # Now new_path has a complete unix path to the binary
28615   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28616     # Keep paths in /bin as-is, but remove trailing .exe if any
28617     new_path="${new_path/%.exe/}"
28618     # Do not save /bin paths to all_fixpath_prefixes!
28619   else
28620     # Not in mixed or Windows style, start by that.
28621     new_path=`cmd //c echo $new_path`
28622 
28623   input_path="$new_path"
28624   # Check if we need to convert this using DOS-style short mode. If the path
28625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28626   # take no chances and rewrite it.
28627   # Note: m4 eats our [], so we need to use [ and ] instead.
28628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28629   if test "x$has_forbidden_chars" != x; then
28630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28631     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28632   fi
28633 
28634     # Output is in $new_path
28635 
28636   windows_path="$new_path"
28637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28638     unix_path=`$CYGPATH -u "$windows_path"`
28639     new_path="$unix_path"
28640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28642     new_path="$unix_path"
28643   fi
28644 
28645     # remove trailing .exe if any
28646     new_path="${new_path/%.exe/}"
28647 
28648     # Save the first 10 bytes of this path to the storage, so fixpath can work.
28649     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28650   fi
28651 
28652   else
28653     # We're on a posix platform. Hooray! :)
28654     # First separate the path from the arguments. This will split at the first
28655     # space.
28656     complete="$BUILD_CXX"
28657     path="${complete%% *}"
28658     tmp="$complete EOL"
28659     arguments="${tmp#* }"
28660 
28661     # Cannot rely on the command "which" here since it doesn't always work.
28662     is_absolute_path=`$ECHO "$path" | $GREP ^/`
28663     if test -z "$is_absolute_path"; then
28664       # Path to executable is not absolute. Find it.
28665       IFS_save="$IFS"
28666       IFS=:
28667       for p in $PATH; do
28668         if test -f "$p/$path" && test -x "$p/$path"; then
28669           new_path="$p/$path"
28670           break
28671         fi
28672       done
28673       IFS="$IFS_save"
28674     else
28675       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
28676 $as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
28677       new_path="$path"
28678     fi
28679 
28680     if test "x$new_path" = x; then
28681       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
28682 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
28683       has_space=`$ECHO "$complete" | $GREP " "`
28684       if test "x$has_space" != x; then
28685         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28686 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28687       fi
28688       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
28689     fi
28690   fi
28691 
28692   # Now join together the path and the arguments once again
28693   if test "x$arguments" != xEOL; then
28694     new_complete="$new_path ${arguments% *}"
28695   else
28696     new_complete="$new_path"
28697   fi
28698 
28699   if test "x$complete" != "x$new_complete"; then
28700     BUILD_CXX="$new_complete"
28701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
28702 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
28703   fi
28704 
28705 
28706 
28707   # Publish this variable in the help.
28708 
28709 
28710   if test "x$BUILD_LD" = x; then
28711     # The variable is not set by user, try to locate tool using the code snippet
28712     for ac_prog in ld
28713 do
28714   # Extract the first word of "$ac_prog", so it can be a program name with args.
28715 set dummy $ac_prog; ac_word=$2
28716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28717 $as_echo_n "checking for $ac_word... " >&6; }
28718 if ${ac_cv_path_BUILD_LD+:} false; then :
28719   $as_echo_n "(cached) " >&6
28720 else
28721   case $BUILD_LD in
28722   [\\/]* | ?:[\\/]*)
28723   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28724   ;;
28725   *)
28726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28727 for as_dir in $PATH
28728 do
28729   IFS=$as_save_IFS
28730   test -z "$as_dir" && as_dir=.
28731     for ac_exec_ext in '' $ac_executable_extensions; do
28732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28733     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28735     break 2
28736   fi
28737 done
28738   done
28739 IFS=$as_save_IFS
28740 
28741   ;;
28742 esac
28743 fi
28744 BUILD_LD=$ac_cv_path_BUILD_LD
28745 if test -n "$BUILD_LD"; then
28746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28747 $as_echo "$BUILD_LD" >&6; }
28748 else
28749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28750 $as_echo "no" >&6; }
28751 fi
28752 
28753 
28754   test -n "$BUILD_LD" && break
28755 done
28756 
28757   else
28758     # The variable is set, but is it from the command line or the environment?
28759 
28760     # Try to remove the string !BUILD_LD! from our list.
28761     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
28762     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
28763       # If it failed, the variable was not from the command line. Ignore it,
28764       # but warn the user (except for BASH, which is always set by the calling BASH).
28765       if test "xBUILD_LD" != xBASH; then
28766         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
28767 $as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
28768       fi
28769       # Try to locate tool using the code snippet
28770       for ac_prog in ld
28771 do
28772   # Extract the first word of "$ac_prog", so it can be a program name with args.
28773 set dummy $ac_prog; ac_word=$2
28774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28775 $as_echo_n "checking for $ac_word... " >&6; }
28776 if ${ac_cv_path_BUILD_LD+:} false; then :
28777   $as_echo_n "(cached) " >&6
28778 else
28779   case $BUILD_LD in
28780   [\\/]* | ?:[\\/]*)
28781   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28782   ;;
28783   *)
28784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28785 for as_dir in $PATH
28786 do
28787   IFS=$as_save_IFS
28788   test -z "$as_dir" && as_dir=.
28789     for ac_exec_ext in '' $ac_executable_extensions; do
28790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28791     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28793     break 2
28794   fi
28795 done
28796   done
28797 IFS=$as_save_IFS
28798 
28799   ;;
28800 esac
28801 fi
28802 BUILD_LD=$ac_cv_path_BUILD_LD
28803 if test -n "$BUILD_LD"; then
28804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28805 $as_echo "$BUILD_LD" >&6; }
28806 else
28807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28808 $as_echo "no" >&6; }
28809 fi
28810 
28811 
28812   test -n "$BUILD_LD" && break
28813 done
28814 
28815     else
28816       # If it succeeded, then it was overridden by the user. We will use it
28817       # for the tool.
28818 
28819       # First remove it from the list of overridden variables, so we can test
28820       # for unknown variables in the end.
28821       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
28822 
28823       # Check if the provided tool contains a complete path.
28824       tool_specified="$BUILD_LD"
28825       tool_basename="${tool_specified##*/}"
28826       if test "x$tool_basename" = "x$tool_specified"; then
28827         # A command without a complete path is provided, search $PATH.
28828         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
28829 $as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
28830         # Extract the first word of "$tool_basename", so it can be a program name with args.
28831 set dummy $tool_basename; ac_word=$2
28832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28833 $as_echo_n "checking for $ac_word... " >&6; }
28834 if ${ac_cv_path_BUILD_LD+:} false; then :
28835   $as_echo_n "(cached) " >&6
28836 else
28837   case $BUILD_LD in
28838   [\\/]* | ?:[\\/]*)
28839   ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
28840   ;;
28841   *)
28842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28843 for as_dir in $PATH
28844 do
28845   IFS=$as_save_IFS
28846   test -z "$as_dir" && as_dir=.
28847     for ac_exec_ext in '' $ac_executable_extensions; do
28848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28849     ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
28850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28851     break 2
28852   fi
28853 done
28854   done
28855 IFS=$as_save_IFS
28856 
28857   ;;
28858 esac
28859 fi
28860 BUILD_LD=$ac_cv_path_BUILD_LD
28861 if test -n "$BUILD_LD"; then
28862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
28863 $as_echo "$BUILD_LD" >&6; }
28864 else
28865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28866 $as_echo "no" >&6; }
28867 fi
28868 
28869 
28870         if test "x$BUILD_LD" = x; then
28871           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
28872         fi
28873       else
28874         # Otherwise we believe it is a complete path. Use it as it is.
28875         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
28876 $as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
28877         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
28878 $as_echo_n "checking for BUILD_LD... " >&6; }
28879         if test ! -x "$tool_specified"; then
28880           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28881 $as_echo "not found" >&6; }
28882           as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
28883         fi
28884         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
28885 $as_echo "$tool_specified" >&6; }
28886       fi
28887     fi
28888   fi
28889 
28890 
28891 
28892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28893 
28894   # First separate the path from the arguments. This will split at the first
28895   # space.
28896   complete="$BUILD_LD"
28897   path="${complete%% *}"
28898   tmp="$complete EOL"
28899   arguments="${tmp#* }"
28900 
28901   # Input might be given as Windows format, start by converting to
28902   # unix format.
28903   new_path=`$CYGPATH -u "$path"`
28904 
28905   # Now try to locate executable using which
28906   new_path=`$WHICH "$new_path" 2> /dev/null`
28907   # bat and cmd files are not always considered executable in cygwin causing which
28908   # to not find them
28909   if test "x$new_path" = x \
28910       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28911       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28912     new_path=`$CYGPATH -u "$path"`
28913   fi
28914   if test "x$new_path" = x; then
28915     # Oops. Which didn't find the executable.
28916     # The splitting of arguments from the executable at a space might have been incorrect,
28917     # since paths with space are more likely in Windows. Give it another try with the whole
28918     # argument.
28919     path="$complete"
28920     arguments="EOL"
28921     new_path=`$CYGPATH -u "$path"`
28922     new_path=`$WHICH "$new_path" 2> /dev/null`
28923     # bat and cmd files are not always considered executable in cygwin causing which
28924     # to not find them
28925     if test "x$new_path" = x \
28926         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28927         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28928       new_path=`$CYGPATH -u "$path"`
28929     fi
28930     if test "x$new_path" = x; then
28931       # It's still not found. Now this is an unrecoverable error.
28932       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
28933 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
28934       has_space=`$ECHO "$complete" | $GREP " "`
28935       if test "x$has_space" != x; then
28936         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28937 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28938       fi
28939       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28940     fi
28941   fi
28942 
28943   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28944   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28945   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28946   # "foo.exe" is OK but "foo" is an error.
28947   #
28948   # This test is therefore slightly more accurate than "test -f" to check for file presence.
28949   # It is also a way to make sure we got the proper file name for the real test later on.
28950   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28951   if test "x$test_shortpath" = x; then
28952     # Short path failed, file does not exist as specified.
28953     # Try adding .exe or .cmd
28954     if test -f "${new_path}.exe"; then
28955       input_to_shortpath="${new_path}.exe"
28956     elif test -f "${new_path}.cmd"; then
28957       input_to_shortpath="${new_path}.cmd"
28958     else
28959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
28960 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
28961       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28962 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28963       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
28964     fi
28965   else
28966     input_to_shortpath="$new_path"
28967   fi
28968 
28969   # Call helper function which possibly converts this using DOS-style short mode.
28970   # If so, the updated path is stored in $new_path.
28971   new_path="$input_to_shortpath"
28972 
28973   input_path="$input_to_shortpath"
28974   # Check if we need to convert this using DOS-style short mode. If the path
28975   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28976   # take no chances and rewrite it.
28977   # Note: m4 eats our [], so we need to use [ and ] instead.
28978   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28979   if test "x$has_forbidden_chars" != x; then
28980     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28981     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28982     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28983     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28984       # Going to short mode and back again did indeed matter. Since short mode is
28985       # case insensitive, let's make it lowercase to improve readability.
28986       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28987       # Now convert it back to Unix-stile (cygpath)
28988       input_path=`$CYGPATH -u "$shortmode_path"`
28989       new_path="$input_path"
28990     fi
28991   fi
28992 
28993   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28994   if test "x$test_cygdrive_prefix" = x; then
28995     # As a simple fix, exclude /usr/bin since it's not a real path.
28996     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28997       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28998       # a path prefixed by /cygdrive for fixpath to work.
28999       new_path="$CYGWIN_ROOT_PATH$input_path"
29000     fi
29001   fi
29002 
29003   # remove trailing .exe if any
29004   new_path="${new_path/%.exe/}"
29005 
29006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29007 
29008   # First separate the path from the arguments. This will split at the first
29009   # space.
29010   complete="$BUILD_LD"
29011   path="${complete%% *}"
29012   tmp="$complete EOL"
29013   arguments="${tmp#* }"
29014 
29015   # Input might be given as Windows format, start by converting to
29016   # unix format.
29017   new_path="$path"
29018 
29019   windows_path="$new_path"
29020   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29021     unix_path=`$CYGPATH -u "$windows_path"`
29022     new_path="$unix_path"
29023   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29024     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29025     new_path="$unix_path"
29026   fi
29027 
29028 
29029   # Now try to locate executable using which
29030   new_path=`$WHICH "$new_path" 2> /dev/null`
29031 
29032   if test "x$new_path" = x; then
29033     # Oops. Which didn't find the executable.
29034     # The splitting of arguments from the executable at a space might have been incorrect,
29035     # since paths with space are more likely in Windows. Give it another try with the whole
29036     # argument.
29037     path="$complete"
29038     arguments="EOL"
29039     new_path="$path"
29040 
29041   windows_path="$new_path"
29042   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29043     unix_path=`$CYGPATH -u "$windows_path"`
29044     new_path="$unix_path"
29045   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29046     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29047     new_path="$unix_path"
29048   fi
29049 
29050 
29051     new_path=`$WHICH "$new_path" 2> /dev/null`
29052 
29053     if test "x$new_path" = x; then
29054       # It's still not found. Now this is an unrecoverable error.
29055       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29056 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29057       has_space=`$ECHO "$complete" | $GREP " "`
29058       if test "x$has_space" != x; then
29059         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29060 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29061       fi
29062       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29063     fi
29064   fi
29065 
29066   # Now new_path has a complete unix path to the binary
29067   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29068     # Keep paths in /bin as-is, but remove trailing .exe if any
29069     new_path="${new_path/%.exe/}"
29070     # Do not save /bin paths to all_fixpath_prefixes!
29071   else
29072     # Not in mixed or Windows style, start by that.
29073     new_path=`cmd //c echo $new_path`
29074 
29075   input_path="$new_path"
29076   # Check if we need to convert this using DOS-style short mode. If the path
29077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29078   # take no chances and rewrite it.
29079   # Note: m4 eats our [], so we need to use [ and ] instead.
29080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29081   if test "x$has_forbidden_chars" != x; then
29082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29084   fi
29085 
29086     # Output is in $new_path
29087 
29088   windows_path="$new_path"
29089   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29090     unix_path=`$CYGPATH -u "$windows_path"`
29091     new_path="$unix_path"
29092   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29093     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29094     new_path="$unix_path"
29095   fi
29096 
29097     # remove trailing .exe if any
29098     new_path="${new_path/%.exe/}"
29099 
29100     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29101     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29102   fi
29103 
29104   else
29105     # We're on a posix platform. Hooray! :)
29106     # First separate the path from the arguments. This will split at the first
29107     # space.
29108     complete="$BUILD_LD"
29109     path="${complete%% *}"
29110     tmp="$complete EOL"
29111     arguments="${tmp#* }"
29112 
29113     # Cannot rely on the command "which" here since it doesn't always work.
29114     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29115     if test -z "$is_absolute_path"; then
29116       # Path to executable is not absolute. Find it.
29117       IFS_save="$IFS"
29118       IFS=:
29119       for p in $PATH; do
29120         if test -f "$p/$path" && test -x "$p/$path"; then
29121           new_path="$p/$path"
29122           break
29123         fi
29124       done
29125       IFS="$IFS_save"
29126     else
29127       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
29128 $as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
29129       new_path="$path"
29130     fi
29131 
29132     if test "x$new_path" = x; then
29133       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
29134 $as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
29135       has_space=`$ECHO "$complete" | $GREP " "`
29136       if test "x$has_space" != x; then
29137         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29138 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29139       fi
29140       as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
29141     fi
29142   fi
29143 
29144   # Now join together the path and the arguments once again
29145   if test "x$arguments" != xEOL; then
29146     new_complete="$new_path ${arguments% *}"
29147   else
29148     new_complete="$new_path"
29149   fi
29150 
29151   if test "x$complete" != "x$new_complete"; then
29152     BUILD_LD="$new_complete"
29153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
29154 $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
29155   fi
29156 
29157   fi
29158 
29159 
29160 
29161 
29162   # If a devkit is found on the builddeps server, then prepend its path to the
29163   # PATH variable. If there are cross compilers available in the devkit, these
29164   # will be found by AC_PROG_CC et al.
29165   DEVKIT=
29166 
29167 
29168   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29169     # Source the builddeps file again, to make sure it uses the latest variables!
29170     . $builddepsfile
29171     # Look for a target and build machine specific resource!
29172     eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29173     if test "x$resource" = x; then
29174       # Ok, lets instead look for a target specific resource
29175       eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
29176     fi
29177     if test "x$resource" = x; then
29178       # Ok, lets instead look for a build specific resource
29179       eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
29180     fi
29181     if test "x$resource" = x; then
29182       # Ok, lets instead look for a generic resource
29183       # (The devkit comes from M4 and not the shell, thus no need for eval here.)
29184       resource=${builddep_devkit}
29185     fi
29186     if test "x$resource" != x; then
29187       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
29188 $as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
29189       # If the resource in the builddeps.conf file is an existing directory,
29190       # for example /java/linux/cups
29191       if test -d ${resource}; then
29192         depdir=${resource}
29193       else
29194 
29195   # devkit is for example mymodule
29196   # $resource is for example libs/general/libmymod_1_2_3.zip
29197   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29198   # $with_builddeps_dir is for example /localhome/builddeps
29199   # depdir is the name of the variable into which we store the depdir, eg MYMOD
29200   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29201   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29202   filename=`basename $resource`
29203   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29204   filebase=${filename%%.*}
29205   extension=${filename#*.}
29206   installdir=$with_builddeps_dir/$filebase
29207   if test ! -f $installdir/$filename.unpacked; then
29208     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
29209 $as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29210     if test ! -d $installdir; then
29211       mkdir -p $installdir
29212     fi
29213     if test ! -d $installdir; then
29214       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29215     fi
29216     tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
29217     touch $tmpfile
29218     if test ! -f $tmpfile; then
29219       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29220     fi
29221 
29222   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29223   # $tmpfile is the local file name for the downloaded file.
29224   VALID_TOOL=no
29225   if test "x$BDEPS_FTP" = xwget; then
29226     VALID_TOOL=yes
29227     wget -O $tmpfile $with_builddeps_server/$resource
29228   fi
29229   if test "x$BDEPS_FTP" = xlftp; then
29230     VALID_TOOL=yes
29231     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29232   fi
29233   if test "x$BDEPS_FTP" = xftp; then
29234     VALID_TOOL=yes
29235     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29236     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29237     FTPUSERPWD=${FTPSERVER%%@*}
29238     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29239       FTPUSER=${userpwd%%:*}
29240       FTPPWD=${userpwd#*@}
29241       FTPSERVER=${FTPSERVER#*@}
29242     else
29243       FTPUSER=ftp
29244       FTPPWD=ftp
29245     fi
29246     # the "pass" command does not work on some
29247     # ftp clients (read ftp.exe) but if it works,
29248     # passive mode is better!
29249     ( \
29250         echo "user $FTPUSER $FTPPWD"        ; \
29251         echo "pass"                         ; \
29252         echo "bin"                          ; \
29253         echo "get $FTPPATH $tmpfile"              ; \
29254     ) | ftp -in $FTPSERVER
29255   fi
29256   if test "x$VALID_TOOL" != xyes; then
29257     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29258   fi
29259 
29260     mv $tmpfile $installdir/$filename
29261     if test ! -s $installdir/$filename; then
29262       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29263     fi
29264     case "$extension" in
29265       zip)  echo "Unzipping $installdir/$filename..."
29266         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29267         ;;
29268       tar.gz) echo "Untaring $installdir/$filename..."
29269         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29270         ;;
29271       tgz) echo "Untaring $installdir/$filename..."
29272         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29273         ;;
29274       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29275         ;;
29276     esac
29277   fi
29278   if test -f $installdir/$filename.unpacked; then
29279     depdir=$installdir
29280   fi
29281 
29282       fi
29283       # Source the builddeps file again, because in the previous command, the depdir
29284       # was updated to point at the current build dependency install directory.
29285       . $builddepsfile
29286       # Now extract variables from the builddeps.conf files.
29287       theroot=${builddep_devkit_ROOT}
29288       thecflags=${builddep_devkit_CFLAGS}
29289       thelibs=${builddep_devkit_LIBS}
29290       if test "x$depdir" = x; then
29291         as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
29292       fi
29293       DEVKIT=$depdir
29294       if test "x$theroot" != x; then
29295         DEVKIT="$theroot"
29296       fi
29297       if test "x$thecflags" != x; then
29298         DEVKIT_CFLAGS="$thecflags"
29299       fi
29300       if test "x$thelibs" != x; then
29301         DEVKIT_LIBS="$thelibs"
29302       fi
29303 
29304         # Found devkit
29305         PATH="$DEVKIT/bin:$PATH"
29306         SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
29307         if test "x$x_includes" = "xNONE"; then
29308           x_includes="$SYS_ROOT/usr/include/X11"
29309         fi
29310         if test "x$x_libraries" = "xNONE"; then
29311           x_libraries="$SYS_ROOT/usr/lib"
29312         fi
29313 
29314 
29315     fi
29316 
29317   fi
29318 
29319 
29320   # Store the CFLAGS etal passed to the configure script.
29321   ORG_CFLAGS="$CFLAGS"
29322   ORG_CXXFLAGS="$CXXFLAGS"
29323   ORG_OBJCFLAGS="$OBJCFLAGS"
29324 
29325   # autoconf magic only relies on PATH, so update it if tools dir is specified
29326   OLD_PATH="$PATH"
29327   if test "x$TOOLS_DIR" != x; then
29328     PATH=$TOOLS_DIR:$PATH
29329   fi
29330 
29331 
29332   ### Locate C compiler (CC)
29333 
29334   # On windows, only cl.exe is supported.
29335   # On Solaris, cc is preferred to gcc.
29336   # Elsewhere, gcc is preferred to cc.
29337 
29338   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
29339     COMPILER_CHECK_LIST="cl"
29340   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
29341     COMPILER_CHECK_LIST="cc gcc"
29342   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
29343     # Do not probe for cc on AIX.
29344     COMPILER_CHECK_LIST="xlc_r"
29345   else
29346     COMPILER_CHECK_LIST="gcc cc"
29347   fi
29348 
29349 
29350   COMPILER_NAME=C
29351   SEARCH_LIST="$COMPILER_CHECK_LIST"
29352 
29353   if test "x$CC" != x; then
29354     # User has supplied compiler name already, always let that override.
29355     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
29356 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
29357     if test "x`basename $CC`" = "x$CC"; then
29358       # A command without a complete path is provided, search $PATH.
29359 
29360       for ac_prog in $CC
29361 do
29362   # Extract the first word of "$ac_prog", so it can be a program name with args.
29363 set dummy $ac_prog; ac_word=$2
29364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29365 $as_echo_n "checking for $ac_word... " >&6; }
29366 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29367   $as_echo_n "(cached) " >&6
29368 else
29369   case $POTENTIAL_CC in
29370   [\\/]* | ?:[\\/]*)
29371   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29372   ;;
29373   *)
29374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29375 for as_dir in $PATH
29376 do
29377   IFS=$as_save_IFS
29378   test -z "$as_dir" && as_dir=.
29379     for ac_exec_ext in '' $ac_executable_extensions; do
29380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29381     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29383     break 2
29384   fi
29385 done
29386   done
29387 IFS=$as_save_IFS
29388 
29389   ;;
29390 esac
29391 fi
29392 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29393 if test -n "$POTENTIAL_CC"; then
29394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29395 $as_echo "$POTENTIAL_CC" >&6; }
29396 else
29397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29398 $as_echo "no" >&6; }
29399 fi
29400 
29401 
29402   test -n "$POTENTIAL_CC" && break
29403 done
29404 
29405       if test "x$POTENTIAL_CC" != x; then
29406         CC=$POTENTIAL_CC
29407       else
29408         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
29409       fi
29410     else
29411       # Otherwise it might already be a complete path
29412       if test ! -x "$CC"; then
29413         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
29414       fi
29415     fi
29416   else
29417     # No user supplied value. Locate compiler ourselves
29418     CC=
29419     # If TOOLS_DIR is set, check for all compiler names in there first
29420     # before checking the rest of the PATH.
29421     if test -n "$TOOLS_DIR"; then
29422       PATH_save="$PATH"
29423       PATH="$TOOLS_DIR"
29424       for ac_prog in $SEARCH_LIST
29425 do
29426   # Extract the first word of "$ac_prog", so it can be a program name with args.
29427 set dummy $ac_prog; ac_word=$2
29428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29429 $as_echo_n "checking for $ac_word... " >&6; }
29430 if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
29431   $as_echo_n "(cached) " >&6
29432 else
29433   case $TOOLS_DIR_CC in
29434   [\\/]* | ?:[\\/]*)
29435   ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
29436   ;;
29437   *)
29438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29439 for as_dir in $PATH
29440 do
29441   IFS=$as_save_IFS
29442   test -z "$as_dir" && as_dir=.
29443     for ac_exec_ext in '' $ac_executable_extensions; do
29444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29445     ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
29446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29447     break 2
29448   fi
29449 done
29450   done
29451 IFS=$as_save_IFS
29452 
29453   ;;
29454 esac
29455 fi
29456 TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
29457 if test -n "$TOOLS_DIR_CC"; then
29458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
29459 $as_echo "$TOOLS_DIR_CC" >&6; }
29460 else
29461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29462 $as_echo "no" >&6; }
29463 fi
29464 
29465 
29466   test -n "$TOOLS_DIR_CC" && break
29467 done
29468 
29469       CC=$TOOLS_DIR_CC
29470       PATH="$PATH_save"
29471     fi
29472 
29473     # AC_PATH_PROGS can't be run multiple times with the same variable,
29474     # so create a new name for this run.
29475     if test "x$CC" = x; then
29476       for ac_prog in $SEARCH_LIST
29477 do
29478   # Extract the first word of "$ac_prog", so it can be a program name with args.
29479 set dummy $ac_prog; ac_word=$2
29480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29481 $as_echo_n "checking for $ac_word... " >&6; }
29482 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
29483   $as_echo_n "(cached) " >&6
29484 else
29485   case $POTENTIAL_CC in
29486   [\\/]* | ?:[\\/]*)
29487   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
29488   ;;
29489   *)
29490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29491 for as_dir in $PATH
29492 do
29493   IFS=$as_save_IFS
29494   test -z "$as_dir" && as_dir=.
29495     for ac_exec_ext in '' $ac_executable_extensions; do
29496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29497     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
29498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29499     break 2
29500   fi
29501 done
29502   done
29503 IFS=$as_save_IFS
29504 
29505   ;;
29506 esac
29507 fi
29508 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
29509 if test -n "$POTENTIAL_CC"; then
29510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
29511 $as_echo "$POTENTIAL_CC" >&6; }
29512 else
29513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29514 $as_echo "no" >&6; }
29515 fi
29516 
29517 
29518   test -n "$POTENTIAL_CC" && break
29519 done
29520 
29521       CC=$POTENTIAL_CC
29522     fi
29523 
29524     if test "x$CC" = x; then
29525 
29526   # Print a helpful message on how to acquire the necessary build dependency.
29527   # devkit is the help tag: freetype, cups, pulse, alsa etc
29528   MISSING_DEPENDENCY=devkit
29529 
29530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29531     cygwin_help $MISSING_DEPENDENCY
29532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29533     msys_help $MISSING_DEPENDENCY
29534   else
29535     PKGHANDLER_COMMAND=
29536 
29537     case $PKGHANDLER in
29538       apt-get)
29539         apt_help     $MISSING_DEPENDENCY ;;
29540       yum)
29541         yum_help     $MISSING_DEPENDENCY ;;
29542       port)
29543         port_help    $MISSING_DEPENDENCY ;;
29544       pkgutil)
29545         pkgutil_help $MISSING_DEPENDENCY ;;
29546       pkgadd)
29547         pkgadd_help  $MISSING_DEPENDENCY ;;
29548     esac
29549 
29550     if test "x$PKGHANDLER_COMMAND" != x; then
29551       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29552     fi
29553   fi
29554 
29555       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29556     fi
29557   fi
29558 
29559   # Now we have a compiler binary in CC. Make sure it's okay.
29560 
29561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29562 
29563   # First separate the path from the arguments. This will split at the first
29564   # space.
29565   complete="$CC"
29566   path="${complete%% *}"
29567   tmp="$complete EOL"
29568   arguments="${tmp#* }"
29569 
29570   # Input might be given as Windows format, start by converting to
29571   # unix format.
29572   new_path=`$CYGPATH -u "$path"`
29573 
29574   # Now try to locate executable using which
29575   new_path=`$WHICH "$new_path" 2> /dev/null`
29576   # bat and cmd files are not always considered executable in cygwin causing which
29577   # to not find them
29578   if test "x$new_path" = x \
29579       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29580       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29581     new_path=`$CYGPATH -u "$path"`
29582   fi
29583   if test "x$new_path" = x; then
29584     # Oops. Which didn't find the executable.
29585     # The splitting of arguments from the executable at a space might have been incorrect,
29586     # since paths with space are more likely in Windows. Give it another try with the whole
29587     # argument.
29588     path="$complete"
29589     arguments="EOL"
29590     new_path=`$CYGPATH -u "$path"`
29591     new_path=`$WHICH "$new_path" 2> /dev/null`
29592     # bat and cmd files are not always considered executable in cygwin causing which
29593     # to not find them
29594     if test "x$new_path" = x \
29595         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29596         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29597       new_path=`$CYGPATH -u "$path"`
29598     fi
29599     if test "x$new_path" = x; then
29600       # It's still not found. Now this is an unrecoverable error.
29601       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29602 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29603       has_space=`$ECHO "$complete" | $GREP " "`
29604       if test "x$has_space" != x; then
29605         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29606 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29607       fi
29608       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29609     fi
29610   fi
29611 
29612   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29613   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29614   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29615   # "foo.exe" is OK but "foo" is an error.
29616   #
29617   # This test is therefore slightly more accurate than "test -f" to check for file presence.
29618   # It is also a way to make sure we got the proper file name for the real test later on.
29619   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29620   if test "x$test_shortpath" = x; then
29621     # Short path failed, file does not exist as specified.
29622     # Try adding .exe or .cmd
29623     if test -f "${new_path}.exe"; then
29624       input_to_shortpath="${new_path}.exe"
29625     elif test -f "${new_path}.cmd"; then
29626       input_to_shortpath="${new_path}.cmd"
29627     else
29628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
29629 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
29630       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29631 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29632       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29633     fi
29634   else
29635     input_to_shortpath="$new_path"
29636   fi
29637 
29638   # Call helper function which possibly converts this using DOS-style short mode.
29639   # If so, the updated path is stored in $new_path.
29640   new_path="$input_to_shortpath"
29641 
29642   input_path="$input_to_shortpath"
29643   # Check if we need to convert this using DOS-style short mode. If the path
29644   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29645   # take no chances and rewrite it.
29646   # Note: m4 eats our [], so we need to use [ and ] instead.
29647   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29648   if test "x$has_forbidden_chars" != x; then
29649     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29650     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29651     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29652     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29653       # Going to short mode and back again did indeed matter. Since short mode is
29654       # case insensitive, let's make it lowercase to improve readability.
29655       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29656       # Now convert it back to Unix-stile (cygpath)
29657       input_path=`$CYGPATH -u "$shortmode_path"`
29658       new_path="$input_path"
29659     fi
29660   fi
29661 
29662   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29663   if test "x$test_cygdrive_prefix" = x; then
29664     # As a simple fix, exclude /usr/bin since it's not a real path.
29665     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29666       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29667       # a path prefixed by /cygdrive for fixpath to work.
29668       new_path="$CYGWIN_ROOT_PATH$input_path"
29669     fi
29670   fi
29671 
29672   # remove trailing .exe if any
29673   new_path="${new_path/%.exe/}"
29674 
29675   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29676 
29677   # First separate the path from the arguments. This will split at the first
29678   # space.
29679   complete="$CC"
29680   path="${complete%% *}"
29681   tmp="$complete EOL"
29682   arguments="${tmp#* }"
29683 
29684   # Input might be given as Windows format, start by converting to
29685   # unix format.
29686   new_path="$path"
29687 
29688   windows_path="$new_path"
29689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29690     unix_path=`$CYGPATH -u "$windows_path"`
29691     new_path="$unix_path"
29692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29694     new_path="$unix_path"
29695   fi
29696 
29697 
29698   # Now try to locate executable using which
29699   new_path=`$WHICH "$new_path" 2> /dev/null`
29700 
29701   if test "x$new_path" = x; then
29702     # Oops. Which didn't find the executable.
29703     # The splitting of arguments from the executable at a space might have been incorrect,
29704     # since paths with space are more likely in Windows. Give it another try with the whole
29705     # argument.
29706     path="$complete"
29707     arguments="EOL"
29708     new_path="$path"
29709 
29710   windows_path="$new_path"
29711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29712     unix_path=`$CYGPATH -u "$windows_path"`
29713     new_path="$unix_path"
29714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29716     new_path="$unix_path"
29717   fi
29718 
29719 
29720     new_path=`$WHICH "$new_path" 2> /dev/null`
29721 
29722     if test "x$new_path" = x; then
29723       # It's still not found. Now this is an unrecoverable error.
29724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29725 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29726       has_space=`$ECHO "$complete" | $GREP " "`
29727       if test "x$has_space" != x; then
29728         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29729 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29730       fi
29731       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29732     fi
29733   fi
29734 
29735   # Now new_path has a complete unix path to the binary
29736   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29737     # Keep paths in /bin as-is, but remove trailing .exe if any
29738     new_path="${new_path/%.exe/}"
29739     # Do not save /bin paths to all_fixpath_prefixes!
29740   else
29741     # Not in mixed or Windows style, start by that.
29742     new_path=`cmd //c echo $new_path`
29743 
29744   input_path="$new_path"
29745   # Check if we need to convert this using DOS-style short mode. If the path
29746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29747   # take no chances and rewrite it.
29748   # Note: m4 eats our [], so we need to use [ and ] instead.
29749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29750   if test "x$has_forbidden_chars" != x; then
29751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29752     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29753   fi
29754 
29755     # Output is in $new_path
29756 
29757   windows_path="$new_path"
29758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29759     unix_path=`$CYGPATH -u "$windows_path"`
29760     new_path="$unix_path"
29761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29763     new_path="$unix_path"
29764   fi
29765 
29766     # remove trailing .exe if any
29767     new_path="${new_path/%.exe/}"
29768 
29769     # Save the first 10 bytes of this path to the storage, so fixpath can work.
29770     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29771   fi
29772 
29773   else
29774     # We're on a posix platform. Hooray! :)
29775     # First separate the path from the arguments. This will split at the first
29776     # space.
29777     complete="$CC"
29778     path="${complete%% *}"
29779     tmp="$complete EOL"
29780     arguments="${tmp#* }"
29781 
29782     # Cannot rely on the command "which" here since it doesn't always work.
29783     is_absolute_path=`$ECHO "$path" | $GREP ^/`
29784     if test -z "$is_absolute_path"; then
29785       # Path to executable is not absolute. Find it.
29786       IFS_save="$IFS"
29787       IFS=:
29788       for p in $PATH; do
29789         if test -f "$p/$path" && test -x "$p/$path"; then
29790           new_path="$p/$path"
29791           break
29792         fi
29793       done
29794       IFS="$IFS_save"
29795     else
29796       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
29797 $as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
29798       new_path="$path"
29799     fi
29800 
29801     if test "x$new_path" = x; then
29802       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
29803 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
29804       has_space=`$ECHO "$complete" | $GREP " "`
29805       if test "x$has_space" != x; then
29806         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29807 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29808       fi
29809       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
29810     fi
29811   fi
29812 
29813   # Now join together the path and the arguments once again
29814   if test "x$arguments" != xEOL; then
29815     new_complete="$new_path ${arguments% *}"
29816   else
29817     new_complete="$new_path"
29818   fi
29819 
29820   if test "x$complete" != "x$new_complete"; then
29821     CC="$new_complete"
29822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
29823 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
29824   fi
29825 
29826   TEST_COMPILER="$CC"
29827   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29828   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29829   if test "x$OPENJDK_BUILD_OS" != xaix; then
29830     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
29831 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
29832 
29833   if test "x$OPENJDK_BUILD_OS" != xwindows; then
29834     # Follow a chain of symbolic links. Use readlink
29835     # where it exists, else fall back to horribly
29836     # complicated shell code.
29837     if test "x$READLINK_TESTED" != yes; then
29838       # On MacOSX there is a readlink tool with a different
29839       # purpose than the GNU readlink tool. Check the found readlink.
29840       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29841       if test "x$ISGNU" = x; then
29842         # A readlink that we do not know how to use.
29843         # Are there other non-GNU readlinks out there?
29844         READLINK_TESTED=yes
29845         READLINK=
29846       fi
29847     fi
29848 
29849     if test "x$READLINK" != x; then
29850       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29851     else
29852       # Save the current directory for restoring afterwards
29853       STARTDIR=$PWD
29854       COUNTER=0
29855       sym_link_dir=`$DIRNAME $TEST_COMPILER`
29856       sym_link_file=`$BASENAME $TEST_COMPILER`
29857       cd $sym_link_dir
29858       # Use -P flag to resolve symlinks in directories.
29859       cd `$THEPWDCMD -P`
29860       sym_link_dir=`$THEPWDCMD -P`
29861       # Resolve file symlinks
29862       while test $COUNTER -lt 20; do
29863         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29864         if test "x$ISLINK" == x; then
29865           # This is not a symbolic link! We are done!
29866           break
29867         fi
29868         # Again resolve directory symlinks since the target of the just found
29869         # link could be in a different directory
29870         cd `$DIRNAME $ISLINK`
29871         sym_link_dir=`$THEPWDCMD -P`
29872         sym_link_file=`$BASENAME $ISLINK`
29873         let COUNTER=COUNTER+1
29874       done
29875       cd $STARTDIR
29876       TEST_COMPILER=$sym_link_dir/$sym_link_file
29877     fi
29878   fi
29879 
29880     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29881 $as_echo "$TEST_COMPILER" >&6; }
29882   fi
29883   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
29884 $as_echo_n "checking if CC is disguised ccache... " >&6; }
29885 
29886   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29887   if test "x$COMPILER_BASENAME" = "xccache"; then
29888     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29889 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29890     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29891     # We want to control ccache invocation ourselves, so ignore this cc and try
29892     # searching again.
29893 
29894     # Remove the path to the fake ccache cc from the PATH
29895     RETRY_COMPILER_SAVED_PATH="$PATH"
29896     COMPILER_DIRNAME=`$DIRNAME $CC`
29897     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29898 
29899     # Try again looking for our compiler
29900     if test -n "$ac_tool_prefix"; then
29901   for ac_prog in $COMPILER_CHECK_LIST
29902   do
29903     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29904 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29906 $as_echo_n "checking for $ac_word... " >&6; }
29907 if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
29908   $as_echo_n "(cached) " >&6
29909 else
29910   if test -n "$PROPER_COMPILER_CC"; then
29911   ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
29912 else
29913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29914 for as_dir in $PATH
29915 do
29916   IFS=$as_save_IFS
29917   test -z "$as_dir" && as_dir=.
29918     for ac_exec_ext in '' $ac_executable_extensions; do
29919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29920     ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
29921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29922     break 2
29923   fi
29924 done
29925   done
29926 IFS=$as_save_IFS
29927 
29928 fi
29929 fi
29930 PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
29931 if test -n "$PROPER_COMPILER_CC"; then
29932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29933 $as_echo "$PROPER_COMPILER_CC" >&6; }
29934 else
29935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29936 $as_echo "no" >&6; }
29937 fi
29938 
29939 
29940     test -n "$PROPER_COMPILER_CC" && break
29941   done
29942 fi
29943 if test -z "$PROPER_COMPILER_CC"; then
29944   ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
29945   for ac_prog in $COMPILER_CHECK_LIST
29946 do
29947   # Extract the first word of "$ac_prog", so it can be a program name with args.
29948 set dummy $ac_prog; ac_word=$2
29949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29950 $as_echo_n "checking for $ac_word... " >&6; }
29951 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
29952   $as_echo_n "(cached) " >&6
29953 else
29954   if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29955   ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
29956 else
29957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29958 for as_dir in $PATH
29959 do
29960   IFS=$as_save_IFS
29961   test -z "$as_dir" && as_dir=.
29962     for ac_exec_ext in '' $ac_executable_extensions; do
29963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29964     ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
29965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29966     break 2
29967   fi
29968 done
29969   done
29970 IFS=$as_save_IFS
29971 
29972 fi
29973 fi
29974 ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
29975 if test -n "$ac_ct_PROPER_COMPILER_CC"; then
29976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
29977 $as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
29978 else
29979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29980 $as_echo "no" >&6; }
29981 fi
29982 
29983 
29984   test -n "$ac_ct_PROPER_COMPILER_CC" && break
29985 done
29986 
29987   if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
29988     PROPER_COMPILER_CC=""
29989   else
29990     case $cross_compiling:$ac_tool_warned in
29991 yes:)
29992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29993 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29994 ac_tool_warned=yes ;;
29995 esac
29996     PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
29997   fi
29998 fi
29999 
30000 
30001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30002 
30003   # First separate the path from the arguments. This will split at the first
30004   # space.
30005   complete="$PROPER_COMPILER_CC"
30006   path="${complete%% *}"
30007   tmp="$complete EOL"
30008   arguments="${tmp#* }"
30009 
30010   # Input might be given as Windows format, start by converting to
30011   # unix format.
30012   new_path=`$CYGPATH -u "$path"`
30013 
30014   # Now try to locate executable using which
30015   new_path=`$WHICH "$new_path" 2> /dev/null`
30016   # bat and cmd files are not always considered executable in cygwin causing which
30017   # to not find them
30018   if test "x$new_path" = x \
30019       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30020       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30021     new_path=`$CYGPATH -u "$path"`
30022   fi
30023   if test "x$new_path" = x; then
30024     # Oops. Which didn't find the executable.
30025     # The splitting of arguments from the executable at a space might have been incorrect,
30026     # since paths with space are more likely in Windows. Give it another try with the whole
30027     # argument.
30028     path="$complete"
30029     arguments="EOL"
30030     new_path=`$CYGPATH -u "$path"`
30031     new_path=`$WHICH "$new_path" 2> /dev/null`
30032     # bat and cmd files are not always considered executable in cygwin causing which
30033     # to not find them
30034     if test "x$new_path" = x \
30035         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30036         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30037       new_path=`$CYGPATH -u "$path"`
30038     fi
30039     if test "x$new_path" = x; then
30040       # It's still not found. Now this is an unrecoverable error.
30041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30042 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30043       has_space=`$ECHO "$complete" | $GREP " "`
30044       if test "x$has_space" != x; then
30045         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30046 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30047       fi
30048       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30049     fi
30050   fi
30051 
30052   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30053   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30054   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30055   # "foo.exe" is OK but "foo" is an error.
30056   #
30057   # This test is therefore slightly more accurate than "test -f" to check for file presence.
30058   # It is also a way to make sure we got the proper file name for the real test later on.
30059   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30060   if test "x$test_shortpath" = x; then
30061     # Short path failed, file does not exist as specified.
30062     # Try adding .exe or .cmd
30063     if test -f "${new_path}.exe"; then
30064       input_to_shortpath="${new_path}.exe"
30065     elif test -f "${new_path}.cmd"; then
30066       input_to_shortpath="${new_path}.cmd"
30067     else
30068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
30069 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
30070       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30071 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30072       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30073     fi
30074   else
30075     input_to_shortpath="$new_path"
30076   fi
30077 
30078   # Call helper function which possibly converts this using DOS-style short mode.
30079   # If so, the updated path is stored in $new_path.
30080   new_path="$input_to_shortpath"
30081 
30082   input_path="$input_to_shortpath"
30083   # Check if we need to convert this using DOS-style short mode. If the path
30084   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30085   # take no chances and rewrite it.
30086   # Note: m4 eats our [], so we need to use [ and ] instead.
30087   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30088   if test "x$has_forbidden_chars" != x; then
30089     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30090     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30091     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30092     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30093       # Going to short mode and back again did indeed matter. Since short mode is
30094       # case insensitive, let's make it lowercase to improve readability.
30095       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30096       # Now convert it back to Unix-stile (cygpath)
30097       input_path=`$CYGPATH -u "$shortmode_path"`
30098       new_path="$input_path"
30099     fi
30100   fi
30101 
30102   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30103   if test "x$test_cygdrive_prefix" = x; then
30104     # As a simple fix, exclude /usr/bin since it's not a real path.
30105     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30106       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30107       # a path prefixed by /cygdrive for fixpath to work.
30108       new_path="$CYGWIN_ROOT_PATH$input_path"
30109     fi
30110   fi
30111 
30112   # remove trailing .exe if any
30113   new_path="${new_path/%.exe/}"
30114 
30115   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30116 
30117   # First separate the path from the arguments. This will split at the first
30118   # space.
30119   complete="$PROPER_COMPILER_CC"
30120   path="${complete%% *}"
30121   tmp="$complete EOL"
30122   arguments="${tmp#* }"
30123 
30124   # Input might be given as Windows format, start by converting to
30125   # unix format.
30126   new_path="$path"
30127 
30128   windows_path="$new_path"
30129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30130     unix_path=`$CYGPATH -u "$windows_path"`
30131     new_path="$unix_path"
30132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30134     new_path="$unix_path"
30135   fi
30136 
30137 
30138   # Now try to locate executable using which
30139   new_path=`$WHICH "$new_path" 2> /dev/null`
30140 
30141   if test "x$new_path" = x; then
30142     # Oops. Which didn't find the executable.
30143     # The splitting of arguments from the executable at a space might have been incorrect,
30144     # since paths with space are more likely in Windows. Give it another try with the whole
30145     # argument.
30146     path="$complete"
30147     arguments="EOL"
30148     new_path="$path"
30149 
30150   windows_path="$new_path"
30151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30152     unix_path=`$CYGPATH -u "$windows_path"`
30153     new_path="$unix_path"
30154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30156     new_path="$unix_path"
30157   fi
30158 
30159 
30160     new_path=`$WHICH "$new_path" 2> /dev/null`
30161 
30162     if test "x$new_path" = x; then
30163       # It's still not found. Now this is an unrecoverable error.
30164       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30165 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30166       has_space=`$ECHO "$complete" | $GREP " "`
30167       if test "x$has_space" != x; then
30168         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30169 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30170       fi
30171       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30172     fi
30173   fi
30174 
30175   # Now new_path has a complete unix path to the binary
30176   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30177     # Keep paths in /bin as-is, but remove trailing .exe if any
30178     new_path="${new_path/%.exe/}"
30179     # Do not save /bin paths to all_fixpath_prefixes!
30180   else
30181     # Not in mixed or Windows style, start by that.
30182     new_path=`cmd //c echo $new_path`
30183 
30184   input_path="$new_path"
30185   # Check if we need to convert this using DOS-style short mode. If the path
30186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30187   # take no chances and rewrite it.
30188   # Note: m4 eats our [], so we need to use [ and ] instead.
30189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30190   if test "x$has_forbidden_chars" != x; then
30191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30192     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30193   fi
30194 
30195     # Output is in $new_path
30196 
30197   windows_path="$new_path"
30198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30199     unix_path=`$CYGPATH -u "$windows_path"`
30200     new_path="$unix_path"
30201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30203     new_path="$unix_path"
30204   fi
30205 
30206     # remove trailing .exe if any
30207     new_path="${new_path/%.exe/}"
30208 
30209     # Save the first 10 bytes of this path to the storage, so fixpath can work.
30210     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30211   fi
30212 
30213   else
30214     # We're on a posix platform. Hooray! :)
30215     # First separate the path from the arguments. This will split at the first
30216     # space.
30217     complete="$PROPER_COMPILER_CC"
30218     path="${complete%% *}"
30219     tmp="$complete EOL"
30220     arguments="${tmp#* }"
30221 
30222     # Cannot rely on the command "which" here since it doesn't always work.
30223     is_absolute_path=`$ECHO "$path" | $GREP ^/`
30224     if test -z "$is_absolute_path"; then
30225       # Path to executable is not absolute. Find it.
30226       IFS_save="$IFS"
30227       IFS=:
30228       for p in $PATH; do
30229         if test -f "$p/$path" && test -x "$p/$path"; then
30230           new_path="$p/$path"
30231           break
30232         fi
30233       done
30234       IFS="$IFS_save"
30235     else
30236       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
30237 $as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
30238       new_path="$path"
30239     fi
30240 
30241     if test "x$new_path" = x; then
30242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
30243 $as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
30244       has_space=`$ECHO "$complete" | $GREP " "`
30245       if test "x$has_space" != x; then
30246         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30247 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30248       fi
30249       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
30250     fi
30251   fi
30252 
30253   # Now join together the path and the arguments once again
30254   if test "x$arguments" != xEOL; then
30255     new_complete="$new_path ${arguments% *}"
30256   else
30257     new_complete="$new_path"
30258   fi
30259 
30260   if test "x$complete" != "x$new_complete"; then
30261     PROPER_COMPILER_CC="$new_complete"
30262     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
30263 $as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
30264   fi
30265 
30266     PATH="$RETRY_COMPILER_SAVED_PATH"
30267 
30268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
30269 $as_echo_n "checking for resolved symbolic links for CC... " >&6; }
30270 
30271   if test "x$OPENJDK_BUILD_OS" != xwindows; then
30272     # Follow a chain of symbolic links. Use readlink
30273     # where it exists, else fall back to horribly
30274     # complicated shell code.
30275     if test "x$READLINK_TESTED" != yes; then
30276       # On MacOSX there is a readlink tool with a different
30277       # purpose than the GNU readlink tool. Check the found readlink.
30278       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30279       if test "x$ISGNU" = x; then
30280         # A readlink that we do not know how to use.
30281         # Are there other non-GNU readlinks out there?
30282         READLINK_TESTED=yes
30283         READLINK=
30284       fi
30285     fi
30286 
30287     if test "x$READLINK" != x; then
30288       PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
30289     else
30290       # Save the current directory for restoring afterwards
30291       STARTDIR=$PWD
30292       COUNTER=0
30293       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
30294       sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
30295       cd $sym_link_dir
30296       # Use -P flag to resolve symlinks in directories.
30297       cd `$THEPWDCMD -P`
30298       sym_link_dir=`$THEPWDCMD -P`
30299       # Resolve file symlinks
30300       while test $COUNTER -lt 20; do
30301         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30302         if test "x$ISLINK" == x; then
30303           # This is not a symbolic link! We are done!
30304           break
30305         fi
30306         # Again resolve directory symlinks since the target of the just found
30307         # link could be in a different directory
30308         cd `$DIRNAME $ISLINK`
30309         sym_link_dir=`$THEPWDCMD -P`
30310         sym_link_file=`$BASENAME $ISLINK`
30311         let COUNTER=COUNTER+1
30312       done
30313       cd $STARTDIR
30314       PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
30315     fi
30316   fi
30317 
30318     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
30319 $as_echo "$PROPER_COMPILER_CC" >&6; }
30320     CC="$PROPER_COMPILER_CC"
30321   else
30322     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
30323 $as_echo "no, keeping CC" >&6; }
30324   fi
30325 
30326 
30327   COMPILER=$CC
30328   COMPILER_NAME=$COMPILER_NAME
30329 
30330   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30331     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
30332     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
30333     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30334     if test $? -ne 0; then
30335       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30336 
30337       { $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
30338 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
30339       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
30340 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
30341       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30342     else
30343       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
30344       COMPILER_VENDOR="Sun Studio"
30345     fi
30346   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
30347       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
30348       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
30349       if test $? -ne 0; then
30350         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
30351       else
30352         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
30353         COMPILER_VENDOR='IBM'
30354       fi
30355   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
30356     # First line typically looks something like:
30357     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30358     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30359     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
30360     COMPILER_VENDOR="Microsoft CL.EXE"
30361     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
30362     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
30363       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
30364         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
30365       fi
30366     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
30367       if test "x$COMPILER_CPU_TEST" != "xx64"; then
30368         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
30369       fi
30370     fi
30371   else
30372     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
30373     # Check that this is likely to be GCC.
30374     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
30375     if test $? -ne 0; then
30376       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
30377 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
30378       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
30379 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
30380       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30381     fi
30382 
30383     # First line typically looks something like:
30384     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
30385     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
30386     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
30387   fi
30388   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
30389   CC_VERSION="$COMPILER_VERSION"
30390   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
30391   CC_VENDOR="$COMPILER_VENDOR"
30392 
30393   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
30394 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
30395 
30396 
30397   # Now that we have resolved CC ourself, let autoconf have its go at it
30398   ac_ext=c
30399 ac_cpp='$CPP $CPPFLAGS'
30400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
30403 if test -n "$ac_tool_prefix"; then
30404   for ac_prog in $CC
30405   do
30406     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30407 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30409 $as_echo_n "checking for $ac_word... " >&6; }
30410 if ${ac_cv_prog_CC+:} false; then :
30411   $as_echo_n "(cached) " >&6
30412 else
30413   if test -n "$CC"; then
30414   ac_cv_prog_CC="$CC" # Let the user override the test.
30415 else
30416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30417 for as_dir in $PATH
30418 do
30419   IFS=$as_save_IFS
30420   test -z "$as_dir" && as_dir=.
30421     for ac_exec_ext in '' $ac_executable_extensions; do
30422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30423     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
30424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30425     break 2
30426   fi
30427 done
30428   done
30429 IFS=$as_save_IFS
30430 
30431 fi
30432 fi
30433 CC=$ac_cv_prog_CC
30434 if test -n "$CC"; then
30435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
30436 $as_echo "$CC" >&6; }
30437 else
30438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30439 $as_echo "no" >&6; }
30440 fi
30441 
30442 
30443     test -n "$CC" && break
30444   done
30445 fi
30446 if test -z "$CC"; then
30447   ac_ct_CC=$CC
30448   for ac_prog in $CC
30449 do
30450   # Extract the first word of "$ac_prog", so it can be a program name with args.
30451 set dummy $ac_prog; ac_word=$2
30452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30453 $as_echo_n "checking for $ac_word... " >&6; }
30454 if ${ac_cv_prog_ac_ct_CC+:} false; then :
30455   $as_echo_n "(cached) " >&6
30456 else
30457   if test -n "$ac_ct_CC"; then
30458   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
30459 else
30460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30461 for as_dir in $PATH
30462 do
30463   IFS=$as_save_IFS
30464   test -z "$as_dir" && as_dir=.
30465     for ac_exec_ext in '' $ac_executable_extensions; do
30466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30467     ac_cv_prog_ac_ct_CC="$ac_prog"
30468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30469     break 2
30470   fi
30471 done
30472   done
30473 IFS=$as_save_IFS
30474 
30475 fi
30476 fi
30477 ac_ct_CC=$ac_cv_prog_ac_ct_CC
30478 if test -n "$ac_ct_CC"; then
30479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
30480 $as_echo "$ac_ct_CC" >&6; }
30481 else
30482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30483 $as_echo "no" >&6; }
30484 fi
30485 
30486 
30487   test -n "$ac_ct_CC" && break
30488 done
30489 
30490   if test "x$ac_ct_CC" = x; then
30491     CC=""
30492   else
30493     case $cross_compiling:$ac_tool_warned in
30494 yes:)
30495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30496 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30497 ac_tool_warned=yes ;;
30498 esac
30499     CC=$ac_ct_CC
30500   fi
30501 fi
30502 
30503 
30504 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30505 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30506 as_fn_error $? "no acceptable C compiler found in \$PATH
30507 See \`config.log' for more details" "$LINENO" 5; }
30508 
30509 # Provide some information about the compiler.
30510 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
30511 set X $ac_compile
30512 ac_compiler=$2
30513 for ac_option in --version -v -V -qversion; do
30514   { { ac_try="$ac_compiler $ac_option >&5"
30515 case "(($ac_try" in
30516   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30517   *) ac_try_echo=$ac_try;;
30518 esac
30519 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30520 $as_echo "$ac_try_echo"; } >&5
30521   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30522   ac_status=$?
30523   if test -s conftest.err; then
30524     sed '10a\
30525 ... rest of stderr output deleted ...
30526          10q' conftest.err >conftest.er1
30527     cat conftest.er1 >&5
30528   fi
30529   rm -f conftest.er1 conftest.err
30530   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30531   test $ac_status = 0; }
30532 done
30533 
30534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30535 /* end confdefs.h.  */
30536 
30537 int
30538 main ()
30539 {
30540 
30541   ;
30542   return 0;
30543 }
30544 _ACEOF
30545 ac_clean_files_save=$ac_clean_files
30546 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
30547 # Try to create an executable without -o first, disregard a.out.
30548 # It will help us diagnose broken compilers, and finding out an intuition
30549 # of exeext.
30550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
30551 $as_echo_n "checking whether the C compiler works... " >&6; }
30552 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
30553 
30554 # The possible output files:
30555 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
30556 
30557 ac_rmfiles=
30558 for ac_file in $ac_files
30559 do
30560   case $ac_file in
30561     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30562     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
30563   esac
30564 done
30565 rm -f $ac_rmfiles
30566 
30567 if { { ac_try="$ac_link_default"
30568 case "(($ac_try" in
30569   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30570   *) ac_try_echo=$ac_try;;
30571 esac
30572 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30573 $as_echo "$ac_try_echo"; } >&5
30574   (eval "$ac_link_default") 2>&5
30575   ac_status=$?
30576   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30577   test $ac_status = 0; }; then :
30578   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
30579 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
30580 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
30581 # so that the user can short-circuit this test for compilers unknown to
30582 # Autoconf.
30583 for ac_file in $ac_files ''
30584 do
30585   test -f "$ac_file" || continue
30586   case $ac_file in
30587     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
30588         ;;
30589     [ab].out )
30590         # We found the default executable, but exeext='' is most
30591         # certainly right.
30592         break;;
30593     *.* )
30594         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
30595         then :; else
30596            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30597         fi
30598         # We set ac_cv_exeext here because the later test for it is not
30599         # safe: cross compilers may not add the suffix if given an `-o'
30600         # argument, so we may need to know it at that point already.
30601         # Even if this section looks crufty: it has the advantage of
30602         # actually working.
30603         break;;
30604     * )
30605         break;;
30606   esac
30607 done
30608 test "$ac_cv_exeext" = no && ac_cv_exeext=
30609 
30610 else
30611   ac_file=''
30612 fi
30613 if test -z "$ac_file"; then :
30614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30615 $as_echo "no" >&6; }
30616 $as_echo "$as_me: failed program was:" >&5
30617 sed 's/^/| /' conftest.$ac_ext >&5
30618 
30619 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30620 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30621 as_fn_error 77 "C compiler cannot create executables
30622 See \`config.log' for more details" "$LINENO" 5; }
30623 else
30624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30625 $as_echo "yes" >&6; }
30626 fi
30627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
30628 $as_echo_n "checking for C compiler default output file name... " >&6; }
30629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
30630 $as_echo "$ac_file" >&6; }
30631 ac_exeext=$ac_cv_exeext
30632 
30633 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
30634 ac_clean_files=$ac_clean_files_save
30635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
30636 $as_echo_n "checking for suffix of executables... " >&6; }
30637 if { { ac_try="$ac_link"
30638 case "(($ac_try" in
30639   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30640   *) ac_try_echo=$ac_try;;
30641 esac
30642 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30643 $as_echo "$ac_try_echo"; } >&5
30644   (eval "$ac_link") 2>&5
30645   ac_status=$?
30646   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30647   test $ac_status = 0; }; then :
30648   # If both `conftest.exe' and `conftest' are `present' (well, observable)
30649 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
30650 # work properly (i.e., refer to `conftest.exe'), while it won't with
30651 # `rm'.
30652 for ac_file in conftest.exe conftest conftest.*; do
30653   test -f "$ac_file" || continue
30654   case $ac_file in
30655     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
30656     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
30657           break;;
30658     * ) break;;
30659   esac
30660 done
30661 else
30662   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30663 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30664 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
30665 See \`config.log' for more details" "$LINENO" 5; }
30666 fi
30667 rm -f conftest conftest$ac_cv_exeext
30668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
30669 $as_echo "$ac_cv_exeext" >&6; }
30670 
30671 rm -f conftest.$ac_ext
30672 EXEEXT=$ac_cv_exeext
30673 ac_exeext=$EXEEXT
30674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30675 /* end confdefs.h.  */
30676 #include <stdio.h>
30677 int
30678 main ()
30679 {
30680 FILE *f = fopen ("conftest.out", "w");
30681  return ferror (f) || fclose (f) != 0;
30682 
30683   ;
30684   return 0;
30685 }
30686 _ACEOF
30687 ac_clean_files="$ac_clean_files conftest.out"
30688 # Check that the compiler produces executables we can run.  If not, either
30689 # the compiler is broken, or we cross compile.
30690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
30691 $as_echo_n "checking whether we are cross compiling... " >&6; }
30692 if test "$cross_compiling" != yes; then
30693   { { ac_try="$ac_link"
30694 case "(($ac_try" in
30695   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30696   *) ac_try_echo=$ac_try;;
30697 esac
30698 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30699 $as_echo "$ac_try_echo"; } >&5
30700   (eval "$ac_link") 2>&5
30701   ac_status=$?
30702   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30703   test $ac_status = 0; }
30704   if { ac_try='./conftest$ac_cv_exeext'
30705   { { case "(($ac_try" in
30706   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30707   *) ac_try_echo=$ac_try;;
30708 esac
30709 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30710 $as_echo "$ac_try_echo"; } >&5
30711   (eval "$ac_try") 2>&5
30712   ac_status=$?
30713   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30714   test $ac_status = 0; }; }; then
30715     cross_compiling=no
30716   else
30717     if test "$cross_compiling" = maybe; then
30718         cross_compiling=yes
30719     else
30720         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30721 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30722 as_fn_error $? "cannot run C compiled programs.
30723 If you meant to cross compile, use \`--host'.
30724 See \`config.log' for more details" "$LINENO" 5; }
30725     fi
30726   fi
30727 fi
30728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
30729 $as_echo "$cross_compiling" >&6; }
30730 
30731 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
30732 ac_clean_files=$ac_clean_files_save
30733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
30734 $as_echo_n "checking for suffix of object files... " >&6; }
30735 if ${ac_cv_objext+:} false; then :
30736   $as_echo_n "(cached) " >&6
30737 else
30738   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30739 /* end confdefs.h.  */
30740 
30741 int
30742 main ()
30743 {
30744 
30745   ;
30746   return 0;
30747 }
30748 _ACEOF
30749 rm -f conftest.o conftest.obj
30750 if { { ac_try="$ac_compile"
30751 case "(($ac_try" in
30752   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30753   *) ac_try_echo=$ac_try;;
30754 esac
30755 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30756 $as_echo "$ac_try_echo"; } >&5
30757   (eval "$ac_compile") 2>&5
30758   ac_status=$?
30759   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30760   test $ac_status = 0; }; then :
30761   for ac_file in conftest.o conftest.obj conftest.*; do
30762   test -f "$ac_file" || continue;
30763   case $ac_file in
30764     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
30765     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
30766        break;;
30767   esac
30768 done
30769 else
30770   $as_echo "$as_me: failed program was:" >&5
30771 sed 's/^/| /' conftest.$ac_ext >&5
30772 
30773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30774 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30775 as_fn_error $? "cannot compute suffix of object files: cannot compile
30776 See \`config.log' for more details" "$LINENO" 5; }
30777 fi
30778 rm -f conftest.$ac_cv_objext conftest.$ac_ext
30779 fi
30780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
30781 $as_echo "$ac_cv_objext" >&6; }
30782 OBJEXT=$ac_cv_objext
30783 ac_objext=$OBJEXT
30784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
30785 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
30786 if ${ac_cv_c_compiler_gnu+:} false; then :
30787   $as_echo_n "(cached) " >&6
30788 else
30789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30790 /* end confdefs.h.  */
30791 
30792 int
30793 main ()
30794 {
30795 #ifndef __GNUC__
30796        choke me
30797 #endif
30798 
30799   ;
30800   return 0;
30801 }
30802 _ACEOF
30803 if ac_fn_c_try_compile "$LINENO"; then :
30804   ac_compiler_gnu=yes
30805 else
30806   ac_compiler_gnu=no
30807 fi
30808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30809 ac_cv_c_compiler_gnu=$ac_compiler_gnu
30810 
30811 fi
30812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
30813 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
30814 if test $ac_compiler_gnu = yes; then
30815   GCC=yes
30816 else
30817   GCC=
30818 fi
30819 ac_test_CFLAGS=${CFLAGS+set}
30820 ac_save_CFLAGS=$CFLAGS
30821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
30822 $as_echo_n "checking whether $CC accepts -g... " >&6; }
30823 if ${ac_cv_prog_cc_g+:} false; then :
30824   $as_echo_n "(cached) " >&6
30825 else
30826   ac_save_c_werror_flag=$ac_c_werror_flag
30827    ac_c_werror_flag=yes
30828    ac_cv_prog_cc_g=no
30829    CFLAGS="-g"
30830    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30831 /* end confdefs.h.  */
30832 
30833 int
30834 main ()
30835 {
30836 
30837   ;
30838   return 0;
30839 }
30840 _ACEOF
30841 if ac_fn_c_try_compile "$LINENO"; then :
30842   ac_cv_prog_cc_g=yes
30843 else
30844   CFLAGS=""
30845       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30846 /* end confdefs.h.  */
30847 
30848 int
30849 main ()
30850 {
30851 
30852   ;
30853   return 0;
30854 }
30855 _ACEOF
30856 if ac_fn_c_try_compile "$LINENO"; then :
30857 
30858 else
30859   ac_c_werror_flag=$ac_save_c_werror_flag
30860          CFLAGS="-g"
30861          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30862 /* end confdefs.h.  */
30863 
30864 int
30865 main ()
30866 {
30867 
30868   ;
30869   return 0;
30870 }
30871 _ACEOF
30872 if ac_fn_c_try_compile "$LINENO"; then :
30873   ac_cv_prog_cc_g=yes
30874 fi
30875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30876 fi
30877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30878 fi
30879 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30880    ac_c_werror_flag=$ac_save_c_werror_flag
30881 fi
30882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
30883 $as_echo "$ac_cv_prog_cc_g" >&6; }
30884 if test "$ac_test_CFLAGS" = set; then
30885   CFLAGS=$ac_save_CFLAGS
30886 elif test $ac_cv_prog_cc_g = yes; then
30887   if test "$GCC" = yes; then
30888     CFLAGS="-g -O2"
30889   else
30890     CFLAGS="-g"
30891   fi
30892 else
30893   if test "$GCC" = yes; then
30894     CFLAGS="-O2"
30895   else
30896     CFLAGS=
30897   fi
30898 fi
30899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
30900 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
30901 if ${ac_cv_prog_cc_c89+:} false; then :
30902   $as_echo_n "(cached) " >&6
30903 else
30904   ac_cv_prog_cc_c89=no
30905 ac_save_CC=$CC
30906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30907 /* end confdefs.h.  */
30908 #include <stdarg.h>
30909 #include <stdio.h>
30910 struct stat;
30911 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
30912 struct buf { int x; };
30913 FILE * (*rcsopen) (struct buf *, struct stat *, int);
30914 static char *e (p, i)
30915      char **p;
30916      int i;
30917 {
30918   return p[i];
30919 }
30920 static char *f (char * (*g) (char **, int), char **p, ...)
30921 {
30922   char *s;
30923   va_list v;
30924   va_start (v,p);
30925   s = g (p, va_arg (v,int));
30926   va_end (v);
30927   return s;
30928 }
30929 
30930 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
30931    function prototypes and stuff, but not '\xHH' hex character constants.
30932    These don't provoke an error unfortunately, instead are silently treated
30933    as 'x'.  The following induces an error, until -std is added to get
30934    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
30935    array size at least.  It's necessary to write '\x00'==0 to get something
30936    that's true only with -std.  */
30937 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
30938 
30939 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
30940    inside strings and character constants.  */
30941 #define FOO(x) 'x'
30942 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
30943 
30944 int test (int i, double x);
30945 struct s1 {int (*f) (int a);};
30946 struct s2 {int (*f) (double a);};
30947 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
30948 int argc;
30949 char **argv;
30950 int
30951 main ()
30952 {
30953 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30954   ;
30955   return 0;
30956 }
30957 _ACEOF
30958 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30959         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30960 do
30961   CC="$ac_save_CC $ac_arg"
30962   if ac_fn_c_try_compile "$LINENO"; then :
30963   ac_cv_prog_cc_c89=$ac_arg
30964 fi
30965 rm -f core conftest.err conftest.$ac_objext
30966   test "x$ac_cv_prog_cc_c89" != "xno" && break
30967 done
30968 rm -f conftest.$ac_ext
30969 CC=$ac_save_CC
30970 
30971 fi
30972 # AC_CACHE_VAL
30973 case "x$ac_cv_prog_cc_c89" in
30974   x)
30975     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30976 $as_echo "none needed" >&6; } ;;
30977   xno)
30978     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30979 $as_echo "unsupported" >&6; } ;;
30980   *)
30981     CC="$CC $ac_cv_prog_cc_c89"
30982     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30983 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30984 esac
30985 if test "x$ac_cv_prog_cc_c89" != xno; then :
30986 
30987 fi
30988 
30989 ac_ext=cpp
30990 ac_cpp='$CXXCPP $CPPFLAGS'
30991 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30992 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30993 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30994 
30995 
30996   # Option used to tell the compiler whether to create 32- or 64-bit executables
30997   # Notice that CC contains the full compiler path at this point.
30998   case $CC in
30999     *xlc_r) COMPILER_TARGET_BITS_FLAG="-q";;
31000     *)      COMPILER_TARGET_BITS_FLAG="-m";;
31001   esac
31002 
31003 
31004   ### Locate C++ compiler (CXX)
31005 
31006   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31007     COMPILER_CHECK_LIST="cl"
31008   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
31009     COMPILER_CHECK_LIST="CC g++"
31010   elif test "x$OPENJDK_TARGET_OS" = "xaix"; then
31011     # Do not probe for CC on AIX .
31012     COMPILER_CHECK_LIST="xlC_r"
31013   else
31014     COMPILER_CHECK_LIST="g++ CC"
31015   fi
31016 
31017 
31018   COMPILER_NAME=C++
31019   SEARCH_LIST="$COMPILER_CHECK_LIST"
31020 
31021   if test "x$CXX" != x; then
31022     # User has supplied compiler name already, always let that override.
31023     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
31024 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
31025     if test "x`basename $CXX`" = "x$CXX"; then
31026       # A command without a complete path is provided, search $PATH.
31027 
31028       for ac_prog in $CXX
31029 do
31030   # Extract the first word of "$ac_prog", so it can be a program name with args.
31031 set dummy $ac_prog; ac_word=$2
31032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31033 $as_echo_n "checking for $ac_word... " >&6; }
31034 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31035   $as_echo_n "(cached) " >&6
31036 else
31037   case $POTENTIAL_CXX in
31038   [\\/]* | ?:[\\/]*)
31039   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31040   ;;
31041   *)
31042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31043 for as_dir in $PATH
31044 do
31045   IFS=$as_save_IFS
31046   test -z "$as_dir" && as_dir=.
31047     for ac_exec_ext in '' $ac_executable_extensions; do
31048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31049     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31051     break 2
31052   fi
31053 done
31054   done
31055 IFS=$as_save_IFS
31056 
31057   ;;
31058 esac
31059 fi
31060 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31061 if test -n "$POTENTIAL_CXX"; then
31062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31063 $as_echo "$POTENTIAL_CXX" >&6; }
31064 else
31065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31066 $as_echo "no" >&6; }
31067 fi
31068 
31069 
31070   test -n "$POTENTIAL_CXX" && break
31071 done
31072 
31073       if test "x$POTENTIAL_CXX" != x; then
31074         CXX=$POTENTIAL_CXX
31075       else
31076         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
31077       fi
31078     else
31079       # Otherwise it might already be a complete path
31080       if test ! -x "$CXX"; then
31081         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
31082       fi
31083     fi
31084   else
31085     # No user supplied value. Locate compiler ourselves
31086     CXX=
31087     # If TOOLS_DIR is set, check for all compiler names in there first
31088     # before checking the rest of the PATH.
31089     if test -n "$TOOLS_DIR"; then
31090       PATH_save="$PATH"
31091       PATH="$TOOLS_DIR"
31092       for ac_prog in $SEARCH_LIST
31093 do
31094   # Extract the first word of "$ac_prog", so it can be a program name with args.
31095 set dummy $ac_prog; ac_word=$2
31096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31097 $as_echo_n "checking for $ac_word... " >&6; }
31098 if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
31099   $as_echo_n "(cached) " >&6
31100 else
31101   case $TOOLS_DIR_CXX in
31102   [\\/]* | ?:[\\/]*)
31103   ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
31104   ;;
31105   *)
31106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31107 for as_dir in $PATH
31108 do
31109   IFS=$as_save_IFS
31110   test -z "$as_dir" && as_dir=.
31111     for ac_exec_ext in '' $ac_executable_extensions; do
31112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31113     ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
31114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31115     break 2
31116   fi
31117 done
31118   done
31119 IFS=$as_save_IFS
31120 
31121   ;;
31122 esac
31123 fi
31124 TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
31125 if test -n "$TOOLS_DIR_CXX"; then
31126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
31127 $as_echo "$TOOLS_DIR_CXX" >&6; }
31128 else
31129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31130 $as_echo "no" >&6; }
31131 fi
31132 
31133 
31134   test -n "$TOOLS_DIR_CXX" && break
31135 done
31136 
31137       CXX=$TOOLS_DIR_CXX
31138       PATH="$PATH_save"
31139     fi
31140 
31141     # AC_PATH_PROGS can't be run multiple times with the same variable,
31142     # so create a new name for this run.
31143     if test "x$CXX" = x; then
31144       for ac_prog in $SEARCH_LIST
31145 do
31146   # Extract the first word of "$ac_prog", so it can be a program name with args.
31147 set dummy $ac_prog; ac_word=$2
31148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31149 $as_echo_n "checking for $ac_word... " >&6; }
31150 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
31151   $as_echo_n "(cached) " >&6
31152 else
31153   case $POTENTIAL_CXX in
31154   [\\/]* | ?:[\\/]*)
31155   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
31156   ;;
31157   *)
31158   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31159 for as_dir in $PATH
31160 do
31161   IFS=$as_save_IFS
31162   test -z "$as_dir" && as_dir=.
31163     for ac_exec_ext in '' $ac_executable_extensions; do
31164   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31165     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
31166     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31167     break 2
31168   fi
31169 done
31170   done
31171 IFS=$as_save_IFS
31172 
31173   ;;
31174 esac
31175 fi
31176 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
31177 if test -n "$POTENTIAL_CXX"; then
31178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
31179 $as_echo "$POTENTIAL_CXX" >&6; }
31180 else
31181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31182 $as_echo "no" >&6; }
31183 fi
31184 
31185 
31186   test -n "$POTENTIAL_CXX" && break
31187 done
31188 
31189       CXX=$POTENTIAL_CXX
31190     fi
31191 
31192     if test "x$CXX" = x; then
31193 
31194   # Print a helpful message on how to acquire the necessary build dependency.
31195   # devkit is the help tag: freetype, cups, pulse, alsa etc
31196   MISSING_DEPENDENCY=devkit
31197 
31198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31199     cygwin_help $MISSING_DEPENDENCY
31200   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31201     msys_help $MISSING_DEPENDENCY
31202   else
31203     PKGHANDLER_COMMAND=
31204 
31205     case $PKGHANDLER in
31206       apt-get)
31207         apt_help     $MISSING_DEPENDENCY ;;
31208       yum)
31209         yum_help     $MISSING_DEPENDENCY ;;
31210       port)
31211         port_help    $MISSING_DEPENDENCY ;;
31212       pkgutil)
31213         pkgutil_help $MISSING_DEPENDENCY ;;
31214       pkgadd)
31215         pkgadd_help  $MISSING_DEPENDENCY ;;
31216     esac
31217 
31218     if test "x$PKGHANDLER_COMMAND" != x; then
31219       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31220     fi
31221   fi
31222 
31223       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
31224     fi
31225   fi
31226 
31227   # Now we have a compiler binary in CXX. Make sure it's okay.
31228 
31229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31230 
31231   # First separate the path from the arguments. This will split at the first
31232   # space.
31233   complete="$CXX"
31234   path="${complete%% *}"
31235   tmp="$complete EOL"
31236   arguments="${tmp#* }"
31237 
31238   # Input might be given as Windows format, start by converting to
31239   # unix format.
31240   new_path=`$CYGPATH -u "$path"`
31241 
31242   # Now try to locate executable using which
31243   new_path=`$WHICH "$new_path" 2> /dev/null`
31244   # bat and cmd files are not always considered executable in cygwin causing which
31245   # to not find them
31246   if test "x$new_path" = x \
31247       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31248       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31249     new_path=`$CYGPATH -u "$path"`
31250   fi
31251   if test "x$new_path" = x; then
31252     # Oops. Which didn't find the executable.
31253     # The splitting of arguments from the executable at a space might have been incorrect,
31254     # since paths with space are more likely in Windows. Give it another try with the whole
31255     # argument.
31256     path="$complete"
31257     arguments="EOL"
31258     new_path=`$CYGPATH -u "$path"`
31259     new_path=`$WHICH "$new_path" 2> /dev/null`
31260     # bat and cmd files are not always considered executable in cygwin causing which
31261     # to not find them
31262     if test "x$new_path" = x \
31263         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31264         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31265       new_path=`$CYGPATH -u "$path"`
31266     fi
31267     if test "x$new_path" = x; then
31268       # It's still not found. Now this is an unrecoverable error.
31269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31270 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31271       has_space=`$ECHO "$complete" | $GREP " "`
31272       if test "x$has_space" != x; then
31273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31275       fi
31276       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31277     fi
31278   fi
31279 
31280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31283   # "foo.exe" is OK but "foo" is an error.
31284   #
31285   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31286   # It is also a way to make sure we got the proper file name for the real test later on.
31287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31288   if test "x$test_shortpath" = x; then
31289     # Short path failed, file does not exist as specified.
31290     # Try adding .exe or .cmd
31291     if test -f "${new_path}.exe"; then
31292       input_to_shortpath="${new_path}.exe"
31293     elif test -f "${new_path}.cmd"; then
31294       input_to_shortpath="${new_path}.cmd"
31295     else
31296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
31297 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
31298       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31299 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31300       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31301     fi
31302   else
31303     input_to_shortpath="$new_path"
31304   fi
31305 
31306   # Call helper function which possibly converts this using DOS-style short mode.
31307   # If so, the updated path is stored in $new_path.
31308   new_path="$input_to_shortpath"
31309 
31310   input_path="$input_to_shortpath"
31311   # Check if we need to convert this using DOS-style short mode. If the path
31312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31313   # take no chances and rewrite it.
31314   # Note: m4 eats our [], so we need to use [ and ] instead.
31315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31316   if test "x$has_forbidden_chars" != x; then
31317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31318     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31319     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31320     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31321       # Going to short mode and back again did indeed matter. Since short mode is
31322       # case insensitive, let's make it lowercase to improve readability.
31323       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31324       # Now convert it back to Unix-stile (cygpath)
31325       input_path=`$CYGPATH -u "$shortmode_path"`
31326       new_path="$input_path"
31327     fi
31328   fi
31329 
31330   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31331   if test "x$test_cygdrive_prefix" = x; then
31332     # As a simple fix, exclude /usr/bin since it's not a real path.
31333     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31334       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31335       # a path prefixed by /cygdrive for fixpath to work.
31336       new_path="$CYGWIN_ROOT_PATH$input_path"
31337     fi
31338   fi
31339 
31340   # remove trailing .exe if any
31341   new_path="${new_path/%.exe/}"
31342 
31343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31344 
31345   # First separate the path from the arguments. This will split at the first
31346   # space.
31347   complete="$CXX"
31348   path="${complete%% *}"
31349   tmp="$complete EOL"
31350   arguments="${tmp#* }"
31351 
31352   # Input might be given as Windows format, start by converting to
31353   # unix format.
31354   new_path="$path"
31355 
31356   windows_path="$new_path"
31357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31358     unix_path=`$CYGPATH -u "$windows_path"`
31359     new_path="$unix_path"
31360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31362     new_path="$unix_path"
31363   fi
31364 
31365 
31366   # Now try to locate executable using which
31367   new_path=`$WHICH "$new_path" 2> /dev/null`
31368 
31369   if test "x$new_path" = x; then
31370     # Oops. Which didn't find the executable.
31371     # The splitting of arguments from the executable at a space might have been incorrect,
31372     # since paths with space are more likely in Windows. Give it another try with the whole
31373     # argument.
31374     path="$complete"
31375     arguments="EOL"
31376     new_path="$path"
31377 
31378   windows_path="$new_path"
31379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31380     unix_path=`$CYGPATH -u "$windows_path"`
31381     new_path="$unix_path"
31382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31384     new_path="$unix_path"
31385   fi
31386 
31387 
31388     new_path=`$WHICH "$new_path" 2> /dev/null`
31389 
31390     if test "x$new_path" = x; then
31391       # It's still not found. Now this is an unrecoverable error.
31392       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31393 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31394       has_space=`$ECHO "$complete" | $GREP " "`
31395       if test "x$has_space" != x; then
31396         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31397 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31398       fi
31399       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31400     fi
31401   fi
31402 
31403   # Now new_path has a complete unix path to the binary
31404   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31405     # Keep paths in /bin as-is, but remove trailing .exe if any
31406     new_path="${new_path/%.exe/}"
31407     # Do not save /bin paths to all_fixpath_prefixes!
31408   else
31409     # Not in mixed or Windows style, start by that.
31410     new_path=`cmd //c echo $new_path`
31411 
31412   input_path="$new_path"
31413   # Check if we need to convert this using DOS-style short mode. If the path
31414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31415   # take no chances and rewrite it.
31416   # Note: m4 eats our [], so we need to use [ and ] instead.
31417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31418   if test "x$has_forbidden_chars" != x; then
31419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31420     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31421   fi
31422 
31423     # Output is in $new_path
31424 
31425   windows_path="$new_path"
31426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31427     unix_path=`$CYGPATH -u "$windows_path"`
31428     new_path="$unix_path"
31429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31431     new_path="$unix_path"
31432   fi
31433 
31434     # remove trailing .exe if any
31435     new_path="${new_path/%.exe/}"
31436 
31437     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31438     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31439   fi
31440 
31441   else
31442     # We're on a posix platform. Hooray! :)
31443     # First separate the path from the arguments. This will split at the first
31444     # space.
31445     complete="$CXX"
31446     path="${complete%% *}"
31447     tmp="$complete EOL"
31448     arguments="${tmp#* }"
31449 
31450     # Cannot rely on the command "which" here since it doesn't always work.
31451     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31452     if test -z "$is_absolute_path"; then
31453       # Path to executable is not absolute. Find it.
31454       IFS_save="$IFS"
31455       IFS=:
31456       for p in $PATH; do
31457         if test -f "$p/$path" && test -x "$p/$path"; then
31458           new_path="$p/$path"
31459           break
31460         fi
31461       done
31462       IFS="$IFS_save"
31463     else
31464       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
31465 $as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
31466       new_path="$path"
31467     fi
31468 
31469     if test "x$new_path" = x; then
31470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
31471 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
31472       has_space=`$ECHO "$complete" | $GREP " "`
31473       if test "x$has_space" != x; then
31474         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31475 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31476       fi
31477       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
31478     fi
31479   fi
31480 
31481   # Now join together the path and the arguments once again
31482   if test "x$arguments" != xEOL; then
31483     new_complete="$new_path ${arguments% *}"
31484   else
31485     new_complete="$new_path"
31486   fi
31487 
31488   if test "x$complete" != "x$new_complete"; then
31489     CXX="$new_complete"
31490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
31491 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
31492   fi
31493 
31494   TEST_COMPILER="$CXX"
31495   # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
31496   # to 'xlc' but it is crucial that we invoke the compiler with the right name!
31497   if test "x$OPENJDK_BUILD_OS" != xaix; then
31498     { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
31499 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
31500 
31501   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31502     # Follow a chain of symbolic links. Use readlink
31503     # where it exists, else fall back to horribly
31504     # complicated shell code.
31505     if test "x$READLINK_TESTED" != yes; then
31506       # On MacOSX there is a readlink tool with a different
31507       # purpose than the GNU readlink tool. Check the found readlink.
31508       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31509       if test "x$ISGNU" = x; then
31510         # A readlink that we do not know how to use.
31511         # Are there other non-GNU readlinks out there?
31512         READLINK_TESTED=yes
31513         READLINK=
31514       fi
31515     fi
31516 
31517     if test "x$READLINK" != x; then
31518       TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
31519     else
31520       # Save the current directory for restoring afterwards
31521       STARTDIR=$PWD
31522       COUNTER=0
31523       sym_link_dir=`$DIRNAME $TEST_COMPILER`
31524       sym_link_file=`$BASENAME $TEST_COMPILER`
31525       cd $sym_link_dir
31526       # Use -P flag to resolve symlinks in directories.
31527       cd `$THEPWDCMD -P`
31528       sym_link_dir=`$THEPWDCMD -P`
31529       # Resolve file symlinks
31530       while test $COUNTER -lt 20; do
31531         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31532         if test "x$ISLINK" == x; then
31533           # This is not a symbolic link! We are done!
31534           break
31535         fi
31536         # Again resolve directory symlinks since the target of the just found
31537         # link could be in a different directory
31538         cd `$DIRNAME $ISLINK`
31539         sym_link_dir=`$THEPWDCMD -P`
31540         sym_link_file=`$BASENAME $ISLINK`
31541         let COUNTER=COUNTER+1
31542       done
31543       cd $STARTDIR
31544       TEST_COMPILER=$sym_link_dir/$sym_link_file
31545     fi
31546   fi
31547 
31548     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
31549 $as_echo "$TEST_COMPILER" >&6; }
31550   fi
31551   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
31552 $as_echo_n "checking if CXX is disguised ccache... " >&6; }
31553 
31554   COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
31555   if test "x$COMPILER_BASENAME" = "xccache"; then
31556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
31557 $as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
31558     # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
31559     # We want to control ccache invocation ourselves, so ignore this cc and try
31560     # searching again.
31561 
31562     # Remove the path to the fake ccache cc from the PATH
31563     RETRY_COMPILER_SAVED_PATH="$PATH"
31564     COMPILER_DIRNAME=`$DIRNAME $CXX`
31565     PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
31566 
31567     # Try again looking for our compiler
31568     if test -n "$ac_tool_prefix"; then
31569   for ac_prog in $COMPILER_CHECK_LIST
31570   do
31571     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31572 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31574 $as_echo_n "checking for $ac_word... " >&6; }
31575 if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
31576   $as_echo_n "(cached) " >&6
31577 else
31578   if test -n "$PROPER_COMPILER_CXX"; then
31579   ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
31580 else
31581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31582 for as_dir in $PATH
31583 do
31584   IFS=$as_save_IFS
31585   test -z "$as_dir" && as_dir=.
31586     for ac_exec_ext in '' $ac_executable_extensions; do
31587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31588     ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
31589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31590     break 2
31591   fi
31592 done
31593   done
31594 IFS=$as_save_IFS
31595 
31596 fi
31597 fi
31598 PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
31599 if test -n "$PROPER_COMPILER_CXX"; then
31600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31601 $as_echo "$PROPER_COMPILER_CXX" >&6; }
31602 else
31603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31604 $as_echo "no" >&6; }
31605 fi
31606 
31607 
31608     test -n "$PROPER_COMPILER_CXX" && break
31609   done
31610 fi
31611 if test -z "$PROPER_COMPILER_CXX"; then
31612   ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
31613   for ac_prog in $COMPILER_CHECK_LIST
31614 do
31615   # Extract the first word of "$ac_prog", so it can be a program name with args.
31616 set dummy $ac_prog; ac_word=$2
31617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31618 $as_echo_n "checking for $ac_word... " >&6; }
31619 if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
31620   $as_echo_n "(cached) " >&6
31621 else
31622   if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31623   ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
31624 else
31625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31626 for as_dir in $PATH
31627 do
31628   IFS=$as_save_IFS
31629   test -z "$as_dir" && as_dir=.
31630     for ac_exec_ext in '' $ac_executable_extensions; do
31631   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31632     ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
31633     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31634     break 2
31635   fi
31636 done
31637   done
31638 IFS=$as_save_IFS
31639 
31640 fi
31641 fi
31642 ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
31643 if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
31644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
31645 $as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
31646 else
31647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31648 $as_echo "no" >&6; }
31649 fi
31650 
31651 
31652   test -n "$ac_ct_PROPER_COMPILER_CXX" && break
31653 done
31654 
31655   if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
31656     PROPER_COMPILER_CXX=""
31657   else
31658     case $cross_compiling:$ac_tool_warned in
31659 yes:)
31660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31661 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31662 ac_tool_warned=yes ;;
31663 esac
31664     PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
31665   fi
31666 fi
31667 
31668 
31669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31670 
31671   # First separate the path from the arguments. This will split at the first
31672   # space.
31673   complete="$PROPER_COMPILER_CXX"
31674   path="${complete%% *}"
31675   tmp="$complete EOL"
31676   arguments="${tmp#* }"
31677 
31678   # Input might be given as Windows format, start by converting to
31679   # unix format.
31680   new_path=`$CYGPATH -u "$path"`
31681 
31682   # Now try to locate executable using which
31683   new_path=`$WHICH "$new_path" 2> /dev/null`
31684   # bat and cmd files are not always considered executable in cygwin causing which
31685   # to not find them
31686   if test "x$new_path" = x \
31687       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31688       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31689     new_path=`$CYGPATH -u "$path"`
31690   fi
31691   if test "x$new_path" = x; then
31692     # Oops. Which didn't find the executable.
31693     # The splitting of arguments from the executable at a space might have been incorrect,
31694     # since paths with space are more likely in Windows. Give it another try with the whole
31695     # argument.
31696     path="$complete"
31697     arguments="EOL"
31698     new_path=`$CYGPATH -u "$path"`
31699     new_path=`$WHICH "$new_path" 2> /dev/null`
31700     # bat and cmd files are not always considered executable in cygwin causing which
31701     # to not find them
31702     if test "x$new_path" = x \
31703         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31704         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31705       new_path=`$CYGPATH -u "$path"`
31706     fi
31707     if test "x$new_path" = x; then
31708       # It's still not found. Now this is an unrecoverable error.
31709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31710 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31711       has_space=`$ECHO "$complete" | $GREP " "`
31712       if test "x$has_space" != x; then
31713         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31714 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31715       fi
31716       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31717     fi
31718   fi
31719 
31720   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31721   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31722   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31723   # "foo.exe" is OK but "foo" is an error.
31724   #
31725   # This test is therefore slightly more accurate than "test -f" to check for file presence.
31726   # It is also a way to make sure we got the proper file name for the real test later on.
31727   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31728   if test "x$test_shortpath" = x; then
31729     # Short path failed, file does not exist as specified.
31730     # Try adding .exe or .cmd
31731     if test -f "${new_path}.exe"; then
31732       input_to_shortpath="${new_path}.exe"
31733     elif test -f "${new_path}.cmd"; then
31734       input_to_shortpath="${new_path}.cmd"
31735     else
31736       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
31737 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
31738       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31739 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31740       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31741     fi
31742   else
31743     input_to_shortpath="$new_path"
31744   fi
31745 
31746   # Call helper function which possibly converts this using DOS-style short mode.
31747   # If so, the updated path is stored in $new_path.
31748   new_path="$input_to_shortpath"
31749 
31750   input_path="$input_to_shortpath"
31751   # Check if we need to convert this using DOS-style short mode. If the path
31752   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31753   # take no chances and rewrite it.
31754   # Note: m4 eats our [], so we need to use [ and ] instead.
31755   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31756   if test "x$has_forbidden_chars" != x; then
31757     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31758     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31759     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31760     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31761       # Going to short mode and back again did indeed matter. Since short mode is
31762       # case insensitive, let's make it lowercase to improve readability.
31763       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31764       # Now convert it back to Unix-stile (cygpath)
31765       input_path=`$CYGPATH -u "$shortmode_path"`
31766       new_path="$input_path"
31767     fi
31768   fi
31769 
31770   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31771   if test "x$test_cygdrive_prefix" = x; then
31772     # As a simple fix, exclude /usr/bin since it's not a real path.
31773     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31774       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31775       # a path prefixed by /cygdrive for fixpath to work.
31776       new_path="$CYGWIN_ROOT_PATH$input_path"
31777     fi
31778   fi
31779 
31780   # remove trailing .exe if any
31781   new_path="${new_path/%.exe/}"
31782 
31783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31784 
31785   # First separate the path from the arguments. This will split at the first
31786   # space.
31787   complete="$PROPER_COMPILER_CXX"
31788   path="${complete%% *}"
31789   tmp="$complete EOL"
31790   arguments="${tmp#* }"
31791 
31792   # Input might be given as Windows format, start by converting to
31793   # unix format.
31794   new_path="$path"
31795 
31796   windows_path="$new_path"
31797   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31798     unix_path=`$CYGPATH -u "$windows_path"`
31799     new_path="$unix_path"
31800   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31801     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31802     new_path="$unix_path"
31803   fi
31804 
31805 
31806   # Now try to locate executable using which
31807   new_path=`$WHICH "$new_path" 2> /dev/null`
31808 
31809   if test "x$new_path" = x; then
31810     # Oops. Which didn't find the executable.
31811     # The splitting of arguments from the executable at a space might have been incorrect,
31812     # since paths with space are more likely in Windows. Give it another try with the whole
31813     # argument.
31814     path="$complete"
31815     arguments="EOL"
31816     new_path="$path"
31817 
31818   windows_path="$new_path"
31819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31820     unix_path=`$CYGPATH -u "$windows_path"`
31821     new_path="$unix_path"
31822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31824     new_path="$unix_path"
31825   fi
31826 
31827 
31828     new_path=`$WHICH "$new_path" 2> /dev/null`
31829 
31830     if test "x$new_path" = x; then
31831       # It's still not found. Now this is an unrecoverable error.
31832       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31833 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31834       has_space=`$ECHO "$complete" | $GREP " "`
31835       if test "x$has_space" != x; then
31836         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31837 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31838       fi
31839       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31840     fi
31841   fi
31842 
31843   # Now new_path has a complete unix path to the binary
31844   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31845     # Keep paths in /bin as-is, but remove trailing .exe if any
31846     new_path="${new_path/%.exe/}"
31847     # Do not save /bin paths to all_fixpath_prefixes!
31848   else
31849     # Not in mixed or Windows style, start by that.
31850     new_path=`cmd //c echo $new_path`
31851 
31852   input_path="$new_path"
31853   # Check if we need to convert this using DOS-style short mode. If the path
31854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31855   # take no chances and rewrite it.
31856   # Note: m4 eats our [], so we need to use [ and ] instead.
31857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31858   if test "x$has_forbidden_chars" != x; then
31859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31861   fi
31862 
31863     # Output is in $new_path
31864 
31865   windows_path="$new_path"
31866   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31867     unix_path=`$CYGPATH -u "$windows_path"`
31868     new_path="$unix_path"
31869   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31870     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31871     new_path="$unix_path"
31872   fi
31873 
31874     # remove trailing .exe if any
31875     new_path="${new_path/%.exe/}"
31876 
31877     # Save the first 10 bytes of this path to the storage, so fixpath can work.
31878     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31879   fi
31880 
31881   else
31882     # We're on a posix platform. Hooray! :)
31883     # First separate the path from the arguments. This will split at the first
31884     # space.
31885     complete="$PROPER_COMPILER_CXX"
31886     path="${complete%% *}"
31887     tmp="$complete EOL"
31888     arguments="${tmp#* }"
31889 
31890     # Cannot rely on the command "which" here since it doesn't always work.
31891     is_absolute_path=`$ECHO "$path" | $GREP ^/`
31892     if test -z "$is_absolute_path"; then
31893       # Path to executable is not absolute. Find it.
31894       IFS_save="$IFS"
31895       IFS=:
31896       for p in $PATH; do
31897         if test -f "$p/$path" && test -x "$p/$path"; then
31898           new_path="$p/$path"
31899           break
31900         fi
31901       done
31902       IFS="$IFS_save"
31903     else
31904       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
31905 $as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
31906       new_path="$path"
31907     fi
31908 
31909     if test "x$new_path" = x; then
31910       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
31911 $as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
31912       has_space=`$ECHO "$complete" | $GREP " "`
31913       if test "x$has_space" != x; then
31914         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31915 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31916       fi
31917       as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
31918     fi
31919   fi
31920 
31921   # Now join together the path and the arguments once again
31922   if test "x$arguments" != xEOL; then
31923     new_complete="$new_path ${arguments% *}"
31924   else
31925     new_complete="$new_path"
31926   fi
31927 
31928   if test "x$complete" != "x$new_complete"; then
31929     PROPER_COMPILER_CXX="$new_complete"
31930     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31931 $as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31932   fi
31933 
31934     PATH="$RETRY_COMPILER_SAVED_PATH"
31935 
31936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31937 $as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31938 
31939   if test "x$OPENJDK_BUILD_OS" != xwindows; then
31940     # Follow a chain of symbolic links. Use readlink
31941     # where it exists, else fall back to horribly
31942     # complicated shell code.
31943     if test "x$READLINK_TESTED" != yes; then
31944       # On MacOSX there is a readlink tool with a different
31945       # purpose than the GNU readlink tool. Check the found readlink.
31946       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31947       if test "x$ISGNU" = x; then
31948         # A readlink that we do not know how to use.
31949         # Are there other non-GNU readlinks out there?
31950         READLINK_TESTED=yes
31951         READLINK=
31952       fi
31953     fi
31954 
31955     if test "x$READLINK" != x; then
31956       PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31957     else
31958       # Save the current directory for restoring afterwards
31959       STARTDIR=$PWD
31960       COUNTER=0
31961       sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31962       sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31963       cd $sym_link_dir
31964       # Use -P flag to resolve symlinks in directories.
31965       cd `$THEPWDCMD -P`
31966       sym_link_dir=`$THEPWDCMD -P`
31967       # Resolve file symlinks
31968       while test $COUNTER -lt 20; do
31969         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31970         if test "x$ISLINK" == x; then
31971           # This is not a symbolic link! We are done!
31972           break
31973         fi
31974         # Again resolve directory symlinks since the target of the just found
31975         # link could be in a different directory
31976         cd `$DIRNAME $ISLINK`
31977         sym_link_dir=`$THEPWDCMD -P`
31978         sym_link_file=`$BASENAME $ISLINK`
31979         let COUNTER=COUNTER+1
31980       done
31981       cd $STARTDIR
31982       PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31983     fi
31984   fi
31985 
31986     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31987 $as_echo "$PROPER_COMPILER_CXX" >&6; }
31988     CXX="$PROPER_COMPILER_CXX"
31989   else
31990     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31991 $as_echo "no, keeping CXX" >&6; }
31992   fi
31993 
31994 
31995   COMPILER=$CXX
31996   COMPILER_NAME=$COMPILER_NAME
31997 
31998   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31999     # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
32000     COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
32001     $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
32002     if test $? -ne 0; then
32003       GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
32004 
32005       { $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
32006 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
32007       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
32008 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
32009       as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32010     else
32011       COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
32012       COMPILER_VENDOR="Sun Studio"
32013     fi
32014   elif test  "x$OPENJDK_TARGET_OS" = xaix; then
32015       COMPILER_VERSION_TEST=`$COMPILER -qversion  2>&1 | $TAIL -n 1`
32016       $ECHO $COMPILER_VERSION_TEST | $GREP "^Version: " > /dev/null
32017       if test $? -ne 0; then
32018         as_fn_error $? "Failed to detect the compiler version of $COMPILER ...." "$LINENO" 5
32019       else
32020         COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n 's/Version: \(0-90-9\.0-90-9*\).*/\1/p'`
32021         COMPILER_VENDOR='IBM'
32022       fi
32023   elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
32024     # First line typically looks something like:
32025     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
32026     COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
32027     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
32028     COMPILER_VENDOR="Microsoft CL.EXE"
32029     COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
32030     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
32031       if test "x$COMPILER_CPU_TEST" != "x80x86"; then
32032         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
32033       fi
32034     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
32035       if test "x$COMPILER_CPU_TEST" != "xx64"; then
32036         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
32037       fi
32038     fi
32039   else
32040     COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
32041     # Check that this is likely to be GCC.
32042     $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
32043     if test $? -ne 0; then
32044       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
32045 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
32046       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
32047 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
32048       as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
32049     fi
32050 
32051     # First line typically looks something like:
32052     # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
32053     COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
32054     COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
32055   fi
32056   # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
32057   CXX_VERSION="$COMPILER_VERSION"
32058   # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
32059   CXX_VENDOR="$COMPILER_VENDOR"
32060 
32061   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
32062 $as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
32063 
32064 
32065   # Now that we have resolved CXX ourself, let autoconf have its go at it
32066   ac_ext=cpp
32067 ac_cpp='$CXXCPP $CPPFLAGS'
32068 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32069 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32070 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32071 if test -z "$CXX"; then
32072   if test -n "$CCC"; then
32073     CXX=$CCC
32074   else
32075     if test -n "$ac_tool_prefix"; then
32076   for ac_prog in $CXX
32077   do
32078     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32079 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32081 $as_echo_n "checking for $ac_word... " >&6; }
32082 if ${ac_cv_prog_CXX+:} false; then :
32083   $as_echo_n "(cached) " >&6
32084 else
32085   if test -n "$CXX"; then
32086   ac_cv_prog_CXX="$CXX" # Let the user override the test.
32087 else
32088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32089 for as_dir in $PATH
32090 do
32091   IFS=$as_save_IFS
32092   test -z "$as_dir" && as_dir=.
32093     for ac_exec_ext in '' $ac_executable_extensions; do
32094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32095     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
32096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32097     break 2
32098   fi
32099 done
32100   done
32101 IFS=$as_save_IFS
32102 
32103 fi
32104 fi
32105 CXX=$ac_cv_prog_CXX
32106 if test -n "$CXX"; then
32107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
32108 $as_echo "$CXX" >&6; }
32109 else
32110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32111 $as_echo "no" >&6; }
32112 fi
32113 
32114 
32115     test -n "$CXX" && break
32116   done
32117 fi
32118 if test -z "$CXX"; then
32119   ac_ct_CXX=$CXX
32120   for ac_prog in $CXX
32121 do
32122   # Extract the first word of "$ac_prog", so it can be a program name with args.
32123 set dummy $ac_prog; ac_word=$2
32124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32125 $as_echo_n "checking for $ac_word... " >&6; }
32126 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
32127   $as_echo_n "(cached) " >&6
32128 else
32129   if test -n "$ac_ct_CXX"; then
32130   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
32131 else
32132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32133 for as_dir in $PATH
32134 do
32135   IFS=$as_save_IFS
32136   test -z "$as_dir" && as_dir=.
32137     for ac_exec_ext in '' $ac_executable_extensions; do
32138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32139     ac_cv_prog_ac_ct_CXX="$ac_prog"
32140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32141     break 2
32142   fi
32143 done
32144   done
32145 IFS=$as_save_IFS
32146 
32147 fi
32148 fi
32149 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
32150 if test -n "$ac_ct_CXX"; then
32151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
32152 $as_echo "$ac_ct_CXX" >&6; }
32153 else
32154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32155 $as_echo "no" >&6; }
32156 fi
32157 
32158 
32159   test -n "$ac_ct_CXX" && break
32160 done
32161 
32162   if test "x$ac_ct_CXX" = x; then
32163     CXX="g++"
32164   else
32165     case $cross_compiling:$ac_tool_warned in
32166 yes:)
32167 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32168 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32169 ac_tool_warned=yes ;;
32170 esac
32171     CXX=$ac_ct_CXX
32172   fi
32173 fi
32174 
32175   fi
32176 fi
32177 # Provide some information about the compiler.
32178 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
32179 set X $ac_compile
32180 ac_compiler=$2
32181 for ac_option in --version -v -V -qversion; do
32182   { { ac_try="$ac_compiler $ac_option >&5"
32183 case "(($ac_try" in
32184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32185   *) ac_try_echo=$ac_try;;
32186 esac
32187 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32188 $as_echo "$ac_try_echo"; } >&5
32189   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32190   ac_status=$?
32191   if test -s conftest.err; then
32192     sed '10a\
32193 ... rest of stderr output deleted ...
32194          10q' conftest.err >conftest.er1
32195     cat conftest.er1 >&5
32196   fi
32197   rm -f conftest.er1 conftest.err
32198   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32199   test $ac_status = 0; }
32200 done
32201 
32202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
32203 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
32204 if ${ac_cv_cxx_compiler_gnu+:} false; then :
32205   $as_echo_n "(cached) " >&6
32206 else
32207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32208 /* end confdefs.h.  */
32209 
32210 int
32211 main ()
32212 {
32213 #ifndef __GNUC__
32214        choke me
32215 #endif
32216 
32217   ;
32218   return 0;
32219 }
32220 _ACEOF
32221 if ac_fn_cxx_try_compile "$LINENO"; then :
32222   ac_compiler_gnu=yes
32223 else
32224   ac_compiler_gnu=no
32225 fi
32226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32227 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
32228 
32229 fi
32230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
32231 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
32232 if test $ac_compiler_gnu = yes; then
32233   GXX=yes
32234 else
32235   GXX=
32236 fi
32237 ac_test_CXXFLAGS=${CXXFLAGS+set}
32238 ac_save_CXXFLAGS=$CXXFLAGS
32239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
32240 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
32241 if ${ac_cv_prog_cxx_g+:} false; then :
32242   $as_echo_n "(cached) " >&6
32243 else
32244   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
32245    ac_cxx_werror_flag=yes
32246    ac_cv_prog_cxx_g=no
32247    CXXFLAGS="-g"
32248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32249 /* end confdefs.h.  */
32250 
32251 int
32252 main ()
32253 {
32254 
32255   ;
32256   return 0;
32257 }
32258 _ACEOF
32259 if ac_fn_cxx_try_compile "$LINENO"; then :
32260   ac_cv_prog_cxx_g=yes
32261 else
32262   CXXFLAGS=""
32263       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32264 /* end confdefs.h.  */
32265 
32266 int
32267 main ()
32268 {
32269 
32270   ;
32271   return 0;
32272 }
32273 _ACEOF
32274 if ac_fn_cxx_try_compile "$LINENO"; then :
32275 
32276 else
32277   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32278          CXXFLAGS="-g"
32279          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32280 /* end confdefs.h.  */
32281 
32282 int
32283 main ()
32284 {
32285 
32286   ;
32287   return 0;
32288 }
32289 _ACEOF
32290 if ac_fn_cxx_try_compile "$LINENO"; then :
32291   ac_cv_prog_cxx_g=yes
32292 fi
32293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32294 fi
32295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32296 fi
32297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32298    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
32299 fi
32300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
32301 $as_echo "$ac_cv_prog_cxx_g" >&6; }
32302 if test "$ac_test_CXXFLAGS" = set; then
32303   CXXFLAGS=$ac_save_CXXFLAGS
32304 elif test $ac_cv_prog_cxx_g = yes; then
32305   if test "$GXX" = yes; then
32306     CXXFLAGS="-g -O2"
32307   else
32308     CXXFLAGS="-g"
32309   fi
32310 else
32311   if test "$GXX" = yes; then
32312     CXXFLAGS="-O2"
32313   else
32314     CXXFLAGS=
32315   fi
32316 fi
32317 ac_ext=cpp
32318 ac_cpp='$CXXCPP $CPPFLAGS'
32319 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32320 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32321 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32322 
32323 
32324   ### Locate other tools
32325 
32326   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32327     ac_ext=m
32328 ac_cpp='$OBJCPP $CPPFLAGS'
32329 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32330 ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32331 ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32332 if test -n "$ac_tool_prefix"; then
32333   for ac_prog in gcc objcc objc cc CC
32334   do
32335     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32336 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32338 $as_echo_n "checking for $ac_word... " >&6; }
32339 if ${ac_cv_prog_OBJC+:} false; then :
32340   $as_echo_n "(cached) " >&6
32341 else
32342   if test -n "$OBJC"; then
32343   ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32344 else
32345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32346 for as_dir in $PATH
32347 do
32348   IFS=$as_save_IFS
32349   test -z "$as_dir" && as_dir=.
32350     for ac_exec_ext in '' $ac_executable_extensions; do
32351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32352     ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32354     break 2
32355   fi
32356 done
32357   done
32358 IFS=$as_save_IFS
32359 
32360 fi
32361 fi
32362 OBJC=$ac_cv_prog_OBJC
32363 if test -n "$OBJC"; then
32364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32365 $as_echo "$OBJC" >&6; }
32366 else
32367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32368 $as_echo "no" >&6; }
32369 fi
32370 
32371 
32372     test -n "$OBJC" && break
32373   done
32374 fi
32375 if test -z "$OBJC"; then
32376   ac_ct_OBJC=$OBJC
32377   for ac_prog in gcc objcc objc cc CC
32378 do
32379   # Extract the first word of "$ac_prog", so it can be a program name with args.
32380 set dummy $ac_prog; ac_word=$2
32381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32382 $as_echo_n "checking for $ac_word... " >&6; }
32383 if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32384   $as_echo_n "(cached) " >&6
32385 else
32386   if test -n "$ac_ct_OBJC"; then
32387   ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32388 else
32389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32390 for as_dir in $PATH
32391 do
32392   IFS=$as_save_IFS
32393   test -z "$as_dir" && as_dir=.
32394     for ac_exec_ext in '' $ac_executable_extensions; do
32395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32396     ac_cv_prog_ac_ct_OBJC="$ac_prog"
32397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32398     break 2
32399   fi
32400 done
32401   done
32402 IFS=$as_save_IFS
32403 
32404 fi
32405 fi
32406 ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32407 if test -n "$ac_ct_OBJC"; then
32408   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32409 $as_echo "$ac_ct_OBJC" >&6; }
32410 else
32411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32412 $as_echo "no" >&6; }
32413 fi
32414 
32415 
32416   test -n "$ac_ct_OBJC" && break
32417 done
32418 
32419   if test "x$ac_ct_OBJC" = x; then
32420     OBJC="gcc"
32421   else
32422     case $cross_compiling:$ac_tool_warned in
32423 yes:)
32424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32425 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32426 ac_tool_warned=yes ;;
32427 esac
32428     OBJC=$ac_ct_OBJC
32429   fi
32430 fi
32431 
32432 # Provide some information about the compiler.
32433 $as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32434 set X $ac_compile
32435 ac_compiler=$2
32436 for ac_option in --version -v -V -qversion; do
32437   { { ac_try="$ac_compiler $ac_option >&5"
32438 case "(($ac_try" in
32439   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32440   *) ac_try_echo=$ac_try;;
32441 esac
32442 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32443 $as_echo "$ac_try_echo"; } >&5
32444   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32445   ac_status=$?
32446   if test -s conftest.err; then
32447     sed '10a\
32448 ... rest of stderr output deleted ...
32449          10q' conftest.err >conftest.er1
32450     cat conftest.er1 >&5
32451   fi
32452   rm -f conftest.er1 conftest.err
32453   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32454   test $ac_status = 0; }
32455 done
32456 
32457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32458 $as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32459 if ${ac_cv_objc_compiler_gnu+:} false; then :
32460   $as_echo_n "(cached) " >&6
32461 else
32462   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32463 /* end confdefs.h.  */
32464 
32465 int
32466 main ()
32467 {
32468 #ifndef __GNUC__
32469        choke me
32470 #endif
32471 
32472   ;
32473   return 0;
32474 }
32475 _ACEOF
32476 if ac_fn_objc_try_compile "$LINENO"; then :
32477   ac_compiler_gnu=yes
32478 else
32479   ac_compiler_gnu=no
32480 fi
32481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32482 ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32483 
32484 fi
32485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32486 $as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32487 if test $ac_compiler_gnu = yes; then
32488   GOBJC=yes
32489 else
32490   GOBJC=
32491 fi
32492 ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32493 ac_save_OBJCFLAGS=$OBJCFLAGS
32494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32495 $as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32496 if ${ac_cv_prog_objc_g+:} false; then :
32497   $as_echo_n "(cached) " >&6
32498 else
32499   ac_save_objc_werror_flag=$ac_objc_werror_flag
32500    ac_objc_werror_flag=yes
32501    ac_cv_prog_objc_g=no
32502    OBJCFLAGS="-g"
32503    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32504 /* end confdefs.h.  */
32505 
32506 int
32507 main ()
32508 {
32509 
32510   ;
32511   return 0;
32512 }
32513 _ACEOF
32514 if ac_fn_objc_try_compile "$LINENO"; then :
32515   ac_cv_prog_objc_g=yes
32516 else
32517   OBJCFLAGS=""
32518       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32519 /* end confdefs.h.  */
32520 
32521 int
32522 main ()
32523 {
32524 
32525   ;
32526   return 0;
32527 }
32528 _ACEOF
32529 if ac_fn_objc_try_compile "$LINENO"; then :
32530 
32531 else
32532   ac_objc_werror_flag=$ac_save_objc_werror_flag
32533          OBJCFLAGS="-g"
32534          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32535 /* end confdefs.h.  */
32536 
32537 int
32538 main ()
32539 {
32540 
32541   ;
32542   return 0;
32543 }
32544 _ACEOF
32545 if ac_fn_objc_try_compile "$LINENO"; then :
32546   ac_cv_prog_objc_g=yes
32547 fi
32548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32549 fi
32550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32551 fi
32552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32553    ac_objc_werror_flag=$ac_save_objc_werror_flag
32554 fi
32555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32556 $as_echo "$ac_cv_prog_objc_g" >&6; }
32557 if test "$ac_test_OBJCFLAGS" = set; then
32558   OBJCFLAGS=$ac_save_OBJCFLAGS
32559 elif test $ac_cv_prog_objc_g = yes; then
32560   if test "$GOBJC" = yes; then
32561     OBJCFLAGS="-g -O2"
32562   else
32563     OBJCFLAGS="-g"
32564   fi
32565 else
32566   if test "$GOBJC" = yes; then
32567     OBJCFLAGS="-O2"
32568   else
32569     OBJCFLAGS=
32570   fi
32571 fi
32572 ac_ext=cpp
32573 ac_cpp='$CXXCPP $CPPFLAGS'
32574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32575 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32577 
32578 
32579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32580 
32581   # First separate the path from the arguments. This will split at the first
32582   # space.
32583   complete="$OBJC"
32584   path="${complete%% *}"
32585   tmp="$complete EOL"
32586   arguments="${tmp#* }"
32587 
32588   # Input might be given as Windows format, start by converting to
32589   # unix format.
32590   new_path=`$CYGPATH -u "$path"`
32591 
32592   # Now try to locate executable using which
32593   new_path=`$WHICH "$new_path" 2> /dev/null`
32594   # bat and cmd files are not always considered executable in cygwin causing which
32595   # to not find them
32596   if test "x$new_path" = x \
32597       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32598       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32599     new_path=`$CYGPATH -u "$path"`
32600   fi
32601   if test "x$new_path" = x; then
32602     # Oops. Which didn't find the executable.
32603     # The splitting of arguments from the executable at a space might have been incorrect,
32604     # since paths with space are more likely in Windows. Give it another try with the whole
32605     # argument.
32606     path="$complete"
32607     arguments="EOL"
32608     new_path=`$CYGPATH -u "$path"`
32609     new_path=`$WHICH "$new_path" 2> /dev/null`
32610     # bat and cmd files are not always considered executable in cygwin causing which
32611     # to not find them
32612     if test "x$new_path" = x \
32613         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32614         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32615       new_path=`$CYGPATH -u "$path"`
32616     fi
32617     if test "x$new_path" = x; then
32618       # It's still not found. Now this is an unrecoverable error.
32619       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32620 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32621       has_space=`$ECHO "$complete" | $GREP " "`
32622       if test "x$has_space" != x; then
32623         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32624 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32625       fi
32626       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32627     fi
32628   fi
32629 
32630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32633   # "foo.exe" is OK but "foo" is an error.
32634   #
32635   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32636   # It is also a way to make sure we got the proper file name for the real test later on.
32637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32638   if test "x$test_shortpath" = x; then
32639     # Short path failed, file does not exist as specified.
32640     # Try adding .exe or .cmd
32641     if test -f "${new_path}.exe"; then
32642       input_to_shortpath="${new_path}.exe"
32643     elif test -f "${new_path}.cmd"; then
32644       input_to_shortpath="${new_path}.cmd"
32645     else
32646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
32647 $as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
32648       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32649 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32650       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32651     fi
32652   else
32653     input_to_shortpath="$new_path"
32654   fi
32655 
32656   # Call helper function which possibly converts this using DOS-style short mode.
32657   # If so, the updated path is stored in $new_path.
32658   new_path="$input_to_shortpath"
32659 
32660   input_path="$input_to_shortpath"
32661   # Check if we need to convert this using DOS-style short mode. If the path
32662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32663   # take no chances and rewrite it.
32664   # Note: m4 eats our [], so we need to use [ and ] instead.
32665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32666   if test "x$has_forbidden_chars" != x; then
32667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32668     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32669     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32670     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32671       # Going to short mode and back again did indeed matter. Since short mode is
32672       # case insensitive, let's make it lowercase to improve readability.
32673       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32674       # Now convert it back to Unix-stile (cygpath)
32675       input_path=`$CYGPATH -u "$shortmode_path"`
32676       new_path="$input_path"
32677     fi
32678   fi
32679 
32680   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32681   if test "x$test_cygdrive_prefix" = x; then
32682     # As a simple fix, exclude /usr/bin since it's not a real path.
32683     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32684       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32685       # a path prefixed by /cygdrive for fixpath to work.
32686       new_path="$CYGWIN_ROOT_PATH$input_path"
32687     fi
32688   fi
32689 
32690   # remove trailing .exe if any
32691   new_path="${new_path/%.exe/}"
32692 
32693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32694 
32695   # First separate the path from the arguments. This will split at the first
32696   # space.
32697   complete="$OBJC"
32698   path="${complete%% *}"
32699   tmp="$complete EOL"
32700   arguments="${tmp#* }"
32701 
32702   # Input might be given as Windows format, start by converting to
32703   # unix format.
32704   new_path="$path"
32705 
32706   windows_path="$new_path"
32707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32708     unix_path=`$CYGPATH -u "$windows_path"`
32709     new_path="$unix_path"
32710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32711     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32712     new_path="$unix_path"
32713   fi
32714 
32715 
32716   # Now try to locate executable using which
32717   new_path=`$WHICH "$new_path" 2> /dev/null`
32718 
32719   if test "x$new_path" = x; then
32720     # Oops. Which didn't find the executable.
32721     # The splitting of arguments from the executable at a space might have been incorrect,
32722     # since paths with space are more likely in Windows. Give it another try with the whole
32723     # argument.
32724     path="$complete"
32725     arguments="EOL"
32726     new_path="$path"
32727 
32728   windows_path="$new_path"
32729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32730     unix_path=`$CYGPATH -u "$windows_path"`
32731     new_path="$unix_path"
32732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32734     new_path="$unix_path"
32735   fi
32736 
32737 
32738     new_path=`$WHICH "$new_path" 2> /dev/null`
32739 
32740     if test "x$new_path" = x; then
32741       # It's still not found. Now this is an unrecoverable error.
32742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32743 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32744       has_space=`$ECHO "$complete" | $GREP " "`
32745       if test "x$has_space" != x; then
32746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32748       fi
32749       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32750     fi
32751   fi
32752 
32753   # Now new_path has a complete unix path to the binary
32754   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32755     # Keep paths in /bin as-is, but remove trailing .exe if any
32756     new_path="${new_path/%.exe/}"
32757     # Do not save /bin paths to all_fixpath_prefixes!
32758   else
32759     # Not in mixed or Windows style, start by that.
32760     new_path=`cmd //c echo $new_path`
32761 
32762   input_path="$new_path"
32763   # Check if we need to convert this using DOS-style short mode. If the path
32764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32765   # take no chances and rewrite it.
32766   # Note: m4 eats our [], so we need to use [ and ] instead.
32767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32768   if test "x$has_forbidden_chars" != x; then
32769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32771   fi
32772 
32773     # Output is in $new_path
32774 
32775   windows_path="$new_path"
32776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32777     unix_path=`$CYGPATH -u "$windows_path"`
32778     new_path="$unix_path"
32779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32781     new_path="$unix_path"
32782   fi
32783 
32784     # remove trailing .exe if any
32785     new_path="${new_path/%.exe/}"
32786 
32787     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32788     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32789   fi
32790 
32791   else
32792     # We're on a posix platform. Hooray! :)
32793     # First separate the path from the arguments. This will split at the first
32794     # space.
32795     complete="$OBJC"
32796     path="${complete%% *}"
32797     tmp="$complete EOL"
32798     arguments="${tmp#* }"
32799 
32800     # Cannot rely on the command "which" here since it doesn't always work.
32801     is_absolute_path=`$ECHO "$path" | $GREP ^/`
32802     if test -z "$is_absolute_path"; then
32803       # Path to executable is not absolute. Find it.
32804       IFS_save="$IFS"
32805       IFS=:
32806       for p in $PATH; do
32807         if test -f "$p/$path" && test -x "$p/$path"; then
32808           new_path="$p/$path"
32809           break
32810         fi
32811       done
32812       IFS="$IFS_save"
32813     else
32814       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
32815 $as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
32816       new_path="$path"
32817     fi
32818 
32819     if test "x$new_path" = x; then
32820       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32821 $as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32822       has_space=`$ECHO "$complete" | $GREP " "`
32823       if test "x$has_space" != x; then
32824         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32825 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32826       fi
32827       as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32828     fi
32829   fi
32830 
32831   # Now join together the path and the arguments once again
32832   if test "x$arguments" != xEOL; then
32833     new_complete="$new_path ${arguments% *}"
32834   else
32835     new_complete="$new_path"
32836   fi
32837 
32838   if test "x$complete" != "x$new_complete"; then
32839     OBJC="$new_complete"
32840     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
32841 $as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
32842   fi
32843 
32844   else
32845     OBJC=
32846   fi
32847 
32848   # Restore the flags to the user specified values.
32849   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
32850   CFLAGS="$ORG_CFLAGS"
32851   CXXFLAGS="$ORG_CXXFLAGS"
32852   OBJCFLAGS="$ORG_OBJCFLAGS"
32853 
32854   LD="$CC"
32855   LDEXE="$CC"
32856   LDCXX="$CXX"
32857   LDEXECXX="$CXX"
32858 
32859   # LDEXE is the linker to use, when creating executables.
32860 
32861   # Linking C++ libraries.
32862 
32863   # Linking C++ executables.
32864 
32865 
32866   if test "x$OPENJDK_TARGET_OS" != xwindows; then
32867 
32868 
32869   # Publish this variable in the help.
32870 
32871 
32872   if test "x$AR" = x; then
32873     # The variable is not set by user, try to locate tool using the code snippet
32874     if test -n "$ac_tool_prefix"; then
32875   for ac_prog in ar
32876   do
32877     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32878 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32880 $as_echo_n "checking for $ac_word... " >&6; }
32881 if ${ac_cv_prog_AR+:} false; then :
32882   $as_echo_n "(cached) " >&6
32883 else
32884   if test -n "$AR"; then
32885   ac_cv_prog_AR="$AR" # Let the user override the test.
32886 else
32887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32888 for as_dir in $PATH
32889 do
32890   IFS=$as_save_IFS
32891   test -z "$as_dir" && as_dir=.
32892     for ac_exec_ext in '' $ac_executable_extensions; do
32893   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32894     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32895     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32896     break 2
32897   fi
32898 done
32899   done
32900 IFS=$as_save_IFS
32901 
32902 fi
32903 fi
32904 AR=$ac_cv_prog_AR
32905 if test -n "$AR"; then
32906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32907 $as_echo "$AR" >&6; }
32908 else
32909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32910 $as_echo "no" >&6; }
32911 fi
32912 
32913 
32914     test -n "$AR" && break
32915   done
32916 fi
32917 if test -z "$AR"; then
32918   ac_ct_AR=$AR
32919   for ac_prog in ar
32920 do
32921   # Extract the first word of "$ac_prog", so it can be a program name with args.
32922 set dummy $ac_prog; ac_word=$2
32923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32924 $as_echo_n "checking for $ac_word... " >&6; }
32925 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32926   $as_echo_n "(cached) " >&6
32927 else
32928   if test -n "$ac_ct_AR"; then
32929   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32930 else
32931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32932 for as_dir in $PATH
32933 do
32934   IFS=$as_save_IFS
32935   test -z "$as_dir" && as_dir=.
32936     for ac_exec_ext in '' $ac_executable_extensions; do
32937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32938     ac_cv_prog_ac_ct_AR="$ac_prog"
32939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32940     break 2
32941   fi
32942 done
32943   done
32944 IFS=$as_save_IFS
32945 
32946 fi
32947 fi
32948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32949 if test -n "$ac_ct_AR"; then
32950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32951 $as_echo "$ac_ct_AR" >&6; }
32952 else
32953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32954 $as_echo "no" >&6; }
32955 fi
32956 
32957 
32958   test -n "$ac_ct_AR" && break
32959 done
32960 
32961   if test "x$ac_ct_AR" = x; then
32962     AR=""
32963   else
32964     case $cross_compiling:$ac_tool_warned in
32965 yes:)
32966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32967 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32968 ac_tool_warned=yes ;;
32969 esac
32970     AR=$ac_ct_AR
32971   fi
32972 fi
32973 
32974   else
32975     # The variable is set, but is it from the command line or the environment?
32976 
32977     # Try to remove the string !AR! from our list.
32978     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32979     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32980       # If it failed, the variable was not from the command line. Ignore it,
32981       # but warn the user (except for BASH, which is always set by the calling BASH).
32982       if test "xAR" != xBASH; then
32983         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32984 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32985       fi
32986       # Try to locate tool using the code snippet
32987       if test -n "$ac_tool_prefix"; then
32988   for ac_prog in ar
32989   do
32990     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32991 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32993 $as_echo_n "checking for $ac_word... " >&6; }
32994 if ${ac_cv_prog_AR+:} false; then :
32995   $as_echo_n "(cached) " >&6
32996 else
32997   if test -n "$AR"; then
32998   ac_cv_prog_AR="$AR" # Let the user override the test.
32999 else
33000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33001 for as_dir in $PATH
33002 do
33003   IFS=$as_save_IFS
33004   test -z "$as_dir" && as_dir=.
33005     for ac_exec_ext in '' $ac_executable_extensions; do
33006   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33007     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33008     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33009     break 2
33010   fi
33011 done
33012   done
33013 IFS=$as_save_IFS
33014 
33015 fi
33016 fi
33017 AR=$ac_cv_prog_AR
33018 if test -n "$AR"; then
33019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33020 $as_echo "$AR" >&6; }
33021 else
33022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33023 $as_echo "no" >&6; }
33024 fi
33025 
33026 
33027     test -n "$AR" && break
33028   done
33029 fi
33030 if test -z "$AR"; then
33031   ac_ct_AR=$AR
33032   for ac_prog in ar
33033 do
33034   # Extract the first word of "$ac_prog", so it can be a program name with args.
33035 set dummy $ac_prog; ac_word=$2
33036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33037 $as_echo_n "checking for $ac_word... " >&6; }
33038 if ${ac_cv_prog_ac_ct_AR+:} false; then :
33039   $as_echo_n "(cached) " >&6
33040 else
33041   if test -n "$ac_ct_AR"; then
33042   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33043 else
33044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33045 for as_dir in $PATH
33046 do
33047   IFS=$as_save_IFS
33048   test -z "$as_dir" && as_dir=.
33049     for ac_exec_ext in '' $ac_executable_extensions; do
33050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33051     ac_cv_prog_ac_ct_AR="$ac_prog"
33052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33053     break 2
33054   fi
33055 done
33056   done
33057 IFS=$as_save_IFS
33058 
33059 fi
33060 fi
33061 ac_ct_AR=$ac_cv_prog_ac_ct_AR
33062 if test -n "$ac_ct_AR"; then
33063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33064 $as_echo "$ac_ct_AR" >&6; }
33065 else
33066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33067 $as_echo "no" >&6; }
33068 fi
33069 
33070 
33071   test -n "$ac_ct_AR" && break
33072 done
33073 
33074   if test "x$ac_ct_AR" = x; then
33075     AR=""
33076   else
33077     case $cross_compiling:$ac_tool_warned in
33078 yes:)
33079 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33080 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33081 ac_tool_warned=yes ;;
33082 esac
33083     AR=$ac_ct_AR
33084   fi
33085 fi
33086 
33087     else
33088       # If it succeeded, then it was overridden by the user. We will use it
33089       # for the tool.
33090 
33091       # First remove it from the list of overridden variables, so we can test
33092       # for unknown variables in the end.
33093       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33094 
33095       # Check if the provided tool contains a complete path.
33096       tool_specified="$AR"
33097       tool_basename="${tool_specified##*/}"
33098       if test "x$tool_basename" = "x$tool_specified"; then
33099         # A command without a complete path is provided, search $PATH.
33100         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33101 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33102         # Extract the first word of "$tool_basename", so it can be a program name with args.
33103 set dummy $tool_basename; ac_word=$2
33104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33105 $as_echo_n "checking for $ac_word... " >&6; }
33106 if ${ac_cv_path_AR+:} false; then :
33107   $as_echo_n "(cached) " >&6
33108 else
33109   case $AR in
33110   [\\/]* | ?:[\\/]*)
33111   ac_cv_path_AR="$AR" # Let the user override the test with a path.
33112   ;;
33113   *)
33114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33115 for as_dir in $PATH
33116 do
33117   IFS=$as_save_IFS
33118   test -z "$as_dir" && as_dir=.
33119     for ac_exec_ext in '' $ac_executable_extensions; do
33120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33121     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33123     break 2
33124   fi
33125 done
33126   done
33127 IFS=$as_save_IFS
33128 
33129   ;;
33130 esac
33131 fi
33132 AR=$ac_cv_path_AR
33133 if test -n "$AR"; then
33134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33135 $as_echo "$AR" >&6; }
33136 else
33137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33138 $as_echo "no" >&6; }
33139 fi
33140 
33141 
33142         if test "x$AR" = x; then
33143           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33144         fi
33145       else
33146         # Otherwise we believe it is a complete path. Use it as it is.
33147         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33148 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33149         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33150 $as_echo_n "checking for AR... " >&6; }
33151         if test ! -x "$tool_specified"; then
33152           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33153 $as_echo "not found" >&6; }
33154           as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33155         fi
33156         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33157 $as_echo "$tool_specified" >&6; }
33158       fi
33159     fi
33160   fi
33161 
33162 
33163 
33164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33165 
33166   # First separate the path from the arguments. This will split at the first
33167   # space.
33168   complete="$AR"
33169   path="${complete%% *}"
33170   tmp="$complete EOL"
33171   arguments="${tmp#* }"
33172 
33173   # Input might be given as Windows format, start by converting to
33174   # unix format.
33175   new_path=`$CYGPATH -u "$path"`
33176 
33177   # Now try to locate executable using which
33178   new_path=`$WHICH "$new_path" 2> /dev/null`
33179   # bat and cmd files are not always considered executable in cygwin causing which
33180   # to not find them
33181   if test "x$new_path" = x \
33182       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33183       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33184     new_path=`$CYGPATH -u "$path"`
33185   fi
33186   if test "x$new_path" = x; then
33187     # Oops. Which didn't find the executable.
33188     # The splitting of arguments from the executable at a space might have been incorrect,
33189     # since paths with space are more likely in Windows. Give it another try with the whole
33190     # argument.
33191     path="$complete"
33192     arguments="EOL"
33193     new_path=`$CYGPATH -u "$path"`
33194     new_path=`$WHICH "$new_path" 2> /dev/null`
33195     # bat and cmd files are not always considered executable in cygwin causing which
33196     # to not find them
33197     if test "x$new_path" = x \
33198         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33199         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33200       new_path=`$CYGPATH -u "$path"`
33201     fi
33202     if test "x$new_path" = x; then
33203       # It's still not found. Now this is an unrecoverable error.
33204       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33205 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33206       has_space=`$ECHO "$complete" | $GREP " "`
33207       if test "x$has_space" != x; then
33208         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33209 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33210       fi
33211       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33212     fi
33213   fi
33214 
33215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33218   # "foo.exe" is OK but "foo" is an error.
33219   #
33220   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33221   # It is also a way to make sure we got the proper file name for the real test later on.
33222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33223   if test "x$test_shortpath" = x; then
33224     # Short path failed, file does not exist as specified.
33225     # Try adding .exe or .cmd
33226     if test -f "${new_path}.exe"; then
33227       input_to_shortpath="${new_path}.exe"
33228     elif test -f "${new_path}.cmd"; then
33229       input_to_shortpath="${new_path}.cmd"
33230     else
33231       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33232 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33233       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33234 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33235       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33236     fi
33237   else
33238     input_to_shortpath="$new_path"
33239   fi
33240 
33241   # Call helper function which possibly converts this using DOS-style short mode.
33242   # If so, the updated path is stored in $new_path.
33243   new_path="$input_to_shortpath"
33244 
33245   input_path="$input_to_shortpath"
33246   # Check if we need to convert this using DOS-style short mode. If the path
33247   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33248   # take no chances and rewrite it.
33249   # Note: m4 eats our [], so we need to use [ and ] instead.
33250   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33251   if test "x$has_forbidden_chars" != x; then
33252     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33253     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33254     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33255     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33256       # Going to short mode and back again did indeed matter. Since short mode is
33257       # case insensitive, let's make it lowercase to improve readability.
33258       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33259       # Now convert it back to Unix-stile (cygpath)
33260       input_path=`$CYGPATH -u "$shortmode_path"`
33261       new_path="$input_path"
33262     fi
33263   fi
33264 
33265   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33266   if test "x$test_cygdrive_prefix" = x; then
33267     # As a simple fix, exclude /usr/bin since it's not a real path.
33268     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33269       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33270       # a path prefixed by /cygdrive for fixpath to work.
33271       new_path="$CYGWIN_ROOT_PATH$input_path"
33272     fi
33273   fi
33274 
33275   # remove trailing .exe if any
33276   new_path="${new_path/%.exe/}"
33277 
33278   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33279 
33280   # First separate the path from the arguments. This will split at the first
33281   # space.
33282   complete="$AR"
33283   path="${complete%% *}"
33284   tmp="$complete EOL"
33285   arguments="${tmp#* }"
33286 
33287   # Input might be given as Windows format, start by converting to
33288   # unix format.
33289   new_path="$path"
33290 
33291   windows_path="$new_path"
33292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33293     unix_path=`$CYGPATH -u "$windows_path"`
33294     new_path="$unix_path"
33295   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33296     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33297     new_path="$unix_path"
33298   fi
33299 
33300 
33301   # Now try to locate executable using which
33302   new_path=`$WHICH "$new_path" 2> /dev/null`
33303 
33304   if test "x$new_path" = x; then
33305     # Oops. Which didn't find the executable.
33306     # The splitting of arguments from the executable at a space might have been incorrect,
33307     # since paths with space are more likely in Windows. Give it another try with the whole
33308     # argument.
33309     path="$complete"
33310     arguments="EOL"
33311     new_path="$path"
33312 
33313   windows_path="$new_path"
33314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33315     unix_path=`$CYGPATH -u "$windows_path"`
33316     new_path="$unix_path"
33317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33319     new_path="$unix_path"
33320   fi
33321 
33322 
33323     new_path=`$WHICH "$new_path" 2> /dev/null`
33324 
33325     if test "x$new_path" = x; then
33326       # It's still not found. Now this is an unrecoverable error.
33327       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33328 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33329       has_space=`$ECHO "$complete" | $GREP " "`
33330       if test "x$has_space" != x; then
33331         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33332 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33333       fi
33334       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33335     fi
33336   fi
33337 
33338   # Now new_path has a complete unix path to the binary
33339   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33340     # Keep paths in /bin as-is, but remove trailing .exe if any
33341     new_path="${new_path/%.exe/}"
33342     # Do not save /bin paths to all_fixpath_prefixes!
33343   else
33344     # Not in mixed or Windows style, start by that.
33345     new_path=`cmd //c echo $new_path`
33346 
33347   input_path="$new_path"
33348   # Check if we need to convert this using DOS-style short mode. If the path
33349   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33350   # take no chances and rewrite it.
33351   # Note: m4 eats our [], so we need to use [ and ] instead.
33352   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33353   if test "x$has_forbidden_chars" != x; then
33354     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33355     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33356   fi
33357 
33358     # Output is in $new_path
33359 
33360   windows_path="$new_path"
33361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33362     unix_path=`$CYGPATH -u "$windows_path"`
33363     new_path="$unix_path"
33364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33366     new_path="$unix_path"
33367   fi
33368 
33369     # remove trailing .exe if any
33370     new_path="${new_path/%.exe/}"
33371 
33372     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33373     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33374   fi
33375 
33376   else
33377     # We're on a posix platform. Hooray! :)
33378     # First separate the path from the arguments. This will split at the first
33379     # space.
33380     complete="$AR"
33381     path="${complete%% *}"
33382     tmp="$complete EOL"
33383     arguments="${tmp#* }"
33384 
33385     # Cannot rely on the command "which" here since it doesn't always work.
33386     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33387     if test -z "$is_absolute_path"; then
33388       # Path to executable is not absolute. Find it.
33389       IFS_save="$IFS"
33390       IFS=:
33391       for p in $PATH; do
33392         if test -f "$p/$path" && test -x "$p/$path"; then
33393           new_path="$p/$path"
33394           break
33395         fi
33396       done
33397       IFS="$IFS_save"
33398     else
33399       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
33400 $as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
33401       new_path="$path"
33402     fi
33403 
33404     if test "x$new_path" = x; then
33405       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33406 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33407       has_space=`$ECHO "$complete" | $GREP " "`
33408       if test "x$has_space" != x; then
33409         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33410 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33411       fi
33412       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33413     fi
33414   fi
33415 
33416   # Now join together the path and the arguments once again
33417   if test "x$arguments" != xEOL; then
33418     new_complete="$new_path ${arguments% *}"
33419   else
33420     new_complete="$new_path"
33421   fi
33422 
33423   if test "x$complete" != "x$new_complete"; then
33424     AR="$new_complete"
33425     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33426 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33427   fi
33428 
33429   fi
33430   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
33431     ARFLAGS="-r"
33432   elif test "x$OPENJDK_TARGET_OS" = xaix; then
33433     ARFLAGS="-X64"
33434   else
33435     ARFLAGS=""
33436   fi
33437 
33438 
33439   # For hotspot, we need these in Windows mixed path; other platforms keep them the same
33440   HOTSPOT_CXX="$CXX"
33441   HOTSPOT_LD="$LD"
33442 
33443 
33444 
33445   COMPILER_NAME=gcc
33446   COMPILER_TYPE=CC
33447   if test "x$OPENJDK_TARGET_OS" = xwindows; then :
33448 
33449     # For now, assume that we are always compiling using cl.exe.
33450     CC_OUT_OPTION=-Fo
33451     EXE_OUT_OPTION=-out:
33452     LD_OUT_OPTION=-out:
33453     AR_OUT_OPTION=-out:
33454     # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
33455     # program for something completely different.
33456     # Extract the first word of "link", so it can be a program name with args.
33457 set dummy link; ac_word=$2
33458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33459 $as_echo_n "checking for $ac_word... " >&6; }
33460 if ${ac_cv_prog_WINLD+:} false; then :
33461   $as_echo_n "(cached) " >&6
33462 else
33463   if test -n "$WINLD"; then
33464   ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
33465 else
33466   ac_prog_rejected=no
33467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33468 for as_dir in $PATH
33469 do
33470   IFS=$as_save_IFS
33471   test -z "$as_dir" && as_dir=.
33472     for ac_exec_ext in '' $ac_executable_extensions; do
33473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33474     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
33475        ac_prog_rejected=yes
33476        continue
33477      fi
33478     ac_cv_prog_WINLD="link"
33479     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33480     break 2
33481   fi
33482 done
33483   done
33484 IFS=$as_save_IFS
33485 
33486 if test $ac_prog_rejected = yes; then
33487   # We found a bogon in the path, so make sure we never use it.
33488   set dummy $ac_cv_prog_WINLD
33489   shift
33490   if test $# != 0; then
33491     # We chose a different compiler from the bogus one.
33492     # However, it has the same basename, so the bogon will be chosen
33493     # first if we set WINLD to just the basename; use the full file name.
33494     shift
33495     ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
33496   fi
33497 fi
33498 fi
33499 fi
33500 WINLD=$ac_cv_prog_WINLD
33501 if test -n "$WINLD"; then
33502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
33503 $as_echo "$WINLD" >&6; }
33504 else
33505   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33506 $as_echo "no" >&6; }
33507 fi
33508 
33509 
33510     # Since we must ignore the first found link, WINLD will contain
33511     # the full path to the link.exe program.
33512 
33513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33514 
33515   # First separate the path from the arguments. This will split at the first
33516   # space.
33517   complete="$WINLD"
33518   path="${complete%% *}"
33519   tmp="$complete EOL"
33520   arguments="${tmp#* }"
33521 
33522   # Input might be given as Windows format, start by converting to
33523   # unix format.
33524   new_path=`$CYGPATH -u "$path"`
33525 
33526   # Now try to locate executable using which
33527   new_path=`$WHICH "$new_path" 2> /dev/null`
33528   # bat and cmd files are not always considered executable in cygwin causing which
33529   # to not find them
33530   if test "x$new_path" = x \
33531       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33532       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33533     new_path=`$CYGPATH -u "$path"`
33534   fi
33535   if test "x$new_path" = x; then
33536     # Oops. Which didn't find the executable.
33537     # The splitting of arguments from the executable at a space might have been incorrect,
33538     # since paths with space are more likely in Windows. Give it another try with the whole
33539     # argument.
33540     path="$complete"
33541     arguments="EOL"
33542     new_path=`$CYGPATH -u "$path"`
33543     new_path=`$WHICH "$new_path" 2> /dev/null`
33544     # bat and cmd files are not always considered executable in cygwin causing which
33545     # to not find them
33546     if test "x$new_path" = x \
33547         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33548         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33549       new_path=`$CYGPATH -u "$path"`
33550     fi
33551     if test "x$new_path" = x; then
33552       # It's still not found. Now this is an unrecoverable error.
33553       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33554 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33555       has_space=`$ECHO "$complete" | $GREP " "`
33556       if test "x$has_space" != x; then
33557         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33558 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33559       fi
33560       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33561     fi
33562   fi
33563 
33564   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33565   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33566   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33567   # "foo.exe" is OK but "foo" is an error.
33568   #
33569   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33570   # It is also a way to make sure we got the proper file name for the real test later on.
33571   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33572   if test "x$test_shortpath" = x; then
33573     # Short path failed, file does not exist as specified.
33574     # Try adding .exe or .cmd
33575     if test -f "${new_path}.exe"; then
33576       input_to_shortpath="${new_path}.exe"
33577     elif test -f "${new_path}.cmd"; then
33578       input_to_shortpath="${new_path}.cmd"
33579     else
33580       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
33581 $as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
33582       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33583 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33584       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33585     fi
33586   else
33587     input_to_shortpath="$new_path"
33588   fi
33589 
33590   # Call helper function which possibly converts this using DOS-style short mode.
33591   # If so, the updated path is stored in $new_path.
33592   new_path="$input_to_shortpath"
33593 
33594   input_path="$input_to_shortpath"
33595   # Check if we need to convert this using DOS-style short mode. If the path
33596   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33597   # take no chances and rewrite it.
33598   # Note: m4 eats our [], so we need to use [ and ] instead.
33599   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33600   if test "x$has_forbidden_chars" != x; then
33601     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33602     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33603     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33604     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33605       # Going to short mode and back again did indeed matter. Since short mode is
33606       # case insensitive, let's make it lowercase to improve readability.
33607       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33608       # Now convert it back to Unix-stile (cygpath)
33609       input_path=`$CYGPATH -u "$shortmode_path"`
33610       new_path="$input_path"
33611     fi
33612   fi
33613 
33614   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33615   if test "x$test_cygdrive_prefix" = x; then
33616     # As a simple fix, exclude /usr/bin since it's not a real path.
33617     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33618       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33619       # a path prefixed by /cygdrive for fixpath to work.
33620       new_path="$CYGWIN_ROOT_PATH$input_path"
33621     fi
33622   fi
33623 
33624   # remove trailing .exe if any
33625   new_path="${new_path/%.exe/}"
33626 
33627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33628 
33629   # First separate the path from the arguments. This will split at the first
33630   # space.
33631   complete="$WINLD"
33632   path="${complete%% *}"
33633   tmp="$complete EOL"
33634   arguments="${tmp#* }"
33635 
33636   # Input might be given as Windows format, start by converting to
33637   # unix format.
33638   new_path="$path"
33639 
33640   windows_path="$new_path"
33641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33642     unix_path=`$CYGPATH -u "$windows_path"`
33643     new_path="$unix_path"
33644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33645     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33646     new_path="$unix_path"
33647   fi
33648 
33649 
33650   # Now try to locate executable using which
33651   new_path=`$WHICH "$new_path" 2> /dev/null`
33652 
33653   if test "x$new_path" = x; then
33654     # Oops. Which didn't find the executable.
33655     # The splitting of arguments from the executable at a space might have been incorrect,
33656     # since paths with space are more likely in Windows. Give it another try with the whole
33657     # argument.
33658     path="$complete"
33659     arguments="EOL"
33660     new_path="$path"
33661 
33662   windows_path="$new_path"
33663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33664     unix_path=`$CYGPATH -u "$windows_path"`
33665     new_path="$unix_path"
33666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33668     new_path="$unix_path"
33669   fi
33670 
33671 
33672     new_path=`$WHICH "$new_path" 2> /dev/null`
33673 
33674     if test "x$new_path" = x; then
33675       # It's still not found. Now this is an unrecoverable error.
33676       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33677 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33678       has_space=`$ECHO "$complete" | $GREP " "`
33679       if test "x$has_space" != x; then
33680         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33681 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33682       fi
33683       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33684     fi
33685   fi
33686 
33687   # Now new_path has a complete unix path to the binary
33688   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33689     # Keep paths in /bin as-is, but remove trailing .exe if any
33690     new_path="${new_path/%.exe/}"
33691     # Do not save /bin paths to all_fixpath_prefixes!
33692   else
33693     # Not in mixed or Windows style, start by that.
33694     new_path=`cmd //c echo $new_path`
33695 
33696   input_path="$new_path"
33697   # Check if we need to convert this using DOS-style short mode. If the path
33698   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33699   # take no chances and rewrite it.
33700   # Note: m4 eats our [], so we need to use [ and ] instead.
33701   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33702   if test "x$has_forbidden_chars" != x; then
33703     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33704     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33705   fi
33706 
33707     # Output is in $new_path
33708 
33709   windows_path="$new_path"
33710   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33711     unix_path=`$CYGPATH -u "$windows_path"`
33712     new_path="$unix_path"
33713   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33714     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33715     new_path="$unix_path"
33716   fi
33717 
33718     # remove trailing .exe if any
33719     new_path="${new_path/%.exe/}"
33720 
33721     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33722     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33723   fi
33724 
33725   else
33726     # We're on a posix platform. Hooray! :)
33727     # First separate the path from the arguments. This will split at the first
33728     # space.
33729     complete="$WINLD"
33730     path="${complete%% *}"
33731     tmp="$complete EOL"
33732     arguments="${tmp#* }"
33733 
33734     # Cannot rely on the command "which" here since it doesn't always work.
33735     is_absolute_path=`$ECHO "$path" | $GREP ^/`
33736     if test -z "$is_absolute_path"; then
33737       # Path to executable is not absolute. Find it.
33738       IFS_save="$IFS"
33739       IFS=:
33740       for p in $PATH; do
33741         if test -f "$p/$path" && test -x "$p/$path"; then
33742           new_path="$p/$path"
33743           break
33744         fi
33745       done
33746       IFS="$IFS_save"
33747     else
33748       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
33749 $as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
33750       new_path="$path"
33751     fi
33752 
33753     if test "x$new_path" = x; then
33754       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
33755 $as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
33756       has_space=`$ECHO "$complete" | $GREP " "`
33757       if test "x$has_space" != x; then
33758         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33759 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33760       fi
33761       as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
33762     fi
33763   fi
33764 
33765   # Now join together the path and the arguments once again
33766   if test "x$arguments" != xEOL; then
33767     new_complete="$new_path ${arguments% *}"
33768   else
33769     new_complete="$new_path"
33770   fi
33771 
33772   if test "x$complete" != "x$new_complete"; then
33773     WINLD="$new_complete"
33774     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
33775 $as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
33776   fi
33777 
33778     printf "Windows linker was found at $WINLD\n"
33779     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
33780 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
33781     "$WINLD" --version > /dev/null
33782     if test $? -eq 0 ; then
33783       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33784 $as_echo "no" >&6; }
33785       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
33786     else
33787       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33788 $as_echo "yes" >&6; }
33789     fi
33790     LD="$WINLD"
33791     LDEXE="$WINLD"
33792     LDCXX="$WINLD"
33793     LDEXECXX="$WINLD"
33794 
33795     # Extract the first word of "mt", so it can be a program name with args.
33796 set dummy mt; ac_word=$2
33797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33798 $as_echo_n "checking for $ac_word... " >&6; }
33799 if ${ac_cv_prog_MT+:} false; then :
33800   $as_echo_n "(cached) " >&6
33801 else
33802   if test -n "$MT"; then
33803   ac_cv_prog_MT="$MT" # Let the user override the test.
33804 else
33805   ac_prog_rejected=no
33806 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33807 for as_dir in $PATH
33808 do
33809   IFS=$as_save_IFS
33810   test -z "$as_dir" && as_dir=.
33811     for ac_exec_ext in '' $ac_executable_extensions; do
33812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33813     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33814        ac_prog_rejected=yes
33815        continue
33816      fi
33817     ac_cv_prog_MT="mt"
33818     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33819     break 2
33820   fi
33821 done
33822   done
33823 IFS=$as_save_IFS
33824 
33825 if test $ac_prog_rejected = yes; then
33826   # We found a bogon in the path, so make sure we never use it.
33827   set dummy $ac_cv_prog_MT
33828   shift
33829   if test $# != 0; then
33830     # We chose a different compiler from the bogus one.
33831     # However, it has the same basename, so the bogon will be chosen
33832     # first if we set MT to just the basename; use the full file name.
33833     shift
33834     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33835   fi
33836 fi
33837 fi
33838 fi
33839 MT=$ac_cv_prog_MT
33840 if test -n "$MT"; then
33841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33842 $as_echo "$MT" >&6; }
33843 else
33844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33845 $as_echo "no" >&6; }
33846 fi
33847 
33848 
33849 
33850   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33851 
33852   # First separate the path from the arguments. This will split at the first
33853   # space.
33854   complete="$MT"
33855   path="${complete%% *}"
33856   tmp="$complete EOL"
33857   arguments="${tmp#* }"
33858 
33859   # Input might be given as Windows format, start by converting to
33860   # unix format.
33861   new_path=`$CYGPATH -u "$path"`
33862 
33863   # Now try to locate executable using which
33864   new_path=`$WHICH "$new_path" 2> /dev/null`
33865   # bat and cmd files are not always considered executable in cygwin causing which
33866   # to not find them
33867   if test "x$new_path" = x \
33868       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33869       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33870     new_path=`$CYGPATH -u "$path"`
33871   fi
33872   if test "x$new_path" = x; then
33873     # Oops. Which didn't find the executable.
33874     # The splitting of arguments from the executable at a space might have been incorrect,
33875     # since paths with space are more likely in Windows. Give it another try with the whole
33876     # argument.
33877     path="$complete"
33878     arguments="EOL"
33879     new_path=`$CYGPATH -u "$path"`
33880     new_path=`$WHICH "$new_path" 2> /dev/null`
33881     # bat and cmd files are not always considered executable in cygwin causing which
33882     # to not find them
33883     if test "x$new_path" = x \
33884         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33885         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33886       new_path=`$CYGPATH -u "$path"`
33887     fi
33888     if test "x$new_path" = x; then
33889       # It's still not found. Now this is an unrecoverable error.
33890       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33891 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33892       has_space=`$ECHO "$complete" | $GREP " "`
33893       if test "x$has_space" != x; then
33894         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33895 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33896       fi
33897       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33898     fi
33899   fi
33900 
33901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33904   # "foo.exe" is OK but "foo" is an error.
33905   #
33906   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33907   # It is also a way to make sure we got the proper file name for the real test later on.
33908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33909   if test "x$test_shortpath" = x; then
33910     # Short path failed, file does not exist as specified.
33911     # Try adding .exe or .cmd
33912     if test -f "${new_path}.exe"; then
33913       input_to_shortpath="${new_path}.exe"
33914     elif test -f "${new_path}.cmd"; then
33915       input_to_shortpath="${new_path}.cmd"
33916     else
33917       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33918 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33919       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33920 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33921       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33922     fi
33923   else
33924     input_to_shortpath="$new_path"
33925   fi
33926 
33927   # Call helper function which possibly converts this using DOS-style short mode.
33928   # If so, the updated path is stored in $new_path.
33929   new_path="$input_to_shortpath"
33930 
33931   input_path="$input_to_shortpath"
33932   # Check if we need to convert this using DOS-style short mode. If the path
33933   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33934   # take no chances and rewrite it.
33935   # Note: m4 eats our [], so we need to use [ and ] instead.
33936   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33937   if test "x$has_forbidden_chars" != x; then
33938     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33939     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33940     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33941     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33942       # Going to short mode and back again did indeed matter. Since short mode is
33943       # case insensitive, let's make it lowercase to improve readability.
33944       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33945       # Now convert it back to Unix-stile (cygpath)
33946       input_path=`$CYGPATH -u "$shortmode_path"`
33947       new_path="$input_path"
33948     fi
33949   fi
33950 
33951   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33952   if test "x$test_cygdrive_prefix" = x; then
33953     # As a simple fix, exclude /usr/bin since it's not a real path.
33954     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33955       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33956       # a path prefixed by /cygdrive for fixpath to work.
33957       new_path="$CYGWIN_ROOT_PATH$input_path"
33958     fi
33959   fi
33960 
33961   # remove trailing .exe if any
33962   new_path="${new_path/%.exe/}"
33963 
33964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33965 
33966   # First separate the path from the arguments. This will split at the first
33967   # space.
33968   complete="$MT"
33969   path="${complete%% *}"
33970   tmp="$complete EOL"
33971   arguments="${tmp#* }"
33972 
33973   # Input might be given as Windows format, start by converting to
33974   # unix format.
33975   new_path="$path"
33976 
33977   windows_path="$new_path"
33978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33979     unix_path=`$CYGPATH -u "$windows_path"`
33980     new_path="$unix_path"
33981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33983     new_path="$unix_path"
33984   fi
33985 
33986 
33987   # Now try to locate executable using which
33988   new_path=`$WHICH "$new_path" 2> /dev/null`
33989 
33990   if test "x$new_path" = x; then
33991     # Oops. Which didn't find the executable.
33992     # The splitting of arguments from the executable at a space might have been incorrect,
33993     # since paths with space are more likely in Windows. Give it another try with the whole
33994     # argument.
33995     path="$complete"
33996     arguments="EOL"
33997     new_path="$path"
33998 
33999   windows_path="$new_path"
34000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34001     unix_path=`$CYGPATH -u "$windows_path"`
34002     new_path="$unix_path"
34003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34005     new_path="$unix_path"
34006   fi
34007 
34008 
34009     new_path=`$WHICH "$new_path" 2> /dev/null`
34010 
34011     if test "x$new_path" = x; then
34012       # It's still not found. Now this is an unrecoverable error.
34013       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34014 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34015       has_space=`$ECHO "$complete" | $GREP " "`
34016       if test "x$has_space" != x; then
34017         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34018 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34019       fi
34020       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34021     fi
34022   fi
34023 
34024   # Now new_path has a complete unix path to the binary
34025   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34026     # Keep paths in /bin as-is, but remove trailing .exe if any
34027     new_path="${new_path/%.exe/}"
34028     # Do not save /bin paths to all_fixpath_prefixes!
34029   else
34030     # Not in mixed or Windows style, start by that.
34031     new_path=`cmd //c echo $new_path`
34032 
34033   input_path="$new_path"
34034   # Check if we need to convert this using DOS-style short mode. If the path
34035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34036   # take no chances and rewrite it.
34037   # Note: m4 eats our [], so we need to use [ and ] instead.
34038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34039   if test "x$has_forbidden_chars" != x; then
34040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34042   fi
34043 
34044     # Output is in $new_path
34045 
34046   windows_path="$new_path"
34047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34048     unix_path=`$CYGPATH -u "$windows_path"`
34049     new_path="$unix_path"
34050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34052     new_path="$unix_path"
34053   fi
34054 
34055     # remove trailing .exe if any
34056     new_path="${new_path/%.exe/}"
34057 
34058     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34059     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34060   fi
34061 
34062   else
34063     # We're on a posix platform. Hooray! :)
34064     # First separate the path from the arguments. This will split at the first
34065     # space.
34066     complete="$MT"
34067     path="${complete%% *}"
34068     tmp="$complete EOL"
34069     arguments="${tmp#* }"
34070 
34071     # Cannot rely on the command "which" here since it doesn't always work.
34072     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34073     if test -z "$is_absolute_path"; then
34074       # Path to executable is not absolute. Find it.
34075       IFS_save="$IFS"
34076       IFS=:
34077       for p in $PATH; do
34078         if test -f "$p/$path" && test -x "$p/$path"; then
34079           new_path="$p/$path"
34080           break
34081         fi
34082       done
34083       IFS="$IFS_save"
34084     else
34085       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
34086 $as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
34087       new_path="$path"
34088     fi
34089 
34090     if test "x$new_path" = x; then
34091       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34092 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34093       has_space=`$ECHO "$complete" | $GREP " "`
34094       if test "x$has_space" != x; then
34095         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34096 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34097       fi
34098       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34099     fi
34100   fi
34101 
34102   # Now join together the path and the arguments once again
34103   if test "x$arguments" != xEOL; then
34104     new_complete="$new_path ${arguments% *}"
34105   else
34106     new_complete="$new_path"
34107   fi
34108 
34109   if test "x$complete" != "x$new_complete"; then
34110     MT="$new_complete"
34111     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34112 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34113   fi
34114 
34115     # The resource compiler
34116     # Extract the first word of "rc", so it can be a program name with args.
34117 set dummy rc; ac_word=$2
34118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34119 $as_echo_n "checking for $ac_word... " >&6; }
34120 if ${ac_cv_prog_RC+:} false; then :
34121   $as_echo_n "(cached) " >&6
34122 else
34123   if test -n "$RC"; then
34124   ac_cv_prog_RC="$RC" # Let the user override the test.
34125 else
34126   ac_prog_rejected=no
34127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34128 for as_dir in $PATH
34129 do
34130   IFS=$as_save_IFS
34131   test -z "$as_dir" && as_dir=.
34132     for ac_exec_ext in '' $ac_executable_extensions; do
34133   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34134     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34135        ac_prog_rejected=yes
34136        continue
34137      fi
34138     ac_cv_prog_RC="rc"
34139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34140     break 2
34141   fi
34142 done
34143   done
34144 IFS=$as_save_IFS
34145 
34146 if test $ac_prog_rejected = yes; then
34147   # We found a bogon in the path, so make sure we never use it.
34148   set dummy $ac_cv_prog_RC
34149   shift
34150   if test $# != 0; then
34151     # We chose a different compiler from the bogus one.
34152     # However, it has the same basename, so the bogon will be chosen
34153     # first if we set RC to just the basename; use the full file name.
34154     shift
34155     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34156   fi
34157 fi
34158 fi
34159 fi
34160 RC=$ac_cv_prog_RC
34161 if test -n "$RC"; then
34162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34163 $as_echo "$RC" >&6; }
34164 else
34165   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34166 $as_echo "no" >&6; }
34167 fi
34168 
34169 
34170 
34171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34172 
34173   # First separate the path from the arguments. This will split at the first
34174   # space.
34175   complete="$RC"
34176   path="${complete%% *}"
34177   tmp="$complete EOL"
34178   arguments="${tmp#* }"
34179 
34180   # Input might be given as Windows format, start by converting to
34181   # unix format.
34182   new_path=`$CYGPATH -u "$path"`
34183 
34184   # Now try to locate executable using which
34185   new_path=`$WHICH "$new_path" 2> /dev/null`
34186   # bat and cmd files are not always considered executable in cygwin causing which
34187   # to not find them
34188   if test "x$new_path" = x \
34189       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34190       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34191     new_path=`$CYGPATH -u "$path"`
34192   fi
34193   if test "x$new_path" = x; then
34194     # Oops. Which didn't find the executable.
34195     # The splitting of arguments from the executable at a space might have been incorrect,
34196     # since paths with space are more likely in Windows. Give it another try with the whole
34197     # argument.
34198     path="$complete"
34199     arguments="EOL"
34200     new_path=`$CYGPATH -u "$path"`
34201     new_path=`$WHICH "$new_path" 2> /dev/null`
34202     # bat and cmd files are not always considered executable in cygwin causing which
34203     # to not find them
34204     if test "x$new_path" = x \
34205         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34206         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34207       new_path=`$CYGPATH -u "$path"`
34208     fi
34209     if test "x$new_path" = x; then
34210       # It's still not found. Now this is an unrecoverable error.
34211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34212 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34213       has_space=`$ECHO "$complete" | $GREP " "`
34214       if test "x$has_space" != x; then
34215         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34216 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34217       fi
34218       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34219     fi
34220   fi
34221 
34222   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34223   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34224   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34225   # "foo.exe" is OK but "foo" is an error.
34226   #
34227   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34228   # It is also a way to make sure we got the proper file name for the real test later on.
34229   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34230   if test "x$test_shortpath" = x; then
34231     # Short path failed, file does not exist as specified.
34232     # Try adding .exe or .cmd
34233     if test -f "${new_path}.exe"; then
34234       input_to_shortpath="${new_path}.exe"
34235     elif test -f "${new_path}.cmd"; then
34236       input_to_shortpath="${new_path}.cmd"
34237     else
34238       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34239 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34240       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34241 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34242       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34243     fi
34244   else
34245     input_to_shortpath="$new_path"
34246   fi
34247 
34248   # Call helper function which possibly converts this using DOS-style short mode.
34249   # If so, the updated path is stored in $new_path.
34250   new_path="$input_to_shortpath"
34251 
34252   input_path="$input_to_shortpath"
34253   # Check if we need to convert this using DOS-style short mode. If the path
34254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34255   # take no chances and rewrite it.
34256   # Note: m4 eats our [], so we need to use [ and ] instead.
34257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34258   if test "x$has_forbidden_chars" != x; then
34259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34260     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34261     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34262     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34263       # Going to short mode and back again did indeed matter. Since short mode is
34264       # case insensitive, let's make it lowercase to improve readability.
34265       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34266       # Now convert it back to Unix-stile (cygpath)
34267       input_path=`$CYGPATH -u "$shortmode_path"`
34268       new_path="$input_path"
34269     fi
34270   fi
34271 
34272   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34273   if test "x$test_cygdrive_prefix" = x; then
34274     # As a simple fix, exclude /usr/bin since it's not a real path.
34275     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34276       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34277       # a path prefixed by /cygdrive for fixpath to work.
34278       new_path="$CYGWIN_ROOT_PATH$input_path"
34279     fi
34280   fi
34281 
34282   # remove trailing .exe if any
34283   new_path="${new_path/%.exe/}"
34284 
34285   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34286 
34287   # First separate the path from the arguments. This will split at the first
34288   # space.
34289   complete="$RC"
34290   path="${complete%% *}"
34291   tmp="$complete EOL"
34292   arguments="${tmp#* }"
34293 
34294   # Input might be given as Windows format, start by converting to
34295   # unix format.
34296   new_path="$path"
34297 
34298   windows_path="$new_path"
34299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34300     unix_path=`$CYGPATH -u "$windows_path"`
34301     new_path="$unix_path"
34302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34304     new_path="$unix_path"
34305   fi
34306 
34307 
34308   # Now try to locate executable using which
34309   new_path=`$WHICH "$new_path" 2> /dev/null`
34310 
34311   if test "x$new_path" = x; then
34312     # Oops. Which didn't find the executable.
34313     # The splitting of arguments from the executable at a space might have been incorrect,
34314     # since paths with space are more likely in Windows. Give it another try with the whole
34315     # argument.
34316     path="$complete"
34317     arguments="EOL"
34318     new_path="$path"
34319 
34320   windows_path="$new_path"
34321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34322     unix_path=`$CYGPATH -u "$windows_path"`
34323     new_path="$unix_path"
34324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34326     new_path="$unix_path"
34327   fi
34328 
34329 
34330     new_path=`$WHICH "$new_path" 2> /dev/null`
34331 
34332     if test "x$new_path" = x; then
34333       # It's still not found. Now this is an unrecoverable error.
34334       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34335 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34336       has_space=`$ECHO "$complete" | $GREP " "`
34337       if test "x$has_space" != x; then
34338         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34339 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34340       fi
34341       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34342     fi
34343   fi
34344 
34345   # Now new_path has a complete unix path to the binary
34346   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34347     # Keep paths in /bin as-is, but remove trailing .exe if any
34348     new_path="${new_path/%.exe/}"
34349     # Do not save /bin paths to all_fixpath_prefixes!
34350   else
34351     # Not in mixed or Windows style, start by that.
34352     new_path=`cmd //c echo $new_path`
34353 
34354   input_path="$new_path"
34355   # Check if we need to convert this using DOS-style short mode. If the path
34356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34357   # take no chances and rewrite it.
34358   # Note: m4 eats our [], so we need to use [ and ] instead.
34359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34360   if test "x$has_forbidden_chars" != x; then
34361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34362     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34363   fi
34364 
34365     # Output is in $new_path
34366 
34367   windows_path="$new_path"
34368   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34369     unix_path=`$CYGPATH -u "$windows_path"`
34370     new_path="$unix_path"
34371   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34372     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34373     new_path="$unix_path"
34374   fi
34375 
34376     # remove trailing .exe if any
34377     new_path="${new_path/%.exe/}"
34378 
34379     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34380     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34381   fi
34382 
34383   else
34384     # We're on a posix platform. Hooray! :)
34385     # First separate the path from the arguments. This will split at the first
34386     # space.
34387     complete="$RC"
34388     path="${complete%% *}"
34389     tmp="$complete EOL"
34390     arguments="${tmp#* }"
34391 
34392     # Cannot rely on the command "which" here since it doesn't always work.
34393     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34394     if test -z "$is_absolute_path"; then
34395       # Path to executable is not absolute. Find it.
34396       IFS_save="$IFS"
34397       IFS=:
34398       for p in $PATH; do
34399         if test -f "$p/$path" && test -x "$p/$path"; then
34400           new_path="$p/$path"
34401           break
34402         fi
34403       done
34404       IFS="$IFS_save"
34405     else
34406       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
34407 $as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
34408       new_path="$path"
34409     fi
34410 
34411     if test "x$new_path" = x; then
34412       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34413 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34414       has_space=`$ECHO "$complete" | $GREP " "`
34415       if test "x$has_space" != x; then
34416         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34417 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34418       fi
34419       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34420     fi
34421   fi
34422 
34423   # Now join together the path and the arguments once again
34424   if test "x$arguments" != xEOL; then
34425     new_complete="$new_path ${arguments% *}"
34426   else
34427     new_complete="$new_path"
34428   fi
34429 
34430   if test "x$complete" != "x$new_complete"; then
34431     RC="$new_complete"
34432     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34433 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34434   fi
34435 
34436 
34437     # For hotspot, we need these in Windows mixed path,
34438     # so rewrite them all. Need added .exe suffix.
34439     HOTSPOT_CXX="$CXX.exe"
34440     HOTSPOT_LD="$LD.exe"
34441     HOTSPOT_MT="$MT.exe"
34442     HOTSPOT_RC="$RC.exe"
34443 
34444   unix_path="$HOTSPOT_CXX"
34445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34446     windows_path=`$CYGPATH -m "$unix_path"`
34447     HOTSPOT_CXX="$windows_path"
34448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34449     windows_path=`cmd //c echo $unix_path`
34450     HOTSPOT_CXX="$windows_path"
34451   fi
34452 
34453 
34454   unix_path="$HOTSPOT_LD"
34455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34456     windows_path=`$CYGPATH -m "$unix_path"`
34457     HOTSPOT_LD="$windows_path"
34458   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34459     windows_path=`cmd //c echo $unix_path`
34460     HOTSPOT_LD="$windows_path"
34461   fi
34462 
34463 
34464   unix_path="$HOTSPOT_MT"
34465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34466     windows_path=`$CYGPATH -m "$unix_path"`
34467     HOTSPOT_MT="$windows_path"
34468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34469     windows_path=`cmd //c echo $unix_path`
34470     HOTSPOT_MT="$windows_path"
34471   fi
34472 
34473 
34474   unix_path="$HOTSPOT_RC"
34475   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34476     windows_path=`$CYGPATH -m "$unix_path"`
34477     HOTSPOT_RC="$windows_path"
34478   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34479     windows_path=`cmd //c echo $unix_path`
34480     HOTSPOT_RC="$windows_path"
34481   fi
34482 
34483 
34484 
34485 
34486     RC_FLAGS="-nologo -l 0x409 -r"
34487     if test "x$VARIANT" = xOPT; then :
34488 
34489     RC_FLAGS="$RC_FLAGS -d NDEBUG"
34490 
34491 fi
34492 
34493   # The version variables used to create RC_FLAGS may be overridden
34494   # in a custom configure script, or possibly the command line.
34495   # Let those variables be expanded at make time in spec.gmk.
34496   # The \$ are escaped to the shell, and the $(...) variables
34497   # are evaluated by make.
34498   RC_FLAGS="$RC_FLAGS \
34499       -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
34500       -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
34501       -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
34502       -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
34503       -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
34504       -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
34505       -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
34506 
34507   # lib.exe is used to create static libraries.
34508   # Extract the first word of "lib", so it can be a program name with args.
34509 set dummy lib; ac_word=$2
34510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34511 $as_echo_n "checking for $ac_word... " >&6; }
34512 if ${ac_cv_prog_WINAR+:} false; then :
34513   $as_echo_n "(cached) " >&6
34514 else
34515   if test -n "$WINAR"; then
34516   ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
34517 else
34518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34519 for as_dir in $PATH
34520 do
34521   IFS=$as_save_IFS
34522   test -z "$as_dir" && as_dir=.
34523     for ac_exec_ext in '' $ac_executable_extensions; do
34524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34525     ac_cv_prog_WINAR="lib"
34526     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34527     break 2
34528   fi
34529 done
34530   done
34531 IFS=$as_save_IFS
34532 
34533 fi
34534 fi
34535 WINAR=$ac_cv_prog_WINAR
34536 if test -n "$WINAR"; then
34537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
34538 $as_echo "$WINAR" >&6; }
34539 else
34540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34541 $as_echo "no" >&6; }
34542 fi
34543 
34544 
34545 
34546   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34547 
34548   # First separate the path from the arguments. This will split at the first
34549   # space.
34550   complete="$WINAR"
34551   path="${complete%% *}"
34552   tmp="$complete EOL"
34553   arguments="${tmp#* }"
34554 
34555   # Input might be given as Windows format, start by converting to
34556   # unix format.
34557   new_path=`$CYGPATH -u "$path"`
34558 
34559   # Now try to locate executable using which
34560   new_path=`$WHICH "$new_path" 2> /dev/null`
34561   # bat and cmd files are not always considered executable in cygwin causing which
34562   # to not find them
34563   if test "x$new_path" = x \
34564       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34565       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34566     new_path=`$CYGPATH -u "$path"`
34567   fi
34568   if test "x$new_path" = x; then
34569     # Oops. Which didn't find the executable.
34570     # The splitting of arguments from the executable at a space might have been incorrect,
34571     # since paths with space are more likely in Windows. Give it another try with the whole
34572     # argument.
34573     path="$complete"
34574     arguments="EOL"
34575     new_path=`$CYGPATH -u "$path"`
34576     new_path=`$WHICH "$new_path" 2> /dev/null`
34577     # bat and cmd files are not always considered executable in cygwin causing which
34578     # to not find them
34579     if test "x$new_path" = x \
34580         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34581         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34582       new_path=`$CYGPATH -u "$path"`
34583     fi
34584     if test "x$new_path" = x; then
34585       # It's still not found. Now this is an unrecoverable error.
34586       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34587 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34588       has_space=`$ECHO "$complete" | $GREP " "`
34589       if test "x$has_space" != x; then
34590         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34591 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34592       fi
34593       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34594     fi
34595   fi
34596 
34597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34600   # "foo.exe" is OK but "foo" is an error.
34601   #
34602   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34603   # It is also a way to make sure we got the proper file name for the real test later on.
34604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34605   if test "x$test_shortpath" = x; then
34606     # Short path failed, file does not exist as specified.
34607     # Try adding .exe or .cmd
34608     if test -f "${new_path}.exe"; then
34609       input_to_shortpath="${new_path}.exe"
34610     elif test -f "${new_path}.cmd"; then
34611       input_to_shortpath="${new_path}.cmd"
34612     else
34613       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
34614 $as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
34615       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34616 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34617       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34618     fi
34619   else
34620     input_to_shortpath="$new_path"
34621   fi
34622 
34623   # Call helper function which possibly converts this using DOS-style short mode.
34624   # If so, the updated path is stored in $new_path.
34625   new_path="$input_to_shortpath"
34626 
34627   input_path="$input_to_shortpath"
34628   # Check if we need to convert this using DOS-style short mode. If the path
34629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34630   # take no chances and rewrite it.
34631   # Note: m4 eats our [], so we need to use [ and ] instead.
34632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34633   if test "x$has_forbidden_chars" != x; then
34634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34635     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34636     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34637     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34638       # Going to short mode and back again did indeed matter. Since short mode is
34639       # case insensitive, let's make it lowercase to improve readability.
34640       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34641       # Now convert it back to Unix-stile (cygpath)
34642       input_path=`$CYGPATH -u "$shortmode_path"`
34643       new_path="$input_path"
34644     fi
34645   fi
34646 
34647   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34648   if test "x$test_cygdrive_prefix" = x; then
34649     # As a simple fix, exclude /usr/bin since it's not a real path.
34650     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34651       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34652       # a path prefixed by /cygdrive for fixpath to work.
34653       new_path="$CYGWIN_ROOT_PATH$input_path"
34654     fi
34655   fi
34656 
34657   # remove trailing .exe if any
34658   new_path="${new_path/%.exe/}"
34659 
34660   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34661 
34662   # First separate the path from the arguments. This will split at the first
34663   # space.
34664   complete="$WINAR"
34665   path="${complete%% *}"
34666   tmp="$complete EOL"
34667   arguments="${tmp#* }"
34668 
34669   # Input might be given as Windows format, start by converting to
34670   # unix format.
34671   new_path="$path"
34672 
34673   windows_path="$new_path"
34674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34675     unix_path=`$CYGPATH -u "$windows_path"`
34676     new_path="$unix_path"
34677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34679     new_path="$unix_path"
34680   fi
34681 
34682 
34683   # Now try to locate executable using which
34684   new_path=`$WHICH "$new_path" 2> /dev/null`
34685 
34686   if test "x$new_path" = x; then
34687     # Oops. Which didn't find the executable.
34688     # The splitting of arguments from the executable at a space might have been incorrect,
34689     # since paths with space are more likely in Windows. Give it another try with the whole
34690     # argument.
34691     path="$complete"
34692     arguments="EOL"
34693     new_path="$path"
34694 
34695   windows_path="$new_path"
34696   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34697     unix_path=`$CYGPATH -u "$windows_path"`
34698     new_path="$unix_path"
34699   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34700     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34701     new_path="$unix_path"
34702   fi
34703 
34704 
34705     new_path=`$WHICH "$new_path" 2> /dev/null`
34706 
34707     if test "x$new_path" = x; then
34708       # It's still not found. Now this is an unrecoverable error.
34709       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34710 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34711       has_space=`$ECHO "$complete" | $GREP " "`
34712       if test "x$has_space" != x; then
34713         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34714 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34715       fi
34716       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34717     fi
34718   fi
34719 
34720   # Now new_path has a complete unix path to the binary
34721   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34722     # Keep paths in /bin as-is, but remove trailing .exe if any
34723     new_path="${new_path/%.exe/}"
34724     # Do not save /bin paths to all_fixpath_prefixes!
34725   else
34726     # Not in mixed or Windows style, start by that.
34727     new_path=`cmd //c echo $new_path`
34728 
34729   input_path="$new_path"
34730   # Check if we need to convert this using DOS-style short mode. If the path
34731   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34732   # take no chances and rewrite it.
34733   # Note: m4 eats our [], so we need to use [ and ] instead.
34734   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34735   if test "x$has_forbidden_chars" != x; then
34736     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34737     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34738   fi
34739 
34740     # Output is in $new_path
34741 
34742   windows_path="$new_path"
34743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34744     unix_path=`$CYGPATH -u "$windows_path"`
34745     new_path="$unix_path"
34746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34748     new_path="$unix_path"
34749   fi
34750 
34751     # remove trailing .exe if any
34752     new_path="${new_path/%.exe/}"
34753 
34754     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34755     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34756   fi
34757 
34758   else
34759     # We're on a posix platform. Hooray! :)
34760     # First separate the path from the arguments. This will split at the first
34761     # space.
34762     complete="$WINAR"
34763     path="${complete%% *}"
34764     tmp="$complete EOL"
34765     arguments="${tmp#* }"
34766 
34767     # Cannot rely on the command "which" here since it doesn't always work.
34768     is_absolute_path=`$ECHO "$path" | $GREP ^/`
34769     if test -z "$is_absolute_path"; then
34770       # Path to executable is not absolute. Find it.
34771       IFS_save="$IFS"
34772       IFS=:
34773       for p in $PATH; do
34774         if test -f "$p/$path" && test -x "$p/$path"; then
34775           new_path="$p/$path"
34776           break
34777         fi
34778       done
34779       IFS="$IFS_save"
34780     else
34781       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
34782 $as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
34783       new_path="$path"
34784     fi
34785 
34786     if test "x$new_path" = x; then
34787       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
34788 $as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
34789       has_space=`$ECHO "$complete" | $GREP " "`
34790       if test "x$has_space" != x; then
34791         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34792 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34793       fi
34794       as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
34795     fi
34796   fi
34797 
34798   # Now join together the path and the arguments once again
34799   if test "x$arguments" != xEOL; then
34800     new_complete="$new_path ${arguments% *}"
34801   else
34802     new_complete="$new_path"
34803   fi
34804 
34805   if test "x$complete" != "x$new_complete"; then
34806     WINAR="$new_complete"
34807     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
34808 $as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
34809   fi
34810 
34811   AR="$WINAR"
34812   ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
34813 
34814   # Extract the first word of "dumpbin", so it can be a program name with args.
34815 set dummy dumpbin; ac_word=$2
34816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34817 $as_echo_n "checking for $ac_word... " >&6; }
34818 if ${ac_cv_prog_DUMPBIN+:} false; then :
34819   $as_echo_n "(cached) " >&6
34820 else
34821   if test -n "$DUMPBIN"; then
34822   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34823 else
34824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34825 for as_dir in $PATH
34826 do
34827   IFS=$as_save_IFS
34828   test -z "$as_dir" && as_dir=.
34829     for ac_exec_ext in '' $ac_executable_extensions; do
34830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34831     ac_cv_prog_DUMPBIN="dumpbin"
34832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34833     break 2
34834   fi
34835 done
34836   done
34837 IFS=$as_save_IFS
34838 
34839 fi
34840 fi
34841 DUMPBIN=$ac_cv_prog_DUMPBIN
34842 if test -n "$DUMPBIN"; then
34843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34844 $as_echo "$DUMPBIN" >&6; }
34845 else
34846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34847 $as_echo "no" >&6; }
34848 fi
34849 
34850 
34851 
34852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34853 
34854   # First separate the path from the arguments. This will split at the first
34855   # space.
34856   complete="$DUMPBIN"
34857   path="${complete%% *}"
34858   tmp="$complete EOL"
34859   arguments="${tmp#* }"
34860 
34861   # Input might be given as Windows format, start by converting to
34862   # unix format.
34863   new_path=`$CYGPATH -u "$path"`
34864 
34865   # Now try to locate executable using which
34866   new_path=`$WHICH "$new_path" 2> /dev/null`
34867   # bat and cmd files are not always considered executable in cygwin causing which
34868   # to not find them
34869   if test "x$new_path" = x \
34870       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34871       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34872     new_path=`$CYGPATH -u "$path"`
34873   fi
34874   if test "x$new_path" = x; then
34875     # Oops. Which didn't find the executable.
34876     # The splitting of arguments from the executable at a space might have been incorrect,
34877     # since paths with space are more likely in Windows. Give it another try with the whole
34878     # argument.
34879     path="$complete"
34880     arguments="EOL"
34881     new_path=`$CYGPATH -u "$path"`
34882     new_path=`$WHICH "$new_path" 2> /dev/null`
34883     # bat and cmd files are not always considered executable in cygwin causing which
34884     # to not find them
34885     if test "x$new_path" = x \
34886         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34887         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34888       new_path=`$CYGPATH -u "$path"`
34889     fi
34890     if test "x$new_path" = x; then
34891       # It's still not found. Now this is an unrecoverable error.
34892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34893 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34894       has_space=`$ECHO "$complete" | $GREP " "`
34895       if test "x$has_space" != x; then
34896         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34897 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34898       fi
34899       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34900     fi
34901   fi
34902 
34903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34906   # "foo.exe" is OK but "foo" is an error.
34907   #
34908   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34909   # It is also a way to make sure we got the proper file name for the real test later on.
34910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34911   if test "x$test_shortpath" = x; then
34912     # Short path failed, file does not exist as specified.
34913     # Try adding .exe or .cmd
34914     if test -f "${new_path}.exe"; then
34915       input_to_shortpath="${new_path}.exe"
34916     elif test -f "${new_path}.cmd"; then
34917       input_to_shortpath="${new_path}.cmd"
34918     else
34919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34920 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34921       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34922 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34923       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34924     fi
34925   else
34926     input_to_shortpath="$new_path"
34927   fi
34928 
34929   # Call helper function which possibly converts this using DOS-style short mode.
34930   # If so, the updated path is stored in $new_path.
34931   new_path="$input_to_shortpath"
34932 
34933   input_path="$input_to_shortpath"
34934   # Check if we need to convert this using DOS-style short mode. If the path
34935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34936   # take no chances and rewrite it.
34937   # Note: m4 eats our [], so we need to use [ and ] instead.
34938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34939   if test "x$has_forbidden_chars" != x; then
34940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34944       # Going to short mode and back again did indeed matter. Since short mode is
34945       # case insensitive, let's make it lowercase to improve readability.
34946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34947       # Now convert it back to Unix-stile (cygpath)
34948       input_path=`$CYGPATH -u "$shortmode_path"`
34949       new_path="$input_path"
34950     fi
34951   fi
34952 
34953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34954   if test "x$test_cygdrive_prefix" = x; then
34955     # As a simple fix, exclude /usr/bin since it's not a real path.
34956     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34958       # a path prefixed by /cygdrive for fixpath to work.
34959       new_path="$CYGWIN_ROOT_PATH$input_path"
34960     fi
34961   fi
34962 
34963   # remove trailing .exe if any
34964   new_path="${new_path/%.exe/}"
34965 
34966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34967 
34968   # First separate the path from the arguments. This will split at the first
34969   # space.
34970   complete="$DUMPBIN"
34971   path="${complete%% *}"
34972   tmp="$complete EOL"
34973   arguments="${tmp#* }"
34974 
34975   # Input might be given as Windows format, start by converting to
34976   # unix format.
34977   new_path="$path"
34978 
34979   windows_path="$new_path"
34980   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34981     unix_path=`$CYGPATH -u "$windows_path"`
34982     new_path="$unix_path"
34983   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34984     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34985     new_path="$unix_path"
34986   fi
34987 
34988 
34989   # Now try to locate executable using which
34990   new_path=`$WHICH "$new_path" 2> /dev/null`
34991 
34992   if test "x$new_path" = x; then
34993     # Oops. Which didn't find the executable.
34994     # The splitting of arguments from the executable at a space might have been incorrect,
34995     # since paths with space are more likely in Windows. Give it another try with the whole
34996     # argument.
34997     path="$complete"
34998     arguments="EOL"
34999     new_path="$path"
35000 
35001   windows_path="$new_path"
35002   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35003     unix_path=`$CYGPATH -u "$windows_path"`
35004     new_path="$unix_path"
35005   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35006     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35007     new_path="$unix_path"
35008   fi
35009 
35010 
35011     new_path=`$WHICH "$new_path" 2> /dev/null`
35012 
35013     if test "x$new_path" = x; then
35014       # It's still not found. Now this is an unrecoverable error.
35015       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35016 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35017       has_space=`$ECHO "$complete" | $GREP " "`
35018       if test "x$has_space" != x; then
35019         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35020 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35021       fi
35022       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35023     fi
35024   fi
35025 
35026   # Now new_path has a complete unix path to the binary
35027   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35028     # Keep paths in /bin as-is, but remove trailing .exe if any
35029     new_path="${new_path/%.exe/}"
35030     # Do not save /bin paths to all_fixpath_prefixes!
35031   else
35032     # Not in mixed or Windows style, start by that.
35033     new_path=`cmd //c echo $new_path`
35034 
35035   input_path="$new_path"
35036   # Check if we need to convert this using DOS-style short mode. If the path
35037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35038   # take no chances and rewrite it.
35039   # Note: m4 eats our [], so we need to use [ and ] instead.
35040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35041   if test "x$has_forbidden_chars" != x; then
35042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35044   fi
35045 
35046     # Output is in $new_path
35047 
35048   windows_path="$new_path"
35049   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35050     unix_path=`$CYGPATH -u "$windows_path"`
35051     new_path="$unix_path"
35052   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35053     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35054     new_path="$unix_path"
35055   fi
35056 
35057     # remove trailing .exe if any
35058     new_path="${new_path/%.exe/}"
35059 
35060     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35061     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35062   fi
35063 
35064   else
35065     # We're on a posix platform. Hooray! :)
35066     # First separate the path from the arguments. This will split at the first
35067     # space.
35068     complete="$DUMPBIN"
35069     path="${complete%% *}"
35070     tmp="$complete EOL"
35071     arguments="${tmp#* }"
35072 
35073     # Cannot rely on the command "which" here since it doesn't always work.
35074     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35075     if test -z "$is_absolute_path"; then
35076       # Path to executable is not absolute. Find it.
35077       IFS_save="$IFS"
35078       IFS=:
35079       for p in $PATH; do
35080         if test -f "$p/$path" && test -x "$p/$path"; then
35081           new_path="$p/$path"
35082           break
35083         fi
35084       done
35085       IFS="$IFS_save"
35086     else
35087       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
35088 $as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
35089       new_path="$path"
35090     fi
35091 
35092     if test "x$new_path" = x; then
35093       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35094 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35095       has_space=`$ECHO "$complete" | $GREP " "`
35096       if test "x$has_space" != x; then
35097         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35098 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35099       fi
35100       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35101     fi
35102   fi
35103 
35104   # Now join together the path and the arguments once again
35105   if test "x$arguments" != xEOL; then
35106     new_complete="$new_path ${arguments% *}"
35107   else
35108     new_complete="$new_path"
35109   fi
35110 
35111   if test "x$complete" != "x$new_complete"; then
35112     DUMPBIN="$new_complete"
35113     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35114 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35115   fi
35116 
35117 
35118       COMPILER_TYPE=CL
35119       CCXXFLAGS="$CCXXFLAGS -nologo"
35120 
35121 fi
35122 
35123 
35124 
35125   ac_ext=c
35126 ac_cpp='$CPP $CPPFLAGS'
35127 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35128 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35129 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35131 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35132 # On Suns, sometimes $CPP names a directory.
35133 if test -n "$CPP" && test -d "$CPP"; then
35134   CPP=
35135 fi
35136 if test -z "$CPP"; then
35137   if ${ac_cv_prog_CPP+:} false; then :
35138   $as_echo_n "(cached) " >&6
35139 else
35140       # Double quotes because CPP needs to be expanded
35141     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35142     do
35143       ac_preproc_ok=false
35144 for ac_c_preproc_warn_flag in '' yes
35145 do
35146   # Use a header file that comes with gcc, so configuring glibc
35147   # with a fresh cross-compiler works.
35148   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35149   # <limits.h> exists even on freestanding compilers.
35150   # On the NeXT, cc -E runs the code through the compiler's parser,
35151   # not just through cpp. "Syntax error" is here to catch this case.
35152   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35153 /* end confdefs.h.  */
35154 #ifdef __STDC__
35155 # include <limits.h>
35156 #else
35157 # include <assert.h>
35158 #endif
35159                      Syntax error
35160 _ACEOF
35161 if ac_fn_c_try_cpp "$LINENO"; then :
35162 
35163 else
35164   # Broken: fails on valid input.
35165 continue
35166 fi
35167 rm -f conftest.err conftest.i conftest.$ac_ext
35168 
35169   # OK, works on sane cases.  Now check whether nonexistent headers
35170   # can be detected and how.
35171   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35172 /* end confdefs.h.  */
35173 #include <ac_nonexistent.h>
35174 _ACEOF
35175 if ac_fn_c_try_cpp "$LINENO"; then :
35176   # Broken: success on invalid input.
35177 continue
35178 else
35179   # Passes both tests.
35180 ac_preproc_ok=:
35181 break
35182 fi
35183 rm -f conftest.err conftest.i conftest.$ac_ext
35184 
35185 done
35186 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35187 rm -f conftest.i conftest.err conftest.$ac_ext
35188 if $ac_preproc_ok; then :
35189   break
35190 fi
35191 
35192     done
35193     ac_cv_prog_CPP=$CPP
35194 
35195 fi
35196   CPP=$ac_cv_prog_CPP
35197 else
35198   ac_cv_prog_CPP=$CPP
35199 fi
35200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35201 $as_echo "$CPP" >&6; }
35202 ac_preproc_ok=false
35203 for ac_c_preproc_warn_flag in '' yes
35204 do
35205   # Use a header file that comes with gcc, so configuring glibc
35206   # with a fresh cross-compiler works.
35207   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35208   # <limits.h> exists even on freestanding compilers.
35209   # On the NeXT, cc -E runs the code through the compiler's parser,
35210   # not just through cpp. "Syntax error" is here to catch this case.
35211   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35212 /* end confdefs.h.  */
35213 #ifdef __STDC__
35214 # include <limits.h>
35215 #else
35216 # include <assert.h>
35217 #endif
35218                      Syntax error
35219 _ACEOF
35220 if ac_fn_c_try_cpp "$LINENO"; then :
35221 
35222 else
35223   # Broken: fails on valid input.
35224 continue
35225 fi
35226 rm -f conftest.err conftest.i conftest.$ac_ext
35227 
35228   # OK, works on sane cases.  Now check whether nonexistent headers
35229   # can be detected and how.
35230   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35231 /* end confdefs.h.  */
35232 #include <ac_nonexistent.h>
35233 _ACEOF
35234 if ac_fn_c_try_cpp "$LINENO"; then :
35235   # Broken: success on invalid input.
35236 continue
35237 else
35238   # Passes both tests.
35239 ac_preproc_ok=:
35240 break
35241 fi
35242 rm -f conftest.err conftest.i conftest.$ac_ext
35243 
35244 done
35245 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35246 rm -f conftest.i conftest.err conftest.$ac_ext
35247 if $ac_preproc_ok; then :
35248 
35249 else
35250   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35251 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35252 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35253 See \`config.log' for more details" "$LINENO" 5; }
35254 fi
35255 
35256 ac_ext=cpp
35257 ac_cpp='$CXXCPP $CPPFLAGS'
35258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35261 
35262 
35263   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35264 
35265   # First separate the path from the arguments. This will split at the first
35266   # space.
35267   complete="$CPP"
35268   path="${complete%% *}"
35269   tmp="$complete EOL"
35270   arguments="${tmp#* }"
35271 
35272   # Input might be given as Windows format, start by converting to
35273   # unix format.
35274   new_path=`$CYGPATH -u "$path"`
35275 
35276   # Now try to locate executable using which
35277   new_path=`$WHICH "$new_path" 2> /dev/null`
35278   # bat and cmd files are not always considered executable in cygwin causing which
35279   # to not find them
35280   if test "x$new_path" = x \
35281       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35282       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35283     new_path=`$CYGPATH -u "$path"`
35284   fi
35285   if test "x$new_path" = x; then
35286     # Oops. Which didn't find the executable.
35287     # The splitting of arguments from the executable at a space might have been incorrect,
35288     # since paths with space are more likely in Windows. Give it another try with the whole
35289     # argument.
35290     path="$complete"
35291     arguments="EOL"
35292     new_path=`$CYGPATH -u "$path"`
35293     new_path=`$WHICH "$new_path" 2> /dev/null`
35294     # bat and cmd files are not always considered executable in cygwin causing which
35295     # to not find them
35296     if test "x$new_path" = x \
35297         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35298         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35299       new_path=`$CYGPATH -u "$path"`
35300     fi
35301     if test "x$new_path" = x; then
35302       # It's still not found. Now this is an unrecoverable error.
35303       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35304 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35305       has_space=`$ECHO "$complete" | $GREP " "`
35306       if test "x$has_space" != x; then
35307         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35308 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35309       fi
35310       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35311     fi
35312   fi
35313 
35314   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35315   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35316   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35317   # "foo.exe" is OK but "foo" is an error.
35318   #
35319   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35320   # It is also a way to make sure we got the proper file name for the real test later on.
35321   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35322   if test "x$test_shortpath" = x; then
35323     # Short path failed, file does not exist as specified.
35324     # Try adding .exe or .cmd
35325     if test -f "${new_path}.exe"; then
35326       input_to_shortpath="${new_path}.exe"
35327     elif test -f "${new_path}.cmd"; then
35328       input_to_shortpath="${new_path}.cmd"
35329     else
35330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35331 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35332       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35333 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35334       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35335     fi
35336   else
35337     input_to_shortpath="$new_path"
35338   fi
35339 
35340   # Call helper function which possibly converts this using DOS-style short mode.
35341   # If so, the updated path is stored in $new_path.
35342   new_path="$input_to_shortpath"
35343 
35344   input_path="$input_to_shortpath"
35345   # Check if we need to convert this using DOS-style short mode. If the path
35346   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35347   # take no chances and rewrite it.
35348   # Note: m4 eats our [], so we need to use [ and ] instead.
35349   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35350   if test "x$has_forbidden_chars" != x; then
35351     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35352     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35353     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35354     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35355       # Going to short mode and back again did indeed matter. Since short mode is
35356       # case insensitive, let's make it lowercase to improve readability.
35357       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35358       # Now convert it back to Unix-stile (cygpath)
35359       input_path=`$CYGPATH -u "$shortmode_path"`
35360       new_path="$input_path"
35361     fi
35362   fi
35363 
35364   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35365   if test "x$test_cygdrive_prefix" = x; then
35366     # As a simple fix, exclude /usr/bin since it's not a real path.
35367     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35368       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35369       # a path prefixed by /cygdrive for fixpath to work.
35370       new_path="$CYGWIN_ROOT_PATH$input_path"
35371     fi
35372   fi
35373 
35374   # remove trailing .exe if any
35375   new_path="${new_path/%.exe/}"
35376 
35377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35378 
35379   # First separate the path from the arguments. This will split at the first
35380   # space.
35381   complete="$CPP"
35382   path="${complete%% *}"
35383   tmp="$complete EOL"
35384   arguments="${tmp#* }"
35385 
35386   # Input might be given as Windows format, start by converting to
35387   # unix format.
35388   new_path="$path"
35389 
35390   windows_path="$new_path"
35391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35392     unix_path=`$CYGPATH -u "$windows_path"`
35393     new_path="$unix_path"
35394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35396     new_path="$unix_path"
35397   fi
35398 
35399 
35400   # Now try to locate executable using which
35401   new_path=`$WHICH "$new_path" 2> /dev/null`
35402 
35403   if test "x$new_path" = x; then
35404     # Oops. Which didn't find the executable.
35405     # The splitting of arguments from the executable at a space might have been incorrect,
35406     # since paths with space are more likely in Windows. Give it another try with the whole
35407     # argument.
35408     path="$complete"
35409     arguments="EOL"
35410     new_path="$path"
35411 
35412   windows_path="$new_path"
35413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35414     unix_path=`$CYGPATH -u "$windows_path"`
35415     new_path="$unix_path"
35416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35418     new_path="$unix_path"
35419   fi
35420 
35421 
35422     new_path=`$WHICH "$new_path" 2> /dev/null`
35423 
35424     if test "x$new_path" = x; then
35425       # It's still not found. Now this is an unrecoverable error.
35426       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35427 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35428       has_space=`$ECHO "$complete" | $GREP " "`
35429       if test "x$has_space" != x; then
35430         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35431 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35432       fi
35433       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35434     fi
35435   fi
35436 
35437   # Now new_path has a complete unix path to the binary
35438   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35439     # Keep paths in /bin as-is, but remove trailing .exe if any
35440     new_path="${new_path/%.exe/}"
35441     # Do not save /bin paths to all_fixpath_prefixes!
35442   else
35443     # Not in mixed or Windows style, start by that.
35444     new_path=`cmd //c echo $new_path`
35445 
35446   input_path="$new_path"
35447   # Check if we need to convert this using DOS-style short mode. If the path
35448   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35449   # take no chances and rewrite it.
35450   # Note: m4 eats our [], so we need to use [ and ] instead.
35451   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35452   if test "x$has_forbidden_chars" != x; then
35453     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35454     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35455   fi
35456 
35457     # Output is in $new_path
35458 
35459   windows_path="$new_path"
35460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35461     unix_path=`$CYGPATH -u "$windows_path"`
35462     new_path="$unix_path"
35463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35465     new_path="$unix_path"
35466   fi
35467 
35468     # remove trailing .exe if any
35469     new_path="${new_path/%.exe/}"
35470 
35471     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35472     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35473   fi
35474 
35475   else
35476     # We're on a posix platform. Hooray! :)
35477     # First separate the path from the arguments. This will split at the first
35478     # space.
35479     complete="$CPP"
35480     path="${complete%% *}"
35481     tmp="$complete EOL"
35482     arguments="${tmp#* }"
35483 
35484     # Cannot rely on the command "which" here since it doesn't always work.
35485     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35486     if test -z "$is_absolute_path"; then
35487       # Path to executable is not absolute. Find it.
35488       IFS_save="$IFS"
35489       IFS=:
35490       for p in $PATH; do
35491         if test -f "$p/$path" && test -x "$p/$path"; then
35492           new_path="$p/$path"
35493           break
35494         fi
35495       done
35496       IFS="$IFS_save"
35497     else
35498       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
35499 $as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
35500       new_path="$path"
35501     fi
35502 
35503     if test "x$new_path" = x; then
35504       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35505 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35506       has_space=`$ECHO "$complete" | $GREP " "`
35507       if test "x$has_space" != x; then
35508         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35509 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35510       fi
35511       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35512     fi
35513   fi
35514 
35515   # Now join together the path and the arguments once again
35516   if test "x$arguments" != xEOL; then
35517     new_complete="$new_path ${arguments% *}"
35518   else
35519     new_complete="$new_path"
35520   fi
35521 
35522   if test "x$complete" != "x$new_complete"; then
35523     CPP="$new_complete"
35524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35525 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35526   fi
35527 
35528 
35529   ac_ext=cpp
35530 ac_cpp='$CXXCPP $CPPFLAGS'
35531 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35532 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35533 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35535 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35536 if test -z "$CXXCPP"; then
35537   if ${ac_cv_prog_CXXCPP+:} false; then :
35538   $as_echo_n "(cached) " >&6
35539 else
35540       # Double quotes because CXXCPP needs to be expanded
35541     for CXXCPP in "$CXX -E" "/lib/cpp"
35542     do
35543       ac_preproc_ok=false
35544 for ac_cxx_preproc_warn_flag in '' yes
35545 do
35546   # Use a header file that comes with gcc, so configuring glibc
35547   # with a fresh cross-compiler works.
35548   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35549   # <limits.h> exists even on freestanding compilers.
35550   # On the NeXT, cc -E runs the code through the compiler's parser,
35551   # not just through cpp. "Syntax error" is here to catch this case.
35552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35553 /* end confdefs.h.  */
35554 #ifdef __STDC__
35555 # include <limits.h>
35556 #else
35557 # include <assert.h>
35558 #endif
35559                      Syntax error
35560 _ACEOF
35561 if ac_fn_cxx_try_cpp "$LINENO"; then :
35562 
35563 else
35564   # Broken: fails on valid input.
35565 continue
35566 fi
35567 rm -f conftest.err conftest.i conftest.$ac_ext
35568 
35569   # OK, works on sane cases.  Now check whether nonexistent headers
35570   # can be detected and how.
35571   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35572 /* end confdefs.h.  */
35573 #include <ac_nonexistent.h>
35574 _ACEOF
35575 if ac_fn_cxx_try_cpp "$LINENO"; then :
35576   # Broken: success on invalid input.
35577 continue
35578 else
35579   # Passes both tests.
35580 ac_preproc_ok=:
35581 break
35582 fi
35583 rm -f conftest.err conftest.i conftest.$ac_ext
35584 
35585 done
35586 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35587 rm -f conftest.i conftest.err conftest.$ac_ext
35588 if $ac_preproc_ok; then :
35589   break
35590 fi
35591 
35592     done
35593     ac_cv_prog_CXXCPP=$CXXCPP
35594 
35595 fi
35596   CXXCPP=$ac_cv_prog_CXXCPP
35597 else
35598   ac_cv_prog_CXXCPP=$CXXCPP
35599 fi
35600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35601 $as_echo "$CXXCPP" >&6; }
35602 ac_preproc_ok=false
35603 for ac_cxx_preproc_warn_flag in '' yes
35604 do
35605   # Use a header file that comes with gcc, so configuring glibc
35606   # with a fresh cross-compiler works.
35607   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35608   # <limits.h> exists even on freestanding compilers.
35609   # On the NeXT, cc -E runs the code through the compiler's parser,
35610   # not just through cpp. "Syntax error" is here to catch this case.
35611   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35612 /* end confdefs.h.  */
35613 #ifdef __STDC__
35614 # include <limits.h>
35615 #else
35616 # include <assert.h>
35617 #endif
35618                      Syntax error
35619 _ACEOF
35620 if ac_fn_cxx_try_cpp "$LINENO"; then :
35621 
35622 else
35623   # Broken: fails on valid input.
35624 continue
35625 fi
35626 rm -f conftest.err conftest.i conftest.$ac_ext
35627 
35628   # OK, works on sane cases.  Now check whether nonexistent headers
35629   # can be detected and how.
35630   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35631 /* end confdefs.h.  */
35632 #include <ac_nonexistent.h>
35633 _ACEOF
35634 if ac_fn_cxx_try_cpp "$LINENO"; then :
35635   # Broken: success on invalid input.
35636 continue
35637 else
35638   # Passes both tests.
35639 ac_preproc_ok=:
35640 break
35641 fi
35642 rm -f conftest.err conftest.i conftest.$ac_ext
35643 
35644 done
35645 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35646 rm -f conftest.i conftest.err conftest.$ac_ext
35647 if $ac_preproc_ok; then :
35648 
35649 else
35650   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35651 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35652 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35653 See \`config.log' for more details" "$LINENO" 5; }
35654 fi
35655 
35656 ac_ext=cpp
35657 ac_cpp='$CXXCPP $CPPFLAGS'
35658 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35659 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35660 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35661 
35662 
35663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35664 
35665   # First separate the path from the arguments. This will split at the first
35666   # space.
35667   complete="$CXXCPP"
35668   path="${complete%% *}"
35669   tmp="$complete EOL"
35670   arguments="${tmp#* }"
35671 
35672   # Input might be given as Windows format, start by converting to
35673   # unix format.
35674   new_path=`$CYGPATH -u "$path"`
35675 
35676   # Now try to locate executable using which
35677   new_path=`$WHICH "$new_path" 2> /dev/null`
35678   # bat and cmd files are not always considered executable in cygwin causing which
35679   # to not find them
35680   if test "x$new_path" = x \
35681       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35682       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35683     new_path=`$CYGPATH -u "$path"`
35684   fi
35685   if test "x$new_path" = x; then
35686     # Oops. Which didn't find the executable.
35687     # The splitting of arguments from the executable at a space might have been incorrect,
35688     # since paths with space are more likely in Windows. Give it another try with the whole
35689     # argument.
35690     path="$complete"
35691     arguments="EOL"
35692     new_path=`$CYGPATH -u "$path"`
35693     new_path=`$WHICH "$new_path" 2> /dev/null`
35694     # bat and cmd files are not always considered executable in cygwin causing which
35695     # to not find them
35696     if test "x$new_path" = x \
35697         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35698         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35699       new_path=`$CYGPATH -u "$path"`
35700     fi
35701     if test "x$new_path" = x; then
35702       # It's still not found. Now this is an unrecoverable error.
35703       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35704 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35705       has_space=`$ECHO "$complete" | $GREP " "`
35706       if test "x$has_space" != x; then
35707         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35708 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35709       fi
35710       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35711     fi
35712   fi
35713 
35714   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35715   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35716   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35717   # "foo.exe" is OK but "foo" is an error.
35718   #
35719   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35720   # It is also a way to make sure we got the proper file name for the real test later on.
35721   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35722   if test "x$test_shortpath" = x; then
35723     # Short path failed, file does not exist as specified.
35724     # Try adding .exe or .cmd
35725     if test -f "${new_path}.exe"; then
35726       input_to_shortpath="${new_path}.exe"
35727     elif test -f "${new_path}.cmd"; then
35728       input_to_shortpath="${new_path}.cmd"
35729     else
35730       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35731 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35732       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35733 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35734       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35735     fi
35736   else
35737     input_to_shortpath="$new_path"
35738   fi
35739 
35740   # Call helper function which possibly converts this using DOS-style short mode.
35741   # If so, the updated path is stored in $new_path.
35742   new_path="$input_to_shortpath"
35743 
35744   input_path="$input_to_shortpath"
35745   # Check if we need to convert this using DOS-style short mode. If the path
35746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35747   # take no chances and rewrite it.
35748   # Note: m4 eats our [], so we need to use [ and ] instead.
35749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35750   if test "x$has_forbidden_chars" != x; then
35751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35752     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35753     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35754     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35755       # Going to short mode and back again did indeed matter. Since short mode is
35756       # case insensitive, let's make it lowercase to improve readability.
35757       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35758       # Now convert it back to Unix-stile (cygpath)
35759       input_path=`$CYGPATH -u "$shortmode_path"`
35760       new_path="$input_path"
35761     fi
35762   fi
35763 
35764   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35765   if test "x$test_cygdrive_prefix" = x; then
35766     # As a simple fix, exclude /usr/bin since it's not a real path.
35767     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35768       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35769       # a path prefixed by /cygdrive for fixpath to work.
35770       new_path="$CYGWIN_ROOT_PATH$input_path"
35771     fi
35772   fi
35773 
35774   # remove trailing .exe if any
35775   new_path="${new_path/%.exe/}"
35776 
35777   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35778 
35779   # First separate the path from the arguments. This will split at the first
35780   # space.
35781   complete="$CXXCPP"
35782   path="${complete%% *}"
35783   tmp="$complete EOL"
35784   arguments="${tmp#* }"
35785 
35786   # Input might be given as Windows format, start by converting to
35787   # unix format.
35788   new_path="$path"
35789 
35790   windows_path="$new_path"
35791   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35792     unix_path=`$CYGPATH -u "$windows_path"`
35793     new_path="$unix_path"
35794   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35795     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35796     new_path="$unix_path"
35797   fi
35798 
35799 
35800   # Now try to locate executable using which
35801   new_path=`$WHICH "$new_path" 2> /dev/null`
35802 
35803   if test "x$new_path" = x; then
35804     # Oops. Which didn't find the executable.
35805     # The splitting of arguments from the executable at a space might have been incorrect,
35806     # since paths with space are more likely in Windows. Give it another try with the whole
35807     # argument.
35808     path="$complete"
35809     arguments="EOL"
35810     new_path="$path"
35811 
35812   windows_path="$new_path"
35813   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35814     unix_path=`$CYGPATH -u "$windows_path"`
35815     new_path="$unix_path"
35816   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35817     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35818     new_path="$unix_path"
35819   fi
35820 
35821 
35822     new_path=`$WHICH "$new_path" 2> /dev/null`
35823 
35824     if test "x$new_path" = x; then
35825       # It's still not found. Now this is an unrecoverable error.
35826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35827 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35828       has_space=`$ECHO "$complete" | $GREP " "`
35829       if test "x$has_space" != x; then
35830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35832       fi
35833       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35834     fi
35835   fi
35836 
35837   # Now new_path has a complete unix path to the binary
35838   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35839     # Keep paths in /bin as-is, but remove trailing .exe if any
35840     new_path="${new_path/%.exe/}"
35841     # Do not save /bin paths to all_fixpath_prefixes!
35842   else
35843     # Not in mixed or Windows style, start by that.
35844     new_path=`cmd //c echo $new_path`
35845 
35846   input_path="$new_path"
35847   # Check if we need to convert this using DOS-style short mode. If the path
35848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35849   # take no chances and rewrite it.
35850   # Note: m4 eats our [], so we need to use [ and ] instead.
35851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35852   if test "x$has_forbidden_chars" != x; then
35853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35855   fi
35856 
35857     # Output is in $new_path
35858 
35859   windows_path="$new_path"
35860   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35861     unix_path=`$CYGPATH -u "$windows_path"`
35862     new_path="$unix_path"
35863   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35864     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35865     new_path="$unix_path"
35866   fi
35867 
35868     # remove trailing .exe if any
35869     new_path="${new_path/%.exe/}"
35870 
35871     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35872     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35873   fi
35874 
35875   else
35876     # We're on a posix platform. Hooray! :)
35877     # First separate the path from the arguments. This will split at the first
35878     # space.
35879     complete="$CXXCPP"
35880     path="${complete%% *}"
35881     tmp="$complete EOL"
35882     arguments="${tmp#* }"
35883 
35884     # Cannot rely on the command "which" here since it doesn't always work.
35885     is_absolute_path=`$ECHO "$path" | $GREP ^/`
35886     if test -z "$is_absolute_path"; then
35887       # Path to executable is not absolute. Find it.
35888       IFS_save="$IFS"
35889       IFS=:
35890       for p in $PATH; do
35891         if test -f "$p/$path" && test -x "$p/$path"; then
35892           new_path="$p/$path"
35893           break
35894         fi
35895       done
35896       IFS="$IFS_save"
35897     else
35898       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
35899 $as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
35900       new_path="$path"
35901     fi
35902 
35903     if test "x$new_path" = x; then
35904       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35905 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35906       has_space=`$ECHO "$complete" | $GREP " "`
35907       if test "x$has_space" != x; then
35908         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35909 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35910       fi
35911       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35912     fi
35913   fi
35914 
35915   # Now join together the path and the arguments once again
35916   if test "x$arguments" != xEOL; then
35917     new_complete="$new_path ${arguments% *}"
35918   else
35919     new_complete="$new_path"
35920   fi
35921 
35922   if test "x$complete" != "x$new_complete"; then
35923     CXXCPP="$new_complete"
35924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35925 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35926   fi
35927 
35928 
35929   if test "x$COMPILE_TYPE" != "xcross"; then
35930     # If we are not cross compiling, use the same compilers for
35931     # building the build platform executables. The cross-compilation
35932     # case needed to be done earlier, but this can only be done after
35933     # the native tools have been localized.
35934     BUILD_CC="$CC"
35935     BUILD_CXX="$CXX"
35936     BUILD_LD="$LD"
35937   fi
35938 
35939   # for solaris we really need solaris tools, and not gnu equivalent
35940   #   these seems to normally reside in /usr/ccs/bin so add that to path before
35941   #   starting to probe
35942   #
35943   #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
35944   #         so that it can be overriden --with-tools-dir
35945   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
35946     PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
35947   fi
35948 
35949   # Find the right assembler.
35950   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35951 
35952 
35953   # Publish this variable in the help.
35954 
35955 
35956   if test "x$AS" = x; then
35957     # The variable is not set by user, try to locate tool using the code snippet
35958     for ac_prog in as
35959 do
35960   # Extract the first word of "$ac_prog", so it can be a program name with args.
35961 set dummy $ac_prog; ac_word=$2
35962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35963 $as_echo_n "checking for $ac_word... " >&6; }
35964 if ${ac_cv_path_AS+:} false; then :
35965   $as_echo_n "(cached) " >&6
35966 else
35967   case $AS in
35968   [\\/]* | ?:[\\/]*)
35969   ac_cv_path_AS="$AS" # Let the user override the test with a path.
35970   ;;
35971   *)
35972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35973 for as_dir in $PATH
35974 do
35975   IFS=$as_save_IFS
35976   test -z "$as_dir" && as_dir=.
35977     for ac_exec_ext in '' $ac_executable_extensions; do
35978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35979     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
35980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35981     break 2
35982   fi
35983 done
35984   done
35985 IFS=$as_save_IFS
35986 
35987   ;;
35988 esac
35989 fi
35990 AS=$ac_cv_path_AS
35991 if test -n "$AS"; then
35992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
35993 $as_echo "$AS" >&6; }
35994 else
35995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35996 $as_echo "no" >&6; }
35997 fi
35998 
35999 
36000   test -n "$AS" && break
36001 done
36002 
36003   else
36004     # The variable is set, but is it from the command line or the environment?
36005 
36006     # Try to remove the string !AS! from our list.
36007     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36008     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36009       # If it failed, the variable was not from the command line. Ignore it,
36010       # but warn the user (except for BASH, which is always set by the calling BASH).
36011       if test "xAS" != xBASH; then
36012         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36013 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36014       fi
36015       # Try to locate tool using the code snippet
36016       for ac_prog in as
36017 do
36018   # Extract the first word of "$ac_prog", so it can be a program name with args.
36019 set dummy $ac_prog; ac_word=$2
36020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36021 $as_echo_n "checking for $ac_word... " >&6; }
36022 if ${ac_cv_path_AS+:} false; then :
36023   $as_echo_n "(cached) " >&6
36024 else
36025   case $AS in
36026   [\\/]* | ?:[\\/]*)
36027   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36028   ;;
36029   *)
36030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36031 for as_dir in $PATH
36032 do
36033   IFS=$as_save_IFS
36034   test -z "$as_dir" && as_dir=.
36035     for ac_exec_ext in '' $ac_executable_extensions; do
36036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36037     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36039     break 2
36040   fi
36041 done
36042   done
36043 IFS=$as_save_IFS
36044 
36045   ;;
36046 esac
36047 fi
36048 AS=$ac_cv_path_AS
36049 if test -n "$AS"; then
36050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36051 $as_echo "$AS" >&6; }
36052 else
36053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36054 $as_echo "no" >&6; }
36055 fi
36056 
36057 
36058   test -n "$AS" && break
36059 done
36060 
36061     else
36062       # If it succeeded, then it was overridden by the user. We will use it
36063       # for the tool.
36064 
36065       # First remove it from the list of overridden variables, so we can test
36066       # for unknown variables in the end.
36067       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36068 
36069       # Check if the provided tool contains a complete path.
36070       tool_specified="$AS"
36071       tool_basename="${tool_specified##*/}"
36072       if test "x$tool_basename" = "x$tool_specified"; then
36073         # A command without a complete path is provided, search $PATH.
36074         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36075 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36076         # Extract the first word of "$tool_basename", so it can be a program name with args.
36077 set dummy $tool_basename; ac_word=$2
36078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36079 $as_echo_n "checking for $ac_word... " >&6; }
36080 if ${ac_cv_path_AS+:} false; then :
36081   $as_echo_n "(cached) " >&6
36082 else
36083   case $AS in
36084   [\\/]* | ?:[\\/]*)
36085   ac_cv_path_AS="$AS" # Let the user override the test with a path.
36086   ;;
36087   *)
36088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36089 for as_dir in $PATH
36090 do
36091   IFS=$as_save_IFS
36092   test -z "$as_dir" && as_dir=.
36093     for ac_exec_ext in '' $ac_executable_extensions; do
36094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36095     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36097     break 2
36098   fi
36099 done
36100   done
36101 IFS=$as_save_IFS
36102 
36103   ;;
36104 esac
36105 fi
36106 AS=$ac_cv_path_AS
36107 if test -n "$AS"; then
36108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36109 $as_echo "$AS" >&6; }
36110 else
36111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36112 $as_echo "no" >&6; }
36113 fi
36114 
36115 
36116         if test "x$AS" = x; then
36117           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36118         fi
36119       else
36120         # Otherwise we believe it is a complete path. Use it as it is.
36121         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36122 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36123         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36124 $as_echo_n "checking for AS... " >&6; }
36125         if test ! -x "$tool_specified"; then
36126           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36127 $as_echo "not found" >&6; }
36128           as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36129         fi
36130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36131 $as_echo "$tool_specified" >&6; }
36132       fi
36133     fi
36134   fi
36135 
36136 
36137 
36138   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36139 
36140   # First separate the path from the arguments. This will split at the first
36141   # space.
36142   complete="$AS"
36143   path="${complete%% *}"
36144   tmp="$complete EOL"
36145   arguments="${tmp#* }"
36146 
36147   # Input might be given as Windows format, start by converting to
36148   # unix format.
36149   new_path=`$CYGPATH -u "$path"`
36150 
36151   # Now try to locate executable using which
36152   new_path=`$WHICH "$new_path" 2> /dev/null`
36153   # bat and cmd files are not always considered executable in cygwin causing which
36154   # to not find them
36155   if test "x$new_path" = x \
36156       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36157       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36158     new_path=`$CYGPATH -u "$path"`
36159   fi
36160   if test "x$new_path" = x; then
36161     # Oops. Which didn't find the executable.
36162     # The splitting of arguments from the executable at a space might have been incorrect,
36163     # since paths with space are more likely in Windows. Give it another try with the whole
36164     # argument.
36165     path="$complete"
36166     arguments="EOL"
36167     new_path=`$CYGPATH -u "$path"`
36168     new_path=`$WHICH "$new_path" 2> /dev/null`
36169     # bat and cmd files are not always considered executable in cygwin causing which
36170     # to not find them
36171     if test "x$new_path" = x \
36172         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36173         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36174       new_path=`$CYGPATH -u "$path"`
36175     fi
36176     if test "x$new_path" = x; then
36177       # It's still not found. Now this is an unrecoverable error.
36178       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36179 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36180       has_space=`$ECHO "$complete" | $GREP " "`
36181       if test "x$has_space" != x; then
36182         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36183 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36184       fi
36185       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36186     fi
36187   fi
36188 
36189   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36190   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36191   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36192   # "foo.exe" is OK but "foo" is an error.
36193   #
36194   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36195   # It is also a way to make sure we got the proper file name for the real test later on.
36196   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36197   if test "x$test_shortpath" = x; then
36198     # Short path failed, file does not exist as specified.
36199     # Try adding .exe or .cmd
36200     if test -f "${new_path}.exe"; then
36201       input_to_shortpath="${new_path}.exe"
36202     elif test -f "${new_path}.cmd"; then
36203       input_to_shortpath="${new_path}.cmd"
36204     else
36205       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36206 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36207       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36208 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36209       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36210     fi
36211   else
36212     input_to_shortpath="$new_path"
36213   fi
36214 
36215   # Call helper function which possibly converts this using DOS-style short mode.
36216   # If so, the updated path is stored in $new_path.
36217   new_path="$input_to_shortpath"
36218 
36219   input_path="$input_to_shortpath"
36220   # Check if we need to convert this using DOS-style short mode. If the path
36221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36222   # take no chances and rewrite it.
36223   # Note: m4 eats our [], so we need to use [ and ] instead.
36224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36225   if test "x$has_forbidden_chars" != x; then
36226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36227     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36228     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36229     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36230       # Going to short mode and back again did indeed matter. Since short mode is
36231       # case insensitive, let's make it lowercase to improve readability.
36232       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36233       # Now convert it back to Unix-stile (cygpath)
36234       input_path=`$CYGPATH -u "$shortmode_path"`
36235       new_path="$input_path"
36236     fi
36237   fi
36238 
36239   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36240   if test "x$test_cygdrive_prefix" = x; then
36241     # As a simple fix, exclude /usr/bin since it's not a real path.
36242     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36243       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36244       # a path prefixed by /cygdrive for fixpath to work.
36245       new_path="$CYGWIN_ROOT_PATH$input_path"
36246     fi
36247   fi
36248 
36249   # remove trailing .exe if any
36250   new_path="${new_path/%.exe/}"
36251 
36252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36253 
36254   # First separate the path from the arguments. This will split at the first
36255   # space.
36256   complete="$AS"
36257   path="${complete%% *}"
36258   tmp="$complete EOL"
36259   arguments="${tmp#* }"
36260 
36261   # Input might be given as Windows format, start by converting to
36262   # unix format.
36263   new_path="$path"
36264 
36265   windows_path="$new_path"
36266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36267     unix_path=`$CYGPATH -u "$windows_path"`
36268     new_path="$unix_path"
36269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36271     new_path="$unix_path"
36272   fi
36273 
36274 
36275   # Now try to locate executable using which
36276   new_path=`$WHICH "$new_path" 2> /dev/null`
36277 
36278   if test "x$new_path" = x; then
36279     # Oops. Which didn't find the executable.
36280     # The splitting of arguments from the executable at a space might have been incorrect,
36281     # since paths with space are more likely in Windows. Give it another try with the whole
36282     # argument.
36283     path="$complete"
36284     arguments="EOL"
36285     new_path="$path"
36286 
36287   windows_path="$new_path"
36288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36289     unix_path=`$CYGPATH -u "$windows_path"`
36290     new_path="$unix_path"
36291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36293     new_path="$unix_path"
36294   fi
36295 
36296 
36297     new_path=`$WHICH "$new_path" 2> /dev/null`
36298 
36299     if test "x$new_path" = x; then
36300       # It's still not found. Now this is an unrecoverable error.
36301       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36302 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36303       has_space=`$ECHO "$complete" | $GREP " "`
36304       if test "x$has_space" != x; then
36305         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36306 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36307       fi
36308       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36309     fi
36310   fi
36311 
36312   # Now new_path has a complete unix path to the binary
36313   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36314     # Keep paths in /bin as-is, but remove trailing .exe if any
36315     new_path="${new_path/%.exe/}"
36316     # Do not save /bin paths to all_fixpath_prefixes!
36317   else
36318     # Not in mixed or Windows style, start by that.
36319     new_path=`cmd //c echo $new_path`
36320 
36321   input_path="$new_path"
36322   # Check if we need to convert this using DOS-style short mode. If the path
36323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36324   # take no chances and rewrite it.
36325   # Note: m4 eats our [], so we need to use [ and ] instead.
36326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36327   if test "x$has_forbidden_chars" != x; then
36328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36329     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36330   fi
36331 
36332     # Output is in $new_path
36333 
36334   windows_path="$new_path"
36335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36336     unix_path=`$CYGPATH -u "$windows_path"`
36337     new_path="$unix_path"
36338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36340     new_path="$unix_path"
36341   fi
36342 
36343     # remove trailing .exe if any
36344     new_path="${new_path/%.exe/}"
36345 
36346     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36347     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36348   fi
36349 
36350   else
36351     # We're on a posix platform. Hooray! :)
36352     # First separate the path from the arguments. This will split at the first
36353     # space.
36354     complete="$AS"
36355     path="${complete%% *}"
36356     tmp="$complete EOL"
36357     arguments="${tmp#* }"
36358 
36359     # Cannot rely on the command "which" here since it doesn't always work.
36360     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36361     if test -z "$is_absolute_path"; then
36362       # Path to executable is not absolute. Find it.
36363       IFS_save="$IFS"
36364       IFS=:
36365       for p in $PATH; do
36366         if test -f "$p/$path" && test -x "$p/$path"; then
36367           new_path="$p/$path"
36368           break
36369         fi
36370       done
36371       IFS="$IFS_save"
36372     else
36373       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
36374 $as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
36375       new_path="$path"
36376     fi
36377 
36378     if test "x$new_path" = x; then
36379       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36380 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36381       has_space=`$ECHO "$complete" | $GREP " "`
36382       if test "x$has_space" != x; then
36383         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36384 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36385       fi
36386       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36387     fi
36388   fi
36389 
36390   # Now join together the path and the arguments once again
36391   if test "x$arguments" != xEOL; then
36392     new_complete="$new_path ${arguments% *}"
36393   else
36394     new_complete="$new_path"
36395   fi
36396 
36397   if test "x$complete" != "x$new_complete"; then
36398     AS="$new_complete"
36399     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36400 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36401   fi
36402 
36403   else
36404     AS="$CC -c"
36405   fi
36406 
36407 
36408   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36409 
36410 
36411   # Publish this variable in the help.
36412 
36413 
36414   if test "x$NM" = x; then
36415     # The variable is not set by user, try to locate tool using the code snippet
36416     for ac_prog in nm
36417 do
36418   # Extract the first word of "$ac_prog", so it can be a program name with args.
36419 set dummy $ac_prog; ac_word=$2
36420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36421 $as_echo_n "checking for $ac_word... " >&6; }
36422 if ${ac_cv_path_NM+:} false; then :
36423   $as_echo_n "(cached) " >&6
36424 else
36425   case $NM in
36426   [\\/]* | ?:[\\/]*)
36427   ac_cv_path_NM="$NM" # Let the user override the test with a path.
36428   ;;
36429   *)
36430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36431 for as_dir in $PATH
36432 do
36433   IFS=$as_save_IFS
36434   test -z "$as_dir" && as_dir=.
36435     for ac_exec_ext in '' $ac_executable_extensions; do
36436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36437     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36439     break 2
36440   fi
36441 done
36442   done
36443 IFS=$as_save_IFS
36444 
36445   ;;
36446 esac
36447 fi
36448 NM=$ac_cv_path_NM
36449 if test -n "$NM"; then
36450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36451 $as_echo "$NM" >&6; }
36452 else
36453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36454 $as_echo "no" >&6; }
36455 fi
36456 
36457 
36458   test -n "$NM" && break
36459 done
36460 
36461   else
36462     # The variable is set, but is it from the command line or the environment?
36463 
36464     # Try to remove the string !NM! from our list.
36465     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
36466     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36467       # If it failed, the variable was not from the command line. Ignore it,
36468       # but warn the user (except for BASH, which is always set by the calling BASH).
36469       if test "xNM" != xBASH; then
36470         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
36471 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
36472       fi
36473       # Try to locate tool using the code snippet
36474       for ac_prog in nm
36475 do
36476   # Extract the first word of "$ac_prog", so it can be a program name with args.
36477 set dummy $ac_prog; ac_word=$2
36478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36479 $as_echo_n "checking for $ac_word... " >&6; }
36480 if ${ac_cv_path_NM+:} false; then :
36481   $as_echo_n "(cached) " >&6
36482 else
36483   case $NM in
36484   [\\/]* | ?:[\\/]*)
36485   ac_cv_path_NM="$NM" # Let the user override the test with a path.
36486   ;;
36487   *)
36488   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36489 for as_dir in $PATH
36490 do
36491   IFS=$as_save_IFS
36492   test -z "$as_dir" && as_dir=.
36493     for ac_exec_ext in '' $ac_executable_extensions; do
36494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36495     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36497     break 2
36498   fi
36499 done
36500   done
36501 IFS=$as_save_IFS
36502 
36503   ;;
36504 esac
36505 fi
36506 NM=$ac_cv_path_NM
36507 if test -n "$NM"; then
36508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36509 $as_echo "$NM" >&6; }
36510 else
36511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36512 $as_echo "no" >&6; }
36513 fi
36514 
36515 
36516   test -n "$NM" && break
36517 done
36518 
36519     else
36520       # If it succeeded, then it was overridden by the user. We will use it
36521       # for the tool.
36522 
36523       # First remove it from the list of overridden variables, so we can test
36524       # for unknown variables in the end.
36525       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36526 
36527       # Check if the provided tool contains a complete path.
36528       tool_specified="$NM"
36529       tool_basename="${tool_specified##*/}"
36530       if test "x$tool_basename" = "x$tool_specified"; then
36531         # A command without a complete path is provided, search $PATH.
36532         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
36533 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
36534         # Extract the first word of "$tool_basename", so it can be a program name with args.
36535 set dummy $tool_basename; ac_word=$2
36536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36537 $as_echo_n "checking for $ac_word... " >&6; }
36538 if ${ac_cv_path_NM+:} false; then :
36539   $as_echo_n "(cached) " >&6
36540 else
36541   case $NM in
36542   [\\/]* | ?:[\\/]*)
36543   ac_cv_path_NM="$NM" # Let the user override the test with a path.
36544   ;;
36545   *)
36546   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36547 for as_dir in $PATH
36548 do
36549   IFS=$as_save_IFS
36550   test -z "$as_dir" && as_dir=.
36551     for ac_exec_ext in '' $ac_executable_extensions; do
36552   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36553     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
36554     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36555     break 2
36556   fi
36557 done
36558   done
36559 IFS=$as_save_IFS
36560 
36561   ;;
36562 esac
36563 fi
36564 NM=$ac_cv_path_NM
36565 if test -n "$NM"; then
36566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
36567 $as_echo "$NM" >&6; }
36568 else
36569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36570 $as_echo "no" >&6; }
36571 fi
36572 
36573 
36574         if test "x$NM" = x; then
36575           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36576         fi
36577       else
36578         # Otherwise we believe it is a complete path. Use it as it is.
36579         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
36580 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
36581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
36582 $as_echo_n "checking for NM... " >&6; }
36583         if test ! -x "$tool_specified"; then
36584           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36585 $as_echo "not found" >&6; }
36586           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
36587         fi
36588         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36589 $as_echo "$tool_specified" >&6; }
36590       fi
36591     fi
36592   fi
36593 
36594 
36595 
36596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36597 
36598   # First separate the path from the arguments. This will split at the first
36599   # space.
36600   complete="$NM"
36601   path="${complete%% *}"
36602   tmp="$complete EOL"
36603   arguments="${tmp#* }"
36604 
36605   # Input might be given as Windows format, start by converting to
36606   # unix format.
36607   new_path=`$CYGPATH -u "$path"`
36608 
36609   # Now try to locate executable using which
36610   new_path=`$WHICH "$new_path" 2> /dev/null`
36611   # bat and cmd files are not always considered executable in cygwin causing which
36612   # to not find them
36613   if test "x$new_path" = x \
36614       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36615       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36616     new_path=`$CYGPATH -u "$path"`
36617   fi
36618   if test "x$new_path" = x; then
36619     # Oops. Which didn't find the executable.
36620     # The splitting of arguments from the executable at a space might have been incorrect,
36621     # since paths with space are more likely in Windows. Give it another try with the whole
36622     # argument.
36623     path="$complete"
36624     arguments="EOL"
36625     new_path=`$CYGPATH -u "$path"`
36626     new_path=`$WHICH "$new_path" 2> /dev/null`
36627     # bat and cmd files are not always considered executable in cygwin causing which
36628     # to not find them
36629     if test "x$new_path" = x \
36630         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36631         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36632       new_path=`$CYGPATH -u "$path"`
36633     fi
36634     if test "x$new_path" = x; then
36635       # It's still not found. Now this is an unrecoverable error.
36636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36637 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36638       has_space=`$ECHO "$complete" | $GREP " "`
36639       if test "x$has_space" != x; then
36640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36642       fi
36643       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36644     fi
36645   fi
36646 
36647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36650   # "foo.exe" is OK but "foo" is an error.
36651   #
36652   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36653   # It is also a way to make sure we got the proper file name for the real test later on.
36654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36655   if test "x$test_shortpath" = x; then
36656     # Short path failed, file does not exist as specified.
36657     # Try adding .exe or .cmd
36658     if test -f "${new_path}.exe"; then
36659       input_to_shortpath="${new_path}.exe"
36660     elif test -f "${new_path}.cmd"; then
36661       input_to_shortpath="${new_path}.cmd"
36662     else
36663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36664 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36665       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36666 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36667       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36668     fi
36669   else
36670     input_to_shortpath="$new_path"
36671   fi
36672 
36673   # Call helper function which possibly converts this using DOS-style short mode.
36674   # If so, the updated path is stored in $new_path.
36675   new_path="$input_to_shortpath"
36676 
36677   input_path="$input_to_shortpath"
36678   # Check if we need to convert this using DOS-style short mode. If the path
36679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36680   # take no chances and rewrite it.
36681   # Note: m4 eats our [], so we need to use [ and ] instead.
36682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36683   if test "x$has_forbidden_chars" != x; then
36684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36688       # Going to short mode and back again did indeed matter. Since short mode is
36689       # case insensitive, let's make it lowercase to improve readability.
36690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36691       # Now convert it back to Unix-stile (cygpath)
36692       input_path=`$CYGPATH -u "$shortmode_path"`
36693       new_path="$input_path"
36694     fi
36695   fi
36696 
36697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36698   if test "x$test_cygdrive_prefix" = x; then
36699     # As a simple fix, exclude /usr/bin since it's not a real path.
36700     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36702       # a path prefixed by /cygdrive for fixpath to work.
36703       new_path="$CYGWIN_ROOT_PATH$input_path"
36704     fi
36705   fi
36706 
36707   # remove trailing .exe if any
36708   new_path="${new_path/%.exe/}"
36709 
36710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36711 
36712   # First separate the path from the arguments. This will split at the first
36713   # space.
36714   complete="$NM"
36715   path="${complete%% *}"
36716   tmp="$complete EOL"
36717   arguments="${tmp#* }"
36718 
36719   # Input might be given as Windows format, start by converting to
36720   # unix format.
36721   new_path="$path"
36722 
36723   windows_path="$new_path"
36724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36725     unix_path=`$CYGPATH -u "$windows_path"`
36726     new_path="$unix_path"
36727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36729     new_path="$unix_path"
36730   fi
36731 
36732 
36733   # Now try to locate executable using which
36734   new_path=`$WHICH "$new_path" 2> /dev/null`
36735 
36736   if test "x$new_path" = x; then
36737     # Oops. Which didn't find the executable.
36738     # The splitting of arguments from the executable at a space might have been incorrect,
36739     # since paths with space are more likely in Windows. Give it another try with the whole
36740     # argument.
36741     path="$complete"
36742     arguments="EOL"
36743     new_path="$path"
36744 
36745   windows_path="$new_path"
36746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36747     unix_path=`$CYGPATH -u "$windows_path"`
36748     new_path="$unix_path"
36749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36751     new_path="$unix_path"
36752   fi
36753 
36754 
36755     new_path=`$WHICH "$new_path" 2> /dev/null`
36756 
36757     if test "x$new_path" = x; then
36758       # It's still not found. Now this is an unrecoverable error.
36759       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36760 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36761       has_space=`$ECHO "$complete" | $GREP " "`
36762       if test "x$has_space" != x; then
36763         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36764 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36765       fi
36766       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36767     fi
36768   fi
36769 
36770   # Now new_path has a complete unix path to the binary
36771   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36772     # Keep paths in /bin as-is, but remove trailing .exe if any
36773     new_path="${new_path/%.exe/}"
36774     # Do not save /bin paths to all_fixpath_prefixes!
36775   else
36776     # Not in mixed or Windows style, start by that.
36777     new_path=`cmd //c echo $new_path`
36778 
36779   input_path="$new_path"
36780   # Check if we need to convert this using DOS-style short mode. If the path
36781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36782   # take no chances and rewrite it.
36783   # Note: m4 eats our [], so we need to use [ and ] instead.
36784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36785   if test "x$has_forbidden_chars" != x; then
36786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36787     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36788   fi
36789 
36790     # Output is in $new_path
36791 
36792   windows_path="$new_path"
36793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36794     unix_path=`$CYGPATH -u "$windows_path"`
36795     new_path="$unix_path"
36796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36798     new_path="$unix_path"
36799   fi
36800 
36801     # remove trailing .exe if any
36802     new_path="${new_path/%.exe/}"
36803 
36804     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36805     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36806   fi
36807 
36808   else
36809     # We're on a posix platform. Hooray! :)
36810     # First separate the path from the arguments. This will split at the first
36811     # space.
36812     complete="$NM"
36813     path="${complete%% *}"
36814     tmp="$complete EOL"
36815     arguments="${tmp#* }"
36816 
36817     # Cannot rely on the command "which" here since it doesn't always work.
36818     is_absolute_path=`$ECHO "$path" | $GREP ^/`
36819     if test -z "$is_absolute_path"; then
36820       # Path to executable is not absolute. Find it.
36821       IFS_save="$IFS"
36822       IFS=:
36823       for p in $PATH; do
36824         if test -f "$p/$path" && test -x "$p/$path"; then
36825           new_path="$p/$path"
36826           break
36827         fi
36828       done
36829       IFS="$IFS_save"
36830     else
36831       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
36832 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
36833       new_path="$path"
36834     fi
36835 
36836     if test "x$new_path" = x; then
36837       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36838 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36839       has_space=`$ECHO "$complete" | $GREP " "`
36840       if test "x$has_space" != x; then
36841         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36842 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36843       fi
36844       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36845     fi
36846   fi
36847 
36848   # Now join together the path and the arguments once again
36849   if test "x$arguments" != xEOL; then
36850     new_complete="$new_path ${arguments% *}"
36851   else
36852     new_complete="$new_path"
36853   fi
36854 
36855   if test "x$complete" != "x$new_complete"; then
36856     NM="$new_complete"
36857     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36858 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36859   fi
36860 
36861 
36862 
36863   # Publish this variable in the help.
36864 
36865 
36866   if test "x$GNM" = x; then
36867     # The variable is not set by user, try to locate tool using the code snippet
36868     for ac_prog in gnm
36869 do
36870   # Extract the first word of "$ac_prog", so it can be a program name with args.
36871 set dummy $ac_prog; ac_word=$2
36872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36873 $as_echo_n "checking for $ac_word... " >&6; }
36874 if ${ac_cv_path_GNM+:} false; then :
36875   $as_echo_n "(cached) " >&6
36876 else
36877   case $GNM in
36878   [\\/]* | ?:[\\/]*)
36879   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36880   ;;
36881   *)
36882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36883 for as_dir in $PATH
36884 do
36885   IFS=$as_save_IFS
36886   test -z "$as_dir" && as_dir=.
36887     for ac_exec_ext in '' $ac_executable_extensions; do
36888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36889     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36891     break 2
36892   fi
36893 done
36894   done
36895 IFS=$as_save_IFS
36896 
36897   ;;
36898 esac
36899 fi
36900 GNM=$ac_cv_path_GNM
36901 if test -n "$GNM"; then
36902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36903 $as_echo "$GNM" >&6; }
36904 else
36905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36906 $as_echo "no" >&6; }
36907 fi
36908 
36909 
36910   test -n "$GNM" && break
36911 done
36912 
36913   else
36914     # The variable is set, but is it from the command line or the environment?
36915 
36916     # Try to remove the string !GNM! from our list.
36917     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36918     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36919       # If it failed, the variable was not from the command line. Ignore it,
36920       # but warn the user (except for BASH, which is always set by the calling BASH).
36921       if test "xGNM" != xBASH; then
36922         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36923 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36924       fi
36925       # Try to locate tool using the code snippet
36926       for ac_prog in gnm
36927 do
36928   # Extract the first word of "$ac_prog", so it can be a program name with args.
36929 set dummy $ac_prog; ac_word=$2
36930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36931 $as_echo_n "checking for $ac_word... " >&6; }
36932 if ${ac_cv_path_GNM+:} false; then :
36933   $as_echo_n "(cached) " >&6
36934 else
36935   case $GNM in
36936   [\\/]* | ?:[\\/]*)
36937   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36938   ;;
36939   *)
36940   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36941 for as_dir in $PATH
36942 do
36943   IFS=$as_save_IFS
36944   test -z "$as_dir" && as_dir=.
36945     for ac_exec_ext in '' $ac_executable_extensions; do
36946   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36947     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36948     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36949     break 2
36950   fi
36951 done
36952   done
36953 IFS=$as_save_IFS
36954 
36955   ;;
36956 esac
36957 fi
36958 GNM=$ac_cv_path_GNM
36959 if test -n "$GNM"; then
36960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36961 $as_echo "$GNM" >&6; }
36962 else
36963   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36964 $as_echo "no" >&6; }
36965 fi
36966 
36967 
36968   test -n "$GNM" && break
36969 done
36970 
36971     else
36972       # If it succeeded, then it was overridden by the user. We will use it
36973       # for the tool.
36974 
36975       # First remove it from the list of overridden variables, so we can test
36976       # for unknown variables in the end.
36977       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36978 
36979       # Check if the provided tool contains a complete path.
36980       tool_specified="$GNM"
36981       tool_basename="${tool_specified##*/}"
36982       if test "x$tool_basename" = "x$tool_specified"; then
36983         # A command without a complete path is provided, search $PATH.
36984         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36985 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36986         # Extract the first word of "$tool_basename", so it can be a program name with args.
36987 set dummy $tool_basename; ac_word=$2
36988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36989 $as_echo_n "checking for $ac_word... " >&6; }
36990 if ${ac_cv_path_GNM+:} false; then :
36991   $as_echo_n "(cached) " >&6
36992 else
36993   case $GNM in
36994   [\\/]* | ?:[\\/]*)
36995   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36996   ;;
36997   *)
36998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36999 for as_dir in $PATH
37000 do
37001   IFS=$as_save_IFS
37002   test -z "$as_dir" && as_dir=.
37003     for ac_exec_ext in '' $ac_executable_extensions; do
37004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37005     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
37006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37007     break 2
37008   fi
37009 done
37010   done
37011 IFS=$as_save_IFS
37012 
37013   ;;
37014 esac
37015 fi
37016 GNM=$ac_cv_path_GNM
37017 if test -n "$GNM"; then
37018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
37019 $as_echo "$GNM" >&6; }
37020 else
37021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37022 $as_echo "no" >&6; }
37023 fi
37024 
37025 
37026         if test "x$GNM" = x; then
37027           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37028         fi
37029       else
37030         # Otherwise we believe it is a complete path. Use it as it is.
37031         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
37032 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
37033         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
37034 $as_echo_n "checking for GNM... " >&6; }
37035         if test ! -x "$tool_specified"; then
37036           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37037 $as_echo "not found" >&6; }
37038           as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
37039         fi
37040         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37041 $as_echo "$tool_specified" >&6; }
37042       fi
37043     fi
37044   fi
37045 
37046 
37047 
37048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37049 
37050   # First separate the path from the arguments. This will split at the first
37051   # space.
37052   complete="$GNM"
37053   path="${complete%% *}"
37054   tmp="$complete EOL"
37055   arguments="${tmp#* }"
37056 
37057   # Input might be given as Windows format, start by converting to
37058   # unix format.
37059   new_path=`$CYGPATH -u "$path"`
37060 
37061   # Now try to locate executable using which
37062   new_path=`$WHICH "$new_path" 2> /dev/null`
37063   # bat and cmd files are not always considered executable in cygwin causing which
37064   # to not find them
37065   if test "x$new_path" = x \
37066       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37067       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37068     new_path=`$CYGPATH -u "$path"`
37069   fi
37070   if test "x$new_path" = x; then
37071     # Oops. Which didn't find the executable.
37072     # The splitting of arguments from the executable at a space might have been incorrect,
37073     # since paths with space are more likely in Windows. Give it another try with the whole
37074     # argument.
37075     path="$complete"
37076     arguments="EOL"
37077     new_path=`$CYGPATH -u "$path"`
37078     new_path=`$WHICH "$new_path" 2> /dev/null`
37079     # bat and cmd files are not always considered executable in cygwin causing which
37080     # to not find them
37081     if test "x$new_path" = x \
37082         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37083         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37084       new_path=`$CYGPATH -u "$path"`
37085     fi
37086     if test "x$new_path" = x; then
37087       # It's still not found. Now this is an unrecoverable error.
37088       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37089 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37090       has_space=`$ECHO "$complete" | $GREP " "`
37091       if test "x$has_space" != x; then
37092         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37093 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37094       fi
37095       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37096     fi
37097   fi
37098 
37099   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37100   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37101   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37102   # "foo.exe" is OK but "foo" is an error.
37103   #
37104   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37105   # It is also a way to make sure we got the proper file name for the real test later on.
37106   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37107   if test "x$test_shortpath" = x; then
37108     # Short path failed, file does not exist as specified.
37109     # Try adding .exe or .cmd
37110     if test -f "${new_path}.exe"; then
37111       input_to_shortpath="${new_path}.exe"
37112     elif test -f "${new_path}.cmd"; then
37113       input_to_shortpath="${new_path}.cmd"
37114     else
37115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
37116 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
37117       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37118 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37119       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37120     fi
37121   else
37122     input_to_shortpath="$new_path"
37123   fi
37124 
37125   # Call helper function which possibly converts this using DOS-style short mode.
37126   # If so, the updated path is stored in $new_path.
37127   new_path="$input_to_shortpath"
37128 
37129   input_path="$input_to_shortpath"
37130   # Check if we need to convert this using DOS-style short mode. If the path
37131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37132   # take no chances and rewrite it.
37133   # Note: m4 eats our [], so we need to use [ and ] instead.
37134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37135   if test "x$has_forbidden_chars" != x; then
37136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37137     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37138     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37139     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37140       # Going to short mode and back again did indeed matter. Since short mode is
37141       # case insensitive, let's make it lowercase to improve readability.
37142       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37143       # Now convert it back to Unix-stile (cygpath)
37144       input_path=`$CYGPATH -u "$shortmode_path"`
37145       new_path="$input_path"
37146     fi
37147   fi
37148 
37149   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37150   if test "x$test_cygdrive_prefix" = x; then
37151     # As a simple fix, exclude /usr/bin since it's not a real path.
37152     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37153       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37154       # a path prefixed by /cygdrive for fixpath to work.
37155       new_path="$CYGWIN_ROOT_PATH$input_path"
37156     fi
37157   fi
37158 
37159   # remove trailing .exe if any
37160   new_path="${new_path/%.exe/}"
37161 
37162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37163 
37164   # First separate the path from the arguments. This will split at the first
37165   # space.
37166   complete="$GNM"
37167   path="${complete%% *}"
37168   tmp="$complete EOL"
37169   arguments="${tmp#* }"
37170 
37171   # Input might be given as Windows format, start by converting to
37172   # unix format.
37173   new_path="$path"
37174 
37175   windows_path="$new_path"
37176   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37177     unix_path=`$CYGPATH -u "$windows_path"`
37178     new_path="$unix_path"
37179   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37180     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37181     new_path="$unix_path"
37182   fi
37183 
37184 
37185   # Now try to locate executable using which
37186   new_path=`$WHICH "$new_path" 2> /dev/null`
37187 
37188   if test "x$new_path" = x; then
37189     # Oops. Which didn't find the executable.
37190     # The splitting of arguments from the executable at a space might have been incorrect,
37191     # since paths with space are more likely in Windows. Give it another try with the whole
37192     # argument.
37193     path="$complete"
37194     arguments="EOL"
37195     new_path="$path"
37196 
37197   windows_path="$new_path"
37198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37199     unix_path=`$CYGPATH -u "$windows_path"`
37200     new_path="$unix_path"
37201   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37202     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37203     new_path="$unix_path"
37204   fi
37205 
37206 
37207     new_path=`$WHICH "$new_path" 2> /dev/null`
37208 
37209     if test "x$new_path" = x; then
37210       # It's still not found. Now this is an unrecoverable error.
37211       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37212 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37213       has_space=`$ECHO "$complete" | $GREP " "`
37214       if test "x$has_space" != x; then
37215         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37216 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37217       fi
37218       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37219     fi
37220   fi
37221 
37222   # Now new_path has a complete unix path to the binary
37223   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37224     # Keep paths in /bin as-is, but remove trailing .exe if any
37225     new_path="${new_path/%.exe/}"
37226     # Do not save /bin paths to all_fixpath_prefixes!
37227   else
37228     # Not in mixed or Windows style, start by that.
37229     new_path=`cmd //c echo $new_path`
37230 
37231   input_path="$new_path"
37232   # Check if we need to convert this using DOS-style short mode. If the path
37233   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37234   # take no chances and rewrite it.
37235   # Note: m4 eats our [], so we need to use [ and ] instead.
37236   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37237   if test "x$has_forbidden_chars" != x; then
37238     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37239     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37240   fi
37241 
37242     # Output is in $new_path
37243 
37244   windows_path="$new_path"
37245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37246     unix_path=`$CYGPATH -u "$windows_path"`
37247     new_path="$unix_path"
37248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37250     new_path="$unix_path"
37251   fi
37252 
37253     # remove trailing .exe if any
37254     new_path="${new_path/%.exe/}"
37255 
37256     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37257     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37258   fi
37259 
37260   else
37261     # We're on a posix platform. Hooray! :)
37262     # First separate the path from the arguments. This will split at the first
37263     # space.
37264     complete="$GNM"
37265     path="${complete%% *}"
37266     tmp="$complete EOL"
37267     arguments="${tmp#* }"
37268 
37269     # Cannot rely on the command "which" here since it doesn't always work.
37270     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37271     if test -z "$is_absolute_path"; then
37272       # Path to executable is not absolute. Find it.
37273       IFS_save="$IFS"
37274       IFS=:
37275       for p in $PATH; do
37276         if test -f "$p/$path" && test -x "$p/$path"; then
37277           new_path="$p/$path"
37278           break
37279         fi
37280       done
37281       IFS="$IFS_save"
37282     else
37283       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
37284 $as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
37285       new_path="$path"
37286     fi
37287 
37288     if test "x$new_path" = x; then
37289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
37290 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
37291       has_space=`$ECHO "$complete" | $GREP " "`
37292       if test "x$has_space" != x; then
37293         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37294 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37295       fi
37296       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
37297     fi
37298   fi
37299 
37300   # Now join together the path and the arguments once again
37301   if test "x$arguments" != xEOL; then
37302     new_complete="$new_path ${arguments% *}"
37303   else
37304     new_complete="$new_path"
37305   fi
37306 
37307   if test "x$complete" != "x$new_complete"; then
37308     GNM="$new_complete"
37309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
37310 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
37311   fi
37312 
37313 
37314 
37315   # Publish this variable in the help.
37316 
37317 
37318   if test "x$STRIP" = x; then
37319     # The variable is not set by user, try to locate tool using the code snippet
37320     for ac_prog in strip
37321 do
37322   # Extract the first word of "$ac_prog", so it can be a program name with args.
37323 set dummy $ac_prog; ac_word=$2
37324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37325 $as_echo_n "checking for $ac_word... " >&6; }
37326 if ${ac_cv_path_STRIP+:} false; then :
37327   $as_echo_n "(cached) " >&6
37328 else
37329   case $STRIP in
37330   [\\/]* | ?:[\\/]*)
37331   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37332   ;;
37333   *)
37334   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37335 for as_dir in $PATH
37336 do
37337   IFS=$as_save_IFS
37338   test -z "$as_dir" && as_dir=.
37339     for ac_exec_ext in '' $ac_executable_extensions; do
37340   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37341     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37342     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37343     break 2
37344   fi
37345 done
37346   done
37347 IFS=$as_save_IFS
37348 
37349   ;;
37350 esac
37351 fi
37352 STRIP=$ac_cv_path_STRIP
37353 if test -n "$STRIP"; then
37354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37355 $as_echo "$STRIP" >&6; }
37356 else
37357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37358 $as_echo "no" >&6; }
37359 fi
37360 
37361 
37362   test -n "$STRIP" && break
37363 done
37364 
37365   else
37366     # The variable is set, but is it from the command line or the environment?
37367 
37368     # Try to remove the string !STRIP! from our list.
37369     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37370     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37371       # If it failed, the variable was not from the command line. Ignore it,
37372       # but warn the user (except for BASH, which is always set by the calling BASH).
37373       if test "xSTRIP" != xBASH; then
37374         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37375 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37376       fi
37377       # Try to locate tool using the code snippet
37378       for ac_prog in strip
37379 do
37380   # Extract the first word of "$ac_prog", so it can be a program name with args.
37381 set dummy $ac_prog; ac_word=$2
37382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37383 $as_echo_n "checking for $ac_word... " >&6; }
37384 if ${ac_cv_path_STRIP+:} false; then :
37385   $as_echo_n "(cached) " >&6
37386 else
37387   case $STRIP in
37388   [\\/]* | ?:[\\/]*)
37389   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37390   ;;
37391   *)
37392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37393 for as_dir in $PATH
37394 do
37395   IFS=$as_save_IFS
37396   test -z "$as_dir" && as_dir=.
37397     for ac_exec_ext in '' $ac_executable_extensions; do
37398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37399     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37401     break 2
37402   fi
37403 done
37404   done
37405 IFS=$as_save_IFS
37406 
37407   ;;
37408 esac
37409 fi
37410 STRIP=$ac_cv_path_STRIP
37411 if test -n "$STRIP"; then
37412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37413 $as_echo "$STRIP" >&6; }
37414 else
37415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37416 $as_echo "no" >&6; }
37417 fi
37418 
37419 
37420   test -n "$STRIP" && break
37421 done
37422 
37423     else
37424       # If it succeeded, then it was overridden by the user. We will use it
37425       # for the tool.
37426 
37427       # First remove it from the list of overridden variables, so we can test
37428       # for unknown variables in the end.
37429       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37430 
37431       # Check if the provided tool contains a complete path.
37432       tool_specified="$STRIP"
37433       tool_basename="${tool_specified##*/}"
37434       if test "x$tool_basename" = "x$tool_specified"; then
37435         # A command without a complete path is provided, search $PATH.
37436         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37437 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37438         # Extract the first word of "$tool_basename", so it can be a program name with args.
37439 set dummy $tool_basename; ac_word=$2
37440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37441 $as_echo_n "checking for $ac_word... " >&6; }
37442 if ${ac_cv_path_STRIP+:} false; then :
37443   $as_echo_n "(cached) " >&6
37444 else
37445   case $STRIP in
37446   [\\/]* | ?:[\\/]*)
37447   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37448   ;;
37449   *)
37450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37451 for as_dir in $PATH
37452 do
37453   IFS=$as_save_IFS
37454   test -z "$as_dir" && as_dir=.
37455     for ac_exec_ext in '' $ac_executable_extensions; do
37456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37457     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37459     break 2
37460   fi
37461 done
37462   done
37463 IFS=$as_save_IFS
37464 
37465   ;;
37466 esac
37467 fi
37468 STRIP=$ac_cv_path_STRIP
37469 if test -n "$STRIP"; then
37470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37471 $as_echo "$STRIP" >&6; }
37472 else
37473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37474 $as_echo "no" >&6; }
37475 fi
37476 
37477 
37478         if test "x$STRIP" = x; then
37479           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37480         fi
37481       else
37482         # Otherwise we believe it is a complete path. Use it as it is.
37483         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37484 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37485         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37486 $as_echo_n "checking for STRIP... " >&6; }
37487         if test ! -x "$tool_specified"; then
37488           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37489 $as_echo "not found" >&6; }
37490           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37491         fi
37492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37493 $as_echo "$tool_specified" >&6; }
37494       fi
37495     fi
37496   fi
37497 
37498 
37499 
37500   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37501 
37502   # First separate the path from the arguments. This will split at the first
37503   # space.
37504   complete="$STRIP"
37505   path="${complete%% *}"
37506   tmp="$complete EOL"
37507   arguments="${tmp#* }"
37508 
37509   # Input might be given as Windows format, start by converting to
37510   # unix format.
37511   new_path=`$CYGPATH -u "$path"`
37512 
37513   # Now try to locate executable using which
37514   new_path=`$WHICH "$new_path" 2> /dev/null`
37515   # bat and cmd files are not always considered executable in cygwin causing which
37516   # to not find them
37517   if test "x$new_path" = x \
37518       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37519       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37520     new_path=`$CYGPATH -u "$path"`
37521   fi
37522   if test "x$new_path" = x; then
37523     # Oops. Which didn't find the executable.
37524     # The splitting of arguments from the executable at a space might have been incorrect,
37525     # since paths with space are more likely in Windows. Give it another try with the whole
37526     # argument.
37527     path="$complete"
37528     arguments="EOL"
37529     new_path=`$CYGPATH -u "$path"`
37530     new_path=`$WHICH "$new_path" 2> /dev/null`
37531     # bat and cmd files are not always considered executable in cygwin causing which
37532     # to not find them
37533     if test "x$new_path" = x \
37534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37536       new_path=`$CYGPATH -u "$path"`
37537     fi
37538     if test "x$new_path" = x; then
37539       # It's still not found. Now this is an unrecoverable error.
37540       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37541 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37542       has_space=`$ECHO "$complete" | $GREP " "`
37543       if test "x$has_space" != x; then
37544         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37545 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37546       fi
37547       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37548     fi
37549   fi
37550 
37551   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37552   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37553   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37554   # "foo.exe" is OK but "foo" is an error.
37555   #
37556   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37557   # It is also a way to make sure we got the proper file name for the real test later on.
37558   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37559   if test "x$test_shortpath" = x; then
37560     # Short path failed, file does not exist as specified.
37561     # Try adding .exe or .cmd
37562     if test -f "${new_path}.exe"; then
37563       input_to_shortpath="${new_path}.exe"
37564     elif test -f "${new_path}.cmd"; then
37565       input_to_shortpath="${new_path}.cmd"
37566     else
37567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37568 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37569       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37570 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37571       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37572     fi
37573   else
37574     input_to_shortpath="$new_path"
37575   fi
37576 
37577   # Call helper function which possibly converts this using DOS-style short mode.
37578   # If so, the updated path is stored in $new_path.
37579   new_path="$input_to_shortpath"
37580 
37581   input_path="$input_to_shortpath"
37582   # Check if we need to convert this using DOS-style short mode. If the path
37583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37584   # take no chances and rewrite it.
37585   # Note: m4 eats our [], so we need to use [ and ] instead.
37586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37587   if test "x$has_forbidden_chars" != x; then
37588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37589     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37590     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37591     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37592       # Going to short mode and back again did indeed matter. Since short mode is
37593       # case insensitive, let's make it lowercase to improve readability.
37594       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37595       # Now convert it back to Unix-stile (cygpath)
37596       input_path=`$CYGPATH -u "$shortmode_path"`
37597       new_path="$input_path"
37598     fi
37599   fi
37600 
37601   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37602   if test "x$test_cygdrive_prefix" = x; then
37603     # As a simple fix, exclude /usr/bin since it's not a real path.
37604     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37605       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37606       # a path prefixed by /cygdrive for fixpath to work.
37607       new_path="$CYGWIN_ROOT_PATH$input_path"
37608     fi
37609   fi
37610 
37611   # remove trailing .exe if any
37612   new_path="${new_path/%.exe/}"
37613 
37614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37615 
37616   # First separate the path from the arguments. This will split at the first
37617   # space.
37618   complete="$STRIP"
37619   path="${complete%% *}"
37620   tmp="$complete EOL"
37621   arguments="${tmp#* }"
37622 
37623   # Input might be given as Windows format, start by converting to
37624   # unix format.
37625   new_path="$path"
37626 
37627   windows_path="$new_path"
37628   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37629     unix_path=`$CYGPATH -u "$windows_path"`
37630     new_path="$unix_path"
37631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37632     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37633     new_path="$unix_path"
37634   fi
37635 
37636 
37637   # Now try to locate executable using which
37638   new_path=`$WHICH "$new_path" 2> /dev/null`
37639 
37640   if test "x$new_path" = x; then
37641     # Oops. Which didn't find the executable.
37642     # The splitting of arguments from the executable at a space might have been incorrect,
37643     # since paths with space are more likely in Windows. Give it another try with the whole
37644     # argument.
37645     path="$complete"
37646     arguments="EOL"
37647     new_path="$path"
37648 
37649   windows_path="$new_path"
37650   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37651     unix_path=`$CYGPATH -u "$windows_path"`
37652     new_path="$unix_path"
37653   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37654     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37655     new_path="$unix_path"
37656   fi
37657 
37658 
37659     new_path=`$WHICH "$new_path" 2> /dev/null`
37660 
37661     if test "x$new_path" = x; then
37662       # It's still not found. Now this is an unrecoverable error.
37663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37664 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37665       has_space=`$ECHO "$complete" | $GREP " "`
37666       if test "x$has_space" != x; then
37667         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37668 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37669       fi
37670       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37671     fi
37672   fi
37673 
37674   # Now new_path has a complete unix path to the binary
37675   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37676     # Keep paths in /bin as-is, but remove trailing .exe if any
37677     new_path="${new_path/%.exe/}"
37678     # Do not save /bin paths to all_fixpath_prefixes!
37679   else
37680     # Not in mixed or Windows style, start by that.
37681     new_path=`cmd //c echo $new_path`
37682 
37683   input_path="$new_path"
37684   # Check if we need to convert this using DOS-style short mode. If the path
37685   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37686   # take no chances and rewrite it.
37687   # Note: m4 eats our [], so we need to use [ and ] instead.
37688   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37689   if test "x$has_forbidden_chars" != x; then
37690     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37691     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37692   fi
37693 
37694     # Output is in $new_path
37695 
37696   windows_path="$new_path"
37697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37698     unix_path=`$CYGPATH -u "$windows_path"`
37699     new_path="$unix_path"
37700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37702     new_path="$unix_path"
37703   fi
37704 
37705     # remove trailing .exe if any
37706     new_path="${new_path/%.exe/}"
37707 
37708     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37709     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37710   fi
37711 
37712   else
37713     # We're on a posix platform. Hooray! :)
37714     # First separate the path from the arguments. This will split at the first
37715     # space.
37716     complete="$STRIP"
37717     path="${complete%% *}"
37718     tmp="$complete EOL"
37719     arguments="${tmp#* }"
37720 
37721     # Cannot rely on the command "which" here since it doesn't always work.
37722     is_absolute_path=`$ECHO "$path" | $GREP ^/`
37723     if test -z "$is_absolute_path"; then
37724       # Path to executable is not absolute. Find it.
37725       IFS_save="$IFS"
37726       IFS=:
37727       for p in $PATH; do
37728         if test -f "$p/$path" && test -x "$p/$path"; then
37729           new_path="$p/$path"
37730           break
37731         fi
37732       done
37733       IFS="$IFS_save"
37734     else
37735       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
37736 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
37737       new_path="$path"
37738     fi
37739 
37740     if test "x$new_path" = x; then
37741       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37742 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37743       has_space=`$ECHO "$complete" | $GREP " "`
37744       if test "x$has_space" != x; then
37745         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37746 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37747       fi
37748       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37749     fi
37750   fi
37751 
37752   # Now join together the path and the arguments once again
37753   if test "x$arguments" != xEOL; then
37754     new_complete="$new_path ${arguments% *}"
37755   else
37756     new_complete="$new_path"
37757   fi
37758 
37759   if test "x$complete" != "x$new_complete"; then
37760     STRIP="$new_complete"
37761     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37762 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37763   fi
37764 
37765 
37766 
37767   # Publish this variable in the help.
37768 
37769 
37770   if test "x$MCS" = x; then
37771     # The variable is not set by user, try to locate tool using the code snippet
37772     for ac_prog in mcs
37773 do
37774   # Extract the first word of "$ac_prog", so it can be a program name with args.
37775 set dummy $ac_prog; ac_word=$2
37776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37777 $as_echo_n "checking for $ac_word... " >&6; }
37778 if ${ac_cv_path_MCS+:} false; then :
37779   $as_echo_n "(cached) " >&6
37780 else
37781   case $MCS in
37782   [\\/]* | ?:[\\/]*)
37783   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37784   ;;
37785   *)
37786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37787 for as_dir in $PATH
37788 do
37789   IFS=$as_save_IFS
37790   test -z "$as_dir" && as_dir=.
37791     for ac_exec_ext in '' $ac_executable_extensions; do
37792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37793     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37795     break 2
37796   fi
37797 done
37798   done
37799 IFS=$as_save_IFS
37800 
37801   ;;
37802 esac
37803 fi
37804 MCS=$ac_cv_path_MCS
37805 if test -n "$MCS"; then
37806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37807 $as_echo "$MCS" >&6; }
37808 else
37809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37810 $as_echo "no" >&6; }
37811 fi
37812 
37813 
37814   test -n "$MCS" && break
37815 done
37816 
37817   else
37818     # The variable is set, but is it from the command line or the environment?
37819 
37820     # Try to remove the string !MCS! from our list.
37821     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
37822     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37823       # If it failed, the variable was not from the command line. Ignore it,
37824       # but warn the user (except for BASH, which is always set by the calling BASH).
37825       if test "xMCS" != xBASH; then
37826         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
37827 $as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
37828       fi
37829       # Try to locate tool using the code snippet
37830       for ac_prog in mcs
37831 do
37832   # Extract the first word of "$ac_prog", so it can be a program name with args.
37833 set dummy $ac_prog; ac_word=$2
37834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37835 $as_echo_n "checking for $ac_word... " >&6; }
37836 if ${ac_cv_path_MCS+:} false; then :
37837   $as_echo_n "(cached) " >&6
37838 else
37839   case $MCS in
37840   [\\/]* | ?:[\\/]*)
37841   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37842   ;;
37843   *)
37844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37845 for as_dir in $PATH
37846 do
37847   IFS=$as_save_IFS
37848   test -z "$as_dir" && as_dir=.
37849     for ac_exec_ext in '' $ac_executable_extensions; do
37850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37851     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37853     break 2
37854   fi
37855 done
37856   done
37857 IFS=$as_save_IFS
37858 
37859   ;;
37860 esac
37861 fi
37862 MCS=$ac_cv_path_MCS
37863 if test -n "$MCS"; then
37864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37865 $as_echo "$MCS" >&6; }
37866 else
37867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37868 $as_echo "no" >&6; }
37869 fi
37870 
37871 
37872   test -n "$MCS" && break
37873 done
37874 
37875     else
37876       # If it succeeded, then it was overridden by the user. We will use it
37877       # for the tool.
37878 
37879       # First remove it from the list of overridden variables, so we can test
37880       # for unknown variables in the end.
37881       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37882 
37883       # Check if the provided tool contains a complete path.
37884       tool_specified="$MCS"
37885       tool_basename="${tool_specified##*/}"
37886       if test "x$tool_basename" = "x$tool_specified"; then
37887         # A command without a complete path is provided, search $PATH.
37888         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
37889 $as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
37890         # Extract the first word of "$tool_basename", so it can be a program name with args.
37891 set dummy $tool_basename; ac_word=$2
37892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37893 $as_echo_n "checking for $ac_word... " >&6; }
37894 if ${ac_cv_path_MCS+:} false; then :
37895   $as_echo_n "(cached) " >&6
37896 else
37897   case $MCS in
37898   [\\/]* | ?:[\\/]*)
37899   ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
37900   ;;
37901   *)
37902   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37903 for as_dir in $PATH
37904 do
37905   IFS=$as_save_IFS
37906   test -z "$as_dir" && as_dir=.
37907     for ac_exec_ext in '' $ac_executable_extensions; do
37908   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37909     ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
37910     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37911     break 2
37912   fi
37913 done
37914   done
37915 IFS=$as_save_IFS
37916 
37917   ;;
37918 esac
37919 fi
37920 MCS=$ac_cv_path_MCS
37921 if test -n "$MCS"; then
37922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
37923 $as_echo "$MCS" >&6; }
37924 else
37925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37926 $as_echo "no" >&6; }
37927 fi
37928 
37929 
37930         if test "x$MCS" = x; then
37931           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37932         fi
37933       else
37934         # Otherwise we believe it is a complete path. Use it as it is.
37935         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
37936 $as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
37937         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
37938 $as_echo_n "checking for MCS... " >&6; }
37939         if test ! -x "$tool_specified"; then
37940           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37941 $as_echo "not found" >&6; }
37942           as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
37943         fi
37944         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37945 $as_echo "$tool_specified" >&6; }
37946       fi
37947     fi
37948   fi
37949 
37950 
37951 
37952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37953 
37954   # First separate the path from the arguments. This will split at the first
37955   # space.
37956   complete="$MCS"
37957   path="${complete%% *}"
37958   tmp="$complete EOL"
37959   arguments="${tmp#* }"
37960 
37961   # Input might be given as Windows format, start by converting to
37962   # unix format.
37963   new_path=`$CYGPATH -u "$path"`
37964 
37965   # Now try to locate executable using which
37966   new_path=`$WHICH "$new_path" 2> /dev/null`
37967   # bat and cmd files are not always considered executable in cygwin causing which
37968   # to not find them
37969   if test "x$new_path" = x \
37970       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37971       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37972     new_path=`$CYGPATH -u "$path"`
37973   fi
37974   if test "x$new_path" = x; then
37975     # Oops. Which didn't find the executable.
37976     # The splitting of arguments from the executable at a space might have been incorrect,
37977     # since paths with space are more likely in Windows. Give it another try with the whole
37978     # argument.
37979     path="$complete"
37980     arguments="EOL"
37981     new_path=`$CYGPATH -u "$path"`
37982     new_path=`$WHICH "$new_path" 2> /dev/null`
37983     # bat and cmd files are not always considered executable in cygwin causing which
37984     # to not find them
37985     if test "x$new_path" = x \
37986         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37987         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37988       new_path=`$CYGPATH -u "$path"`
37989     fi
37990     if test "x$new_path" = x; then
37991       # It's still not found. Now this is an unrecoverable error.
37992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
37993 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
37994       has_space=`$ECHO "$complete" | $GREP " "`
37995       if test "x$has_space" != x; then
37996         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37997 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37998       fi
37999       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38000     fi
38001   fi
38002 
38003   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38004   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38005   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38006   # "foo.exe" is OK but "foo" is an error.
38007   #
38008   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38009   # It is also a way to make sure we got the proper file name for the real test later on.
38010   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38011   if test "x$test_shortpath" = x; then
38012     # Short path failed, file does not exist as specified.
38013     # Try adding .exe or .cmd
38014     if test -f "${new_path}.exe"; then
38015       input_to_shortpath="${new_path}.exe"
38016     elif test -f "${new_path}.cmd"; then
38017       input_to_shortpath="${new_path}.cmd"
38018     else
38019       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
38020 $as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
38021       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38022 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38023       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38024     fi
38025   else
38026     input_to_shortpath="$new_path"
38027   fi
38028 
38029   # Call helper function which possibly converts this using DOS-style short mode.
38030   # If so, the updated path is stored in $new_path.
38031   new_path="$input_to_shortpath"
38032 
38033   input_path="$input_to_shortpath"
38034   # Check if we need to convert this using DOS-style short mode. If the path
38035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38036   # take no chances and rewrite it.
38037   # Note: m4 eats our [], so we need to use [ and ] instead.
38038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38039   if test "x$has_forbidden_chars" != x; then
38040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38041     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38042     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38043     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38044       # Going to short mode and back again did indeed matter. Since short mode is
38045       # case insensitive, let's make it lowercase to improve readability.
38046       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38047       # Now convert it back to Unix-stile (cygpath)
38048       input_path=`$CYGPATH -u "$shortmode_path"`
38049       new_path="$input_path"
38050     fi
38051   fi
38052 
38053   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38054   if test "x$test_cygdrive_prefix" = x; then
38055     # As a simple fix, exclude /usr/bin since it's not a real path.
38056     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38057       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38058       # a path prefixed by /cygdrive for fixpath to work.
38059       new_path="$CYGWIN_ROOT_PATH$input_path"
38060     fi
38061   fi
38062 
38063   # remove trailing .exe if any
38064   new_path="${new_path/%.exe/}"
38065 
38066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38067 
38068   # First separate the path from the arguments. This will split at the first
38069   # space.
38070   complete="$MCS"
38071   path="${complete%% *}"
38072   tmp="$complete EOL"
38073   arguments="${tmp#* }"
38074 
38075   # Input might be given as Windows format, start by converting to
38076   # unix format.
38077   new_path="$path"
38078 
38079   windows_path="$new_path"
38080   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38081     unix_path=`$CYGPATH -u "$windows_path"`
38082     new_path="$unix_path"
38083   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38084     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38085     new_path="$unix_path"
38086   fi
38087 
38088 
38089   # Now try to locate executable using which
38090   new_path=`$WHICH "$new_path" 2> /dev/null`
38091 
38092   if test "x$new_path" = x; then
38093     # Oops. Which didn't find the executable.
38094     # The splitting of arguments from the executable at a space might have been incorrect,
38095     # since paths with space are more likely in Windows. Give it another try with the whole
38096     # argument.
38097     path="$complete"
38098     arguments="EOL"
38099     new_path="$path"
38100 
38101   windows_path="$new_path"
38102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38103     unix_path=`$CYGPATH -u "$windows_path"`
38104     new_path="$unix_path"
38105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38107     new_path="$unix_path"
38108   fi
38109 
38110 
38111     new_path=`$WHICH "$new_path" 2> /dev/null`
38112 
38113     if test "x$new_path" = x; then
38114       # It's still not found. Now this is an unrecoverable error.
38115       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38116 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38117       has_space=`$ECHO "$complete" | $GREP " "`
38118       if test "x$has_space" != x; then
38119         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38120 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38121       fi
38122       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38123     fi
38124   fi
38125 
38126   # Now new_path has a complete unix path to the binary
38127   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38128     # Keep paths in /bin as-is, but remove trailing .exe if any
38129     new_path="${new_path/%.exe/}"
38130     # Do not save /bin paths to all_fixpath_prefixes!
38131   else
38132     # Not in mixed or Windows style, start by that.
38133     new_path=`cmd //c echo $new_path`
38134 
38135   input_path="$new_path"
38136   # Check if we need to convert this using DOS-style short mode. If the path
38137   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38138   # take no chances and rewrite it.
38139   # Note: m4 eats our [], so we need to use [ and ] instead.
38140   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38141   if test "x$has_forbidden_chars" != x; then
38142     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38143     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38144   fi
38145 
38146     # Output is in $new_path
38147 
38148   windows_path="$new_path"
38149   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38150     unix_path=`$CYGPATH -u "$windows_path"`
38151     new_path="$unix_path"
38152   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38153     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38154     new_path="$unix_path"
38155   fi
38156 
38157     # remove trailing .exe if any
38158     new_path="${new_path/%.exe/}"
38159 
38160     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38161     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38162   fi
38163 
38164   else
38165     # We're on a posix platform. Hooray! :)
38166     # First separate the path from the arguments. This will split at the first
38167     # space.
38168     complete="$MCS"
38169     path="${complete%% *}"
38170     tmp="$complete EOL"
38171     arguments="${tmp#* }"
38172 
38173     # Cannot rely on the command "which" here since it doesn't always work.
38174     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38175     if test -z "$is_absolute_path"; then
38176       # Path to executable is not absolute. Find it.
38177       IFS_save="$IFS"
38178       IFS=:
38179       for p in $PATH; do
38180         if test -f "$p/$path" && test -x "$p/$path"; then
38181           new_path="$p/$path"
38182           break
38183         fi
38184       done
38185       IFS="$IFS_save"
38186     else
38187       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
38188 $as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
38189       new_path="$path"
38190     fi
38191 
38192     if test "x$new_path" = x; then
38193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
38194 $as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
38195       has_space=`$ECHO "$complete" | $GREP " "`
38196       if test "x$has_space" != x; then
38197         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38198 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38199       fi
38200       as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
38201     fi
38202   fi
38203 
38204   # Now join together the path and the arguments once again
38205   if test "x$arguments" != xEOL; then
38206     new_complete="$new_path ${arguments% *}"
38207   else
38208     new_complete="$new_path"
38209   fi
38210 
38211   if test "x$complete" != "x$new_complete"; then
38212     MCS="$new_complete"
38213     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
38214 $as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
38215   fi
38216 
38217   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
38218 
38219 
38220   # Publish this variable in the help.
38221 
38222 
38223   if test "x$NM" = x; then
38224     # The variable is not set by user, try to locate tool using the code snippet
38225     if test -n "$ac_tool_prefix"; then
38226   for ac_prog in nm
38227   do
38228     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38229 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38231 $as_echo_n "checking for $ac_word... " >&6; }
38232 if ${ac_cv_prog_NM+:} false; then :
38233   $as_echo_n "(cached) " >&6
38234 else
38235   if test -n "$NM"; then
38236   ac_cv_prog_NM="$NM" # Let the user override the test.
38237 else
38238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38239 for as_dir in $PATH
38240 do
38241   IFS=$as_save_IFS
38242   test -z "$as_dir" && as_dir=.
38243     for ac_exec_ext in '' $ac_executable_extensions; do
38244   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38245     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38246     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38247     break 2
38248   fi
38249 done
38250   done
38251 IFS=$as_save_IFS
38252 
38253 fi
38254 fi
38255 NM=$ac_cv_prog_NM
38256 if test -n "$NM"; then
38257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38258 $as_echo "$NM" >&6; }
38259 else
38260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38261 $as_echo "no" >&6; }
38262 fi
38263 
38264 
38265     test -n "$NM" && break
38266   done
38267 fi
38268 if test -z "$NM"; then
38269   ac_ct_NM=$NM
38270   for ac_prog in nm
38271 do
38272   # Extract the first word of "$ac_prog", so it can be a program name with args.
38273 set dummy $ac_prog; ac_word=$2
38274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38275 $as_echo_n "checking for $ac_word... " >&6; }
38276 if ${ac_cv_prog_ac_ct_NM+:} false; then :
38277   $as_echo_n "(cached) " >&6
38278 else
38279   if test -n "$ac_ct_NM"; then
38280   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38281 else
38282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38283 for as_dir in $PATH
38284 do
38285   IFS=$as_save_IFS
38286   test -z "$as_dir" && as_dir=.
38287     for ac_exec_ext in '' $ac_executable_extensions; do
38288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38289     ac_cv_prog_ac_ct_NM="$ac_prog"
38290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38291     break 2
38292   fi
38293 done
38294   done
38295 IFS=$as_save_IFS
38296 
38297 fi
38298 fi
38299 ac_ct_NM=$ac_cv_prog_ac_ct_NM
38300 if test -n "$ac_ct_NM"; then
38301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38302 $as_echo "$ac_ct_NM" >&6; }
38303 else
38304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38305 $as_echo "no" >&6; }
38306 fi
38307 
38308 
38309   test -n "$ac_ct_NM" && break
38310 done
38311 
38312   if test "x$ac_ct_NM" = x; then
38313     NM=""
38314   else
38315     case $cross_compiling:$ac_tool_warned in
38316 yes:)
38317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38318 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38319 ac_tool_warned=yes ;;
38320 esac
38321     NM=$ac_ct_NM
38322   fi
38323 fi
38324 
38325   else
38326     # The variable is set, but is it from the command line or the environment?
38327 
38328     # Try to remove the string !NM! from our list.
38329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
38330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38331       # If it failed, the variable was not from the command line. Ignore it,
38332       # but warn the user (except for BASH, which is always set by the calling BASH).
38333       if test "xNM" != xBASH; then
38334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
38335 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
38336       fi
38337       # Try to locate tool using the code snippet
38338       if test -n "$ac_tool_prefix"; then
38339   for ac_prog in nm
38340   do
38341     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38342 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38344 $as_echo_n "checking for $ac_word... " >&6; }
38345 if ${ac_cv_prog_NM+:} false; then :
38346   $as_echo_n "(cached) " >&6
38347 else
38348   if test -n "$NM"; then
38349   ac_cv_prog_NM="$NM" # Let the user override the test.
38350 else
38351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38352 for as_dir in $PATH
38353 do
38354   IFS=$as_save_IFS
38355   test -z "$as_dir" && as_dir=.
38356     for ac_exec_ext in '' $ac_executable_extensions; do
38357   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38358     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
38359     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38360     break 2
38361   fi
38362 done
38363   done
38364 IFS=$as_save_IFS
38365 
38366 fi
38367 fi
38368 NM=$ac_cv_prog_NM
38369 if test -n "$NM"; then
38370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38371 $as_echo "$NM" >&6; }
38372 else
38373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38374 $as_echo "no" >&6; }
38375 fi
38376 
38377 
38378     test -n "$NM" && break
38379   done
38380 fi
38381 if test -z "$NM"; then
38382   ac_ct_NM=$NM
38383   for ac_prog in nm
38384 do
38385   # Extract the first word of "$ac_prog", so it can be a program name with args.
38386 set dummy $ac_prog; ac_word=$2
38387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38388 $as_echo_n "checking for $ac_word... " >&6; }
38389 if ${ac_cv_prog_ac_ct_NM+:} false; then :
38390   $as_echo_n "(cached) " >&6
38391 else
38392   if test -n "$ac_ct_NM"; then
38393   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
38394 else
38395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38396 for as_dir in $PATH
38397 do
38398   IFS=$as_save_IFS
38399   test -z "$as_dir" && as_dir=.
38400     for ac_exec_ext in '' $ac_executable_extensions; do
38401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38402     ac_cv_prog_ac_ct_NM="$ac_prog"
38403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38404     break 2
38405   fi
38406 done
38407   done
38408 IFS=$as_save_IFS
38409 
38410 fi
38411 fi
38412 ac_ct_NM=$ac_cv_prog_ac_ct_NM
38413 if test -n "$ac_ct_NM"; then
38414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
38415 $as_echo "$ac_ct_NM" >&6; }
38416 else
38417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38418 $as_echo "no" >&6; }
38419 fi
38420 
38421 
38422   test -n "$ac_ct_NM" && break
38423 done
38424 
38425   if test "x$ac_ct_NM" = x; then
38426     NM=""
38427   else
38428     case $cross_compiling:$ac_tool_warned in
38429 yes:)
38430 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38431 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38432 ac_tool_warned=yes ;;
38433 esac
38434     NM=$ac_ct_NM
38435   fi
38436 fi
38437 
38438     else
38439       # If it succeeded, then it was overridden by the user. We will use it
38440       # for the tool.
38441 
38442       # First remove it from the list of overridden variables, so we can test
38443       # for unknown variables in the end.
38444       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38445 
38446       # Check if the provided tool contains a complete path.
38447       tool_specified="$NM"
38448       tool_basename="${tool_specified##*/}"
38449       if test "x$tool_basename" = "x$tool_specified"; then
38450         # A command without a complete path is provided, search $PATH.
38451         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
38452 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
38453         # Extract the first word of "$tool_basename", so it can be a program name with args.
38454 set dummy $tool_basename; ac_word=$2
38455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38456 $as_echo_n "checking for $ac_word... " >&6; }
38457 if ${ac_cv_path_NM+:} false; then :
38458   $as_echo_n "(cached) " >&6
38459 else
38460   case $NM in
38461   [\\/]* | ?:[\\/]*)
38462   ac_cv_path_NM="$NM" # Let the user override the test with a path.
38463   ;;
38464   *)
38465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38466 for as_dir in $PATH
38467 do
38468   IFS=$as_save_IFS
38469   test -z "$as_dir" && as_dir=.
38470     for ac_exec_ext in '' $ac_executable_extensions; do
38471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38472     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
38473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38474     break 2
38475   fi
38476 done
38477   done
38478 IFS=$as_save_IFS
38479 
38480   ;;
38481 esac
38482 fi
38483 NM=$ac_cv_path_NM
38484 if test -n "$NM"; then
38485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
38486 $as_echo "$NM" >&6; }
38487 else
38488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38489 $as_echo "no" >&6; }
38490 fi
38491 
38492 
38493         if test "x$NM" = x; then
38494           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38495         fi
38496       else
38497         # Otherwise we believe it is a complete path. Use it as it is.
38498         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
38499 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
38500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
38501 $as_echo_n "checking for NM... " >&6; }
38502         if test ! -x "$tool_specified"; then
38503           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38504 $as_echo "not found" >&6; }
38505           as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
38506         fi
38507         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38508 $as_echo "$tool_specified" >&6; }
38509       fi
38510     fi
38511   fi
38512 
38513 
38514 
38515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38516 
38517   # First separate the path from the arguments. This will split at the first
38518   # space.
38519   complete="$NM"
38520   path="${complete%% *}"
38521   tmp="$complete EOL"
38522   arguments="${tmp#* }"
38523 
38524   # Input might be given as Windows format, start by converting to
38525   # unix format.
38526   new_path=`$CYGPATH -u "$path"`
38527 
38528   # Now try to locate executable using which
38529   new_path=`$WHICH "$new_path" 2> /dev/null`
38530   # bat and cmd files are not always considered executable in cygwin causing which
38531   # to not find them
38532   if test "x$new_path" = x \
38533       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38534       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38535     new_path=`$CYGPATH -u "$path"`
38536   fi
38537   if test "x$new_path" = x; then
38538     # Oops. Which didn't find the executable.
38539     # The splitting of arguments from the executable at a space might have been incorrect,
38540     # since paths with space are more likely in Windows. Give it another try with the whole
38541     # argument.
38542     path="$complete"
38543     arguments="EOL"
38544     new_path=`$CYGPATH -u "$path"`
38545     new_path=`$WHICH "$new_path" 2> /dev/null`
38546     # bat and cmd files are not always considered executable in cygwin causing which
38547     # to not find them
38548     if test "x$new_path" = x \
38549         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38550         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38551       new_path=`$CYGPATH -u "$path"`
38552     fi
38553     if test "x$new_path" = x; then
38554       # It's still not found. Now this is an unrecoverable error.
38555       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38556 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38557       has_space=`$ECHO "$complete" | $GREP " "`
38558       if test "x$has_space" != x; then
38559         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38560 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38561       fi
38562       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38563     fi
38564   fi
38565 
38566   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38567   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38568   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38569   # "foo.exe" is OK but "foo" is an error.
38570   #
38571   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38572   # It is also a way to make sure we got the proper file name for the real test later on.
38573   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38574   if test "x$test_shortpath" = x; then
38575     # Short path failed, file does not exist as specified.
38576     # Try adding .exe or .cmd
38577     if test -f "${new_path}.exe"; then
38578       input_to_shortpath="${new_path}.exe"
38579     elif test -f "${new_path}.cmd"; then
38580       input_to_shortpath="${new_path}.cmd"
38581     else
38582       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
38583 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
38584       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38585 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38586       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38587     fi
38588   else
38589     input_to_shortpath="$new_path"
38590   fi
38591 
38592   # Call helper function which possibly converts this using DOS-style short mode.
38593   # If so, the updated path is stored in $new_path.
38594   new_path="$input_to_shortpath"
38595 
38596   input_path="$input_to_shortpath"
38597   # Check if we need to convert this using DOS-style short mode. If the path
38598   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38599   # take no chances and rewrite it.
38600   # Note: m4 eats our [], so we need to use [ and ] instead.
38601   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38602   if test "x$has_forbidden_chars" != x; then
38603     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38604     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38605     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38606     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38607       # Going to short mode and back again did indeed matter. Since short mode is
38608       # case insensitive, let's make it lowercase to improve readability.
38609       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38610       # Now convert it back to Unix-stile (cygpath)
38611       input_path=`$CYGPATH -u "$shortmode_path"`
38612       new_path="$input_path"
38613     fi
38614   fi
38615 
38616   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38617   if test "x$test_cygdrive_prefix" = x; then
38618     # As a simple fix, exclude /usr/bin since it's not a real path.
38619     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38620       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38621       # a path prefixed by /cygdrive for fixpath to work.
38622       new_path="$CYGWIN_ROOT_PATH$input_path"
38623     fi
38624   fi
38625 
38626   # remove trailing .exe if any
38627   new_path="${new_path/%.exe/}"
38628 
38629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38630 
38631   # First separate the path from the arguments. This will split at the first
38632   # space.
38633   complete="$NM"
38634   path="${complete%% *}"
38635   tmp="$complete EOL"
38636   arguments="${tmp#* }"
38637 
38638   # Input might be given as Windows format, start by converting to
38639   # unix format.
38640   new_path="$path"
38641 
38642   windows_path="$new_path"
38643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38644     unix_path=`$CYGPATH -u "$windows_path"`
38645     new_path="$unix_path"
38646   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38647     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38648     new_path="$unix_path"
38649   fi
38650 
38651 
38652   # Now try to locate executable using which
38653   new_path=`$WHICH "$new_path" 2> /dev/null`
38654 
38655   if test "x$new_path" = x; then
38656     # Oops. Which didn't find the executable.
38657     # The splitting of arguments from the executable at a space might have been incorrect,
38658     # since paths with space are more likely in Windows. Give it another try with the whole
38659     # argument.
38660     path="$complete"
38661     arguments="EOL"
38662     new_path="$path"
38663 
38664   windows_path="$new_path"
38665   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38666     unix_path=`$CYGPATH -u "$windows_path"`
38667     new_path="$unix_path"
38668   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38669     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38670     new_path="$unix_path"
38671   fi
38672 
38673 
38674     new_path=`$WHICH "$new_path" 2> /dev/null`
38675 
38676     if test "x$new_path" = x; then
38677       # It's still not found. Now this is an unrecoverable error.
38678       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38679 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38680       has_space=`$ECHO "$complete" | $GREP " "`
38681       if test "x$has_space" != x; then
38682         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38683 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38684       fi
38685       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38686     fi
38687   fi
38688 
38689   # Now new_path has a complete unix path to the binary
38690   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38691     # Keep paths in /bin as-is, but remove trailing .exe if any
38692     new_path="${new_path/%.exe/}"
38693     # Do not save /bin paths to all_fixpath_prefixes!
38694   else
38695     # Not in mixed or Windows style, start by that.
38696     new_path=`cmd //c echo $new_path`
38697 
38698   input_path="$new_path"
38699   # Check if we need to convert this using DOS-style short mode. If the path
38700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38701   # take no chances and rewrite it.
38702   # Note: m4 eats our [], so we need to use [ and ] instead.
38703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38704   if test "x$has_forbidden_chars" != x; then
38705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38706     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38707   fi
38708 
38709     # Output is in $new_path
38710 
38711   windows_path="$new_path"
38712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38713     unix_path=`$CYGPATH -u "$windows_path"`
38714     new_path="$unix_path"
38715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38717     new_path="$unix_path"
38718   fi
38719 
38720     # remove trailing .exe if any
38721     new_path="${new_path/%.exe/}"
38722 
38723     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38724     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38725   fi
38726 
38727   else
38728     # We're on a posix platform. Hooray! :)
38729     # First separate the path from the arguments. This will split at the first
38730     # space.
38731     complete="$NM"
38732     path="${complete%% *}"
38733     tmp="$complete EOL"
38734     arguments="${tmp#* }"
38735 
38736     # Cannot rely on the command "which" here since it doesn't always work.
38737     is_absolute_path=`$ECHO "$path" | $GREP ^/`
38738     if test -z "$is_absolute_path"; then
38739       # Path to executable is not absolute. Find it.
38740       IFS_save="$IFS"
38741       IFS=:
38742       for p in $PATH; do
38743         if test -f "$p/$path" && test -x "$p/$path"; then
38744           new_path="$p/$path"
38745           break
38746         fi
38747       done
38748       IFS="$IFS_save"
38749     else
38750       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
38751 $as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
38752       new_path="$path"
38753     fi
38754 
38755     if test "x$new_path" = x; then
38756       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38757 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38758       has_space=`$ECHO "$complete" | $GREP " "`
38759       if test "x$has_space" != x; then
38760         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38761 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38762       fi
38763       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38764     fi
38765   fi
38766 
38767   # Now join together the path and the arguments once again
38768   if test "x$arguments" != xEOL; then
38769     new_complete="$new_path ${arguments% *}"
38770   else
38771     new_complete="$new_path"
38772   fi
38773 
38774   if test "x$complete" != "x$new_complete"; then
38775     NM="$new_complete"
38776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38777 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38778   fi
38779 
38780     GNM="$NM"
38781 
38782 
38783 
38784   # Publish this variable in the help.
38785 
38786 
38787   if test "x$STRIP" = x; then
38788     # The variable is not set by user, try to locate tool using the code snippet
38789     if test -n "$ac_tool_prefix"; then
38790   for ac_prog in strip
38791   do
38792     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38793 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38795 $as_echo_n "checking for $ac_word... " >&6; }
38796 if ${ac_cv_prog_STRIP+:} false; then :
38797   $as_echo_n "(cached) " >&6
38798 else
38799   if test -n "$STRIP"; then
38800   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38801 else
38802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38803 for as_dir in $PATH
38804 do
38805   IFS=$as_save_IFS
38806   test -z "$as_dir" && as_dir=.
38807     for ac_exec_ext in '' $ac_executable_extensions; do
38808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38809     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38811     break 2
38812   fi
38813 done
38814   done
38815 IFS=$as_save_IFS
38816 
38817 fi
38818 fi
38819 STRIP=$ac_cv_prog_STRIP
38820 if test -n "$STRIP"; then
38821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38822 $as_echo "$STRIP" >&6; }
38823 else
38824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38825 $as_echo "no" >&6; }
38826 fi
38827 
38828 
38829     test -n "$STRIP" && break
38830   done
38831 fi
38832 if test -z "$STRIP"; then
38833   ac_ct_STRIP=$STRIP
38834   for ac_prog in strip
38835 do
38836   # Extract the first word of "$ac_prog", so it can be a program name with args.
38837 set dummy $ac_prog; ac_word=$2
38838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38839 $as_echo_n "checking for $ac_word... " >&6; }
38840 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38841   $as_echo_n "(cached) " >&6
38842 else
38843   if test -n "$ac_ct_STRIP"; then
38844   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38845 else
38846 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38847 for as_dir in $PATH
38848 do
38849   IFS=$as_save_IFS
38850   test -z "$as_dir" && as_dir=.
38851     for ac_exec_ext in '' $ac_executable_extensions; do
38852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38853     ac_cv_prog_ac_ct_STRIP="$ac_prog"
38854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38855     break 2
38856   fi
38857 done
38858   done
38859 IFS=$as_save_IFS
38860 
38861 fi
38862 fi
38863 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38864 if test -n "$ac_ct_STRIP"; then
38865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38866 $as_echo "$ac_ct_STRIP" >&6; }
38867 else
38868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38869 $as_echo "no" >&6; }
38870 fi
38871 
38872 
38873   test -n "$ac_ct_STRIP" && break
38874 done
38875 
38876   if test "x$ac_ct_STRIP" = x; then
38877     STRIP=""
38878   else
38879     case $cross_compiling:$ac_tool_warned in
38880 yes:)
38881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38882 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38883 ac_tool_warned=yes ;;
38884 esac
38885     STRIP=$ac_ct_STRIP
38886   fi
38887 fi
38888 
38889   else
38890     # The variable is set, but is it from the command line or the environment?
38891 
38892     # Try to remove the string !STRIP! from our list.
38893     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
38894     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38895       # If it failed, the variable was not from the command line. Ignore it,
38896       # but warn the user (except for BASH, which is always set by the calling BASH).
38897       if test "xSTRIP" != xBASH; then
38898         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
38899 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
38900       fi
38901       # Try to locate tool using the code snippet
38902       if test -n "$ac_tool_prefix"; then
38903   for ac_prog in strip
38904   do
38905     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38906 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38908 $as_echo_n "checking for $ac_word... " >&6; }
38909 if ${ac_cv_prog_STRIP+:} false; then :
38910   $as_echo_n "(cached) " >&6
38911 else
38912   if test -n "$STRIP"; then
38913   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
38914 else
38915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38916 for as_dir in $PATH
38917 do
38918   IFS=$as_save_IFS
38919   test -z "$as_dir" && as_dir=.
38920     for ac_exec_ext in '' $ac_executable_extensions; do
38921   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38922     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
38923     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38924     break 2
38925   fi
38926 done
38927   done
38928 IFS=$as_save_IFS
38929 
38930 fi
38931 fi
38932 STRIP=$ac_cv_prog_STRIP
38933 if test -n "$STRIP"; then
38934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
38935 $as_echo "$STRIP" >&6; }
38936 else
38937   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38938 $as_echo "no" >&6; }
38939 fi
38940 
38941 
38942     test -n "$STRIP" && break
38943   done
38944 fi
38945 if test -z "$STRIP"; then
38946   ac_ct_STRIP=$STRIP
38947   for ac_prog in strip
38948 do
38949   # Extract the first word of "$ac_prog", so it can be a program name with args.
38950 set dummy $ac_prog; ac_word=$2
38951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38952 $as_echo_n "checking for $ac_word... " >&6; }
38953 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
38954   $as_echo_n "(cached) " >&6
38955 else
38956   if test -n "$ac_ct_STRIP"; then
38957   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
38958 else
38959 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38960 for as_dir in $PATH
38961 do
38962   IFS=$as_save_IFS
38963   test -z "$as_dir" && as_dir=.
38964     for ac_exec_ext in '' $ac_executable_extensions; do
38965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38966     ac_cv_prog_ac_ct_STRIP="$ac_prog"
38967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38968     break 2
38969   fi
38970 done
38971   done
38972 IFS=$as_save_IFS
38973 
38974 fi
38975 fi
38976 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
38977 if test -n "$ac_ct_STRIP"; then
38978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
38979 $as_echo "$ac_ct_STRIP" >&6; }
38980 else
38981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38982 $as_echo "no" >&6; }
38983 fi
38984 
38985 
38986   test -n "$ac_ct_STRIP" && break
38987 done
38988 
38989   if test "x$ac_ct_STRIP" = x; then
38990     STRIP=""
38991   else
38992     case $cross_compiling:$ac_tool_warned in
38993 yes:)
38994 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38995 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38996 ac_tool_warned=yes ;;
38997 esac
38998     STRIP=$ac_ct_STRIP
38999   fi
39000 fi
39001 
39002     else
39003       # If it succeeded, then it was overridden by the user. We will use it
39004       # for the tool.
39005 
39006       # First remove it from the list of overridden variables, so we can test
39007       # for unknown variables in the end.
39008       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39009 
39010       # Check if the provided tool contains a complete path.
39011       tool_specified="$STRIP"
39012       tool_basename="${tool_specified##*/}"
39013       if test "x$tool_basename" = "x$tool_specified"; then
39014         # A command without a complete path is provided, search $PATH.
39015         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39016 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39017         # Extract the first word of "$tool_basename", so it can be a program name with args.
39018 set dummy $tool_basename; ac_word=$2
39019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39020 $as_echo_n "checking for $ac_word... " >&6; }
39021 if ${ac_cv_path_STRIP+:} false; then :
39022   $as_echo_n "(cached) " >&6
39023 else
39024   case $STRIP in
39025   [\\/]* | ?:[\\/]*)
39026   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39027   ;;
39028   *)
39029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39030 for as_dir in $PATH
39031 do
39032   IFS=$as_save_IFS
39033   test -z "$as_dir" && as_dir=.
39034     for ac_exec_ext in '' $ac_executable_extensions; do
39035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39036     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39038     break 2
39039   fi
39040 done
39041   done
39042 IFS=$as_save_IFS
39043 
39044   ;;
39045 esac
39046 fi
39047 STRIP=$ac_cv_path_STRIP
39048 if test -n "$STRIP"; then
39049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39050 $as_echo "$STRIP" >&6; }
39051 else
39052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39053 $as_echo "no" >&6; }
39054 fi
39055 
39056 
39057         if test "x$STRIP" = x; then
39058           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39059         fi
39060       else
39061         # Otherwise we believe it is a complete path. Use it as it is.
39062         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39063 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39065 $as_echo_n "checking for STRIP... " >&6; }
39066         if test ! -x "$tool_specified"; then
39067           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39068 $as_echo "not found" >&6; }
39069           as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39070         fi
39071         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39072 $as_echo "$tool_specified" >&6; }
39073       fi
39074     fi
39075   fi
39076 
39077 
39078 
39079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39080 
39081   # First separate the path from the arguments. This will split at the first
39082   # space.
39083   complete="$STRIP"
39084   path="${complete%% *}"
39085   tmp="$complete EOL"
39086   arguments="${tmp#* }"
39087 
39088   # Input might be given as Windows format, start by converting to
39089   # unix format.
39090   new_path=`$CYGPATH -u "$path"`
39091 
39092   # Now try to locate executable using which
39093   new_path=`$WHICH "$new_path" 2> /dev/null`
39094   # bat and cmd files are not always considered executable in cygwin causing which
39095   # to not find them
39096   if test "x$new_path" = x \
39097       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39098       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39099     new_path=`$CYGPATH -u "$path"`
39100   fi
39101   if test "x$new_path" = x; then
39102     # Oops. Which didn't find the executable.
39103     # The splitting of arguments from the executable at a space might have been incorrect,
39104     # since paths with space are more likely in Windows. Give it another try with the whole
39105     # argument.
39106     path="$complete"
39107     arguments="EOL"
39108     new_path=`$CYGPATH -u "$path"`
39109     new_path=`$WHICH "$new_path" 2> /dev/null`
39110     # bat and cmd files are not always considered executable in cygwin causing which
39111     # to not find them
39112     if test "x$new_path" = x \
39113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39115       new_path=`$CYGPATH -u "$path"`
39116     fi
39117     if test "x$new_path" = x; then
39118       # It's still not found. Now this is an unrecoverable error.
39119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39120 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39121       has_space=`$ECHO "$complete" | $GREP " "`
39122       if test "x$has_space" != x; then
39123         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39124 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39125       fi
39126       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39127     fi
39128   fi
39129 
39130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39133   # "foo.exe" is OK but "foo" is an error.
39134   #
39135   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39136   # It is also a way to make sure we got the proper file name for the real test later on.
39137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39138   if test "x$test_shortpath" = x; then
39139     # Short path failed, file does not exist as specified.
39140     # Try adding .exe or .cmd
39141     if test -f "${new_path}.exe"; then
39142       input_to_shortpath="${new_path}.exe"
39143     elif test -f "${new_path}.cmd"; then
39144       input_to_shortpath="${new_path}.cmd"
39145     else
39146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39147 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39148       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39149 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39150       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39151     fi
39152   else
39153     input_to_shortpath="$new_path"
39154   fi
39155 
39156   # Call helper function which possibly converts this using DOS-style short mode.
39157   # If so, the updated path is stored in $new_path.
39158   new_path="$input_to_shortpath"
39159 
39160   input_path="$input_to_shortpath"
39161   # Check if we need to convert this using DOS-style short mode. If the path
39162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39163   # take no chances and rewrite it.
39164   # Note: m4 eats our [], so we need to use [ and ] instead.
39165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39166   if test "x$has_forbidden_chars" != x; then
39167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39171       # Going to short mode and back again did indeed matter. Since short mode is
39172       # case insensitive, let's make it lowercase to improve readability.
39173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39174       # Now convert it back to Unix-stile (cygpath)
39175       input_path=`$CYGPATH -u "$shortmode_path"`
39176       new_path="$input_path"
39177     fi
39178   fi
39179 
39180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39181   if test "x$test_cygdrive_prefix" = x; then
39182     # As a simple fix, exclude /usr/bin since it's not a real path.
39183     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39185       # a path prefixed by /cygdrive for fixpath to work.
39186       new_path="$CYGWIN_ROOT_PATH$input_path"
39187     fi
39188   fi
39189 
39190   # remove trailing .exe if any
39191   new_path="${new_path/%.exe/}"
39192 
39193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39194 
39195   # First separate the path from the arguments. This will split at the first
39196   # space.
39197   complete="$STRIP"
39198   path="${complete%% *}"
39199   tmp="$complete EOL"
39200   arguments="${tmp#* }"
39201 
39202   # Input might be given as Windows format, start by converting to
39203   # unix format.
39204   new_path="$path"
39205 
39206   windows_path="$new_path"
39207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39208     unix_path=`$CYGPATH -u "$windows_path"`
39209     new_path="$unix_path"
39210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39212     new_path="$unix_path"
39213   fi
39214 
39215 
39216   # Now try to locate executable using which
39217   new_path=`$WHICH "$new_path" 2> /dev/null`
39218 
39219   if test "x$new_path" = x; then
39220     # Oops. Which didn't find the executable.
39221     # The splitting of arguments from the executable at a space might have been incorrect,
39222     # since paths with space are more likely in Windows. Give it another try with the whole
39223     # argument.
39224     path="$complete"
39225     arguments="EOL"
39226     new_path="$path"
39227 
39228   windows_path="$new_path"
39229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39230     unix_path=`$CYGPATH -u "$windows_path"`
39231     new_path="$unix_path"
39232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39234     new_path="$unix_path"
39235   fi
39236 
39237 
39238     new_path=`$WHICH "$new_path" 2> /dev/null`
39239 
39240     if test "x$new_path" = x; then
39241       # It's still not found. Now this is an unrecoverable error.
39242       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39243 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39244       has_space=`$ECHO "$complete" | $GREP " "`
39245       if test "x$has_space" != x; then
39246         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39247 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39248       fi
39249       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39250     fi
39251   fi
39252 
39253   # Now new_path has a complete unix path to the binary
39254   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39255     # Keep paths in /bin as-is, but remove trailing .exe if any
39256     new_path="${new_path/%.exe/}"
39257     # Do not save /bin paths to all_fixpath_prefixes!
39258   else
39259     # Not in mixed or Windows style, start by that.
39260     new_path=`cmd //c echo $new_path`
39261 
39262   input_path="$new_path"
39263   # Check if we need to convert this using DOS-style short mode. If the path
39264   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39265   # take no chances and rewrite it.
39266   # Note: m4 eats our [], so we need to use [ and ] instead.
39267   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39268   if test "x$has_forbidden_chars" != x; then
39269     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39270     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39271   fi
39272 
39273     # Output is in $new_path
39274 
39275   windows_path="$new_path"
39276   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39277     unix_path=`$CYGPATH -u "$windows_path"`
39278     new_path="$unix_path"
39279   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39280     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39281     new_path="$unix_path"
39282   fi
39283 
39284     # remove trailing .exe if any
39285     new_path="${new_path/%.exe/}"
39286 
39287     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39288     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39289   fi
39290 
39291   else
39292     # We're on a posix platform. Hooray! :)
39293     # First separate the path from the arguments. This will split at the first
39294     # space.
39295     complete="$STRIP"
39296     path="${complete%% *}"
39297     tmp="$complete EOL"
39298     arguments="${tmp#* }"
39299 
39300     # Cannot rely on the command "which" here since it doesn't always work.
39301     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39302     if test -z "$is_absolute_path"; then
39303       # Path to executable is not absolute. Find it.
39304       IFS_save="$IFS"
39305       IFS=:
39306       for p in $PATH; do
39307         if test -f "$p/$path" && test -x "$p/$path"; then
39308           new_path="$p/$path"
39309           break
39310         fi
39311       done
39312       IFS="$IFS_save"
39313     else
39314       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
39315 $as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
39316       new_path="$path"
39317     fi
39318 
39319     if test "x$new_path" = x; then
39320       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39321 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39322       has_space=`$ECHO "$complete" | $GREP " "`
39323       if test "x$has_space" != x; then
39324         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39325 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39326       fi
39327       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39328     fi
39329   fi
39330 
39331   # Now join together the path and the arguments once again
39332   if test "x$arguments" != xEOL; then
39333     new_complete="$new_path ${arguments% *}"
39334   else
39335     new_complete="$new_path"
39336   fi
39337 
39338   if test "x$complete" != "x$new_complete"; then
39339     STRIP="$new_complete"
39340     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39341 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39342   fi
39343 
39344   fi
39345 
39346   # objcopy is used for moving debug symbols to separate files when
39347   # full debug symbols are enabled.
39348   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
39349 
39350 
39351   # Publish this variable in the help.
39352 
39353 
39354   if test "x$OBJCOPY" = x; then
39355     # The variable is not set by user, try to locate tool using the code snippet
39356     if test -n "$ac_tool_prefix"; then
39357   for ac_prog in gobjcopy objcopy
39358   do
39359     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39360 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39362 $as_echo_n "checking for $ac_word... " >&6; }
39363 if ${ac_cv_prog_OBJCOPY+:} false; then :
39364   $as_echo_n "(cached) " >&6
39365 else
39366   if test -n "$OBJCOPY"; then
39367   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39368 else
39369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39370 for as_dir in $PATH
39371 do
39372   IFS=$as_save_IFS
39373   test -z "$as_dir" && as_dir=.
39374     for ac_exec_ext in '' $ac_executable_extensions; do
39375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39376     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39378     break 2
39379   fi
39380 done
39381   done
39382 IFS=$as_save_IFS
39383 
39384 fi
39385 fi
39386 OBJCOPY=$ac_cv_prog_OBJCOPY
39387 if test -n "$OBJCOPY"; then
39388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39389 $as_echo "$OBJCOPY" >&6; }
39390 else
39391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39392 $as_echo "no" >&6; }
39393 fi
39394 
39395 
39396     test -n "$OBJCOPY" && break
39397   done
39398 fi
39399 if test -z "$OBJCOPY"; then
39400   ac_ct_OBJCOPY=$OBJCOPY
39401   for ac_prog in gobjcopy objcopy
39402 do
39403   # Extract the first word of "$ac_prog", so it can be a program name with args.
39404 set dummy $ac_prog; ac_word=$2
39405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39406 $as_echo_n "checking for $ac_word... " >&6; }
39407 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39408   $as_echo_n "(cached) " >&6
39409 else
39410   if test -n "$ac_ct_OBJCOPY"; then
39411   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39412 else
39413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39414 for as_dir in $PATH
39415 do
39416   IFS=$as_save_IFS
39417   test -z "$as_dir" && as_dir=.
39418     for ac_exec_ext in '' $ac_executable_extensions; do
39419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39420     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39422     break 2
39423   fi
39424 done
39425   done
39426 IFS=$as_save_IFS
39427 
39428 fi
39429 fi
39430 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39431 if test -n "$ac_ct_OBJCOPY"; then
39432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39433 $as_echo "$ac_ct_OBJCOPY" >&6; }
39434 else
39435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39436 $as_echo "no" >&6; }
39437 fi
39438 
39439 
39440   test -n "$ac_ct_OBJCOPY" && break
39441 done
39442 
39443   if test "x$ac_ct_OBJCOPY" = x; then
39444     OBJCOPY=""
39445   else
39446     case $cross_compiling:$ac_tool_warned in
39447 yes:)
39448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39449 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39450 ac_tool_warned=yes ;;
39451 esac
39452     OBJCOPY=$ac_ct_OBJCOPY
39453   fi
39454 fi
39455 
39456   else
39457     # The variable is set, but is it from the command line or the environment?
39458 
39459     # Try to remove the string !OBJCOPY! from our list.
39460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
39461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39462       # If it failed, the variable was not from the command line. Ignore it,
39463       # but warn the user (except for BASH, which is always set by the calling BASH).
39464       if test "xOBJCOPY" != xBASH; then
39465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
39466 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
39467       fi
39468       # Try to locate tool using the code snippet
39469       if test -n "$ac_tool_prefix"; then
39470   for ac_prog in gobjcopy objcopy
39471   do
39472     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39473 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39475 $as_echo_n "checking for $ac_word... " >&6; }
39476 if ${ac_cv_prog_OBJCOPY+:} false; then :
39477   $as_echo_n "(cached) " >&6
39478 else
39479   if test -n "$OBJCOPY"; then
39480   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
39481 else
39482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39483 for as_dir in $PATH
39484 do
39485   IFS=$as_save_IFS
39486   test -z "$as_dir" && as_dir=.
39487     for ac_exec_ext in '' $ac_executable_extensions; do
39488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39489     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
39490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39491     break 2
39492   fi
39493 done
39494   done
39495 IFS=$as_save_IFS
39496 
39497 fi
39498 fi
39499 OBJCOPY=$ac_cv_prog_OBJCOPY
39500 if test -n "$OBJCOPY"; then
39501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39502 $as_echo "$OBJCOPY" >&6; }
39503 else
39504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39505 $as_echo "no" >&6; }
39506 fi
39507 
39508 
39509     test -n "$OBJCOPY" && break
39510   done
39511 fi
39512 if test -z "$OBJCOPY"; then
39513   ac_ct_OBJCOPY=$OBJCOPY
39514   for ac_prog in gobjcopy objcopy
39515 do
39516   # Extract the first word of "$ac_prog", so it can be a program name with args.
39517 set dummy $ac_prog; ac_word=$2
39518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39519 $as_echo_n "checking for $ac_word... " >&6; }
39520 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
39521   $as_echo_n "(cached) " >&6
39522 else
39523   if test -n "$ac_ct_OBJCOPY"; then
39524   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
39525 else
39526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39527 for as_dir in $PATH
39528 do
39529   IFS=$as_save_IFS
39530   test -z "$as_dir" && as_dir=.
39531     for ac_exec_ext in '' $ac_executable_extensions; do
39532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39533     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
39534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39535     break 2
39536   fi
39537 done
39538   done
39539 IFS=$as_save_IFS
39540 
39541 fi
39542 fi
39543 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
39544 if test -n "$ac_ct_OBJCOPY"; then
39545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
39546 $as_echo "$ac_ct_OBJCOPY" >&6; }
39547 else
39548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39549 $as_echo "no" >&6; }
39550 fi
39551 
39552 
39553   test -n "$ac_ct_OBJCOPY" && break
39554 done
39555 
39556   if test "x$ac_ct_OBJCOPY" = x; then
39557     OBJCOPY=""
39558   else
39559     case $cross_compiling:$ac_tool_warned in
39560 yes:)
39561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
39562 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
39563 ac_tool_warned=yes ;;
39564 esac
39565     OBJCOPY=$ac_ct_OBJCOPY
39566   fi
39567 fi
39568 
39569     else
39570       # If it succeeded, then it was overridden by the user. We will use it
39571       # for the tool.
39572 
39573       # First remove it from the list of overridden variables, so we can test
39574       # for unknown variables in the end.
39575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39576 
39577       # Check if the provided tool contains a complete path.
39578       tool_specified="$OBJCOPY"
39579       tool_basename="${tool_specified##*/}"
39580       if test "x$tool_basename" = "x$tool_specified"; then
39581         # A command without a complete path is provided, search $PATH.
39582         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
39583 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
39584         # Extract the first word of "$tool_basename", so it can be a program name with args.
39585 set dummy $tool_basename; ac_word=$2
39586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39587 $as_echo_n "checking for $ac_word... " >&6; }
39588 if ${ac_cv_path_OBJCOPY+:} false; then :
39589   $as_echo_n "(cached) " >&6
39590 else
39591   case $OBJCOPY in
39592   [\\/]* | ?:[\\/]*)
39593   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
39594   ;;
39595   *)
39596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39597 for as_dir in $PATH
39598 do
39599   IFS=$as_save_IFS
39600   test -z "$as_dir" && as_dir=.
39601     for ac_exec_ext in '' $ac_executable_extensions; do
39602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39603     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
39604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39605     break 2
39606   fi
39607 done
39608   done
39609 IFS=$as_save_IFS
39610 
39611   ;;
39612 esac
39613 fi
39614 OBJCOPY=$ac_cv_path_OBJCOPY
39615 if test -n "$OBJCOPY"; then
39616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
39617 $as_echo "$OBJCOPY" >&6; }
39618 else
39619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39620 $as_echo "no" >&6; }
39621 fi
39622 
39623 
39624         if test "x$OBJCOPY" = x; then
39625           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39626         fi
39627       else
39628         # Otherwise we believe it is a complete path. Use it as it is.
39629         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
39630 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
39631         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
39632 $as_echo_n "checking for OBJCOPY... " >&6; }
39633         if test ! -x "$tool_specified"; then
39634           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39635 $as_echo "not found" >&6; }
39636           as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
39637         fi
39638         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39639 $as_echo "$tool_specified" >&6; }
39640       fi
39641     fi
39642   fi
39643 
39644 
39645     # Only call fixup if objcopy was found.
39646     if test -n "$OBJCOPY"; then
39647 
39648   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39649 
39650   # First separate the path from the arguments. This will split at the first
39651   # space.
39652   complete="$OBJCOPY"
39653   path="${complete%% *}"
39654   tmp="$complete EOL"
39655   arguments="${tmp#* }"
39656 
39657   # Input might be given as Windows format, start by converting to
39658   # unix format.
39659   new_path=`$CYGPATH -u "$path"`
39660 
39661   # Now try to locate executable using which
39662   new_path=`$WHICH "$new_path" 2> /dev/null`
39663   # bat and cmd files are not always considered executable in cygwin causing which
39664   # to not find them
39665   if test "x$new_path" = x \
39666       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39667       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39668     new_path=`$CYGPATH -u "$path"`
39669   fi
39670   if test "x$new_path" = x; then
39671     # Oops. Which didn't find the executable.
39672     # The splitting of arguments from the executable at a space might have been incorrect,
39673     # since paths with space are more likely in Windows. Give it another try with the whole
39674     # argument.
39675     path="$complete"
39676     arguments="EOL"
39677     new_path=`$CYGPATH -u "$path"`
39678     new_path=`$WHICH "$new_path" 2> /dev/null`
39679     # bat and cmd files are not always considered executable in cygwin causing which
39680     # to not find them
39681     if test "x$new_path" = x \
39682         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39683         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39684       new_path=`$CYGPATH -u "$path"`
39685     fi
39686     if test "x$new_path" = x; then
39687       # It's still not found. Now this is an unrecoverable error.
39688       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39689 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39690       has_space=`$ECHO "$complete" | $GREP " "`
39691       if test "x$has_space" != x; then
39692         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39693 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39694       fi
39695       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39696     fi
39697   fi
39698 
39699   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39700   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39701   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39702   # "foo.exe" is OK but "foo" is an error.
39703   #
39704   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39705   # It is also a way to make sure we got the proper file name for the real test later on.
39706   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39707   if test "x$test_shortpath" = x; then
39708     # Short path failed, file does not exist as specified.
39709     # Try adding .exe or .cmd
39710     if test -f "${new_path}.exe"; then
39711       input_to_shortpath="${new_path}.exe"
39712     elif test -f "${new_path}.cmd"; then
39713       input_to_shortpath="${new_path}.cmd"
39714     else
39715       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
39716 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
39717       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39718 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39719       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39720     fi
39721   else
39722     input_to_shortpath="$new_path"
39723   fi
39724 
39725   # Call helper function which possibly converts this using DOS-style short mode.
39726   # If so, the updated path is stored in $new_path.
39727   new_path="$input_to_shortpath"
39728 
39729   input_path="$input_to_shortpath"
39730   # Check if we need to convert this using DOS-style short mode. If the path
39731   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39732   # take no chances and rewrite it.
39733   # Note: m4 eats our [], so we need to use [ and ] instead.
39734   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39735   if test "x$has_forbidden_chars" != x; then
39736     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39737     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39738     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39739     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39740       # Going to short mode and back again did indeed matter. Since short mode is
39741       # case insensitive, let's make it lowercase to improve readability.
39742       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39743       # Now convert it back to Unix-stile (cygpath)
39744       input_path=`$CYGPATH -u "$shortmode_path"`
39745       new_path="$input_path"
39746     fi
39747   fi
39748 
39749   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39750   if test "x$test_cygdrive_prefix" = x; then
39751     # As a simple fix, exclude /usr/bin since it's not a real path.
39752     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39753       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39754       # a path prefixed by /cygdrive for fixpath to work.
39755       new_path="$CYGWIN_ROOT_PATH$input_path"
39756     fi
39757   fi
39758 
39759   # remove trailing .exe if any
39760   new_path="${new_path/%.exe/}"
39761 
39762   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39763 
39764   # First separate the path from the arguments. This will split at the first
39765   # space.
39766   complete="$OBJCOPY"
39767   path="${complete%% *}"
39768   tmp="$complete EOL"
39769   arguments="${tmp#* }"
39770 
39771   # Input might be given as Windows format, start by converting to
39772   # unix format.
39773   new_path="$path"
39774 
39775   windows_path="$new_path"
39776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39777     unix_path=`$CYGPATH -u "$windows_path"`
39778     new_path="$unix_path"
39779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39781     new_path="$unix_path"
39782   fi
39783 
39784 
39785   # Now try to locate executable using which
39786   new_path=`$WHICH "$new_path" 2> /dev/null`
39787 
39788   if test "x$new_path" = x; then
39789     # Oops. Which didn't find the executable.
39790     # The splitting of arguments from the executable at a space might have been incorrect,
39791     # since paths with space are more likely in Windows. Give it another try with the whole
39792     # argument.
39793     path="$complete"
39794     arguments="EOL"
39795     new_path="$path"
39796 
39797   windows_path="$new_path"
39798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39799     unix_path=`$CYGPATH -u "$windows_path"`
39800     new_path="$unix_path"
39801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39803     new_path="$unix_path"
39804   fi
39805 
39806 
39807     new_path=`$WHICH "$new_path" 2> /dev/null`
39808 
39809     if test "x$new_path" = x; then
39810       # It's still not found. Now this is an unrecoverable error.
39811       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39812 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39813       has_space=`$ECHO "$complete" | $GREP " "`
39814       if test "x$has_space" != x; then
39815         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39816 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39817       fi
39818       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39819     fi
39820   fi
39821 
39822   # Now new_path has a complete unix path to the binary
39823   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39824     # Keep paths in /bin as-is, but remove trailing .exe if any
39825     new_path="${new_path/%.exe/}"
39826     # Do not save /bin paths to all_fixpath_prefixes!
39827   else
39828     # Not in mixed or Windows style, start by that.
39829     new_path=`cmd //c echo $new_path`
39830 
39831   input_path="$new_path"
39832   # Check if we need to convert this using DOS-style short mode. If the path
39833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39834   # take no chances and rewrite it.
39835   # Note: m4 eats our [], so we need to use [ and ] instead.
39836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39837   if test "x$has_forbidden_chars" != x; then
39838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39839     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39840   fi
39841 
39842     # Output is in $new_path
39843 
39844   windows_path="$new_path"
39845   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39846     unix_path=`$CYGPATH -u "$windows_path"`
39847     new_path="$unix_path"
39848   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39849     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39850     new_path="$unix_path"
39851   fi
39852 
39853     # remove trailing .exe if any
39854     new_path="${new_path/%.exe/}"
39855 
39856     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39857     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39858   fi
39859 
39860   else
39861     # We're on a posix platform. Hooray! :)
39862     # First separate the path from the arguments. This will split at the first
39863     # space.
39864     complete="$OBJCOPY"
39865     path="${complete%% *}"
39866     tmp="$complete EOL"
39867     arguments="${tmp#* }"
39868 
39869     # Cannot rely on the command "which" here since it doesn't always work.
39870     is_absolute_path=`$ECHO "$path" | $GREP ^/`
39871     if test -z "$is_absolute_path"; then
39872       # Path to executable is not absolute. Find it.
39873       IFS_save="$IFS"
39874       IFS=:
39875       for p in $PATH; do
39876         if test -f "$p/$path" && test -x "$p/$path"; then
39877           new_path="$p/$path"
39878           break
39879         fi
39880       done
39881       IFS="$IFS_save"
39882     else
39883       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
39884 $as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
39885       new_path="$path"
39886     fi
39887 
39888     if test "x$new_path" = x; then
39889       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
39890 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
39891       has_space=`$ECHO "$complete" | $GREP " "`
39892       if test "x$has_space" != x; then
39893         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39894 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39895       fi
39896       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
39897     fi
39898   fi
39899 
39900   # Now join together the path and the arguments once again
39901   if test "x$arguments" != xEOL; then
39902     new_complete="$new_path ${arguments% *}"
39903   else
39904     new_complete="$new_path"
39905   fi
39906 
39907   if test "x$complete" != "x$new_complete"; then
39908     OBJCOPY="$new_complete"
39909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
39910 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
39911   fi
39912 
39913     fi
39914   fi
39915 
39916 
39917 
39918   # Publish this variable in the help.
39919 
39920 
39921   if test "x$OBJDUMP" = x; then
39922     # The variable is not set by user, try to locate tool using the code snippet
39923     if test -n "$ac_tool_prefix"; then
39924   for ac_prog in gobjdump objdump
39925   do
39926     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
39927 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
39928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39929 $as_echo_n "checking for $ac_word... " >&6; }
39930 if ${ac_cv_prog_OBJDUMP+:} false; then :
39931   $as_echo_n "(cached) " >&6
39932 else
39933   if test -n "$OBJDUMP"; then
39934   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
39935 else
39936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39937 for as_dir in $PATH
39938 do
39939   IFS=$as_save_IFS
39940   test -z "$as_dir" && as_dir=.
39941     for ac_exec_ext in '' $ac_executable_extensions; do
39942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39943     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
39944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39945     break 2
39946   fi
39947 done
39948   done
39949 IFS=$as_save_IFS
39950 
39951 fi
39952 fi
39953 OBJDUMP=$ac_cv_prog_OBJDUMP
39954 if test -n "$OBJDUMP"; then
39955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
39956 $as_echo "$OBJDUMP" >&6; }
39957 else
39958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39959 $as_echo "no" >&6; }
39960 fi
39961 
39962 
39963     test -n "$OBJDUMP" && break
39964   done
39965 fi
39966 if test -z "$OBJDUMP"; then
39967   ac_ct_OBJDUMP=$OBJDUMP
39968   for ac_prog in gobjdump objdump
39969 do
39970   # Extract the first word of "$ac_prog", so it can be a program name with args.
39971 set dummy $ac_prog; ac_word=$2
39972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39973 $as_echo_n "checking for $ac_word... " >&6; }
39974 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
39975   $as_echo_n "(cached) " >&6
39976 else
39977   if test -n "$ac_ct_OBJDUMP"; then
39978   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
39979 else
39980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39981 for as_dir in $PATH
39982 do
39983   IFS=$as_save_IFS
39984   test -z "$as_dir" && as_dir=.
39985     for ac_exec_ext in '' $ac_executable_extensions; do
39986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39987     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
39988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39989     break 2
39990   fi
39991 done
39992   done
39993 IFS=$as_save_IFS
39994 
39995 fi
39996 fi
39997 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
39998 if test -n "$ac_ct_OBJDUMP"; then
39999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
40000 $as_echo "$ac_ct_OBJDUMP" >&6; }
40001 else
40002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40003 $as_echo "no" >&6; }
40004 fi
40005 
40006 
40007   test -n "$ac_ct_OBJDUMP" && break
40008 done
40009 
40010   if test "x$ac_ct_OBJDUMP" = x; then
40011     OBJDUMP=""
40012   else
40013     case $cross_compiling:$ac_tool_warned in
40014 yes:)
40015 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40016 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40017 ac_tool_warned=yes ;;
40018 esac
40019     OBJDUMP=$ac_ct_OBJDUMP
40020   fi
40021 fi
40022 
40023   else
40024     # The variable is set, but is it from the command line or the environment?
40025 
40026     # Try to remove the string !OBJDUMP! from our list.
40027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
40028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40029       # If it failed, the variable was not from the command line. Ignore it,
40030       # but warn the user (except for BASH, which is always set by the calling BASH).
40031       if test "xOBJDUMP" != xBASH; then
40032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
40033 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
40034       fi
40035       # Try to locate tool using the code snippet
40036       if test -n "$ac_tool_prefix"; then
40037   for ac_prog in gobjdump objdump
40038   do
40039     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40040 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40042 $as_echo_n "checking for $ac_word... " >&6; }
40043 if ${ac_cv_prog_OBJDUMP+:} false; then :
40044   $as_echo_n "(cached) " >&6
40045 else
40046   if test -n "$OBJDUMP"; then
40047   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
40048 else
40049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40050 for as_dir in $PATH
40051 do
40052   IFS=$as_save_IFS
40053   test -z "$as_dir" && as_dir=.
40054     for ac_exec_ext in '' $ac_executable_extensions; do
40055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40056     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
40057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40058     break 2
40059   fi
40060 done
40061   done
40062 IFS=$as_save_IFS
40063 
40064 fi
40065 fi
40066 OBJDUMP=$ac_cv_prog_OBJDUMP
40067 if test -n "$OBJDUMP"; then
40068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40069 $as_echo "$OBJDUMP" >&6; }
40070 else
40071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40072 $as_echo "no" >&6; }
40073 fi
40074 
40075 
40076     test -n "$OBJDUMP" && break
40077   done
40078 fi
40079 if test -z "$OBJDUMP"; then
40080   ac_ct_OBJDUMP=$OBJDUMP
40081   for ac_prog in gobjdump objdump
40082 do
40083   # Extract the first word of "$ac_prog", so it can be a program name with args.
40084 set dummy $ac_prog; ac_word=$2
40085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40086 $as_echo_n "checking for $ac_word... " >&6; }
40087 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
40088   $as_echo_n "(cached) " >&6
40089 else
40090   if test -n "$ac_ct_OBJDUMP"; then
40091   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
40092 else
40093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40094 for as_dir in $PATH
40095 do
40096   IFS=$as_save_IFS
40097   test -z "$as_dir" && as_dir=.
40098     for ac_exec_ext in '' $ac_executable_extensions; do
40099   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40100     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
40101     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40102     break 2
40103   fi
40104 done
40105   done
40106 IFS=$as_save_IFS
40107 
40108 fi
40109 fi
40110 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
40111 if test -n "$ac_ct_OBJDUMP"; then
40112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
40113 $as_echo "$ac_ct_OBJDUMP" >&6; }
40114 else
40115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40116 $as_echo "no" >&6; }
40117 fi
40118 
40119 
40120   test -n "$ac_ct_OBJDUMP" && break
40121 done
40122 
40123   if test "x$ac_ct_OBJDUMP" = x; then
40124     OBJDUMP=""
40125   else
40126     case $cross_compiling:$ac_tool_warned in
40127 yes:)
40128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40129 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40130 ac_tool_warned=yes ;;
40131 esac
40132     OBJDUMP=$ac_ct_OBJDUMP
40133   fi
40134 fi
40135 
40136     else
40137       # If it succeeded, then it was overridden by the user. We will use it
40138       # for the tool.
40139 
40140       # First remove it from the list of overridden variables, so we can test
40141       # for unknown variables in the end.
40142       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40143 
40144       # Check if the provided tool contains a complete path.
40145       tool_specified="$OBJDUMP"
40146       tool_basename="${tool_specified##*/}"
40147       if test "x$tool_basename" = "x$tool_specified"; then
40148         # A command without a complete path is provided, search $PATH.
40149         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
40150 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
40151         # Extract the first word of "$tool_basename", so it can be a program name with args.
40152 set dummy $tool_basename; ac_word=$2
40153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40154 $as_echo_n "checking for $ac_word... " >&6; }
40155 if ${ac_cv_path_OBJDUMP+:} false; then :
40156   $as_echo_n "(cached) " >&6
40157 else
40158   case $OBJDUMP in
40159   [\\/]* | ?:[\\/]*)
40160   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
40161   ;;
40162   *)
40163   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40164 for as_dir in $PATH
40165 do
40166   IFS=$as_save_IFS
40167   test -z "$as_dir" && as_dir=.
40168     for ac_exec_ext in '' $ac_executable_extensions; do
40169   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40170     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
40171     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40172     break 2
40173   fi
40174 done
40175   done
40176 IFS=$as_save_IFS
40177 
40178   ;;
40179 esac
40180 fi
40181 OBJDUMP=$ac_cv_path_OBJDUMP
40182 if test -n "$OBJDUMP"; then
40183   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
40184 $as_echo "$OBJDUMP" >&6; }
40185 else
40186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40187 $as_echo "no" >&6; }
40188 fi
40189 
40190 
40191         if test "x$OBJDUMP" = x; then
40192           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40193         fi
40194       else
40195         # Otherwise we believe it is a complete path. Use it as it is.
40196         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
40197 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
40198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
40199 $as_echo_n "checking for OBJDUMP... " >&6; }
40200         if test ! -x "$tool_specified"; then
40201           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40202 $as_echo "not found" >&6; }
40203           as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
40204         fi
40205         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40206 $as_echo "$tool_specified" >&6; }
40207       fi
40208     fi
40209   fi
40210 
40211 
40212   if test "x$OBJDUMP" != x; then
40213     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
40214 
40215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40216 
40217   # First separate the path from the arguments. This will split at the first
40218   # space.
40219   complete="$OBJDUMP"
40220   path="${complete%% *}"
40221   tmp="$complete EOL"
40222   arguments="${tmp#* }"
40223 
40224   # Input might be given as Windows format, start by converting to
40225   # unix format.
40226   new_path=`$CYGPATH -u "$path"`
40227 
40228   # Now try to locate executable using which
40229   new_path=`$WHICH "$new_path" 2> /dev/null`
40230   # bat and cmd files are not always considered executable in cygwin causing which
40231   # to not find them
40232   if test "x$new_path" = x \
40233       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40234       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40235     new_path=`$CYGPATH -u "$path"`
40236   fi
40237   if test "x$new_path" = x; then
40238     # Oops. Which didn't find the executable.
40239     # The splitting of arguments from the executable at a space might have been incorrect,
40240     # since paths with space are more likely in Windows. Give it another try with the whole
40241     # argument.
40242     path="$complete"
40243     arguments="EOL"
40244     new_path=`$CYGPATH -u "$path"`
40245     new_path=`$WHICH "$new_path" 2> /dev/null`
40246     # bat and cmd files are not always considered executable in cygwin causing which
40247     # to not find them
40248     if test "x$new_path" = x \
40249         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40250         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40251       new_path=`$CYGPATH -u "$path"`
40252     fi
40253     if test "x$new_path" = x; then
40254       # It's still not found. Now this is an unrecoverable error.
40255       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40256 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40257       has_space=`$ECHO "$complete" | $GREP " "`
40258       if test "x$has_space" != x; then
40259         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40260 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40261       fi
40262       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40263     fi
40264   fi
40265 
40266   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40267   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40268   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40269   # "foo.exe" is OK but "foo" is an error.
40270   #
40271   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40272   # It is also a way to make sure we got the proper file name for the real test later on.
40273   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40274   if test "x$test_shortpath" = x; then
40275     # Short path failed, file does not exist as specified.
40276     # Try adding .exe or .cmd
40277     if test -f "${new_path}.exe"; then
40278       input_to_shortpath="${new_path}.exe"
40279     elif test -f "${new_path}.cmd"; then
40280       input_to_shortpath="${new_path}.cmd"
40281     else
40282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
40283 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
40284       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40285 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40286       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40287     fi
40288   else
40289     input_to_shortpath="$new_path"
40290   fi
40291 
40292   # Call helper function which possibly converts this using DOS-style short mode.
40293   # If so, the updated path is stored in $new_path.
40294   new_path="$input_to_shortpath"
40295 
40296   input_path="$input_to_shortpath"
40297   # Check if we need to convert this using DOS-style short mode. If the path
40298   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40299   # take no chances and rewrite it.
40300   # Note: m4 eats our [], so we need to use [ and ] instead.
40301   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40302   if test "x$has_forbidden_chars" != x; then
40303     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40304     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40305     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40306     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40307       # Going to short mode and back again did indeed matter. Since short mode is
40308       # case insensitive, let's make it lowercase to improve readability.
40309       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40310       # Now convert it back to Unix-stile (cygpath)
40311       input_path=`$CYGPATH -u "$shortmode_path"`
40312       new_path="$input_path"
40313     fi
40314   fi
40315 
40316   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40317   if test "x$test_cygdrive_prefix" = x; then
40318     # As a simple fix, exclude /usr/bin since it's not a real path.
40319     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40320       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40321       # a path prefixed by /cygdrive for fixpath to work.
40322       new_path="$CYGWIN_ROOT_PATH$input_path"
40323     fi
40324   fi
40325 
40326   # remove trailing .exe if any
40327   new_path="${new_path/%.exe/}"
40328 
40329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40330 
40331   # First separate the path from the arguments. This will split at the first
40332   # space.
40333   complete="$OBJDUMP"
40334   path="${complete%% *}"
40335   tmp="$complete EOL"
40336   arguments="${tmp#* }"
40337 
40338   # Input might be given as Windows format, start by converting to
40339   # unix format.
40340   new_path="$path"
40341 
40342   windows_path="$new_path"
40343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40344     unix_path=`$CYGPATH -u "$windows_path"`
40345     new_path="$unix_path"
40346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40348     new_path="$unix_path"
40349   fi
40350 
40351 
40352   # Now try to locate executable using which
40353   new_path=`$WHICH "$new_path" 2> /dev/null`
40354 
40355   if test "x$new_path" = x; then
40356     # Oops. Which didn't find the executable.
40357     # The splitting of arguments from the executable at a space might have been incorrect,
40358     # since paths with space are more likely in Windows. Give it another try with the whole
40359     # argument.
40360     path="$complete"
40361     arguments="EOL"
40362     new_path="$path"
40363 
40364   windows_path="$new_path"
40365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40366     unix_path=`$CYGPATH -u "$windows_path"`
40367     new_path="$unix_path"
40368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40370     new_path="$unix_path"
40371   fi
40372 
40373 
40374     new_path=`$WHICH "$new_path" 2> /dev/null`
40375 
40376     if test "x$new_path" = x; then
40377       # It's still not found. Now this is an unrecoverable error.
40378       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40379 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40380       has_space=`$ECHO "$complete" | $GREP " "`
40381       if test "x$has_space" != x; then
40382         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40383 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40384       fi
40385       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40386     fi
40387   fi
40388 
40389   # Now new_path has a complete unix path to the binary
40390   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40391     # Keep paths in /bin as-is, but remove trailing .exe if any
40392     new_path="${new_path/%.exe/}"
40393     # Do not save /bin paths to all_fixpath_prefixes!
40394   else
40395     # Not in mixed or Windows style, start by that.
40396     new_path=`cmd //c echo $new_path`
40397 
40398   input_path="$new_path"
40399   # Check if we need to convert this using DOS-style short mode. If the path
40400   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40401   # take no chances and rewrite it.
40402   # Note: m4 eats our [], so we need to use [ and ] instead.
40403   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40404   if test "x$has_forbidden_chars" != x; then
40405     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40406     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40407   fi
40408 
40409     # Output is in $new_path
40410 
40411   windows_path="$new_path"
40412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40413     unix_path=`$CYGPATH -u "$windows_path"`
40414     new_path="$unix_path"
40415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40417     new_path="$unix_path"
40418   fi
40419 
40420     # remove trailing .exe if any
40421     new_path="${new_path/%.exe/}"
40422 
40423     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40424     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40425   fi
40426 
40427   else
40428     # We're on a posix platform. Hooray! :)
40429     # First separate the path from the arguments. This will split at the first
40430     # space.
40431     complete="$OBJDUMP"
40432     path="${complete%% *}"
40433     tmp="$complete EOL"
40434     arguments="${tmp#* }"
40435 
40436     # Cannot rely on the command "which" here since it doesn't always work.
40437     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40438     if test -z "$is_absolute_path"; then
40439       # Path to executable is not absolute. Find it.
40440       IFS_save="$IFS"
40441       IFS=:
40442       for p in $PATH; do
40443         if test -f "$p/$path" && test -x "$p/$path"; then
40444           new_path="$p/$path"
40445           break
40446         fi
40447       done
40448       IFS="$IFS_save"
40449     else
40450       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
40451 $as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
40452       new_path="$path"
40453     fi
40454 
40455     if test "x$new_path" = x; then
40456       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
40457 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
40458       has_space=`$ECHO "$complete" | $GREP " "`
40459       if test "x$has_space" != x; then
40460         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40461 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40462       fi
40463       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
40464     fi
40465   fi
40466 
40467   # Now join together the path and the arguments once again
40468   if test "x$arguments" != xEOL; then
40469     new_complete="$new_path ${arguments% *}"
40470   else
40471     new_complete="$new_path"
40472   fi
40473 
40474   if test "x$complete" != "x$new_complete"; then
40475     OBJDUMP="$new_complete"
40476     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
40477 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
40478   fi
40479 
40480   fi
40481 
40482   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
40483 
40484 
40485   # Publish this variable in the help.
40486 
40487 
40488   if test "x$LIPO" = x; then
40489     # The variable is not set by user, try to locate tool using the code snippet
40490     for ac_prog in lipo
40491 do
40492   # Extract the first word of "$ac_prog", so it can be a program name with args.
40493 set dummy $ac_prog; ac_word=$2
40494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40495 $as_echo_n "checking for $ac_word... " >&6; }
40496 if ${ac_cv_path_LIPO+:} false; then :
40497   $as_echo_n "(cached) " >&6
40498 else
40499   case $LIPO in
40500   [\\/]* | ?:[\\/]*)
40501   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40502   ;;
40503   *)
40504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40505 for as_dir in $PATH
40506 do
40507   IFS=$as_save_IFS
40508   test -z "$as_dir" && as_dir=.
40509     for ac_exec_ext in '' $ac_executable_extensions; do
40510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40511     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40513     break 2
40514   fi
40515 done
40516   done
40517 IFS=$as_save_IFS
40518 
40519   ;;
40520 esac
40521 fi
40522 LIPO=$ac_cv_path_LIPO
40523 if test -n "$LIPO"; then
40524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40525 $as_echo "$LIPO" >&6; }
40526 else
40527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40528 $as_echo "no" >&6; }
40529 fi
40530 
40531 
40532   test -n "$LIPO" && break
40533 done
40534 
40535   else
40536     # The variable is set, but is it from the command line or the environment?
40537 
40538     # Try to remove the string !LIPO! from our list.
40539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
40540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40541       # If it failed, the variable was not from the command line. Ignore it,
40542       # but warn the user (except for BASH, which is always set by the calling BASH).
40543       if test "xLIPO" != xBASH; then
40544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
40545 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
40546       fi
40547       # Try to locate tool using the code snippet
40548       for ac_prog in lipo
40549 do
40550   # Extract the first word of "$ac_prog", so it can be a program name with args.
40551 set dummy $ac_prog; ac_word=$2
40552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40553 $as_echo_n "checking for $ac_word... " >&6; }
40554 if ${ac_cv_path_LIPO+:} false; then :
40555   $as_echo_n "(cached) " >&6
40556 else
40557   case $LIPO in
40558   [\\/]* | ?:[\\/]*)
40559   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40560   ;;
40561   *)
40562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40563 for as_dir in $PATH
40564 do
40565   IFS=$as_save_IFS
40566   test -z "$as_dir" && as_dir=.
40567     for ac_exec_ext in '' $ac_executable_extensions; do
40568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40569     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40571     break 2
40572   fi
40573 done
40574   done
40575 IFS=$as_save_IFS
40576 
40577   ;;
40578 esac
40579 fi
40580 LIPO=$ac_cv_path_LIPO
40581 if test -n "$LIPO"; then
40582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40583 $as_echo "$LIPO" >&6; }
40584 else
40585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40586 $as_echo "no" >&6; }
40587 fi
40588 
40589 
40590   test -n "$LIPO" && break
40591 done
40592 
40593     else
40594       # If it succeeded, then it was overridden by the user. We will use it
40595       # for the tool.
40596 
40597       # First remove it from the list of overridden variables, so we can test
40598       # for unknown variables in the end.
40599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40600 
40601       # Check if the provided tool contains a complete path.
40602       tool_specified="$LIPO"
40603       tool_basename="${tool_specified##*/}"
40604       if test "x$tool_basename" = "x$tool_specified"; then
40605         # A command without a complete path is provided, search $PATH.
40606         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
40607 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
40608         # Extract the first word of "$tool_basename", so it can be a program name with args.
40609 set dummy $tool_basename; ac_word=$2
40610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40611 $as_echo_n "checking for $ac_word... " >&6; }
40612 if ${ac_cv_path_LIPO+:} false; then :
40613   $as_echo_n "(cached) " >&6
40614 else
40615   case $LIPO in
40616   [\\/]* | ?:[\\/]*)
40617   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
40618   ;;
40619   *)
40620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40621 for as_dir in $PATH
40622 do
40623   IFS=$as_save_IFS
40624   test -z "$as_dir" && as_dir=.
40625     for ac_exec_ext in '' $ac_executable_extensions; do
40626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40627     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
40628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40629     break 2
40630   fi
40631 done
40632   done
40633 IFS=$as_save_IFS
40634 
40635   ;;
40636 esac
40637 fi
40638 LIPO=$ac_cv_path_LIPO
40639 if test -n "$LIPO"; then
40640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
40641 $as_echo "$LIPO" >&6; }
40642 else
40643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40644 $as_echo "no" >&6; }
40645 fi
40646 
40647 
40648         if test "x$LIPO" = x; then
40649           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40650         fi
40651       else
40652         # Otherwise we believe it is a complete path. Use it as it is.
40653         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
40654 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
40655         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
40656 $as_echo_n "checking for LIPO... " >&6; }
40657         if test ! -x "$tool_specified"; then
40658           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40659 $as_echo "not found" >&6; }
40660           as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
40661         fi
40662         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40663 $as_echo "$tool_specified" >&6; }
40664       fi
40665     fi
40666   fi
40667 
40668 
40669 
40670   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40671 
40672   # First separate the path from the arguments. This will split at the first
40673   # space.
40674   complete="$LIPO"
40675   path="${complete%% *}"
40676   tmp="$complete EOL"
40677   arguments="${tmp#* }"
40678 
40679   # Input might be given as Windows format, start by converting to
40680   # unix format.
40681   new_path=`$CYGPATH -u "$path"`
40682 
40683   # Now try to locate executable using which
40684   new_path=`$WHICH "$new_path" 2> /dev/null`
40685   # bat and cmd files are not always considered executable in cygwin causing which
40686   # to not find them
40687   if test "x$new_path" = x \
40688       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40689       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40690     new_path=`$CYGPATH -u "$path"`
40691   fi
40692   if test "x$new_path" = x; then
40693     # Oops. Which didn't find the executable.
40694     # The splitting of arguments from the executable at a space might have been incorrect,
40695     # since paths with space are more likely in Windows. Give it another try with the whole
40696     # argument.
40697     path="$complete"
40698     arguments="EOL"
40699     new_path=`$CYGPATH -u "$path"`
40700     new_path=`$WHICH "$new_path" 2> /dev/null`
40701     # bat and cmd files are not always considered executable in cygwin causing which
40702     # to not find them
40703     if test "x$new_path" = x \
40704         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40705         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40706       new_path=`$CYGPATH -u "$path"`
40707     fi
40708     if test "x$new_path" = x; then
40709       # It's still not found. Now this is an unrecoverable error.
40710       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40711 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40712       has_space=`$ECHO "$complete" | $GREP " "`
40713       if test "x$has_space" != x; then
40714         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40715 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40716       fi
40717       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40718     fi
40719   fi
40720 
40721   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40722   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40723   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40724   # "foo.exe" is OK but "foo" is an error.
40725   #
40726   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40727   # It is also a way to make sure we got the proper file name for the real test later on.
40728   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40729   if test "x$test_shortpath" = x; then
40730     # Short path failed, file does not exist as specified.
40731     # Try adding .exe or .cmd
40732     if test -f "${new_path}.exe"; then
40733       input_to_shortpath="${new_path}.exe"
40734     elif test -f "${new_path}.cmd"; then
40735       input_to_shortpath="${new_path}.cmd"
40736     else
40737       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
40738 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
40739       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40740 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40741       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40742     fi
40743   else
40744     input_to_shortpath="$new_path"
40745   fi
40746 
40747   # Call helper function which possibly converts this using DOS-style short mode.
40748   # If so, the updated path is stored in $new_path.
40749   new_path="$input_to_shortpath"
40750 
40751   input_path="$input_to_shortpath"
40752   # Check if we need to convert this using DOS-style short mode. If the path
40753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40754   # take no chances and rewrite it.
40755   # Note: m4 eats our [], so we need to use [ and ] instead.
40756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40757   if test "x$has_forbidden_chars" != x; then
40758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40762       # Going to short mode and back again did indeed matter. Since short mode is
40763       # case insensitive, let's make it lowercase to improve readability.
40764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40765       # Now convert it back to Unix-stile (cygpath)
40766       input_path=`$CYGPATH -u "$shortmode_path"`
40767       new_path="$input_path"
40768     fi
40769   fi
40770 
40771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40772   if test "x$test_cygdrive_prefix" = x; then
40773     # As a simple fix, exclude /usr/bin since it's not a real path.
40774     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40776       # a path prefixed by /cygdrive for fixpath to work.
40777       new_path="$CYGWIN_ROOT_PATH$input_path"
40778     fi
40779   fi
40780 
40781   # remove trailing .exe if any
40782   new_path="${new_path/%.exe/}"
40783 
40784   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40785 
40786   # First separate the path from the arguments. This will split at the first
40787   # space.
40788   complete="$LIPO"
40789   path="${complete%% *}"
40790   tmp="$complete EOL"
40791   arguments="${tmp#* }"
40792 
40793   # Input might be given as Windows format, start by converting to
40794   # unix format.
40795   new_path="$path"
40796 
40797   windows_path="$new_path"
40798   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40799     unix_path=`$CYGPATH -u "$windows_path"`
40800     new_path="$unix_path"
40801   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40802     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40803     new_path="$unix_path"
40804   fi
40805 
40806 
40807   # Now try to locate executable using which
40808   new_path=`$WHICH "$new_path" 2> /dev/null`
40809 
40810   if test "x$new_path" = x; then
40811     # Oops. Which didn't find the executable.
40812     # The splitting of arguments from the executable at a space might have been incorrect,
40813     # since paths with space are more likely in Windows. Give it another try with the whole
40814     # argument.
40815     path="$complete"
40816     arguments="EOL"
40817     new_path="$path"
40818 
40819   windows_path="$new_path"
40820   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40821     unix_path=`$CYGPATH -u "$windows_path"`
40822     new_path="$unix_path"
40823   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40824     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40825     new_path="$unix_path"
40826   fi
40827 
40828 
40829     new_path=`$WHICH "$new_path" 2> /dev/null`
40830 
40831     if test "x$new_path" = x; then
40832       # It's still not found. Now this is an unrecoverable error.
40833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40834 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40835       has_space=`$ECHO "$complete" | $GREP " "`
40836       if test "x$has_space" != x; then
40837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40839       fi
40840       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40841     fi
40842   fi
40843 
40844   # Now new_path has a complete unix path to the binary
40845   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40846     # Keep paths in /bin as-is, but remove trailing .exe if any
40847     new_path="${new_path/%.exe/}"
40848     # Do not save /bin paths to all_fixpath_prefixes!
40849   else
40850     # Not in mixed or Windows style, start by that.
40851     new_path=`cmd //c echo $new_path`
40852 
40853   input_path="$new_path"
40854   # Check if we need to convert this using DOS-style short mode. If the path
40855   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40856   # take no chances and rewrite it.
40857   # Note: m4 eats our [], so we need to use [ and ] instead.
40858   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40859   if test "x$has_forbidden_chars" != x; then
40860     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40861     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40862   fi
40863 
40864     # Output is in $new_path
40865 
40866   windows_path="$new_path"
40867   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40868     unix_path=`$CYGPATH -u "$windows_path"`
40869     new_path="$unix_path"
40870   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40871     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40872     new_path="$unix_path"
40873   fi
40874 
40875     # remove trailing .exe if any
40876     new_path="${new_path/%.exe/}"
40877 
40878     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40879     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40880   fi
40881 
40882   else
40883     # We're on a posix platform. Hooray! :)
40884     # First separate the path from the arguments. This will split at the first
40885     # space.
40886     complete="$LIPO"
40887     path="${complete%% *}"
40888     tmp="$complete EOL"
40889     arguments="${tmp#* }"
40890 
40891     # Cannot rely on the command "which" here since it doesn't always work.
40892     is_absolute_path=`$ECHO "$path" | $GREP ^/`
40893     if test -z "$is_absolute_path"; then
40894       # Path to executable is not absolute. Find it.
40895       IFS_save="$IFS"
40896       IFS=:
40897       for p in $PATH; do
40898         if test -f "$p/$path" && test -x "$p/$path"; then
40899           new_path="$p/$path"
40900           break
40901         fi
40902       done
40903       IFS="$IFS_save"
40904     else
40905       { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
40906 $as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
40907       new_path="$path"
40908     fi
40909 
40910     if test "x$new_path" = x; then
40911       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
40912 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
40913       has_space=`$ECHO "$complete" | $GREP " "`
40914       if test "x$has_space" != x; then
40915         { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40916 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40917       fi
40918       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
40919     fi
40920   fi
40921 
40922   # Now join together the path and the arguments once again
40923   if test "x$arguments" != xEOL; then
40924     new_complete="$new_path ${arguments% *}"
40925   else
40926     new_complete="$new_path"
40927   fi
40928 
40929   if test "x$complete" != "x$new_complete"; then
40930     LIPO="$new_complete"
40931     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
40932 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
40933   fi
40934 
40935   fi
40936 
40937 
40938 
40939   # Restore old path without tools dir
40940   PATH="$OLD_PATH"
40941 
40942 
40943 # FIXME: Currently we must test this after paths but before flags. Fix!
40944 
40945 # And we can test some aspects on the target using configure macros.
40946 
40947 
40948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40949 $as_echo_n "checking for ANSI C header files... " >&6; }
40950 if ${ac_cv_header_stdc+:} false; then :
40951   $as_echo_n "(cached) " >&6
40952 else
40953   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40954 /* end confdefs.h.  */
40955 #include <stdlib.h>
40956 #include <stdarg.h>
40957 #include <string.h>
40958 #include <float.h>
40959 
40960 int
40961 main ()
40962 {
40963 
40964   ;
40965   return 0;
40966 }
40967 _ACEOF
40968 if ac_fn_cxx_try_compile "$LINENO"; then :
40969   ac_cv_header_stdc=yes
40970 else
40971   ac_cv_header_stdc=no
40972 fi
40973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40974 
40975 if test $ac_cv_header_stdc = yes; then
40976   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40977   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40978 /* end confdefs.h.  */
40979 #include <string.h>
40980 
40981 _ACEOF
40982 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40983   $EGREP "memchr" >/dev/null 2>&1; then :
40984 
40985 else
40986   ac_cv_header_stdc=no
40987 fi
40988 rm -f conftest*
40989 
40990 fi
40991 
40992 if test $ac_cv_header_stdc = yes; then
40993   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40995 /* end confdefs.h.  */
40996 #include <stdlib.h>
40997 
40998 _ACEOF
40999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41000   $EGREP "free" >/dev/null 2>&1; then :
41001 
41002 else
41003   ac_cv_header_stdc=no
41004 fi
41005 rm -f conftest*
41006 
41007 fi
41008 
41009 if test $ac_cv_header_stdc = yes; then
41010   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41011   if test "$cross_compiling" = yes; then :
41012   :
41013 else
41014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41015 /* end confdefs.h.  */
41016 #include <ctype.h>
41017 #include <stdlib.h>
41018 #if ((' ' & 0x0FF) == 0x020)
41019 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41020 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41021 #else
41022 # define ISLOWER(c) \
41023                    (('a' <= (c) && (c) <= 'i') \
41024                      || ('j' <= (c) && (c) <= 'r') \
41025                      || ('s' <= (c) && (c) <= 'z'))
41026 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41027 #endif
41028 
41029 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41030 int
41031 main ()
41032 {
41033   int i;
41034   for (i = 0; i < 256; i++)
41035     if (XOR (islower (i), ISLOWER (i))
41036         || toupper (i) != TOUPPER (i))
41037       return 2;
41038   return 0;
41039 }
41040 _ACEOF
41041 if ac_fn_cxx_try_run "$LINENO"; then :
41042 
41043 else
41044   ac_cv_header_stdc=no
41045 fi
41046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41047   conftest.$ac_objext conftest.beam conftest.$ac_ext
41048 fi
41049 
41050 fi
41051 fi
41052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41053 $as_echo "$ac_cv_header_stdc" >&6; }
41054 if test $ac_cv_header_stdc = yes; then
41055 
41056 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
41057 
41058 fi
41059 
41060 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
41061 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41062                   inttypes.h stdint.h unistd.h
41063 do :
41064   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41065 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41066 "
41067 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41068   cat >>confdefs.h <<_ACEOF
41069 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41070 _ACEOF
41071 
41072 fi
41073 
41074 done
41075 
41076 
41077 
41078   ###############################################################################
41079   #
41080   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41081   # (The JVM can use 32 or 64 bit Java pointers but that decision
41082   # is made at runtime.)
41083   #
41084 
41085   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41086     # Always specify -m flag on Solaris
41087     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41088 
41089   # When we add flags to the "official" CFLAGS etc, we need to
41090   # keep track of these additions in ADDED_CFLAGS etc. These
41091   # will later be checked to make sure only controlled additions
41092   # have been made to CFLAGS etc.
41093   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41094   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41095   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41096 
41097   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41098   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41099   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41100 
41101   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41102   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41103   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41104 
41105   elif test "x$COMPILE_TYPE" = xreduced; then
41106     if test "x$OPENJDK_TARGET_OS" != xwindows; then
41107       # Specify -m if running reduced on other Posix platforms
41108 
41109   # When we add flags to the "official" CFLAGS etc, we need to
41110   # keep track of these additions in ADDED_CFLAGS etc. These
41111   # will later be checked to make sure only controlled additions
41112   # have been made to CFLAGS etc.
41113   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41114   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41115   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41116 
41117   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41118   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41119   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41120 
41121   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41122   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41123   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41124 
41125     fi
41126   fi
41127 
41128   # Make compilation sanity check
41129   for ac_header in stdio.h
41130 do :
41131   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41132 if test "x$ac_cv_header_stdio_h" = xyes; then :
41133   cat >>confdefs.h <<_ACEOF
41134 #define HAVE_STDIO_H 1
41135 _ACEOF
41136 
41137 else
41138 
41139     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41140 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41141     if test "x$COMPILE_TYPE" = xreduced; then
41142       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41143 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41144     elif test "x$COMPILE_TYPE" = xcross; then
41145       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41146 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41147     fi
41148     as_fn_error $? "Cannot continue." "$LINENO" 5
41149 
41150 fi
41151 
41152 done
41153 
41154 
41155   # The cast to long int works around a bug in the HP C Compiler
41156 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41157 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41158 # This bug is HP SR number 8606223364.
41159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41160 $as_echo_n "checking size of int *... " >&6; }
41161 if ${ac_cv_sizeof_int_p+:} false; then :
41162   $as_echo_n "(cached) " >&6
41163 else
41164   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41165 
41166 else
41167   if test "$ac_cv_type_int_p" = yes; then
41168      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41169 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41170 as_fn_error 77 "cannot compute sizeof (int *)
41171 See \`config.log' for more details" "$LINENO" 5; }
41172    else
41173      ac_cv_sizeof_int_p=0
41174    fi
41175 fi
41176 
41177 fi
41178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41179 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41180 
41181 
41182 
41183 cat >>confdefs.h <<_ACEOF
41184 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41185 _ACEOF
41186 
41187 
41188 
41189   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41190   if test "x$ac_cv_sizeof_int_p" = x; then
41191     # The test failed, lets stick to the assumed value.
41192     { $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
41193 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41194   else
41195     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41196 
41197     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41198       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41199       # Let's try to implicitely set the compilers target architecture and retry the test
41200       { $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
41201 $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;}
41202       { $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
41203 $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;}
41204 
41205   # When we add flags to the "official" CFLAGS etc, we need to
41206   # keep track of these additions in ADDED_CFLAGS etc. These
41207   # will later be checked to make sure only controlled additions
41208   # have been made to CFLAGS etc.
41209   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41210   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41211   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41212 
41213   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41214   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41215   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41216 
41217   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41218   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41219   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41220 
41221 
41222       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41223       unset ac_cv_sizeof_int_p
41224       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41225       cat >>confdefs.h <<_ACEOF
41226 #undef SIZEOF_INT_P
41227 _ACEOF
41228 
41229       # The cast to long int works around a bug in the HP C Compiler
41230 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41231 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41232 # This bug is HP SR number 8606223364.
41233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41234 $as_echo_n "checking size of int *... " >&6; }
41235 if ${ac_cv_sizeof_int_p+:} false; then :
41236   $as_echo_n "(cached) " >&6
41237 else
41238   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41239 
41240 else
41241   if test "$ac_cv_type_int_p" = yes; then
41242      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41243 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41244 as_fn_error 77 "cannot compute sizeof (int *)
41245 See \`config.log' for more details" "$LINENO" 5; }
41246    else
41247      ac_cv_sizeof_int_p=0
41248    fi
41249 fi
41250 
41251 fi
41252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41253 $as_echo "$ac_cv_sizeof_int_p" >&6; }
41254 
41255 
41256 
41257 cat >>confdefs.h <<_ACEOF
41258 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
41259 _ACEOF
41260 
41261 
41262 
41263       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41264 
41265       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41266         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
41267       fi
41268     fi
41269   fi
41270 
41271   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41272 $as_echo_n "checking for target address size... " >&6; }
41273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41274 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41275 
41276 
41277   ###############################################################################
41278   #
41279   # Is the target little of big endian?
41280   #
41281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41282 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41283 if ${ac_cv_c_bigendian+:} false; then :
41284   $as_echo_n "(cached) " >&6
41285 else
41286   ac_cv_c_bigendian=unknown
41287     # See if we're dealing with a universal compiler.
41288     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41289 /* end confdefs.h.  */
41290 #ifndef __APPLE_CC__
41291                not a universal capable compiler
41292              #endif
41293              typedef int dummy;
41294 
41295 _ACEOF
41296 if ac_fn_cxx_try_compile "$LINENO"; then :
41297 
41298         # Check for potential -arch flags.  It is not universal unless
41299         # there are at least two -arch flags with different values.
41300         ac_arch=
41301         ac_prev=
41302         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41303          if test -n "$ac_prev"; then
41304            case $ac_word in
41305              i?86 | x86_64 | ppc | ppc64)
41306                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41307                  ac_arch=$ac_word
41308                else
41309                  ac_cv_c_bigendian=universal
41310                  break
41311                fi
41312                ;;
41313            esac
41314            ac_prev=
41315          elif test "x$ac_word" = "x-arch"; then
41316            ac_prev=arch
41317          fi
41318        done
41319 fi
41320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41321     if test $ac_cv_c_bigendian = unknown; then
41322       # See if sys/param.h defines the BYTE_ORDER macro.
41323       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41324 /* end confdefs.h.  */
41325 #include <sys/types.h>
41326              #include <sys/param.h>
41327 
41328 int
41329 main ()
41330 {
41331 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41332                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41333                      && LITTLE_ENDIAN)
41334               bogus endian macros
41335              #endif
41336 
41337   ;
41338   return 0;
41339 }
41340 _ACEOF
41341 if ac_fn_cxx_try_compile "$LINENO"; then :
41342   # It does; now see whether it defined to BIG_ENDIAN or not.
41343          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41344 /* end confdefs.h.  */
41345 #include <sys/types.h>
41346                 #include <sys/param.h>
41347 
41348 int
41349 main ()
41350 {
41351 #if BYTE_ORDER != BIG_ENDIAN
41352                  not big endian
41353                 #endif
41354 
41355   ;
41356   return 0;
41357 }
41358 _ACEOF
41359 if ac_fn_cxx_try_compile "$LINENO"; then :
41360   ac_cv_c_bigendian=yes
41361 else
41362   ac_cv_c_bigendian=no
41363 fi
41364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41365 fi
41366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41367     fi
41368     if test $ac_cv_c_bigendian = unknown; then
41369       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41370       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41371 /* end confdefs.h.  */
41372 #include <limits.h>
41373 
41374 int
41375 main ()
41376 {
41377 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41378               bogus endian macros
41379              #endif
41380 
41381   ;
41382   return 0;
41383 }
41384 _ACEOF
41385 if ac_fn_cxx_try_compile "$LINENO"; then :
41386   # It does; now see whether it defined to _BIG_ENDIAN or not.
41387          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41388 /* end confdefs.h.  */
41389 #include <limits.h>
41390 
41391 int
41392 main ()
41393 {
41394 #ifndef _BIG_ENDIAN
41395                  not big endian
41396                 #endif
41397 
41398   ;
41399   return 0;
41400 }
41401 _ACEOF
41402 if ac_fn_cxx_try_compile "$LINENO"; then :
41403   ac_cv_c_bigendian=yes
41404 else
41405   ac_cv_c_bigendian=no
41406 fi
41407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41408 fi
41409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41410     fi
41411     if test $ac_cv_c_bigendian = unknown; then
41412       # Compile a test program.
41413       if test "$cross_compiling" = yes; then :
41414   # Try to guess by grepping values from an object file.
41415          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41416 /* end confdefs.h.  */
41417 short int ascii_mm[] =
41418                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41419                 short int ascii_ii[] =
41420                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41421                 int use_ascii (int i) {
41422                   return ascii_mm[i] + ascii_ii[i];
41423                 }
41424                 short int ebcdic_ii[] =
41425                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41426                 short int ebcdic_mm[] =
41427                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41428                 int use_ebcdic (int i) {
41429                   return ebcdic_mm[i] + ebcdic_ii[i];
41430                 }
41431                 extern int foo;
41432 
41433 int
41434 main ()
41435 {
41436 return use_ascii (foo) == use_ebcdic (foo);
41437   ;
41438   return 0;
41439 }
41440 _ACEOF
41441 if ac_fn_cxx_try_compile "$LINENO"; then :
41442   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41443               ac_cv_c_bigendian=yes
41444             fi
41445             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41446               if test "$ac_cv_c_bigendian" = unknown; then
41447                 ac_cv_c_bigendian=no
41448               else
41449                 # finding both strings is unlikely to happen, but who knows?
41450                 ac_cv_c_bigendian=unknown
41451               fi
41452             fi
41453 fi
41454 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41455 else
41456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41457 /* end confdefs.h.  */
41458 $ac_includes_default
41459 int
41460 main ()
41461 {
41462 
41463              /* Are we little or big endian?  From Harbison&Steele.  */
41464              union
41465              {
41466                long int l;
41467                char c[sizeof (long int)];
41468              } u;
41469              u.l = 1;
41470              return u.c[sizeof (long int) - 1] == 1;
41471 
41472   ;
41473   return 0;
41474 }
41475 _ACEOF
41476 if ac_fn_cxx_try_run "$LINENO"; then :
41477   ac_cv_c_bigendian=no
41478 else
41479   ac_cv_c_bigendian=yes
41480 fi
41481 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41482   conftest.$ac_objext conftest.beam conftest.$ac_ext
41483 fi
41484 
41485     fi
41486 fi
41487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41488 $as_echo "$ac_cv_c_bigendian" >&6; }
41489  case $ac_cv_c_bigendian in #(
41490    yes)
41491      ENDIAN="big";; #(
41492    no)
41493      ENDIAN="little" ;; #(
41494    universal)
41495      ENDIAN="universal_endianness"
41496      ;; #(
41497    *)
41498      ENDIAN="unknown" ;;
41499  esac
41500 
41501 
41502   if test "x$ENDIAN" = xuniversal_endianness; then
41503     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41504   fi
41505   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41506     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
41507   fi
41508 
41509 
41510 # Configure flags for the tools
41511 
41512 
41513   ###############################################################################
41514   #
41515   # How to compile shared libraries.
41516   #
41517 
41518   if test "x$GCC" = xyes; then
41519     COMPILER_NAME=gcc
41520     PICFLAG="-fPIC"
41521     LIBRARY_PREFIX=lib
41522     SHARED_LIBRARY='lib$1.so'
41523     STATIC_LIBRARY='lib$1.a'
41524     SHARED_LIBRARY_FLAGS="-shared"
41525     SHARED_LIBRARY_SUFFIX='.so'
41526     STATIC_LIBRARY_SUFFIX='.a'
41527     OBJ_SUFFIX='.o'
41528     EXE_SUFFIX=''
41529     SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41530     SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41531     C_FLAG_REORDER=''
41532     CXX_FLAG_REORDER=''
41533     SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41534     SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41535     LD="$CC"
41536     LDEXE="$CC"
41537     LDCXX="$CXX"
41538     LDEXECXX="$CXX"
41539     POST_STRIP_CMD="$STRIP -g"
41540 
41541     # Linking is different on MacOSX
41542     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41543       # Might change in the future to clang.
41544       COMPILER_NAME=gcc
41545       SHARED_LIBRARY='lib$1.dylib'
41546       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41547       SHARED_LIBRARY_SUFFIX='.dylib'
41548       EXE_SUFFIX=''
41549       SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41550       SET_SHARED_LIBRARY_MAPFILE=''
41551       SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41552       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41553       POST_STRIP_CMD="$STRIP -S"
41554     fi
41555   else
41556     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41557       # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
41558       COMPILER_NAME=ossc
41559       PICFLAG="-KPIC"
41560       LIBRARY_PREFIX=lib
41561       SHARED_LIBRARY='lib$1.so'
41562       STATIC_LIBRARY='lib$1.a'
41563       SHARED_LIBRARY_FLAGS="-G"
41564       SHARED_LIBRARY_SUFFIX='.so'
41565       STATIC_LIBRARY_SUFFIX='.a'
41566       OBJ_SUFFIX='.o'
41567       EXE_SUFFIX=''
41568       SET_SHARED_LIBRARY_NAME=''
41569       SET_SHARED_LIBRARY_MAPFILE='-M$1'
41570       C_FLAG_REORDER='-xF'
41571       CXX_FLAG_REORDER='-xF'
41572       SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
41573       SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
41574       CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41575       CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41576       CFLAGS_JDKLIB_EXTRA='-xstrconst'
41577       POST_STRIP_CMD="$STRIP -x"
41578       POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41579     fi
41580     if test "x$OPENJDK_TARGET_OS" = xaix; then
41581         COMPILER_NAME=xlc
41582         PICFLAG="-qpic=large"
41583         LIBRARY_PREFIX=lib
41584         SHARED_LIBRARY='lib$1.so'
41585         STATIC_LIBRARY='lib$1.a'
41586         SHARED_LIBRARY_FLAGS="-qmkshrobj"
41587         SHARED_LIBRARY_SUFFIX='.so'
41588         STATIC_LIBRARY_SUFFIX='.a'
41589         OBJ_SUFFIX='.o'
41590         EXE_SUFFIX=''
41591         SET_SHARED_LIBRARY_NAME=''
41592         SET_SHARED_LIBRARY_MAPFILE=''
41593         C_FLAG_REORDER=''
41594         CXX_FLAG_REORDER=''
41595         SET_SHARED_LIBRARY_ORIGIN=''
41596         SET_EXECUTABLE_ORIGIN=""
41597         CFLAGS_JDK=""
41598         CXXFLAGS_JDK=""
41599         CFLAGS_JDKLIB_EXTRA=''
41600         POST_STRIP_CMD="$STRIP -X32_64"
41601         POST_MCS_CMD=""
41602     fi
41603     if test "x$OPENJDK_TARGET_OS" = xwindows; then
41604       # If it is not gcc, then assume it is the MS Visual Studio compiler
41605       COMPILER_NAME=cl
41606       PICFLAG=""
41607       LIBRARY_PREFIX=
41608       SHARED_LIBRARY='$1.dll'
41609       STATIC_LIBRARY='$1.lib'
41610       SHARED_LIBRARY_FLAGS="-LD"
41611       SHARED_LIBRARY_SUFFIX='.dll'
41612       STATIC_LIBRARY_SUFFIX='.lib'
41613       OBJ_SUFFIX='.obj'
41614       EXE_SUFFIX='.exe'
41615       SET_SHARED_LIBRARY_NAME=''
41616       SET_SHARED_LIBRARY_MAPFILE=''
41617       SET_SHARED_LIBRARY_ORIGIN=''
41618       SET_EXECUTABLE_ORIGIN=''
41619     fi
41620   fi
41621 
41622 
41623 
41624 
41625 
41626 
41627 
41628 
41629 
41630 
41631 
41632 
41633 
41634 
41635 
41636 
41637 
41638 
41639 
41640   # The (cross) compiler is now configured, we can now test capabilities
41641   # of the target platform.
41642 
41643 
41644 
41645   ###############################################################################
41646   #
41647   # Setup the opt flags for different compilers
41648   # and different operating systems.
41649   #
41650 
41651   #
41652   # NOTE: check for -mstackrealign needs to be below potential addition of -m32
41653   #
41654   if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
41655     # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
41656     # While waiting for a better solution, the current workaround is to use -mstackrealign.
41657     CFLAGS="$CFLAGS -mstackrealign"
41658     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
41659 $as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
41660     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41661 /* end confdefs.h.  */
41662 int main() { return 0; }
41663 _ACEOF
41664 if ac_fn_cxx_try_link "$LINENO"; then :
41665 
41666           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41667 $as_echo "yes" >&6; }
41668 
41669 else
41670 
41671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41672 $as_echo "no" >&6; }
41673           as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
41674 
41675 
41676 fi
41677 rm -f core conftest.err conftest.$ac_objext \
41678     conftest$ac_exeext conftest.$ac_ext
41679   fi
41680 
41681   C_FLAG_DEPS="-MMD -MF"
41682   CXX_FLAG_DEPS="-MMD -MF"
41683 
41684   case $COMPILER_TYPE in
41685     CC )
41686       case $COMPILER_NAME in
41687         gcc )
41688           case $OPENJDK_TARGET_OS in
41689             macosx )
41690               # On MacOSX we optimize for size, something
41691               # we should do for all platforms?
41692               C_O_FLAG_HI="-Os"
41693               C_O_FLAG_NORM="-Os"
41694               C_O_FLAG_NONE=""
41695               ;;
41696             *)
41697               C_O_FLAG_HI="-O3"
41698               C_O_FLAG_NORM="-O2"
41699               C_O_FLAG_NONE="-O0"
41700               ;;
41701           esac
41702           CXX_O_FLAG_HI="$C_O_FLAG_HI"
41703           CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41704           CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41705           CFLAGS_DEBUG_SYMBOLS="-g"
41706           CXXFLAGS_DEBUG_SYMBOLS="-g"
41707           if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41708             CFLAGS_DEBUG_SYMBOLS="-g1"
41709             CXXFLAGS_DEBUG_SYMBOLS="-g1"
41710           fi
41711           ;;
41712         ossc )
41713           #
41714           # Forte has different names for this with their C++ compiler...
41715           #
41716           C_FLAG_DEPS="-xMMD -xMF"
41717           CXX_FLAG_DEPS="-xMMD -xMF"
41718 
41719           # Extra options used with HIGHEST
41720           #
41721           # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
41722           #          done with care, there are some assumptions below that need to
41723           #          be understood about the use of pointers, and IEEE behavior.
41724           #
41725           # Use non-standard floating point mode (not IEEE 754)
41726           CC_HIGHEST="$CC_HIGHEST -fns"
41727           # Do some simplification of floating point arithmetic (not IEEE 754)
41728           CC_HIGHEST="$CC_HIGHEST -fsimple"
41729           # Use single precision floating point with 'float'
41730           CC_HIGHEST="$CC_HIGHEST -fsingle"
41731           # Assume memory references via basic pointer types do not alias
41732           #   (Source with excessing pointer casting and data access with mixed
41733           #    pointer types are not recommended)
41734           CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
41735           # Use intrinsic or inline versions for math/std functions
41736           #   (If you expect perfect errno behavior, do not use this)
41737           CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
41738           # Loop data dependency optimizations (need -xO3 or higher)
41739           CC_HIGHEST="$CC_HIGHEST -xdepend"
41740           # Pointer parameters to functions do not overlap
41741           #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
41742           #    If you pass in multiple pointers to the same data, do not use this)
41743           CC_HIGHEST="$CC_HIGHEST -xrestrict"
41744           # Inline some library routines
41745           #   (If you expect perfect errno behavior, do not use this)
41746           CC_HIGHEST="$CC_HIGHEST -xlibmil"
41747           # Use optimized math routines
41748           #   (If you expect perfect errno behavior, do not use this)
41749           #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
41750           #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
41751 
41752           if test "x$OPENJDK_TARGET_CPU" = xsparc; then
41753             CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
41754             CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
41755           fi
41756 
41757           case $OPENJDK_TARGET_CPU_ARCH in
41758             x86)
41759               C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41760               C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41761               C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41762               C_O_FLAG_NONE="-xregs=no%frameptr"
41763               CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41764               CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41765               CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41766               CXX_O_FLAG_NONE="-xregs=no%frameptr"
41767               if test "x$OPENJDK_TARGET_CPU" = xx86; then
41768                 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41769                 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41770               fi
41771               ;;
41772             sparc)
41773               CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41774               CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41775               C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41776               C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41777               C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41778               C_O_FLAG_NONE=""
41779               CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41780               CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41781               CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41782               CXX_O_FLAG_NONE=""
41783               ;;
41784           esac
41785 
41786           CFLAGS_DEBUG_SYMBOLS="-g -xs"
41787           CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41788           ;;
41789         xlc )
41790           C_FLAG_DEPS="-qmakedep=gcc -MF"
41791           CXX_FLAG_DEPS="-qmakedep=gcc -MF"
41792           C_O_FLAG_HIGHEST="-O3"
41793           C_O_FLAG_HI="-O3 -qstrict"
41794           C_O_FLAG_NORM="-O2"
41795           C_O_FLAG_NONE=""
41796           CXX_O_FLAG_HIGHEST="-O3"
41797           CXX_O_FLAG_HI="-O3 -qstrict"
41798           CXX_O_FLAG_NORM="-O2"
41799           CXX_O_FLAG_NONE=""
41800           CFLAGS_DEBUG_SYMBOLS="-g"
41801           CXXFLAGS_DEBUG_SYMBOLS="-g"
41802           LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41803           CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41804           CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41805           ;;
41806       esac
41807       ;;
41808     CL )
41809       C_O_FLAG_HIGHEST="-O2"
41810       C_O_FLAG_HI="-O1"
41811       C_O_FLAG_NORM="-O1"
41812       C_O_FLAG_NONE="-Od"
41813       CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41814       CXX_O_FLAG_HI="$C_O_FLAG_HI"
41815       CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41816       CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41817       ;;
41818   esac
41819 
41820   if test -z "$C_O_FLAG_HIGHEST"; then
41821     C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
41822   fi
41823 
41824   if test -z "$CXX_O_FLAG_HIGHEST"; then
41825     CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
41826   fi
41827 
41828 
41829 
41830 
41831 
41832 
41833 
41834 
41835 
41836 
41837 
41838 
41839 
41840 
41841   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41842     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41843 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41844   fi
41845 
41846   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41847     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41848 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41849   fi
41850 
41851   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41852     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41853 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41854   fi
41855 
41856 
41857 # Check whether --with-extra-cflags was given.
41858 if test "${with_extra_cflags+set}" = set; then :
41859   withval=$with_extra_cflags;
41860 fi
41861 
41862 
41863 
41864 # Check whether --with-extra-cxxflags was given.
41865 if test "${with_extra_cxxflags+set}" = set; then :
41866   withval=$with_extra_cxxflags;
41867 fi
41868 
41869 
41870 
41871 # Check whether --with-extra-ldflags was given.
41872 if test "${with_extra_ldflags+set}" = set; then :
41873   withval=$with_extra_ldflags;
41874 fi
41875 
41876 
41877   CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41878   CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41879   LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41880 
41881   # Hotspot needs these set in their legacy form
41882   LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41883   LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41884   LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41885 
41886 
41887 
41888 
41889 
41890   ###############################################################################
41891   #
41892   # Now setup the CFLAGS and LDFLAGS for the JDK build.
41893   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41894   #
41895   case $COMPILER_NAME in
41896     gcc )
41897       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
41898       -pipe \
41899       -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41900       case $OPENJDK_TARGET_CPU_ARCH in
41901         arm )
41902           # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41903           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41904           ;;
41905         ppc )
41906           # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41907           ;;
41908         * )
41909           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41910           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41911           ;;
41912       esac
41913       ;;
41914     ossc )
41915       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41916       case $OPENJDK_TARGET_CPU_ARCH in
41917         x86 )
41918           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41919           CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41920           ;;
41921       esac
41922 
41923       CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41924       CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41925 
41926       LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41927       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41928       ;;
41929     xlc )
41930       CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41931       CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41932 
41933       LDFLAGS_JDK="$LDFLAGS_JDK"
41934       LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK"
41935       ;;
41936     cl )
41937       CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41938       -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41939       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41940       -DWIN32 -DIAL"
41941       case $OPENJDK_TARGET_CPU in
41942         x86 )
41943           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41944           ;;
41945         x86_64 )
41946           CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41947           ;;
41948       esac
41949       ;;
41950   esac
41951 
41952   ###############################################################################
41953 
41954   # Adjust flags according to debug level.
41955   case $DEBUG_LEVEL in
41956     fastdebug )
41957       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41958       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41959       C_O_FLAG_HI="$C_O_FLAG_NORM"
41960       C_O_FLAG_NORM="$C_O_FLAG_NORM"
41961       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41962       CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41963       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41964       ;;
41965     slowdebug )
41966       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41967       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41968       C_O_FLAG_HI="$C_O_FLAG_NONE"
41969       C_O_FLAG_NORM="$C_O_FLAG_NONE"
41970       CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41971       CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41972       JAVAC_FLAGS="$JAVAC_FLAGS -g"
41973       ;;
41974   esac
41975 
41976   CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41977 
41978   # The package path is used only on macosx?
41979   PACKAGE_PATH=/opt/local
41980 
41981 
41982   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41983     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41984     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41985     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41986     #   Note: -Dmacro         is the same as    #define macro 1
41987     #         -Dmacro=        is the same as    #define macro
41988     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41989       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41990     else
41991       CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41992     fi
41993   else
41994     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41995   fi
41996   if test "x$OPENJDK_TARGET_OS" = xlinux; then
41997     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
41998   fi
41999   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42000     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
42001   fi
42002   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42003     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
42004   fi
42005   if test "x$OPENJDK_TARGET_OS" = xaix; then
42006     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DAIX -DPPC64"
42007   fi
42008   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42009     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42010     # Setting these parameters makes it an error to link to macosx APIs that are
42011     # newer than the given OS version and makes the linked binaries compatible even
42012     # if built on a newer version of the OS.
42013     # The expected format is X.Y.Z
42014     MACOSX_VERSION_MIN=10.7.0
42015 
42016     # The macro takes the version with no dots, ex: 1070
42017     # Let the flags variables get resolved in make for easier override on make
42018     # command line.
42019     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42020     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42021   fi
42022   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42023     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
42024   fi
42025   if test "x$DEBUG_LEVEL" = xrelease; then
42026     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
42027   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42028     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
42029   fi
42030   else
42031     CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
42032   fi
42033 
42034   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42035   CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42036 
42037   CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
42038       -I${JDK_OUTPUTDIR}/include \
42039       -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42040       -I${JDK_TOPDIR}/src/share/javavm/export \
42041       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42042       -I${JDK_TOPDIR}/src/share/native/common \
42043       -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42044 
42045   # The shared libraries are compiled using the picflag.
42046   CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42047   CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42048 
42049   # Executable flags
42050   CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
42051   CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
42052 
42053   # Now this is odd. The JDK native libraries have to link against libjvm.so
42054   # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42055   # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42056   # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42057   # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42058   # libraries will link to whatever is in memory. Yuck.
42059   #
42060   # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42061   if test "x$COMPILER_NAME" = xcl; then
42062     LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42063     if test "x$OPENJDK_TARGET_CPU" = xx86; then
42064       LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42065     fi
42066     # TODO: make -debug optional "--disable-full-debug-symbols"
42067     LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42068     LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42069     LDFLAGS_JDKLIB_SUFFIX=""
42070     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42071       LDFLAGS_STACK_SIZE=1048576
42072     else
42073       LDFLAGS_STACK_SIZE=327680
42074     fi
42075     LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
42076   else
42077     if test "x$COMPILER_NAME" = xgcc; then
42078       # If this is a --hash-style=gnu system, use --hash-style=both, why?
42079       HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
42080       if test -n "$HAS_GNU_HASH"; then
42081         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
42082       fi
42083       if test "x$OPENJDK_TARGET_OS" = xlinux; then
42084         # And since we now know that the linker is gnu, then add -z defs, to forbid
42085         # undefined symbols in object files.
42086         LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42087         if test "x$DEBUG_LEVEL" = "xrelease"; then
42088           # When building release libraries, tell the linker optimize them.
42089           # Should this be supplied to the OSS linker as well?
42090           LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42091         fi
42092       fi
42093     fi
42094     LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
42095         -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42096 
42097     # On some platforms (mac) the linker warns about non existing -L dirs.
42098     # Add server first if available. Linking aginst client does not always produce the same results.
42099     # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42100     # Default to server for other variants.
42101     if test "x$JVM_VARIANT_SERVER" = xtrue; then
42102       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42103     elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42104       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42105     elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42106       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42107     else
42108       LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42109     fi
42110 
42111     LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42112     if test "x$COMPILER_NAME" = xossc; then
42113       LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42114     fi
42115 
42116     LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42117     if test "x$OPENJDK_TARGET_OS" = xlinux; then
42118       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42119     fi
42120   fi
42121 
42122 
42123 
42124 
42125 
42126 
42127 
42128 
42129 
42130 
42131 
42132 
42133 
42134 
42135 
42136   # Some Zero and Shark settings.
42137   # ZERO_ARCHFLAG tells the compiler which mode to build for
42138   case "${OPENJDK_TARGET_CPU}" in
42139     s390)
42140       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42141       ;;
42142     *)
42143       ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42144   esac
42145 
42146   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42147 $as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42148   supports=yes
42149 
42150   saved_cflags="$CFLAGS"
42151   CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42152   ac_ext=c
42153 ac_cpp='$CPP $CPPFLAGS'
42154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42157 
42158   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42159 /* end confdefs.h.  */
42160 int i;
42161 _ACEOF
42162 if ac_fn_c_try_compile "$LINENO"; then :
42163 
42164 else
42165   supports=no
42166 fi
42167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42168   ac_ext=cpp
42169 ac_cpp='$CXXCPP $CPPFLAGS'
42170 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42171 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42172 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42173 
42174   CFLAGS="$saved_cflags"
42175 
42176   saved_cxxflags="$CXXFLAGS"
42177   CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42178   ac_ext=cpp
42179 ac_cpp='$CXXCPP $CPPFLAGS'
42180 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42181 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42182 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42183 
42184   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42185 /* end confdefs.h.  */
42186 int i;
42187 _ACEOF
42188 if ac_fn_cxx_try_compile "$LINENO"; then :
42189 
42190 else
42191   supports=no
42192 fi
42193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42194   ac_ext=cpp
42195 ac_cpp='$CXXCPP $CPPFLAGS'
42196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42199 
42200   CXXFLAGS="$saved_cxxflags"
42201 
42202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42203 $as_echo "$supports" >&6; }
42204   if test "x$supports" = "xyes" ; then
42205     :
42206   else
42207     ZERO_ARCHFLAG=""
42208   fi
42209 
42210 
42211 
42212   # Check that the compiler supports -mX (or -qX on AIX) flags
42213   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42214 
42215   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42216 $as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42217   supports=yes
42218 
42219   saved_cflags="$CFLAGS"
42220   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42221   ac_ext=c
42222 ac_cpp='$CPP $CPPFLAGS'
42223 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42224 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42225 ac_compiler_gnu=$ac_cv_c_compiler_gnu
42226 
42227   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42228 /* end confdefs.h.  */
42229 int i;
42230 _ACEOF
42231 if ac_fn_c_try_compile "$LINENO"; then :
42232 
42233 else
42234   supports=no
42235 fi
42236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42237   ac_ext=cpp
42238 ac_cpp='$CXXCPP $CPPFLAGS'
42239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42242 
42243   CFLAGS="$saved_cflags"
42244 
42245   saved_cxxflags="$CXXFLAGS"
42246   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42247   ac_ext=cpp
42248 ac_cpp='$CXXCPP $CPPFLAGS'
42249 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42250 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42251 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42252 
42253   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42254 /* end confdefs.h.  */
42255 int i;
42256 _ACEOF
42257 if ac_fn_cxx_try_compile "$LINENO"; then :
42258 
42259 else
42260   supports=no
42261 fi
42262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42263   ac_ext=cpp
42264 ac_cpp='$CXXCPP $CPPFLAGS'
42265 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42266 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42267 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42268 
42269   CXXFLAGS="$saved_cxxflags"
42270 
42271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42272 $as_echo "$supports" >&6; }
42273   if test "x$supports" = "xyes" ; then
42274     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42275   else
42276     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42277   fi
42278 
42279 
42280 
42281 
42282   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed in executable.'
42283   USING_BROKEN_SUSE_LD=no
42284   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$GCC" = xyes; then
42285     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
42286 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
42287     echo "SUNWprivate_1.1 { local: *; };" > version-script.map
42288     echo "int main() { }" > main.c
42289     if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
42290       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42291 $as_echo "no" >&6; }
42292       USING_BROKEN_SUSE_LD=no
42293     else
42294       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42295 $as_echo "yes" >&6; }
42296       USING_BROKEN_SUSE_LD=yes
42297     fi
42298     rm -rf version-script.map main.c a.out
42299   fi
42300 
42301 
42302 
42303 # Setup debug symbols (need objcopy from the toolchain for that)
42304 
42305   #
42306   # ENABLE_DEBUG_SYMBOLS
42307   # This must be done after the toolchain is setup, since we're looking at objcopy.
42308   #
42309   # Check whether --enable-debug-symbols was given.
42310 if test "${enable_debug_symbols+set}" = set; then :
42311   enableval=$enable_debug_symbols;
42312 fi
42313 
42314 
42315   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42316 $as_echo_n "checking if we should generate debug symbols... " >&6; }
42317 
42318   if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42319     # explicit enabling of enable-debug-symbols and can't find objcopy
42320     #   this is an error
42321     as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42322   fi
42323 
42324   if test "x$enable_debug_symbols" = "xyes"; then
42325     ENABLE_DEBUG_SYMBOLS=true
42326   elif test "x$enable_debug_symbols" = "xno"; then
42327     ENABLE_DEBUG_SYMBOLS=false
42328   else
42329     # Default is on if objcopy is found
42330     if test "x$OBJCOPY" != x; then
42331       ENABLE_DEBUG_SYMBOLS=true
42332     # MacOS X and Windows don't use objcopy but default is on for those OSes
42333     elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42334       ENABLE_DEBUG_SYMBOLS=true
42335     else
42336       ENABLE_DEBUG_SYMBOLS=false
42337     fi
42338   fi
42339 
42340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42341 $as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42342 
42343   #
42344   # ZIP_DEBUGINFO_FILES
42345   #
42346   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42347 $as_echo_n "checking if we should zip debug-info files... " >&6; }
42348   # Check whether --enable-zip-debug-info was given.
42349 if test "${enable_zip_debug_info+set}" = set; then :
42350   enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42351 else
42352   enable_zip_debug_info="yes"
42353 fi
42354 
42355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42356 $as_echo "${enable_zip_debug_info}" >&6; }
42357 
42358   if test "x${enable_zip_debug_info}" = "xno"; then
42359     ZIP_DEBUGINFO_FILES=false
42360   else
42361     ZIP_DEBUGINFO_FILES=true
42362   fi
42363 
42364 
42365 
42366 
42367 
42368 
42369 
42370 ###############################################################################
42371 #
42372 # Check dependencies for external and internal libraries.
42373 #
42374 ###############################################################################
42375 
42376 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42377 
42378   # When using cygwin or msys, we need a wrapper binary that renames
42379   # /cygdrive/c/ arguments into c:/ arguments and peeks into
42380   # @files and rewrites these too! This wrapper binary is
42381   # called fixpath.
42382   FIXPATH=
42383   if test "x$OPENJDK_BUILD_OS" = xwindows; then
42384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42385 $as_echo_n "checking if fixpath can be created... " >&6; }
42386     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42387     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42388     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42389       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42390       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42391       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42392       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42393     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42394       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42395       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42396 
42397       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42398       # @ was chosen as separator to minimize risk of other tools messing around with it
42399       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42400       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42401 
42402       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42403     fi
42404     rm -f $OUTPUT_ROOT/fixpath*
42405     cd $OUTPUT_ROOT
42406     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42407     cd $CURDIR
42408 
42409     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42410       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42411 $as_echo "no" >&6; }
42412       cat $OUTPUT_ROOT/fixpath1.log
42413       as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42414     fi
42415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42416 $as_echo "yes" >&6; }
42417     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42418 $as_echo_n "checking if fixpath.exe works... " >&6; }
42419     cd $OUTPUT_ROOT
42420     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42421     cd $CURDIR
42422     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42423       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42424 $as_echo "no" >&6; }
42425       cat $OUTPUT_ROOT/fixpath2.log
42426       as_fn_error $? "fixpath did not work!" "$LINENO" 5
42427     fi
42428     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42429 $as_echo "yes" >&6; }
42430     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42431   fi
42432 
42433 
42434 
42435 
42436 
42437 
42438   ###############################################################################
42439   #
42440   # OS specific settings that we never will need to probe.
42441   #
42442   if test "x$OPENJDK_TARGET_OS" = xlinux; then
42443     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42444 $as_echo_n "checking what is not needed on Linux?... " >&6; }
42445     PULSE_NOT_NEEDED=yes
42446     { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42447 $as_echo "pulse" >&6; }
42448   fi
42449 
42450   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42451     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42452 $as_echo_n "checking what is not needed on Solaris?... " >&6; }
42453     ALSA_NOT_NEEDED=yes
42454     PULSE_NOT_NEEDED=yes
42455     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42456 $as_echo "alsa pulse" >&6; }
42457   fi
42458 
42459   if test "x$OPENJDK_TARGET_OS" = xaix; then
42460     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42461 $as_echo_n "checking what is not needed on AIX?... " >&6; }
42462     ALSA_NOT_NEEDED=yes
42463     PULSE_NOT_NEEDED=yes
42464     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42465 $as_echo "alsa pulse" >&6; }
42466   fi
42467 
42468 
42469   if test "x$OPENJDK_TARGET_OS" = xwindows; then
42470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42471 $as_echo_n "checking what is not needed on Windows?... " >&6; }
42472     CUPS_NOT_NEEDED=yes
42473     ALSA_NOT_NEEDED=yes
42474     PULSE_NOT_NEEDED=yes
42475     X11_NOT_NEEDED=yes
42476     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42477 $as_echo "alsa cups pulse x11" >&6; }
42478   fi
42479 
42480   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42481     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42482 $as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42483     ALSA_NOT_NEEDED=yes
42484     PULSE_NOT_NEEDED=yes
42485     X11_NOT_NEEDED=yes
42486     # If the java runtime framework is disabled, then we need X11.
42487     # This will be adjusted below.
42488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42489 $as_echo "alsa pulse x11" >&6; }
42490   fi
42491 
42492   if test "x$OPENJDK_TARGET_OS" = xbsd; then
42493     { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42494 $as_echo_n "checking what is not needed on bsd?... " >&6; }
42495     ALSA_NOT_NEEDED=yes
42496     { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42497 $as_echo "alsa" >&6; }
42498   fi
42499 
42500   if test "x$OPENJDK" = "xfalse"; then
42501     FREETYPE_NOT_NEEDED=yes
42502   fi
42503 
42504   if test "x$SUPPORT_HEADFUL" = xno; then
42505     X11_NOT_NEEDED=yes
42506   fi
42507 
42508   ###############################################################################
42509   #
42510   # Check for MacOSX support for OpenJDK.
42511   #
42512 
42513 
42514   # Check whether --enable-macosx-runtime-support was given.
42515 if test "${enable_macosx_runtime_support+set}" = set; then :
42516   enableval=$enable_macosx_runtime_support;
42517 fi
42518 
42519   if test "x$enable_macosx_runtime_support" != x; then
42520     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42521 $as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42522   fi
42523 
42524 
42525   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42526 $as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42527   if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42528     { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42529 $as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42530   else
42531     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42532 $as_echo "no" >&6; }
42533   fi
42534 
42535 
42536 
42537   ###############################################################################
42538   #
42539   # Check for X Windows
42540   #
42541 
42542   # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42543   # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42544   # --x-libraries for the sysroot, if that seems to be correct.
42545   if test "x$SYS_ROOT" != "x/"; then
42546     if test "x$x_includes" = xNONE; then
42547       if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42548         x_includes="$SYS_ROOT/usr/X11R6/include"
42549       elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42550         x_includes="$SYS_ROOT/usr/include"
42551       fi
42552     fi
42553     if test "x$x_libraries" = xNONE; then
42554       if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42555         x_libraries="$SYS_ROOT/usr/X11R6/lib"
42556       elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42557         x_libraries="$SYS_ROOT/usr/lib64"
42558       elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42559         x_libraries="$SYS_ROOT/usr/lib"
42560       fi
42561     fi
42562   fi
42563 
42564   # Now let autoconf do it's magic
42565   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42566 $as_echo_n "checking for X... " >&6; }
42567 
42568 
42569 # Check whether --with-x was given.
42570 if test "${with_x+set}" = set; then :
42571   withval=$with_x;
42572 fi
42573 
42574 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42575 if test "x$with_x" = xno; then
42576   # The user explicitly disabled X.
42577   have_x=disabled
42578 else
42579   case $x_includes,$x_libraries in #(
42580     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42581     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42582   $as_echo_n "(cached) " >&6
42583 else
42584   # One or both of the vars are not set, and there is no cached value.
42585 ac_x_includes=no ac_x_libraries=no
42586 rm -f -r conftest.dir
42587 if mkdir conftest.dir; then
42588   cd conftest.dir
42589   cat >Imakefile <<'_ACEOF'
42590 incroot:
42591         @echo incroot='${INCROOT}'
42592 usrlibdir:
42593         @echo usrlibdir='${USRLIBDIR}'
42594 libdir:
42595         @echo libdir='${LIBDIR}'
42596 _ACEOF
42597   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42598     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42599     for ac_var in incroot usrlibdir libdir; do
42600       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42601     done
42602     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42603     for ac_extension in a so sl dylib la dll; do
42604       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42605          test -f "$ac_im_libdir/libX11.$ac_extension"; then
42606         ac_im_usrlibdir=$ac_im_libdir; break
42607       fi
42608     done
42609     # Screen out bogus values from the imake configuration.  They are
42610     # bogus both because they are the default anyway, and because
42611     # using them would break gcc on systems where it needs fixed includes.
42612     case $ac_im_incroot in
42613         /usr/include) ac_x_includes= ;;
42614         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42615     esac
42616     case $ac_im_usrlibdir in
42617         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
42618         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42619     esac
42620   fi
42621   cd ..
42622   rm -f -r conftest.dir
42623 fi
42624 
42625 # Standard set of common directories for X headers.
42626 # Check X11 before X11Rn because it is often a symlink to the current release.
42627 ac_x_header_dirs='
42628 /usr/X11/include
42629 /usr/X11R7/include
42630 /usr/X11R6/include
42631 /usr/X11R5/include
42632 /usr/X11R4/include
42633 
42634 /usr/include/X11
42635 /usr/include/X11R7
42636 /usr/include/X11R6
42637 /usr/include/X11R5
42638 /usr/include/X11R4
42639 
42640 /usr/local/X11/include
42641 /usr/local/X11R7/include
42642 /usr/local/X11R6/include
42643 /usr/local/X11R5/include
42644 /usr/local/X11R4/include
42645 
42646 /usr/local/include/X11
42647 /usr/local/include/X11R7
42648 /usr/local/include/X11R6
42649 /usr/local/include/X11R5
42650 /usr/local/include/X11R4
42651 
42652 /usr/X386/include
42653 /usr/x386/include
42654 /usr/XFree86/include/X11
42655 
42656 /usr/include
42657 /usr/local/include
42658 /usr/unsupported/include
42659 /usr/athena/include
42660 /usr/local/x11r5/include
42661 /usr/lpp/Xamples/include
42662 
42663 /usr/openwin/include
42664 /usr/openwin/share/include'
42665 
42666 if test "$ac_x_includes" = no; then
42667   # Guess where to find include files, by looking for Xlib.h.
42668   # First, try using that file with no special directory specified.
42669   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42670 /* end confdefs.h.  */
42671 #include <X11/Xlib.h>
42672 _ACEOF
42673 if ac_fn_cxx_try_cpp "$LINENO"; then :
42674   # We can compile using X headers with no special include directory.
42675 ac_x_includes=
42676 else
42677   for ac_dir in $ac_x_header_dirs; do
42678   if test -r "$ac_dir/X11/Xlib.h"; then
42679     ac_x_includes=$ac_dir
42680     break
42681   fi
42682 done
42683 fi
42684 rm -f conftest.err conftest.i conftest.$ac_ext
42685 fi # $ac_x_includes = no
42686 
42687 if test "$ac_x_libraries" = no; then
42688   # Check for the libraries.
42689   # See if we find them without any special options.
42690   # Don't add to $LIBS permanently.
42691   ac_save_LIBS=$LIBS
42692   LIBS="-lX11 $LIBS"
42693   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42694 /* end confdefs.h.  */
42695 #include <X11/Xlib.h>
42696 int
42697 main ()
42698 {
42699 XrmInitialize ()
42700   ;
42701   return 0;
42702 }
42703 _ACEOF
42704 if ac_fn_cxx_try_link "$LINENO"; then :
42705   LIBS=$ac_save_LIBS
42706 # We can link X programs with no special library path.
42707 ac_x_libraries=
42708 else
42709   LIBS=$ac_save_LIBS
42710 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42711 do
42712   # Don't even attempt the hair of trying to link an X program!
42713   for ac_extension in a so sl dylib la dll; do
42714     if test -r "$ac_dir/libX11.$ac_extension"; then
42715       ac_x_libraries=$ac_dir
42716       break 2
42717     fi
42718   done
42719 done
42720 fi
42721 rm -f core conftest.err conftest.$ac_objext \
42722     conftest$ac_exeext conftest.$ac_ext
42723 fi # $ac_x_libraries = no
42724 
42725 case $ac_x_includes,$ac_x_libraries in #(
42726   no,* | *,no | *\'*)
42727     # Didn't find X, or a directory has "'" in its name.
42728     ac_cv_have_x="have_x=no";; #(
42729   *)
42730     # Record where we found X for the cache.
42731     ac_cv_have_x="have_x=yes\
42732         ac_x_includes='$ac_x_includes'\
42733         ac_x_libraries='$ac_x_libraries'"
42734 esac
42735 fi
42736 ;; #(
42737     *) have_x=yes;;
42738   esac
42739   eval "$ac_cv_have_x"
42740 fi # $with_x != no
42741 
42742 if test "$have_x" != yes; then
42743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42744 $as_echo "$have_x" >&6; }
42745   no_x=yes
42746 else
42747   # If each of the values was on the command line, it overrides each guess.
42748   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42749   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42750   # Update the cache value to reflect the command line values.
42751   ac_cv_have_x="have_x=yes\
42752         ac_x_includes='$x_includes'\
42753         ac_x_libraries='$x_libraries'"
42754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42755 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42756 fi
42757 
42758   if test "$no_x" = yes; then
42759   # Not all programs may use this symbol, but it does not hurt to define it.
42760 
42761 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42762 
42763   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42764 else
42765   if test -n "$x_includes"; then
42766     X_CFLAGS="$X_CFLAGS -I$x_includes"
42767   fi
42768 
42769   # It would also be nice to do this for all -L options, not just this one.
42770   if test -n "$x_libraries"; then
42771     X_LIBS="$X_LIBS -L$x_libraries"
42772     # For Solaris; some versions of Sun CC require a space after -R and
42773     # others require no space.  Words are not sufficient . . . .
42774     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42775 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
42776     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42777     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42778     ac_cxx_werror_flag=yes
42779     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42780 /* end confdefs.h.  */
42781 
42782 int
42783 main ()
42784 {
42785 
42786   ;
42787   return 0;
42788 }
42789 _ACEOF
42790 if ac_fn_cxx_try_link "$LINENO"; then :
42791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42792 $as_echo "no" >&6; }
42793        X_LIBS="$X_LIBS -R$x_libraries"
42794 else
42795   LIBS="$ac_xsave_LIBS -R $x_libraries"
42796        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42797 /* end confdefs.h.  */
42798 
42799 int
42800 main ()
42801 {
42802 
42803   ;
42804   return 0;
42805 }
42806 _ACEOF
42807 if ac_fn_cxx_try_link "$LINENO"; then :
42808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42809 $as_echo "yes" >&6; }
42810           X_LIBS="$X_LIBS -R $x_libraries"
42811 else
42812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42813 $as_echo "neither works" >&6; }
42814 fi
42815 rm -f core conftest.err conftest.$ac_objext \
42816     conftest$ac_exeext conftest.$ac_ext
42817 fi
42818 rm -f core conftest.err conftest.$ac_objext \
42819     conftest$ac_exeext conftest.$ac_ext
42820     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42821     LIBS=$ac_xsave_LIBS
42822   fi
42823 
42824   # Check for system-dependent libraries X programs must link with.
42825   # Do this before checking for the system-independent R6 libraries
42826   # (-lICE), since we may need -lsocket or whatever for X linking.
42827 
42828   if test "$ISC" = yes; then
42829     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42830   else
42831     # Martyn Johnson says this is needed for Ultrix, if the X
42832     # libraries were built with DECnet support.  And Karl Berry says
42833     # the Alpha needs dnet_stub (dnet does not exist).
42834     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42835     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42836 /* end confdefs.h.  */
42837 
42838 /* Override any GCC internal prototype to avoid an error.
42839    Use char because int might match the return type of a GCC
42840    builtin and then its argument prototype would still apply.  */
42841 #ifdef __cplusplus
42842 extern "C"
42843 #endif
42844 char XOpenDisplay ();
42845 int
42846 main ()
42847 {
42848 return XOpenDisplay ();
42849   ;
42850   return 0;
42851 }
42852 _ACEOF
42853 if ac_fn_cxx_try_link "$LINENO"; then :
42854 
42855 else
42856   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42857 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42858 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42859   $as_echo_n "(cached) " >&6
42860 else
42861   ac_check_lib_save_LIBS=$LIBS
42862 LIBS="-ldnet  $LIBS"
42863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42864 /* end confdefs.h.  */
42865 
42866 /* Override any GCC internal prototype to avoid an error.
42867    Use char because int might match the return type of a GCC
42868    builtin and then its argument prototype would still apply.  */
42869 #ifdef __cplusplus
42870 extern "C"
42871 #endif
42872 char dnet_ntoa ();
42873 int
42874 main ()
42875 {
42876 return dnet_ntoa ();
42877   ;
42878   return 0;
42879 }
42880 _ACEOF
42881 if ac_fn_cxx_try_link "$LINENO"; then :
42882   ac_cv_lib_dnet_dnet_ntoa=yes
42883 else
42884   ac_cv_lib_dnet_dnet_ntoa=no
42885 fi
42886 rm -f core conftest.err conftest.$ac_objext \
42887     conftest$ac_exeext conftest.$ac_ext
42888 LIBS=$ac_check_lib_save_LIBS
42889 fi
42890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42891 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42892 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42893   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42894 fi
42895 
42896     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42897       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42898 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42899 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42900   $as_echo_n "(cached) " >&6
42901 else
42902   ac_check_lib_save_LIBS=$LIBS
42903 LIBS="-ldnet_stub  $LIBS"
42904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42905 /* end confdefs.h.  */
42906 
42907 /* Override any GCC internal prototype to avoid an error.
42908    Use char because int might match the return type of a GCC
42909    builtin and then its argument prototype would still apply.  */
42910 #ifdef __cplusplus
42911 extern "C"
42912 #endif
42913 char dnet_ntoa ();
42914 int
42915 main ()
42916 {
42917 return dnet_ntoa ();
42918   ;
42919   return 0;
42920 }
42921 _ACEOF
42922 if ac_fn_cxx_try_link "$LINENO"; then :
42923   ac_cv_lib_dnet_stub_dnet_ntoa=yes
42924 else
42925   ac_cv_lib_dnet_stub_dnet_ntoa=no
42926 fi
42927 rm -f core conftest.err conftest.$ac_objext \
42928     conftest$ac_exeext conftest.$ac_ext
42929 LIBS=$ac_check_lib_save_LIBS
42930 fi
42931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42932 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42933 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42934   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42935 fi
42936 
42937     fi
42938 fi
42939 rm -f core conftest.err conftest.$ac_objext \
42940     conftest$ac_exeext conftest.$ac_ext
42941     LIBS="$ac_xsave_LIBS"
42942 
42943     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42944     # to get the SysV transport functions.
42945     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42946     # needs -lnsl.
42947     # The nsl library prevents programs from opening the X display
42948     # on Irix 5.2, according to T.E. Dickey.
42949     # The functions gethostbyname, getservbyname, and inet_addr are
42950     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42951     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42952 if test "x$ac_cv_func_gethostbyname" = xyes; then :
42953 
42954 fi
42955 
42956     if test $ac_cv_func_gethostbyname = no; then
42957       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42958 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42959 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42960   $as_echo_n "(cached) " >&6
42961 else
42962   ac_check_lib_save_LIBS=$LIBS
42963 LIBS="-lnsl  $LIBS"
42964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42965 /* end confdefs.h.  */
42966 
42967 /* Override any GCC internal prototype to avoid an error.
42968    Use char because int might match the return type of a GCC
42969    builtin and then its argument prototype would still apply.  */
42970 #ifdef __cplusplus
42971 extern "C"
42972 #endif
42973 char gethostbyname ();
42974 int
42975 main ()
42976 {
42977 return gethostbyname ();
42978   ;
42979   return 0;
42980 }
42981 _ACEOF
42982 if ac_fn_cxx_try_link "$LINENO"; then :
42983   ac_cv_lib_nsl_gethostbyname=yes
42984 else
42985   ac_cv_lib_nsl_gethostbyname=no
42986 fi
42987 rm -f core conftest.err conftest.$ac_objext \
42988     conftest$ac_exeext conftest.$ac_ext
42989 LIBS=$ac_check_lib_save_LIBS
42990 fi
42991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42992 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42993 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42994   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42995 fi
42996 
42997       if test $ac_cv_lib_nsl_gethostbyname = no; then
42998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42999 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43000 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43001   $as_echo_n "(cached) " >&6
43002 else
43003   ac_check_lib_save_LIBS=$LIBS
43004 LIBS="-lbsd  $LIBS"
43005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43006 /* end confdefs.h.  */
43007 
43008 /* Override any GCC internal prototype to avoid an error.
43009    Use char because int might match the return type of a GCC
43010    builtin and then its argument prototype would still apply.  */
43011 #ifdef __cplusplus
43012 extern "C"
43013 #endif
43014 char gethostbyname ();
43015 int
43016 main ()
43017 {
43018 return gethostbyname ();
43019   ;
43020   return 0;
43021 }
43022 _ACEOF
43023 if ac_fn_cxx_try_link "$LINENO"; then :
43024   ac_cv_lib_bsd_gethostbyname=yes
43025 else
43026   ac_cv_lib_bsd_gethostbyname=no
43027 fi
43028 rm -f core conftest.err conftest.$ac_objext \
43029     conftest$ac_exeext conftest.$ac_ext
43030 LIBS=$ac_check_lib_save_LIBS
43031 fi
43032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43033 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43034 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43035   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43036 fi
43037 
43038       fi
43039     fi
43040 
43041     # lieder@skyler.mavd.honeywell.com says without -lsocket,
43042     # socket/setsockopt and other routines are undefined under SCO ODT
43043     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43044     # on later versions), says Simon Leinen: it contains gethostby*
43045     # variants that don't use the name server (or something).  -lsocket
43046     # must be given before -lnsl if both are needed.  We assume that
43047     # if connect needs -lnsl, so does gethostbyname.
43048     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43049 if test "x$ac_cv_func_connect" = xyes; then :
43050 
43051 fi
43052 
43053     if test $ac_cv_func_connect = no; then
43054       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43055 $as_echo_n "checking for connect in -lsocket... " >&6; }
43056 if ${ac_cv_lib_socket_connect+:} false; then :
43057   $as_echo_n "(cached) " >&6
43058 else
43059   ac_check_lib_save_LIBS=$LIBS
43060 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43062 /* end confdefs.h.  */
43063 
43064 /* Override any GCC internal prototype to avoid an error.
43065    Use char because int might match the return type of a GCC
43066    builtin and then its argument prototype would still apply.  */
43067 #ifdef __cplusplus
43068 extern "C"
43069 #endif
43070 char connect ();
43071 int
43072 main ()
43073 {
43074 return connect ();
43075   ;
43076   return 0;
43077 }
43078 _ACEOF
43079 if ac_fn_cxx_try_link "$LINENO"; then :
43080   ac_cv_lib_socket_connect=yes
43081 else
43082   ac_cv_lib_socket_connect=no
43083 fi
43084 rm -f core conftest.err conftest.$ac_objext \
43085     conftest$ac_exeext conftest.$ac_ext
43086 LIBS=$ac_check_lib_save_LIBS
43087 fi
43088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43089 $as_echo "$ac_cv_lib_socket_connect" >&6; }
43090 if test "x$ac_cv_lib_socket_connect" = xyes; then :
43091   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43092 fi
43093 
43094     fi
43095 
43096     # Guillermo Gomez says -lposix is necessary on A/UX.
43097     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43098 if test "x$ac_cv_func_remove" = xyes; then :
43099 
43100 fi
43101 
43102     if test $ac_cv_func_remove = no; then
43103       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43104 $as_echo_n "checking for remove in -lposix... " >&6; }
43105 if ${ac_cv_lib_posix_remove+:} false; then :
43106   $as_echo_n "(cached) " >&6
43107 else
43108   ac_check_lib_save_LIBS=$LIBS
43109 LIBS="-lposix  $LIBS"
43110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43111 /* end confdefs.h.  */
43112 
43113 /* Override any GCC internal prototype to avoid an error.
43114    Use char because int might match the return type of a GCC
43115    builtin and then its argument prototype would still apply.  */
43116 #ifdef __cplusplus
43117 extern "C"
43118 #endif
43119 char remove ();
43120 int
43121 main ()
43122 {
43123 return remove ();
43124   ;
43125   return 0;
43126 }
43127 _ACEOF
43128 if ac_fn_cxx_try_link "$LINENO"; then :
43129   ac_cv_lib_posix_remove=yes
43130 else
43131   ac_cv_lib_posix_remove=no
43132 fi
43133 rm -f core conftest.err conftest.$ac_objext \
43134     conftest$ac_exeext conftest.$ac_ext
43135 LIBS=$ac_check_lib_save_LIBS
43136 fi
43137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43138 $as_echo "$ac_cv_lib_posix_remove" >&6; }
43139 if test "x$ac_cv_lib_posix_remove" = xyes; then :
43140   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43141 fi
43142 
43143     fi
43144 
43145     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43146     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43147 if test "x$ac_cv_func_shmat" = xyes; then :
43148 
43149 fi
43150 
43151     if test $ac_cv_func_shmat = no; then
43152       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43153 $as_echo_n "checking for shmat in -lipc... " >&6; }
43154 if ${ac_cv_lib_ipc_shmat+:} false; then :
43155   $as_echo_n "(cached) " >&6
43156 else
43157   ac_check_lib_save_LIBS=$LIBS
43158 LIBS="-lipc  $LIBS"
43159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43160 /* end confdefs.h.  */
43161 
43162 /* Override any GCC internal prototype to avoid an error.
43163    Use char because int might match the return type of a GCC
43164    builtin and then its argument prototype would still apply.  */
43165 #ifdef __cplusplus
43166 extern "C"
43167 #endif
43168 char shmat ();
43169 int
43170 main ()
43171 {
43172 return shmat ();
43173   ;
43174   return 0;
43175 }
43176 _ACEOF
43177 if ac_fn_cxx_try_link "$LINENO"; then :
43178   ac_cv_lib_ipc_shmat=yes
43179 else
43180   ac_cv_lib_ipc_shmat=no
43181 fi
43182 rm -f core conftest.err conftest.$ac_objext \
43183     conftest$ac_exeext conftest.$ac_ext
43184 LIBS=$ac_check_lib_save_LIBS
43185 fi
43186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43187 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43188 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43189   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43190 fi
43191 
43192     fi
43193   fi
43194 
43195   # Check for libraries that X11R6 Xt/Xaw programs need.
43196   ac_save_LDFLAGS=$LDFLAGS
43197   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43198   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43199   # check for ICE first), but we must link in the order -lSM -lICE or
43200   # we get undefined symbols.  So assume we have SM if we have ICE.
43201   # These have to be linked with before -lX11, unlike the other
43202   # libraries we check for below, so use a different variable.
43203   # John Interrante, Karl Berry
43204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43205 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43206 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43207   $as_echo_n "(cached) " >&6
43208 else
43209   ac_check_lib_save_LIBS=$LIBS
43210 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43212 /* end confdefs.h.  */
43213 
43214 /* Override any GCC internal prototype to avoid an error.
43215    Use char because int might match the return type of a GCC
43216    builtin and then its argument prototype would still apply.  */
43217 #ifdef __cplusplus
43218 extern "C"
43219 #endif
43220 char IceConnectionNumber ();
43221 int
43222 main ()
43223 {
43224 return IceConnectionNumber ();
43225   ;
43226   return 0;
43227 }
43228 _ACEOF
43229 if ac_fn_cxx_try_link "$LINENO"; then :
43230   ac_cv_lib_ICE_IceConnectionNumber=yes
43231 else
43232   ac_cv_lib_ICE_IceConnectionNumber=no
43233 fi
43234 rm -f core conftest.err conftest.$ac_objext \
43235     conftest$ac_exeext conftest.$ac_ext
43236 LIBS=$ac_check_lib_save_LIBS
43237 fi
43238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43239 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43240 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43241   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43242 fi
43243 
43244   LDFLAGS=$ac_save_LDFLAGS
43245 
43246 fi
43247 
43248 
43249   # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43250   # this doesn't make sense so we remove it.
43251   if test "x$COMPILE_TYPE" = xcross; then
43252     X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43253   fi
43254 
43255   if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43256 
43257   # Print a helpful message on how to acquire the necessary build dependency.
43258   # x11 is the help tag: freetype, cups, pulse, alsa etc
43259   MISSING_DEPENDENCY=x11
43260 
43261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43262     cygwin_help $MISSING_DEPENDENCY
43263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43264     msys_help $MISSING_DEPENDENCY
43265   else
43266     PKGHANDLER_COMMAND=
43267 
43268     case $PKGHANDLER in
43269       apt-get)
43270         apt_help     $MISSING_DEPENDENCY ;;
43271       yum)
43272         yum_help     $MISSING_DEPENDENCY ;;
43273       port)
43274         port_help    $MISSING_DEPENDENCY ;;
43275       pkgutil)
43276         pkgutil_help $MISSING_DEPENDENCY ;;
43277       pkgadd)
43278         pkgadd_help  $MISSING_DEPENDENCY ;;
43279     esac
43280 
43281     if test "x$PKGHANDLER_COMMAND" != x; then
43282       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43283     fi
43284   fi
43285 
43286     as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43287   fi
43288 
43289   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43290     OPENWIN_HOME="/usr/openwin"
43291   fi
43292 
43293 
43294 
43295   #
43296   # Weird Sol10 something check...TODO change to try compile
43297   #
43298   if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43299     if test "`uname -r`" = "5.10"; then
43300       if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43301         X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43302       fi
43303     fi
43304   fi
43305 
43306   ac_ext=c
43307 ac_cpp='$CPP $CPPFLAGS'
43308 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43309 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43310 ac_compiler_gnu=$ac_cv_c_compiler_gnu
43311 
43312   OLD_CFLAGS="$CFLAGS"
43313   CFLAGS="$CFLAGS $X_CFLAGS"
43314 
43315   # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43316   for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43317 do :
43318   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43319 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43320         # include <X11/Xlib.h>
43321         # include <X11/Xutil.h>
43322 
43323 
43324 "
43325 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43326   cat >>confdefs.h <<_ACEOF
43327 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43328 _ACEOF
43329  X11_A_OK=yes
43330 else
43331   X11_A_OK=no; break
43332 fi
43333 
43334 done
43335 
43336 
43337   CFLAGS="$OLD_CFLAGS"
43338   ac_ext=cpp
43339 ac_cpp='$CXXCPP $CPPFLAGS'
43340 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43341 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43342 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43343 
43344 
43345   if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43346 
43347   # Print a helpful message on how to acquire the necessary build dependency.
43348   # x11 is the help tag: freetype, cups, pulse, alsa etc
43349   MISSING_DEPENDENCY=x11
43350 
43351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43352     cygwin_help $MISSING_DEPENDENCY
43353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43354     msys_help $MISSING_DEPENDENCY
43355   else
43356     PKGHANDLER_COMMAND=
43357 
43358     case $PKGHANDLER in
43359       apt-get)
43360         apt_help     $MISSING_DEPENDENCY ;;
43361       yum)
43362         yum_help     $MISSING_DEPENDENCY ;;
43363       port)
43364         port_help    $MISSING_DEPENDENCY ;;
43365       pkgutil)
43366         pkgutil_help $MISSING_DEPENDENCY ;;
43367       pkgadd)
43368         pkgadd_help  $MISSING_DEPENDENCY ;;
43369     esac
43370 
43371     if test "x$PKGHANDLER_COMMAND" != x; then
43372       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43373     fi
43374   fi
43375 
43376     as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43377   fi
43378 
43379 
43380 
43381 
43382 
43383 
43384   ###############################################################################
43385   #
43386   # The common unix printing system cups is used to print from java.
43387   #
43388 
43389 # Check whether --with-cups was given.
43390 if test "${with_cups+set}" = set; then :
43391   withval=$with_cups;
43392 fi
43393 
43394 
43395 # Check whether --with-cups-include was given.
43396 if test "${with_cups_include+set}" = set; then :
43397   withval=$with_cups_include;
43398 fi
43399 
43400 
43401   if test "x$CUPS_NOT_NEEDED" = xyes; then
43402     if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43403       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43404 $as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43405     fi
43406     CUPS_CFLAGS=
43407   else
43408     CUPS_FOUND=no
43409 
43410     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43411       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43412     fi
43413 
43414     if test "x${with_cups}" != x; then
43415       CUPS_CFLAGS="-I${with_cups}/include"
43416       CUPS_FOUND=yes
43417     fi
43418     if test "x${with_cups_include}" != x; then
43419       CUPS_CFLAGS="-I${with_cups_include}"
43420       CUPS_FOUND=yes
43421     fi
43422     if test "x$CUPS_FOUND" = xno; then
43423 
43424 
43425   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43426     # Source the builddeps file again, to make sure it uses the latest variables!
43427     . $builddepsfile
43428     # Look for a target and build machine specific resource!
43429     eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43430     if test "x$resource" = x; then
43431       # Ok, lets instead look for a target specific resource
43432       eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43433     fi
43434     if test "x$resource" = x; then
43435       # Ok, lets instead look for a build specific resource
43436       eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43437     fi
43438     if test "x$resource" = x; then
43439       # Ok, lets instead look for a generic resource
43440       # (The cups comes from M4 and not the shell, thus no need for eval here.)
43441       resource=${builddep_cups}
43442     fi
43443     if test "x$resource" != x; then
43444       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43445 $as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43446       # If the resource in the builddeps.conf file is an existing directory,
43447       # for example /java/linux/cups
43448       if test -d ${resource}; then
43449         depdir=${resource}
43450       else
43451 
43452   # cups is for example mymodule
43453   # $resource is for example libs/general/libmymod_1_2_3.zip
43454   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43455   # $with_builddeps_dir is for example /localhome/builddeps
43456   # depdir is the name of the variable into which we store the depdir, eg MYMOD
43457   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43458   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43459   filename=`basename $resource`
43460   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43461   filebase=${filename%%.*}
43462   extension=${filename#*.}
43463   installdir=$with_builddeps_dir/$filebase
43464   if test ! -f $installdir/$filename.unpacked; then
43465     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43466 $as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43467     if test ! -d $installdir; then
43468       mkdir -p $installdir
43469     fi
43470     if test ! -d $installdir; then
43471       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43472     fi
43473     tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43474     touch $tmpfile
43475     if test ! -f $tmpfile; then
43476       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43477     fi
43478 
43479   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43480   # $tmpfile is the local file name for the downloaded file.
43481   VALID_TOOL=no
43482   if test "x$BDEPS_FTP" = xwget; then
43483     VALID_TOOL=yes
43484     wget -O $tmpfile $with_builddeps_server/$resource
43485   fi
43486   if test "x$BDEPS_FTP" = xlftp; then
43487     VALID_TOOL=yes
43488     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43489   fi
43490   if test "x$BDEPS_FTP" = xftp; then
43491     VALID_TOOL=yes
43492     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43493     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43494     FTPUSERPWD=${FTPSERVER%%@*}
43495     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43496       FTPUSER=${userpwd%%:*}
43497       FTPPWD=${userpwd#*@}
43498       FTPSERVER=${FTPSERVER#*@}
43499     else
43500       FTPUSER=ftp
43501       FTPPWD=ftp
43502     fi
43503     # the "pass" command does not work on some
43504     # ftp clients (read ftp.exe) but if it works,
43505     # passive mode is better!
43506     ( \
43507         echo "user $FTPUSER $FTPPWD"        ; \
43508         echo "pass"                         ; \
43509         echo "bin"                          ; \
43510         echo "get $FTPPATH $tmpfile"              ; \
43511     ) | ftp -in $FTPSERVER
43512   fi
43513   if test "x$VALID_TOOL" != xyes; then
43514     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43515   fi
43516 
43517     mv $tmpfile $installdir/$filename
43518     if test ! -s $installdir/$filename; then
43519       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43520     fi
43521     case "$extension" in
43522       zip)  echo "Unzipping $installdir/$filename..."
43523         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43524         ;;
43525       tar.gz) echo "Untaring $installdir/$filename..."
43526         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43527         ;;
43528       tgz) echo "Untaring $installdir/$filename..."
43529         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43530         ;;
43531       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43532         ;;
43533     esac
43534   fi
43535   if test -f $installdir/$filename.unpacked; then
43536     depdir=$installdir
43537   fi
43538 
43539       fi
43540       # Source the builddeps file again, because in the previous command, the depdir
43541       # was updated to point at the current build dependency install directory.
43542       . $builddepsfile
43543       # Now extract variables from the builddeps.conf files.
43544       theroot=${builddep_cups_ROOT}
43545       thecflags=${builddep_cups_CFLAGS}
43546       thelibs=${builddep_cups_LIBS}
43547       if test "x$depdir" = x; then
43548         as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43549       fi
43550       CUPS=$depdir
43551       if test "x$theroot" != x; then
43552         CUPS="$theroot"
43553       fi
43554       if test "x$thecflags" != x; then
43555         CUPS_CFLAGS="$thecflags"
43556       fi
43557       if test "x$thelibs" != x; then
43558         CUPS_LIBS="$thelibs"
43559       fi
43560       CUPS_FOUND=yes
43561 
43562     fi
43563 
43564   fi
43565 
43566     fi
43567     if test "x$CUPS_FOUND" = xno; then
43568       # Are the cups headers installed in the default /usr/include location?
43569       for ac_header in cups/cups.h cups/ppd.h
43570 do :
43571   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43572 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43573 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43574   cat >>confdefs.h <<_ACEOF
43575 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43576 _ACEOF
43577 
43578             CUPS_FOUND=yes
43579             CUPS_CFLAGS=
43580             DEFAULT_CUPS=yes
43581 
43582 
43583 fi
43584 
43585 done
43586 
43587     fi
43588     if test "x$CUPS_FOUND" = xno; then
43589       # Getting nervous now? Lets poke around for standard Solaris third-party
43590       # package installation locations.
43591       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43592 $as_echo_n "checking for cups headers... " >&6; }
43593       if test -s /opt/sfw/cups/include/cups/cups.h; then
43594         # An SFW package seems to be installed!
43595         CUPS_FOUND=yes
43596         CUPS_CFLAGS="-I/opt/sfw/cups/include"
43597       elif test -s /opt/csw/include/cups/cups.h; then
43598         # A CSW package seems to be installed!
43599         CUPS_FOUND=yes
43600         CUPS_CFLAGS="-I/opt/csw/include"
43601       fi
43602       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43603 $as_echo "$CUPS_FOUND" >&6; }
43604     fi
43605     if test "x$CUPS_FOUND" = xno; then
43606 
43607   # Print a helpful message on how to acquire the necessary build dependency.
43608   # cups is the help tag: freetype, cups, pulse, alsa etc
43609   MISSING_DEPENDENCY=cups
43610 
43611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43612     cygwin_help $MISSING_DEPENDENCY
43613   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43614     msys_help $MISSING_DEPENDENCY
43615   else
43616     PKGHANDLER_COMMAND=
43617 
43618     case $PKGHANDLER in
43619       apt-get)
43620         apt_help     $MISSING_DEPENDENCY ;;
43621       yum)
43622         yum_help     $MISSING_DEPENDENCY ;;
43623       port)
43624         port_help    $MISSING_DEPENDENCY ;;
43625       pkgutil)
43626         pkgutil_help $MISSING_DEPENDENCY ;;
43627       pkgadd)
43628         pkgadd_help  $MISSING_DEPENDENCY ;;
43629     esac
43630 
43631     if test "x$PKGHANDLER_COMMAND" != x; then
43632       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43633     fi
43634   fi
43635 
43636       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43637     fi
43638   fi
43639 
43640 
43641 
43642 
43643 
43644 
43645   ###############################################################################
43646   #
43647   # The ubiquitous freetype library is used to render fonts.
43648   #
43649 
43650 # Check whether --with-freetype was given.
43651 if test "${with_freetype+set}" = set; then :
43652   withval=$with_freetype;
43653 fi
43654 
43655 
43656 # Check whether --with-freetype-include was given.
43657 if test "${with_freetype_include+set}" = set; then :
43658   withval=$with_freetype_include;
43659 fi
43660 
43661 
43662 # Check whether --with-freetype-lib was given.
43663 if test "${with_freetype_lib+set}" = set; then :
43664   withval=$with_freetype_lib;
43665 fi
43666 
43667   # Check whether --enable-freetype-bundling was given.
43668 if test "${enable_freetype_bundling+set}" = set; then :
43669   enableval=$enable_freetype_bundling;
43670 fi
43671 
43672 
43673   FREETYPE_CFLAGS=
43674   FREETYPE_LIBS=
43675   FREETYPE_BUNDLE_LIB_PATH=
43676 
43677   if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43678     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43679       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43680 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43681     fi
43682     if test "x$enable_freetype_bundling" != x; then
43683       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43684 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43685     fi
43686   else
43687     # freetype is needed to build; go get it!
43688 
43689     BUNDLE_FREETYPE="$enable_freetype_bundling"
43690 
43691     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43692       # User has specified settings
43693 
43694       if test "x$BUNDLE_FREETYPE" = x; then
43695         # If not specified, default is to bundle freetype
43696         BUNDLE_FREETYPE=yes
43697       fi
43698 
43699       if test "x$with_freetype" != x; then
43700         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43701         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43702       fi
43703 
43704       # Allow --with-freetype-lib and --with-freetype-include to override
43705       if test "x$with_freetype_include" != x; then
43706         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43707       fi
43708       if test "x$with_freetype_lib" != x; then
43709         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43710       fi
43711 
43712       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43713         # Okay, we got it. Check that it works.
43714 
43715   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43716   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43717   METHOD="--with-freetype"
43718 
43719   # First check if the files exists.
43720   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43721     # We found an arbitrary include file. That's a good sign.
43722     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43723 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43724     FOUND_FREETYPE=yes
43725 
43726     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43727     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43728       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43729 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43730       FOUND_FREETYPE=no
43731     else
43732       if test "x$OPENJDK_TARGET_OS" = xwindows; then
43733         # On Windows, we will need both .lib and .dll file.
43734         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43735           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43736 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43737           FOUND_FREETYPE=no
43738         fi
43739       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
43740         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43741         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43742       fi
43743     fi
43744   fi
43745 
43746   if test "x$FOUND_FREETYPE" = xyes; then
43747 
43748   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43749 
43750   # Input might be given as Windows format, start by converting to
43751   # unix format.
43752   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43753   new_path=`$CYGPATH -u "$path"`
43754 
43755   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43756   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43757   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43758   # "foo.exe" is OK but "foo" is an error.
43759   #
43760   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43761   # It is also a way to make sure we got the proper file name for the real test later on.
43762   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43763   if test "x$test_shortpath" = x; then
43764     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43765 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43766     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43767   fi
43768 
43769   # Call helper function which possibly converts this using DOS-style short mode.
43770   # If so, the updated path is stored in $new_path.
43771 
43772   input_path="$new_path"
43773   # Check if we need to convert this using DOS-style short mode. If the path
43774   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43775   # take no chances and rewrite it.
43776   # Note: m4 eats our [], so we need to use [ and ] instead.
43777   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43778   if test "x$has_forbidden_chars" != x; then
43779     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43780     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43781     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43782     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43783       # Going to short mode and back again did indeed matter. Since short mode is
43784       # case insensitive, let's make it lowercase to improve readability.
43785       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43786       # Now convert it back to Unix-stile (cygpath)
43787       input_path=`$CYGPATH -u "$shortmode_path"`
43788       new_path="$input_path"
43789     fi
43790   fi
43791 
43792   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43793   if test "x$test_cygdrive_prefix" = x; then
43794     # As a simple fix, exclude /usr/bin since it's not a real path.
43795     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43796       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43797       # a path prefixed by /cygdrive for fixpath to work.
43798       new_path="$CYGWIN_ROOT_PATH$input_path"
43799     fi
43800   fi
43801 
43802 
43803   if test "x$path" != "x$new_path"; then
43804     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43805     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43806 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43807   fi
43808 
43809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43810 
43811   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43812   has_colon=`$ECHO $path | $GREP ^.:`
43813   new_path="$path"
43814   if test "x$has_colon" = x; then
43815     # Not in mixed or Windows style, start by that.
43816     new_path=`cmd //c echo $path`
43817   fi
43818 
43819 
43820   input_path="$new_path"
43821   # Check if we need to convert this using DOS-style short mode. If the path
43822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43823   # take no chances and rewrite it.
43824   # Note: m4 eats our [], so we need to use [ and ] instead.
43825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43826   if test "x$has_forbidden_chars" != x; then
43827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43828     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43829   fi
43830 
43831 
43832   windows_path="$new_path"
43833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43834     unix_path=`$CYGPATH -u "$windows_path"`
43835     new_path="$unix_path"
43836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43838     new_path="$unix_path"
43839   fi
43840 
43841   if test "x$path" != "x$new_path"; then
43842     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43843     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43844 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43845   fi
43846 
43847   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43848   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43849 
43850   else
43851     # We're on a posix platform. Hooray! :)
43852     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43853     has_space=`$ECHO "$path" | $GREP " "`
43854     if test "x$has_space" != x; then
43855       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43856 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43857       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43858     fi
43859 
43860     # Use eval to expand a potential ~
43861     eval path="$path"
43862     if test ! -f "$path" && test ! -d "$path"; then
43863       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43864     fi
43865 
43866     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43867   fi
43868 
43869 
43870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43871 
43872   # Input might be given as Windows format, start by converting to
43873   # unix format.
43874   path="$POTENTIAL_FREETYPE_LIB_PATH"
43875   new_path=`$CYGPATH -u "$path"`
43876 
43877   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43878   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43879   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43880   # "foo.exe" is OK but "foo" is an error.
43881   #
43882   # This test is therefore slightly more accurate than "test -f" to check for file precense.
43883   # It is also a way to make sure we got the proper file name for the real test later on.
43884   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43885   if test "x$test_shortpath" = x; then
43886     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43887 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43888     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43889   fi
43890 
43891   # Call helper function which possibly converts this using DOS-style short mode.
43892   # If so, the updated path is stored in $new_path.
43893 
43894   input_path="$new_path"
43895   # Check if we need to convert this using DOS-style short mode. If the path
43896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43897   # take no chances and rewrite it.
43898   # Note: m4 eats our [], so we need to use [ and ] instead.
43899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43900   if test "x$has_forbidden_chars" != x; then
43901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43902     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43903     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43904     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43905       # Going to short mode and back again did indeed matter. Since short mode is
43906       # case insensitive, let's make it lowercase to improve readability.
43907       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43908       # Now convert it back to Unix-stile (cygpath)
43909       input_path=`$CYGPATH -u "$shortmode_path"`
43910       new_path="$input_path"
43911     fi
43912   fi
43913 
43914   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43915   if test "x$test_cygdrive_prefix" = x; then
43916     # As a simple fix, exclude /usr/bin since it's not a real path.
43917     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43918       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43919       # a path prefixed by /cygdrive for fixpath to work.
43920       new_path="$CYGWIN_ROOT_PATH$input_path"
43921     fi
43922   fi
43923 
43924 
43925   if test "x$path" != "x$new_path"; then
43926     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43927     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43928 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43929   fi
43930 
43931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43932 
43933   path="$POTENTIAL_FREETYPE_LIB_PATH"
43934   has_colon=`$ECHO $path | $GREP ^.:`
43935   new_path="$path"
43936   if test "x$has_colon" = x; then
43937     # Not in mixed or Windows style, start by that.
43938     new_path=`cmd //c echo $path`
43939   fi
43940 
43941 
43942   input_path="$new_path"
43943   # Check if we need to convert this using DOS-style short mode. If the path
43944   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43945   # take no chances and rewrite it.
43946   # Note: m4 eats our [], so we need to use [ and ] instead.
43947   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43948   if test "x$has_forbidden_chars" != x; then
43949     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43950     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43951   fi
43952 
43953 
43954   windows_path="$new_path"
43955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43956     unix_path=`$CYGPATH -u "$windows_path"`
43957     new_path="$unix_path"
43958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43959     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43960     new_path="$unix_path"
43961   fi
43962 
43963   if test "x$path" != "x$new_path"; then
43964     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43965     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43966 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43967   fi
43968 
43969   # Save the first 10 bytes of this path to the storage, so fixpath can work.
43970   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43971 
43972   else
43973     # We're on a posix platform. Hooray! :)
43974     path="$POTENTIAL_FREETYPE_LIB_PATH"
43975     has_space=`$ECHO "$path" | $GREP " "`
43976     if test "x$has_space" != x; then
43977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43978 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43979       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43980     fi
43981 
43982     # Use eval to expand a potential ~
43983     eval path="$path"
43984     if test ! -f "$path" && test ! -d "$path"; then
43985       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43986     fi
43987 
43988     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43989   fi
43990 
43991 
43992     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43993     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43994 $as_echo_n "checking for freetype includes... " >&6; }
43995     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43996 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43997     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43998     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43999 $as_echo_n "checking for freetype libraries... " >&6; }
44000     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44001 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44002   fi
44003 
44004         if test "x$FOUND_FREETYPE" != xyes; then
44005           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44006         fi
44007       else
44008         # User specified only one of lib or include. This is an error.
44009         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44010           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44011 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44012           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44013         else
44014           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44015 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44016           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44017         fi
44018       fi
44019     else
44020       # User did not specify settings, but we need freetype. Try to locate it.
44021 
44022       if test "x$BUNDLE_FREETYPE" = x; then
44023         # If not specified, default is to bundle freetype only on windows
44024         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44025           BUNDLE_FREETYPE=yes
44026         else
44027           BUNDLE_FREETYPE=no
44028         fi
44029       fi
44030 
44031       if test "x$FOUND_FREETYPE" != xyes; then
44032         # Check builddeps
44033 
44034 
44035   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44036     # Source the builddeps file again, to make sure it uses the latest variables!
44037     . $builddepsfile
44038     # Look for a target and build machine specific resource!
44039     eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44040     if test "x$resource" = x; then
44041       # Ok, lets instead look for a target specific resource
44042       eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44043     fi
44044     if test "x$resource" = x; then
44045       # Ok, lets instead look for a build specific resource
44046       eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44047     fi
44048     if test "x$resource" = x; then
44049       # Ok, lets instead look for a generic resource
44050       # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44051       resource=${builddep_freetype2}
44052     fi
44053     if test "x$resource" != x; then
44054       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44055 $as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44056       # If the resource in the builddeps.conf file is an existing directory,
44057       # for example /java/linux/cups
44058       if test -d ${resource}; then
44059         depdir=${resource}
44060       else
44061 
44062   # freetype2 is for example mymodule
44063   # $resource is for example libs/general/libmymod_1_2_3.zip
44064   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44065   # $with_builddeps_dir is for example /localhome/builddeps
44066   # depdir is the name of the variable into which we store the depdir, eg MYMOD
44067   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44068   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44069   filename=`basename $resource`
44070   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44071   filebase=${filename%%.*}
44072   extension=${filename#*.}
44073   installdir=$with_builddeps_dir/$filebase
44074   if test ! -f $installdir/$filename.unpacked; then
44075     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44076 $as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44077     if test ! -d $installdir; then
44078       mkdir -p $installdir
44079     fi
44080     if test ! -d $installdir; then
44081       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44082     fi
44083     tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44084     touch $tmpfile
44085     if test ! -f $tmpfile; then
44086       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44087     fi
44088 
44089   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44090   # $tmpfile is the local file name for the downloaded file.
44091   VALID_TOOL=no
44092   if test "x$BDEPS_FTP" = xwget; then
44093     VALID_TOOL=yes
44094     wget -O $tmpfile $with_builddeps_server/$resource
44095   fi
44096   if test "x$BDEPS_FTP" = xlftp; then
44097     VALID_TOOL=yes
44098     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44099   fi
44100   if test "x$BDEPS_FTP" = xftp; then
44101     VALID_TOOL=yes
44102     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44103     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44104     FTPUSERPWD=${FTPSERVER%%@*}
44105     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44106       FTPUSER=${userpwd%%:*}
44107       FTPPWD=${userpwd#*@}
44108       FTPSERVER=${FTPSERVER#*@}
44109     else
44110       FTPUSER=ftp
44111       FTPPWD=ftp
44112     fi
44113     # the "pass" command does not work on some
44114     # ftp clients (read ftp.exe) but if it works,
44115     # passive mode is better!
44116     ( \
44117         echo "user $FTPUSER $FTPPWD"        ; \
44118         echo "pass"                         ; \
44119         echo "bin"                          ; \
44120         echo "get $FTPPATH $tmpfile"              ; \
44121     ) | ftp -in $FTPSERVER
44122   fi
44123   if test "x$VALID_TOOL" != xyes; then
44124     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44125   fi
44126 
44127     mv $tmpfile $installdir/$filename
44128     if test ! -s $installdir/$filename; then
44129       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44130     fi
44131     case "$extension" in
44132       zip)  echo "Unzipping $installdir/$filename..."
44133         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44134         ;;
44135       tar.gz) echo "Untaring $installdir/$filename..."
44136         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44137         ;;
44138       tgz) echo "Untaring $installdir/$filename..."
44139         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44140         ;;
44141       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44142         ;;
44143     esac
44144   fi
44145   if test -f $installdir/$filename.unpacked; then
44146     depdir=$installdir
44147   fi
44148 
44149       fi
44150       # Source the builddeps file again, because in the previous command, the depdir
44151       # was updated to point at the current build dependency install directory.
44152       . $builddepsfile
44153       # Now extract variables from the builddeps.conf files.
44154       theroot=${builddep_freetype2_ROOT}
44155       thecflags=${builddep_freetype2_CFLAGS}
44156       thelibs=${builddep_freetype2_LIBS}
44157       if test "x$depdir" = x; then
44158         as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44159       fi
44160       FREETYPE=$depdir
44161       if test "x$theroot" != x; then
44162         FREETYPE="$theroot"
44163       fi
44164       if test "x$thecflags" != x; then
44165         FREETYPE_CFLAGS="$thecflags"
44166       fi
44167       if test "x$thelibs" != x; then
44168         FREETYPE_LIBS="$thelibs"
44169       fi
44170       FOUND_FREETYPE=yes
44171       else FOUND_FREETYPE=no
44172 
44173     fi
44174     else FOUND_FREETYPE=no
44175 
44176   fi
44177 
44178         # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44179         if test "x$FOUND_FREETYPE" = xyes; then
44180           if test "x$BUNDLE_FREETYPE" = xyes; then
44181             { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44182 $as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44183             FOUND_FREETYPE=no
44184           else
44185             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44186 $as_echo_n "checking for freetype... " >&6; }
44187             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44188 $as_echo "yes (using builddeps)" >&6; }
44189           fi
44190         fi
44191       fi
44192 
44193       if test "x$FOUND_FREETYPE" != xyes; then
44194         # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44195         if test "x$PKG_CONFIG" != x; then
44196 
44197 pkg_failed=no
44198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44199 $as_echo_n "checking for FREETYPE... " >&6; }
44200 
44201 if test -n "$FREETYPE_CFLAGS"; then
44202     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44203  elif test -n "$PKG_CONFIG"; then
44204     if test -n "$PKG_CONFIG" && \
44205     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44206   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44207   ac_status=$?
44208   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44209   test $ac_status = 0; }; then
44210   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44211 else
44212   pkg_failed=yes
44213 fi
44214  else
44215     pkg_failed=untried
44216 fi
44217 if test -n "$FREETYPE_LIBS"; then
44218     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44219  elif test -n "$PKG_CONFIG"; then
44220     if test -n "$PKG_CONFIG" && \
44221     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44222   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44223   ac_status=$?
44224   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44225   test $ac_status = 0; }; then
44226   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44227 else
44228   pkg_failed=yes
44229 fi
44230  else
44231     pkg_failed=untried
44232 fi
44233 
44234 
44235 
44236 if test $pkg_failed = yes; then
44237 
44238 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44239         _pkg_short_errors_supported=yes
44240 else
44241         _pkg_short_errors_supported=no
44242 fi
44243         if test $_pkg_short_errors_supported = yes; then
44244                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44245         else
44246                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44247         fi
44248         # Put the nasty error message in config.log where it belongs
44249         echo "$FREETYPE_PKG_ERRORS" >&5
44250 
44251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44252 $as_echo "no" >&6; }
44253                 FOUND_FREETYPE=no
44254 elif test $pkg_failed = untried; then
44255         FOUND_FREETYPE=no
44256 else
44257         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44258         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44259         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44260 $as_echo "yes" >&6; }
44261         FOUND_FREETYPE=yes
44262 fi
44263           if test "x$FOUND_FREETYPE" = xyes; then
44264             # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44265             FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44266             # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44267             if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44268               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44269             fi
44270             # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44271             if test "x$BUNDLE_FREETYPE" = xyes; then
44272               { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44273 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44274               FOUND_FREETYPE=no
44275             else
44276               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44277 $as_echo_n "checking for freetype... " >&6; }
44278               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44279 $as_echo "yes (using pkg-config)" >&6; }
44280             fi
44281           fi
44282         fi
44283       fi
44284 
44285       if test "x$FOUND_FREETYPE" != xyes; then
44286         # Check in well-known locations
44287         if test "x$OPENJDK_TARGET_OS" = xwindows; then
44288           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44289 
44290   windows_path="$FREETYPE_BASE_DIR"
44291   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44292     unix_path=`$CYGPATH -u "$windows_path"`
44293     FREETYPE_BASE_DIR="$unix_path"
44294   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44295     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44296     FREETYPE_BASE_DIR="$unix_path"
44297   fi
44298 
44299 
44300   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44301   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44302   METHOD="well-known location"
44303 
44304   # First check if the files exists.
44305   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44306     # We found an arbitrary include file. That's a good sign.
44307     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44308 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44309     FOUND_FREETYPE=yes
44310 
44311     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44312     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44313       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44314 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44315       FOUND_FREETYPE=no
44316     else
44317       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44318         # On Windows, we will need both .lib and .dll file.
44319         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44320           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44321 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44322           FOUND_FREETYPE=no
44323         fi
44324       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
44325         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44326         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44327       fi
44328     fi
44329   fi
44330 
44331   if test "x$FOUND_FREETYPE" = xyes; then
44332 
44333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44334 
44335   # Input might be given as Windows format, start by converting to
44336   # unix format.
44337   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44338   new_path=`$CYGPATH -u "$path"`
44339 
44340   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44341   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44342   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44343   # "foo.exe" is OK but "foo" is an error.
44344   #
44345   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44346   # It is also a way to make sure we got the proper file name for the real test later on.
44347   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44348   if test "x$test_shortpath" = x; then
44349     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44350 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44351     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44352   fi
44353 
44354   # Call helper function which possibly converts this using DOS-style short mode.
44355   # If so, the updated path is stored in $new_path.
44356 
44357   input_path="$new_path"
44358   # Check if we need to convert this using DOS-style short mode. If the path
44359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44360   # take no chances and rewrite it.
44361   # Note: m4 eats our [], so we need to use [ and ] instead.
44362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44363   if test "x$has_forbidden_chars" != x; then
44364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44365     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44366     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44367     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44368       # Going to short mode and back again did indeed matter. Since short mode is
44369       # case insensitive, let's make it lowercase to improve readability.
44370       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44371       # Now convert it back to Unix-stile (cygpath)
44372       input_path=`$CYGPATH -u "$shortmode_path"`
44373       new_path="$input_path"
44374     fi
44375   fi
44376 
44377   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44378   if test "x$test_cygdrive_prefix" = x; then
44379     # As a simple fix, exclude /usr/bin since it's not a real path.
44380     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44381       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44382       # a path prefixed by /cygdrive for fixpath to work.
44383       new_path="$CYGWIN_ROOT_PATH$input_path"
44384     fi
44385   fi
44386 
44387 
44388   if test "x$path" != "x$new_path"; then
44389     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44390     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44391 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44392   fi
44393 
44394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44395 
44396   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44397   has_colon=`$ECHO $path | $GREP ^.:`
44398   new_path="$path"
44399   if test "x$has_colon" = x; then
44400     # Not in mixed or Windows style, start by that.
44401     new_path=`cmd //c echo $path`
44402   fi
44403 
44404 
44405   input_path="$new_path"
44406   # Check if we need to convert this using DOS-style short mode. If the path
44407   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44408   # take no chances and rewrite it.
44409   # Note: m4 eats our [], so we need to use [ and ] instead.
44410   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44411   if test "x$has_forbidden_chars" != x; then
44412     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44413     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44414   fi
44415 
44416 
44417   windows_path="$new_path"
44418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44419     unix_path=`$CYGPATH -u "$windows_path"`
44420     new_path="$unix_path"
44421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44423     new_path="$unix_path"
44424   fi
44425 
44426   if test "x$path" != "x$new_path"; then
44427     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44428     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44429 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44430   fi
44431 
44432   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44433   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44434 
44435   else
44436     # We're on a posix platform. Hooray! :)
44437     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44438     has_space=`$ECHO "$path" | $GREP " "`
44439     if test "x$has_space" != x; then
44440       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44441 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44442       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44443     fi
44444 
44445     # Use eval to expand a potential ~
44446     eval path="$path"
44447     if test ! -f "$path" && test ! -d "$path"; then
44448       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44449     fi
44450 
44451     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44452   fi
44453 
44454 
44455   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44456 
44457   # Input might be given as Windows format, start by converting to
44458   # unix format.
44459   path="$POTENTIAL_FREETYPE_LIB_PATH"
44460   new_path=`$CYGPATH -u "$path"`
44461 
44462   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44463   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44464   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44465   # "foo.exe" is OK but "foo" is an error.
44466   #
44467   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44468   # It is also a way to make sure we got the proper file name for the real test later on.
44469   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44470   if test "x$test_shortpath" = x; then
44471     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44472 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44473     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44474   fi
44475 
44476   # Call helper function which possibly converts this using DOS-style short mode.
44477   # If so, the updated path is stored in $new_path.
44478 
44479   input_path="$new_path"
44480   # Check if we need to convert this using DOS-style short mode. If the path
44481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44482   # take no chances and rewrite it.
44483   # Note: m4 eats our [], so we need to use [ and ] instead.
44484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44485   if test "x$has_forbidden_chars" != x; then
44486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44487     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44488     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44489     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44490       # Going to short mode and back again did indeed matter. Since short mode is
44491       # case insensitive, let's make it lowercase to improve readability.
44492       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44493       # Now convert it back to Unix-stile (cygpath)
44494       input_path=`$CYGPATH -u "$shortmode_path"`
44495       new_path="$input_path"
44496     fi
44497   fi
44498 
44499   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44500   if test "x$test_cygdrive_prefix" = x; then
44501     # As a simple fix, exclude /usr/bin since it's not a real path.
44502     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44503       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44504       # a path prefixed by /cygdrive for fixpath to work.
44505       new_path="$CYGWIN_ROOT_PATH$input_path"
44506     fi
44507   fi
44508 
44509 
44510   if test "x$path" != "x$new_path"; then
44511     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44512     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44513 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44514   fi
44515 
44516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44517 
44518   path="$POTENTIAL_FREETYPE_LIB_PATH"
44519   has_colon=`$ECHO $path | $GREP ^.:`
44520   new_path="$path"
44521   if test "x$has_colon" = x; then
44522     # Not in mixed or Windows style, start by that.
44523     new_path=`cmd //c echo $path`
44524   fi
44525 
44526 
44527   input_path="$new_path"
44528   # Check if we need to convert this using DOS-style short mode. If the path
44529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44530   # take no chances and rewrite it.
44531   # Note: m4 eats our [], so we need to use [ and ] instead.
44532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44533   if test "x$has_forbidden_chars" != x; then
44534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44535     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44536   fi
44537 
44538 
44539   windows_path="$new_path"
44540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44541     unix_path=`$CYGPATH -u "$windows_path"`
44542     new_path="$unix_path"
44543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44545     new_path="$unix_path"
44546   fi
44547 
44548   if test "x$path" != "x$new_path"; then
44549     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44550     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44551 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44552   fi
44553 
44554   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44555   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44556 
44557   else
44558     # We're on a posix platform. Hooray! :)
44559     path="$POTENTIAL_FREETYPE_LIB_PATH"
44560     has_space=`$ECHO "$path" | $GREP " "`
44561     if test "x$has_space" != x; then
44562       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44563 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44564       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44565     fi
44566 
44567     # Use eval to expand a potential ~
44568     eval path="$path"
44569     if test ! -f "$path" && test ! -d "$path"; then
44570       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44571     fi
44572 
44573     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44574   fi
44575 
44576 
44577     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44578     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44579 $as_echo_n "checking for freetype includes... " >&6; }
44580     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44581 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44582     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44583     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44584 $as_echo_n "checking for freetype libraries... " >&6; }
44585     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44586 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44587   fi
44588 
44589           if test "x$FOUND_FREETYPE" != xyes; then
44590             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44591 
44592   windows_path="$FREETYPE_BASE_DIR"
44593   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44594     unix_path=`$CYGPATH -u "$windows_path"`
44595     FREETYPE_BASE_DIR="$unix_path"
44596   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44597     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44598     FREETYPE_BASE_DIR="$unix_path"
44599   fi
44600 
44601 
44602   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44603   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44604   METHOD="well-known location"
44605 
44606   # First check if the files exists.
44607   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44608     # We found an arbitrary include file. That's a good sign.
44609     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44610 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44611     FOUND_FREETYPE=yes
44612 
44613     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44614     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44615       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44616 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44617       FOUND_FREETYPE=no
44618     else
44619       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44620         # On Windows, we will need both .lib and .dll file.
44621         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44622           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44623 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44624           FOUND_FREETYPE=no
44625         fi
44626       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
44627         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44628         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44629       fi
44630     fi
44631   fi
44632 
44633   if test "x$FOUND_FREETYPE" = xyes; then
44634 
44635   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44636 
44637   # Input might be given as Windows format, start by converting to
44638   # unix format.
44639   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44640   new_path=`$CYGPATH -u "$path"`
44641 
44642   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44643   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44644   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44645   # "foo.exe" is OK but "foo" is an error.
44646   #
44647   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44648   # It is also a way to make sure we got the proper file name for the real test later on.
44649   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44650   if test "x$test_shortpath" = x; then
44651     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44652 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44653     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44654   fi
44655 
44656   # Call helper function which possibly converts this using DOS-style short mode.
44657   # If so, the updated path is stored in $new_path.
44658 
44659   input_path="$new_path"
44660   # Check if we need to convert this using DOS-style short mode. If the path
44661   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44662   # take no chances and rewrite it.
44663   # Note: m4 eats our [], so we need to use [ and ] instead.
44664   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44665   if test "x$has_forbidden_chars" != x; then
44666     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44667     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44668     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44669     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44670       # Going to short mode and back again did indeed matter. Since short mode is
44671       # case insensitive, let's make it lowercase to improve readability.
44672       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44673       # Now convert it back to Unix-stile (cygpath)
44674       input_path=`$CYGPATH -u "$shortmode_path"`
44675       new_path="$input_path"
44676     fi
44677   fi
44678 
44679   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44680   if test "x$test_cygdrive_prefix" = x; then
44681     # As a simple fix, exclude /usr/bin since it's not a real path.
44682     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44683       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44684       # a path prefixed by /cygdrive for fixpath to work.
44685       new_path="$CYGWIN_ROOT_PATH$input_path"
44686     fi
44687   fi
44688 
44689 
44690   if test "x$path" != "x$new_path"; then
44691     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44692     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44693 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44694   fi
44695 
44696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44697 
44698   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44699   has_colon=`$ECHO $path | $GREP ^.:`
44700   new_path="$path"
44701   if test "x$has_colon" = x; then
44702     # Not in mixed or Windows style, start by that.
44703     new_path=`cmd //c echo $path`
44704   fi
44705 
44706 
44707   input_path="$new_path"
44708   # Check if we need to convert this using DOS-style short mode. If the path
44709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44710   # take no chances and rewrite it.
44711   # Note: m4 eats our [], so we need to use [ and ] instead.
44712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44713   if test "x$has_forbidden_chars" != x; then
44714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44715     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44716   fi
44717 
44718 
44719   windows_path="$new_path"
44720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44721     unix_path=`$CYGPATH -u "$windows_path"`
44722     new_path="$unix_path"
44723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44725     new_path="$unix_path"
44726   fi
44727 
44728   if test "x$path" != "x$new_path"; then
44729     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44730     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44731 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44732   fi
44733 
44734   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44735   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44736 
44737   else
44738     # We're on a posix platform. Hooray! :)
44739     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44740     has_space=`$ECHO "$path" | $GREP " "`
44741     if test "x$has_space" != x; then
44742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44743 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44744       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44745     fi
44746 
44747     # Use eval to expand a potential ~
44748     eval path="$path"
44749     if test ! -f "$path" && test ! -d "$path"; then
44750       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44751     fi
44752 
44753     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44754   fi
44755 
44756 
44757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44758 
44759   # Input might be given as Windows format, start by converting to
44760   # unix format.
44761   path="$POTENTIAL_FREETYPE_LIB_PATH"
44762   new_path=`$CYGPATH -u "$path"`
44763 
44764   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44765   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44766   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44767   # "foo.exe" is OK but "foo" is an error.
44768   #
44769   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44770   # It is also a way to make sure we got the proper file name for the real test later on.
44771   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44772   if test "x$test_shortpath" = x; then
44773     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44774 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44775     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44776   fi
44777 
44778   # Call helper function which possibly converts this using DOS-style short mode.
44779   # If so, the updated path is stored in $new_path.
44780 
44781   input_path="$new_path"
44782   # Check if we need to convert this using DOS-style short mode. If the path
44783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44784   # take no chances and rewrite it.
44785   # Note: m4 eats our [], so we need to use [ and ] instead.
44786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44787   if test "x$has_forbidden_chars" != x; then
44788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44792       # Going to short mode and back again did indeed matter. Since short mode is
44793       # case insensitive, let's make it lowercase to improve readability.
44794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44795       # Now convert it back to Unix-stile (cygpath)
44796       input_path=`$CYGPATH -u "$shortmode_path"`
44797       new_path="$input_path"
44798     fi
44799   fi
44800 
44801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44802   if test "x$test_cygdrive_prefix" = x; then
44803     # As a simple fix, exclude /usr/bin since it's not a real path.
44804     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44806       # a path prefixed by /cygdrive for fixpath to work.
44807       new_path="$CYGWIN_ROOT_PATH$input_path"
44808     fi
44809   fi
44810 
44811 
44812   if test "x$path" != "x$new_path"; then
44813     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44815 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44816   fi
44817 
44818   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44819 
44820   path="$POTENTIAL_FREETYPE_LIB_PATH"
44821   has_colon=`$ECHO $path | $GREP ^.:`
44822   new_path="$path"
44823   if test "x$has_colon" = x; then
44824     # Not in mixed or Windows style, start by that.
44825     new_path=`cmd //c echo $path`
44826   fi
44827 
44828 
44829   input_path="$new_path"
44830   # Check if we need to convert this using DOS-style short mode. If the path
44831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44832   # take no chances and rewrite it.
44833   # Note: m4 eats our [], so we need to use [ and ] instead.
44834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44835   if test "x$has_forbidden_chars" != x; then
44836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44837     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44838   fi
44839 
44840 
44841   windows_path="$new_path"
44842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44843     unix_path=`$CYGPATH -u "$windows_path"`
44844     new_path="$unix_path"
44845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44847     new_path="$unix_path"
44848   fi
44849 
44850   if test "x$path" != "x$new_path"; then
44851     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44853 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44854   fi
44855 
44856   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44857   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44858 
44859   else
44860     # We're on a posix platform. Hooray! :)
44861     path="$POTENTIAL_FREETYPE_LIB_PATH"
44862     has_space=`$ECHO "$path" | $GREP " "`
44863     if test "x$has_space" != x; then
44864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44865 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44866       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44867     fi
44868 
44869     # Use eval to expand a potential ~
44870     eval path="$path"
44871     if test ! -f "$path" && test ! -d "$path"; then
44872       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44873     fi
44874 
44875     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44876   fi
44877 
44878 
44879     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44880     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44881 $as_echo_n "checking for freetype includes... " >&6; }
44882     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44883 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44884     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44885     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44886 $as_echo_n "checking for freetype libraries... " >&6; }
44887     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44888 $as_echo "$FREETYPE_LIB_PATH" >&6; }
44889   fi
44890 
44891           fi
44892         else
44893           if test "x$SYS_ROOT" = "x/"; then
44894             FREETYPE_ROOT=
44895           else
44896             FREETYPE_ROOT="$SYS_ROOT"
44897           fi
44898           FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44899 
44900   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44901   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44902   METHOD="well-known location"
44903 
44904   # First check if the files exists.
44905   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44906     # We found an arbitrary include file. That's a good sign.
44907     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44908 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44909     FOUND_FREETYPE=yes
44910 
44911     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44912     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44913       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44914 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44915       FOUND_FREETYPE=no
44916     else
44917       if test "x$OPENJDK_TARGET_OS" = xwindows; then
44918         # On Windows, we will need both .lib and .dll file.
44919         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44920           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44921 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44922           FOUND_FREETYPE=no
44923         fi
44924       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
44925         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44926         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44927       fi
44928     fi
44929   fi
44930 
44931   if test "x$FOUND_FREETYPE" = xyes; then
44932 
44933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44934 
44935   # Input might be given as Windows format, start by converting to
44936   # unix format.
44937   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44938   new_path=`$CYGPATH -u "$path"`
44939 
44940   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44941   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44942   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44943   # "foo.exe" is OK but "foo" is an error.
44944   #
44945   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44946   # It is also a way to make sure we got the proper file name for the real test later on.
44947   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44948   if test "x$test_shortpath" = x; then
44949     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44950 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44951     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44952   fi
44953 
44954   # Call helper function which possibly converts this using DOS-style short mode.
44955   # If so, the updated path is stored in $new_path.
44956 
44957   input_path="$new_path"
44958   # Check if we need to convert this using DOS-style short mode. If the path
44959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44960   # take no chances and rewrite it.
44961   # Note: m4 eats our [], so we need to use [ and ] instead.
44962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44963   if test "x$has_forbidden_chars" != x; then
44964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44965     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44966     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44967     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44968       # Going to short mode and back again did indeed matter. Since short mode is
44969       # case insensitive, let's make it lowercase to improve readability.
44970       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44971       # Now convert it back to Unix-stile (cygpath)
44972       input_path=`$CYGPATH -u "$shortmode_path"`
44973       new_path="$input_path"
44974     fi
44975   fi
44976 
44977   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44978   if test "x$test_cygdrive_prefix" = x; then
44979     # As a simple fix, exclude /usr/bin since it's not a real path.
44980     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44981       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44982       # a path prefixed by /cygdrive for fixpath to work.
44983       new_path="$CYGWIN_ROOT_PATH$input_path"
44984     fi
44985   fi
44986 
44987 
44988   if test "x$path" != "x$new_path"; then
44989     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44990     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44991 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44992   fi
44993 
44994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44995 
44996   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44997   has_colon=`$ECHO $path | $GREP ^.:`
44998   new_path="$path"
44999   if test "x$has_colon" = x; then
45000     # Not in mixed or Windows style, start by that.
45001     new_path=`cmd //c echo $path`
45002   fi
45003 
45004 
45005   input_path="$new_path"
45006   # Check if we need to convert this using DOS-style short mode. If the path
45007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45008   # take no chances and rewrite it.
45009   # Note: m4 eats our [], so we need to use [ and ] instead.
45010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45011   if test "x$has_forbidden_chars" != x; then
45012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45013     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45014   fi
45015 
45016 
45017   windows_path="$new_path"
45018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45019     unix_path=`$CYGPATH -u "$windows_path"`
45020     new_path="$unix_path"
45021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45023     new_path="$unix_path"
45024   fi
45025 
45026   if test "x$path" != "x$new_path"; then
45027     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45028     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45029 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45030   fi
45031 
45032   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45033   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45034 
45035   else
45036     # We're on a posix platform. Hooray! :)
45037     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45038     has_space=`$ECHO "$path" | $GREP " "`
45039     if test "x$has_space" != x; then
45040       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45041 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45042       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45043     fi
45044 
45045     # Use eval to expand a potential ~
45046     eval path="$path"
45047     if test ! -f "$path" && test ! -d "$path"; then
45048       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45049     fi
45050 
45051     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45052   fi
45053 
45054 
45055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45056 
45057   # Input might be given as Windows format, start by converting to
45058   # unix format.
45059   path="$POTENTIAL_FREETYPE_LIB_PATH"
45060   new_path=`$CYGPATH -u "$path"`
45061 
45062   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45063   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45064   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45065   # "foo.exe" is OK but "foo" is an error.
45066   #
45067   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45068   # It is also a way to make sure we got the proper file name for the real test later on.
45069   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45070   if test "x$test_shortpath" = x; then
45071     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45072 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45073     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45074   fi
45075 
45076   # Call helper function which possibly converts this using DOS-style short mode.
45077   # If so, the updated path is stored in $new_path.
45078 
45079   input_path="$new_path"
45080   # Check if we need to convert this using DOS-style short mode. If the path
45081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45082   # take no chances and rewrite it.
45083   # Note: m4 eats our [], so we need to use [ and ] instead.
45084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45085   if test "x$has_forbidden_chars" != x; then
45086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45087     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45088     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45089     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45090       # Going to short mode and back again did indeed matter. Since short mode is
45091       # case insensitive, let's make it lowercase to improve readability.
45092       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45093       # Now convert it back to Unix-stile (cygpath)
45094       input_path=`$CYGPATH -u "$shortmode_path"`
45095       new_path="$input_path"
45096     fi
45097   fi
45098 
45099   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45100   if test "x$test_cygdrive_prefix" = x; then
45101     # As a simple fix, exclude /usr/bin since it's not a real path.
45102     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45103       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45104       # a path prefixed by /cygdrive for fixpath to work.
45105       new_path="$CYGWIN_ROOT_PATH$input_path"
45106     fi
45107   fi
45108 
45109 
45110   if test "x$path" != "x$new_path"; then
45111     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45114   fi
45115 
45116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45117 
45118   path="$POTENTIAL_FREETYPE_LIB_PATH"
45119   has_colon=`$ECHO $path | $GREP ^.:`
45120   new_path="$path"
45121   if test "x$has_colon" = x; then
45122     # Not in mixed or Windows style, start by that.
45123     new_path=`cmd //c echo $path`
45124   fi
45125 
45126 
45127   input_path="$new_path"
45128   # Check if we need to convert this using DOS-style short mode. If the path
45129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45130   # take no chances and rewrite it.
45131   # Note: m4 eats our [], so we need to use [ and ] instead.
45132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45133   if test "x$has_forbidden_chars" != x; then
45134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45135     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45136   fi
45137 
45138 
45139   windows_path="$new_path"
45140   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45141     unix_path=`$CYGPATH -u "$windows_path"`
45142     new_path="$unix_path"
45143   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45144     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45145     new_path="$unix_path"
45146   fi
45147 
45148   if test "x$path" != "x$new_path"; then
45149     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45150     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45151 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45152   fi
45153 
45154   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45155   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45156 
45157   else
45158     # We're on a posix platform. Hooray! :)
45159     path="$POTENTIAL_FREETYPE_LIB_PATH"
45160     has_space=`$ECHO "$path" | $GREP " "`
45161     if test "x$has_space" != x; then
45162       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45163 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45164       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45165     fi
45166 
45167     # Use eval to expand a potential ~
45168     eval path="$path"
45169     if test ! -f "$path" && test ! -d "$path"; then
45170       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45171     fi
45172 
45173     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45174   fi
45175 
45176 
45177     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45178     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45179 $as_echo_n "checking for freetype includes... " >&6; }
45180     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45181 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45182     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45184 $as_echo_n "checking for freetype libraries... " >&6; }
45185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45186 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45187   fi
45188 
45189 
45190           if test "x$FOUND_FREETYPE" != xyes; then
45191             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
45192 
45193   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45194   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45195   METHOD="well-known location"
45196 
45197   # First check if the files exists.
45198   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45199     # We found an arbitrary include file. That's a good sign.
45200     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45201 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45202     FOUND_FREETYPE=yes
45203 
45204     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45205     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45206       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45207 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45208       FOUND_FREETYPE=no
45209     else
45210       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45211         # On Windows, we will need both .lib and .dll file.
45212         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45213           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45214 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45215           FOUND_FREETYPE=no
45216         fi
45217       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
45218         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45219         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45220       fi
45221     fi
45222   fi
45223 
45224   if test "x$FOUND_FREETYPE" = xyes; then
45225 
45226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45227 
45228   # Input might be given as Windows format, start by converting to
45229   # unix format.
45230   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45231   new_path=`$CYGPATH -u "$path"`
45232 
45233   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45234   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45235   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45236   # "foo.exe" is OK but "foo" is an error.
45237   #
45238   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45239   # It is also a way to make sure we got the proper file name for the real test later on.
45240   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45241   if test "x$test_shortpath" = x; then
45242     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45243 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45244     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45245   fi
45246 
45247   # Call helper function which possibly converts this using DOS-style short mode.
45248   # If so, the updated path is stored in $new_path.
45249 
45250   input_path="$new_path"
45251   # Check if we need to convert this using DOS-style short mode. If the path
45252   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45253   # take no chances and rewrite it.
45254   # Note: m4 eats our [], so we need to use [ and ] instead.
45255   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45256   if test "x$has_forbidden_chars" != x; then
45257     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45258     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45259     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45260     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45261       # Going to short mode and back again did indeed matter. Since short mode is
45262       # case insensitive, let's make it lowercase to improve readability.
45263       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45264       # Now convert it back to Unix-stile (cygpath)
45265       input_path=`$CYGPATH -u "$shortmode_path"`
45266       new_path="$input_path"
45267     fi
45268   fi
45269 
45270   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45271   if test "x$test_cygdrive_prefix" = x; then
45272     # As a simple fix, exclude /usr/bin since it's not a real path.
45273     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45274       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45275       # a path prefixed by /cygdrive for fixpath to work.
45276       new_path="$CYGWIN_ROOT_PATH$input_path"
45277     fi
45278   fi
45279 
45280 
45281   if test "x$path" != "x$new_path"; then
45282     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45283     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45284 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45285   fi
45286 
45287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45288 
45289   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45290   has_colon=`$ECHO $path | $GREP ^.:`
45291   new_path="$path"
45292   if test "x$has_colon" = x; then
45293     # Not in mixed or Windows style, start by that.
45294     new_path=`cmd //c echo $path`
45295   fi
45296 
45297 
45298   input_path="$new_path"
45299   # Check if we need to convert this using DOS-style short mode. If the path
45300   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45301   # take no chances and rewrite it.
45302   # Note: m4 eats our [], so we need to use [ and ] instead.
45303   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45304   if test "x$has_forbidden_chars" != x; then
45305     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45306     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45307   fi
45308 
45309 
45310   windows_path="$new_path"
45311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45312     unix_path=`$CYGPATH -u "$windows_path"`
45313     new_path="$unix_path"
45314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45316     new_path="$unix_path"
45317   fi
45318 
45319   if test "x$path" != "x$new_path"; then
45320     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45321     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45322 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45323   fi
45324 
45325   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45326   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45327 
45328   else
45329     # We're on a posix platform. Hooray! :)
45330     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45331     has_space=`$ECHO "$path" | $GREP " "`
45332     if test "x$has_space" != x; then
45333       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45334 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45335       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45336     fi
45337 
45338     # Use eval to expand a potential ~
45339     eval path="$path"
45340     if test ! -f "$path" && test ! -d "$path"; then
45341       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45342     fi
45343 
45344     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45345   fi
45346 
45347 
45348   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45349 
45350   # Input might be given as Windows format, start by converting to
45351   # unix format.
45352   path="$POTENTIAL_FREETYPE_LIB_PATH"
45353   new_path=`$CYGPATH -u "$path"`
45354 
45355   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45356   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45357   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45358   # "foo.exe" is OK but "foo" is an error.
45359   #
45360   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45361   # It is also a way to make sure we got the proper file name for the real test later on.
45362   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45363   if test "x$test_shortpath" = x; then
45364     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45365 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45366     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45367   fi
45368 
45369   # Call helper function which possibly converts this using DOS-style short mode.
45370   # If so, the updated path is stored in $new_path.
45371 
45372   input_path="$new_path"
45373   # Check if we need to convert this using DOS-style short mode. If the path
45374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45375   # take no chances and rewrite it.
45376   # Note: m4 eats our [], so we need to use [ and ] instead.
45377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45378   if test "x$has_forbidden_chars" != x; then
45379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45380     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45381     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45382     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45383       # Going to short mode and back again did indeed matter. Since short mode is
45384       # case insensitive, let's make it lowercase to improve readability.
45385       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45386       # Now convert it back to Unix-stile (cygpath)
45387       input_path=`$CYGPATH -u "$shortmode_path"`
45388       new_path="$input_path"
45389     fi
45390   fi
45391 
45392   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45393   if test "x$test_cygdrive_prefix" = x; then
45394     # As a simple fix, exclude /usr/bin since it's not a real path.
45395     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45396       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45397       # a path prefixed by /cygdrive for fixpath to work.
45398       new_path="$CYGWIN_ROOT_PATH$input_path"
45399     fi
45400   fi
45401 
45402 
45403   if test "x$path" != "x$new_path"; then
45404     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45405     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45406 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45407   fi
45408 
45409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45410 
45411   path="$POTENTIAL_FREETYPE_LIB_PATH"
45412   has_colon=`$ECHO $path | $GREP ^.:`
45413   new_path="$path"
45414   if test "x$has_colon" = x; then
45415     # Not in mixed or Windows style, start by that.
45416     new_path=`cmd //c echo $path`
45417   fi
45418 
45419 
45420   input_path="$new_path"
45421   # Check if we need to convert this using DOS-style short mode. If the path
45422   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45423   # take no chances and rewrite it.
45424   # Note: m4 eats our [], so we need to use [ and ] instead.
45425   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45426   if test "x$has_forbidden_chars" != x; then
45427     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45428     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45429   fi
45430 
45431 
45432   windows_path="$new_path"
45433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45434     unix_path=`$CYGPATH -u "$windows_path"`
45435     new_path="$unix_path"
45436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45438     new_path="$unix_path"
45439   fi
45440 
45441   if test "x$path" != "x$new_path"; then
45442     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45443     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45444 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45445   fi
45446 
45447   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45448   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45449 
45450   else
45451     # We're on a posix platform. Hooray! :)
45452     path="$POTENTIAL_FREETYPE_LIB_PATH"
45453     has_space=`$ECHO "$path" | $GREP " "`
45454     if test "x$has_space" != x; then
45455       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45456 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45457       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45458     fi
45459 
45460     # Use eval to expand a potential ~
45461     eval path="$path"
45462     if test ! -f "$path" && test ! -d "$path"; then
45463       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45464     fi
45465 
45466     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45467   fi
45468 
45469 
45470     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45471     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45472 $as_echo_n "checking for freetype includes... " >&6; }
45473     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45474 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45475     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45476     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45477 $as_echo_n "checking for freetype libraries... " >&6; }
45478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45479 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45480   fi
45481 
45482           fi
45483 
45484           if test "x$FOUND_FREETYPE" != xyes; then
45485             FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45486             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45487 
45488   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45489   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45490   METHOD="well-known location"
45491 
45492   # First check if the files exists.
45493   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45494     # We found an arbitrary include file. That's a good sign.
45495     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45496 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45497     FOUND_FREETYPE=yes
45498 
45499     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45500     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45501       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45502 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45503       FOUND_FREETYPE=no
45504     else
45505       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45506         # On Windows, we will need both .lib and .dll file.
45507         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45508           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45509 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45510           FOUND_FREETYPE=no
45511         fi
45512       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
45513         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45514         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45515       fi
45516     fi
45517   fi
45518 
45519   if test "x$FOUND_FREETYPE" = xyes; then
45520 
45521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45522 
45523   # Input might be given as Windows format, start by converting to
45524   # unix format.
45525   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45526   new_path=`$CYGPATH -u "$path"`
45527 
45528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45531   # "foo.exe" is OK but "foo" is an error.
45532   #
45533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45534   # It is also a way to make sure we got the proper file name for the real test later on.
45535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45536   if test "x$test_shortpath" = x; then
45537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45538 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45539     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45540   fi
45541 
45542   # Call helper function which possibly converts this using DOS-style short mode.
45543   # If so, the updated path is stored in $new_path.
45544 
45545   input_path="$new_path"
45546   # Check if we need to convert this using DOS-style short mode. If the path
45547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45548   # take no chances and rewrite it.
45549   # Note: m4 eats our [], so we need to use [ and ] instead.
45550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45551   if test "x$has_forbidden_chars" != x; then
45552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45556       # Going to short mode and back again did indeed matter. Since short mode is
45557       # case insensitive, let's make it lowercase to improve readability.
45558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45559       # Now convert it back to Unix-stile (cygpath)
45560       input_path=`$CYGPATH -u "$shortmode_path"`
45561       new_path="$input_path"
45562     fi
45563   fi
45564 
45565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45566   if test "x$test_cygdrive_prefix" = x; then
45567     # As a simple fix, exclude /usr/bin since it's not a real path.
45568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45570       # a path prefixed by /cygdrive for fixpath to work.
45571       new_path="$CYGWIN_ROOT_PATH$input_path"
45572     fi
45573   fi
45574 
45575 
45576   if test "x$path" != "x$new_path"; then
45577     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45579 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45580   fi
45581 
45582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45583 
45584   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45585   has_colon=`$ECHO $path | $GREP ^.:`
45586   new_path="$path"
45587   if test "x$has_colon" = x; then
45588     # Not in mixed or Windows style, start by that.
45589     new_path=`cmd //c echo $path`
45590   fi
45591 
45592 
45593   input_path="$new_path"
45594   # Check if we need to convert this using DOS-style short mode. If the path
45595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45596   # take no chances and rewrite it.
45597   # Note: m4 eats our [], so we need to use [ and ] instead.
45598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45599   if test "x$has_forbidden_chars" != x; then
45600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45602   fi
45603 
45604 
45605   windows_path="$new_path"
45606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45607     unix_path=`$CYGPATH -u "$windows_path"`
45608     new_path="$unix_path"
45609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45611     new_path="$unix_path"
45612   fi
45613 
45614   if test "x$path" != "x$new_path"; then
45615     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45617 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45618   fi
45619 
45620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45622 
45623   else
45624     # We're on a posix platform. Hooray! :)
45625     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45626     has_space=`$ECHO "$path" | $GREP " "`
45627     if test "x$has_space" != x; then
45628       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45629 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45630       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45631     fi
45632 
45633     # Use eval to expand a potential ~
45634     eval path="$path"
45635     if test ! -f "$path" && test ! -d "$path"; then
45636       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45637     fi
45638 
45639     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45640   fi
45641 
45642 
45643   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45644 
45645   # Input might be given as Windows format, start by converting to
45646   # unix format.
45647   path="$POTENTIAL_FREETYPE_LIB_PATH"
45648   new_path=`$CYGPATH -u "$path"`
45649 
45650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45653   # "foo.exe" is OK but "foo" is an error.
45654   #
45655   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45656   # It is also a way to make sure we got the proper file name for the real test later on.
45657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45658   if test "x$test_shortpath" = x; then
45659     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45660 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45661     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45662   fi
45663 
45664   # Call helper function which possibly converts this using DOS-style short mode.
45665   # If so, the updated path is stored in $new_path.
45666 
45667   input_path="$new_path"
45668   # Check if we need to convert this using DOS-style short mode. If the path
45669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45670   # take no chances and rewrite it.
45671   # Note: m4 eats our [], so we need to use [ and ] instead.
45672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45673   if test "x$has_forbidden_chars" != x; then
45674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45675     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45676     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45677     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45678       # Going to short mode and back again did indeed matter. Since short mode is
45679       # case insensitive, let's make it lowercase to improve readability.
45680       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45681       # Now convert it back to Unix-stile (cygpath)
45682       input_path=`$CYGPATH -u "$shortmode_path"`
45683       new_path="$input_path"
45684     fi
45685   fi
45686 
45687   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45688   if test "x$test_cygdrive_prefix" = x; then
45689     # As a simple fix, exclude /usr/bin since it's not a real path.
45690     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45691       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45692       # a path prefixed by /cygdrive for fixpath to work.
45693       new_path="$CYGWIN_ROOT_PATH$input_path"
45694     fi
45695   fi
45696 
45697 
45698   if test "x$path" != "x$new_path"; then
45699     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45701 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45702   fi
45703 
45704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45705 
45706   path="$POTENTIAL_FREETYPE_LIB_PATH"
45707   has_colon=`$ECHO $path | $GREP ^.:`
45708   new_path="$path"
45709   if test "x$has_colon" = x; then
45710     # Not in mixed or Windows style, start by that.
45711     new_path=`cmd //c echo $path`
45712   fi
45713 
45714 
45715   input_path="$new_path"
45716   # Check if we need to convert this using DOS-style short mode. If the path
45717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45718   # take no chances and rewrite it.
45719   # Note: m4 eats our [], so we need to use [ and ] instead.
45720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45721   if test "x$has_forbidden_chars" != x; then
45722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45723     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45724   fi
45725 
45726 
45727   windows_path="$new_path"
45728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45729     unix_path=`$CYGPATH -u "$windows_path"`
45730     new_path="$unix_path"
45731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45733     new_path="$unix_path"
45734   fi
45735 
45736   if test "x$path" != "x$new_path"; then
45737     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45739 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45740   fi
45741 
45742   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45743   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45744 
45745   else
45746     # We're on a posix platform. Hooray! :)
45747     path="$POTENTIAL_FREETYPE_LIB_PATH"
45748     has_space=`$ECHO "$path" | $GREP " "`
45749     if test "x$has_space" != x; then
45750       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45751 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45752       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45753     fi
45754 
45755     # Use eval to expand a potential ~
45756     eval path="$path"
45757     if test ! -f "$path" && test ! -d "$path"; then
45758       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45759     fi
45760 
45761     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45762   fi
45763 
45764 
45765     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45766     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45767 $as_echo_n "checking for freetype includes... " >&6; }
45768     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45769 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45770     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45772 $as_echo_n "checking for freetype libraries... " >&6; }
45773     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45774 $as_echo "$FREETYPE_LIB_PATH" >&6; }
45775   fi
45776 
45777             else
45778 
45779   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45780   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45781   METHOD="well-known location"
45782 
45783   # First check if the files exists.
45784   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45785     # We found an arbitrary include file. That's a good sign.
45786     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45787 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45788     FOUND_FREETYPE=yes
45789 
45790     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45791     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45792       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45793 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45794       FOUND_FREETYPE=no
45795     else
45796       if test "x$OPENJDK_TARGET_OS" = xwindows; then
45797         # On Windows, we will need both .lib and .dll file.
45798         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45799           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45800 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45801           FOUND_FREETYPE=no
45802         fi
45803       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
45804         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45805         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45806       fi
45807     fi
45808   fi
45809 
45810   if test "x$FOUND_FREETYPE" = xyes; then
45811 
45812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45813 
45814   # Input might be given as Windows format, start by converting to
45815   # unix format.
45816   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45817   new_path=`$CYGPATH -u "$path"`
45818 
45819   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45820   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45821   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45822   # "foo.exe" is OK but "foo" is an error.
45823   #
45824   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45825   # It is also a way to make sure we got the proper file name for the real test later on.
45826   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45827   if test "x$test_shortpath" = x; then
45828     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45829 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45830     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45831   fi
45832 
45833   # Call helper function which possibly converts this using DOS-style short mode.
45834   # If so, the updated path is stored in $new_path.
45835 
45836   input_path="$new_path"
45837   # Check if we need to convert this using DOS-style short mode. If the path
45838   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45839   # take no chances and rewrite it.
45840   # Note: m4 eats our [], so we need to use [ and ] instead.
45841   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45842   if test "x$has_forbidden_chars" != x; then
45843     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45844     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45845     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45846     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45847       # Going to short mode and back again did indeed matter. Since short mode is
45848       # case insensitive, let's make it lowercase to improve readability.
45849       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45850       # Now convert it back to Unix-stile (cygpath)
45851       input_path=`$CYGPATH -u "$shortmode_path"`
45852       new_path="$input_path"
45853     fi
45854   fi
45855 
45856   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45857   if test "x$test_cygdrive_prefix" = x; then
45858     # As a simple fix, exclude /usr/bin since it's not a real path.
45859     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45860       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45861       # a path prefixed by /cygdrive for fixpath to work.
45862       new_path="$CYGWIN_ROOT_PATH$input_path"
45863     fi
45864   fi
45865 
45866 
45867   if test "x$path" != "x$new_path"; then
45868     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45870 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45871   fi
45872 
45873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45874 
45875   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45876   has_colon=`$ECHO $path | $GREP ^.:`
45877   new_path="$path"
45878   if test "x$has_colon" = x; then
45879     # Not in mixed or Windows style, start by that.
45880     new_path=`cmd //c echo $path`
45881   fi
45882 
45883 
45884   input_path="$new_path"
45885   # Check if we need to convert this using DOS-style short mode. If the path
45886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45887   # take no chances and rewrite it.
45888   # Note: m4 eats our [], so we need to use [ and ] instead.
45889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45890   if test "x$has_forbidden_chars" != x; then
45891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45893   fi
45894 
45895 
45896   windows_path="$new_path"
45897   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45898     unix_path=`$CYGPATH -u "$windows_path"`
45899     new_path="$unix_path"
45900   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45901     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45902     new_path="$unix_path"
45903   fi
45904 
45905   if test "x$path" != "x$new_path"; then
45906     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45907     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45908 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45909   fi
45910 
45911   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45912   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45913 
45914   else
45915     # We're on a posix platform. Hooray! :)
45916     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45917     has_space=`$ECHO "$path" | $GREP " "`
45918     if test "x$has_space" != x; then
45919       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45920 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45921       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45922     fi
45923 
45924     # Use eval to expand a potential ~
45925     eval path="$path"
45926     if test ! -f "$path" && test ! -d "$path"; then
45927       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45928     fi
45929 
45930     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45931   fi
45932 
45933 
45934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45935 
45936   # Input might be given as Windows format, start by converting to
45937   # unix format.
45938   path="$POTENTIAL_FREETYPE_LIB_PATH"
45939   new_path=`$CYGPATH -u "$path"`
45940 
45941   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45942   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45943   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45944   # "foo.exe" is OK but "foo" is an error.
45945   #
45946   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45947   # It is also a way to make sure we got the proper file name for the real test later on.
45948   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45949   if test "x$test_shortpath" = x; then
45950     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45951 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45952     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45953   fi
45954 
45955   # Call helper function which possibly converts this using DOS-style short mode.
45956   # If so, the updated path is stored in $new_path.
45957 
45958   input_path="$new_path"
45959   # Check if we need to convert this using DOS-style short mode. If the path
45960   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45961   # take no chances and rewrite it.
45962   # Note: m4 eats our [], so we need to use [ and ] instead.
45963   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45964   if test "x$has_forbidden_chars" != x; then
45965     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45966     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45967     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45968     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45969       # Going to short mode and back again did indeed matter. Since short mode is
45970       # case insensitive, let's make it lowercase to improve readability.
45971       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45972       # Now convert it back to Unix-stile (cygpath)
45973       input_path=`$CYGPATH -u "$shortmode_path"`
45974       new_path="$input_path"
45975     fi
45976   fi
45977 
45978   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45979   if test "x$test_cygdrive_prefix" = x; then
45980     # As a simple fix, exclude /usr/bin since it's not a real path.
45981     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45982       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45983       # a path prefixed by /cygdrive for fixpath to work.
45984       new_path="$CYGWIN_ROOT_PATH$input_path"
45985     fi
45986   fi
45987 
45988 
45989   if test "x$path" != "x$new_path"; then
45990     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45992 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45993   fi
45994 
45995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45996 
45997   path="$POTENTIAL_FREETYPE_LIB_PATH"
45998   has_colon=`$ECHO $path | $GREP ^.:`
45999   new_path="$path"
46000   if test "x$has_colon" = x; then
46001     # Not in mixed or Windows style, start by that.
46002     new_path=`cmd //c echo $path`
46003   fi
46004 
46005 
46006   input_path="$new_path"
46007   # Check if we need to convert this using DOS-style short mode. If the path
46008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46009   # take no chances and rewrite it.
46010   # Note: m4 eats our [], so we need to use [ and ] instead.
46011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46012   if test "x$has_forbidden_chars" != x; then
46013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46014     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46015   fi
46016 
46017 
46018   windows_path="$new_path"
46019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46020     unix_path=`$CYGPATH -u "$windows_path"`
46021     new_path="$unix_path"
46022   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46023     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46024     new_path="$unix_path"
46025   fi
46026 
46027   if test "x$path" != "x$new_path"; then
46028     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46030 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46031   fi
46032 
46033   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46034   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46035 
46036   else
46037     # We're on a posix platform. Hooray! :)
46038     path="$POTENTIAL_FREETYPE_LIB_PATH"
46039     has_space=`$ECHO "$path" | $GREP " "`
46040     if test "x$has_space" != x; then
46041       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46042 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46043       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46044     fi
46045 
46046     # Use eval to expand a potential ~
46047     eval path="$path"
46048     if test ! -f "$path" && test ! -d "$path"; then
46049       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46050     fi
46051 
46052     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46053   fi
46054 
46055 
46056     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46057     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46058 $as_echo_n "checking for freetype includes... " >&6; }
46059     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46060 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46061     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46062     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46063 $as_echo_n "checking for freetype libraries... " >&6; }
46064     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46065 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46066   fi
46067 
46068               if test "x$FOUND_FREETYPE" != xyes; then
46069 
46070   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46071   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46072   METHOD="well-known location"
46073 
46074   # First check if the files exists.
46075   if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46076     # We found an arbitrary include file. That's a good sign.
46077     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46078 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46079     FOUND_FREETYPE=yes
46080 
46081     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46082     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46083       { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46084 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46085       FOUND_FREETYPE=no
46086     else
46087       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46088         # On Windows, we will need both .lib and .dll file.
46089         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46090           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46091 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46092           FOUND_FREETYPE=no
46093         fi
46094       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
46095         # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
46096         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
46097       fi
46098     fi
46099   fi
46100 
46101   if test "x$FOUND_FREETYPE" = xyes; then
46102 
46103   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46104 
46105   # Input might be given as Windows format, start by converting to
46106   # unix format.
46107   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46108   new_path=`$CYGPATH -u "$path"`
46109 
46110   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46111   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46112   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46113   # "foo.exe" is OK but "foo" is an error.
46114   #
46115   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46116   # It is also a way to make sure we got the proper file name for the real test later on.
46117   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46118   if test "x$test_shortpath" = x; then
46119     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46120 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46121     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46122   fi
46123 
46124   # Call helper function which possibly converts this using DOS-style short mode.
46125   # If so, the updated path is stored in $new_path.
46126 
46127   input_path="$new_path"
46128   # Check if we need to convert this using DOS-style short mode. If the path
46129   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46130   # take no chances and rewrite it.
46131   # Note: m4 eats our [], so we need to use [ and ] instead.
46132   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46133   if test "x$has_forbidden_chars" != x; then
46134     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46135     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46136     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46137     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46138       # Going to short mode and back again did indeed matter. Since short mode is
46139       # case insensitive, let's make it lowercase to improve readability.
46140       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46141       # Now convert it back to Unix-stile (cygpath)
46142       input_path=`$CYGPATH -u "$shortmode_path"`
46143       new_path="$input_path"
46144     fi
46145   fi
46146 
46147   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46148   if test "x$test_cygdrive_prefix" = x; then
46149     # As a simple fix, exclude /usr/bin since it's not a real path.
46150     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46151       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46152       # a path prefixed by /cygdrive for fixpath to work.
46153       new_path="$CYGWIN_ROOT_PATH$input_path"
46154     fi
46155   fi
46156 
46157 
46158   if test "x$path" != "x$new_path"; then
46159     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46160     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46161 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46162   fi
46163 
46164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46165 
46166   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46167   has_colon=`$ECHO $path | $GREP ^.:`
46168   new_path="$path"
46169   if test "x$has_colon" = x; then
46170     # Not in mixed or Windows style, start by that.
46171     new_path=`cmd //c echo $path`
46172   fi
46173 
46174 
46175   input_path="$new_path"
46176   # Check if we need to convert this using DOS-style short mode. If the path
46177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46178   # take no chances and rewrite it.
46179   # Note: m4 eats our [], so we need to use [ and ] instead.
46180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46181   if test "x$has_forbidden_chars" != x; then
46182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46183     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46184   fi
46185 
46186 
46187   windows_path="$new_path"
46188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46189     unix_path=`$CYGPATH -u "$windows_path"`
46190     new_path="$unix_path"
46191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46193     new_path="$unix_path"
46194   fi
46195 
46196   if test "x$path" != "x$new_path"; then
46197     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46198     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46199 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46200   fi
46201 
46202   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46203   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46204 
46205   else
46206     # We're on a posix platform. Hooray! :)
46207     path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46208     has_space=`$ECHO "$path" | $GREP " "`
46209     if test "x$has_space" != x; then
46210       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46211 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46212       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46213     fi
46214 
46215     # Use eval to expand a potential ~
46216     eval path="$path"
46217     if test ! -f "$path" && test ! -d "$path"; then
46218       as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46219     fi
46220 
46221     POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46222   fi
46223 
46224 
46225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46226 
46227   # Input might be given as Windows format, start by converting to
46228   # unix format.
46229   path="$POTENTIAL_FREETYPE_LIB_PATH"
46230   new_path=`$CYGPATH -u "$path"`
46231 
46232   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46233   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46234   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46235   # "foo.exe" is OK but "foo" is an error.
46236   #
46237   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46238   # It is also a way to make sure we got the proper file name for the real test later on.
46239   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46240   if test "x$test_shortpath" = x; then
46241     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46242 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46243     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46244   fi
46245 
46246   # Call helper function which possibly converts this using DOS-style short mode.
46247   # If so, the updated path is stored in $new_path.
46248 
46249   input_path="$new_path"
46250   # Check if we need to convert this using DOS-style short mode. If the path
46251   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46252   # take no chances and rewrite it.
46253   # Note: m4 eats our [], so we need to use [ and ] instead.
46254   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46255   if test "x$has_forbidden_chars" != x; then
46256     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46257     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46258     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46259     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46260       # Going to short mode and back again did indeed matter. Since short mode is
46261       # case insensitive, let's make it lowercase to improve readability.
46262       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46263       # Now convert it back to Unix-stile (cygpath)
46264       input_path=`$CYGPATH -u "$shortmode_path"`
46265       new_path="$input_path"
46266     fi
46267   fi
46268 
46269   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46270   if test "x$test_cygdrive_prefix" = x; then
46271     # As a simple fix, exclude /usr/bin since it's not a real path.
46272     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46273       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46274       # a path prefixed by /cygdrive for fixpath to work.
46275       new_path="$CYGWIN_ROOT_PATH$input_path"
46276     fi
46277   fi
46278 
46279 
46280   if test "x$path" != "x$new_path"; then
46281     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46283 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46284   fi
46285 
46286   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46287 
46288   path="$POTENTIAL_FREETYPE_LIB_PATH"
46289   has_colon=`$ECHO $path | $GREP ^.:`
46290   new_path="$path"
46291   if test "x$has_colon" = x; then
46292     # Not in mixed or Windows style, start by that.
46293     new_path=`cmd //c echo $path`
46294   fi
46295 
46296 
46297   input_path="$new_path"
46298   # Check if we need to convert this using DOS-style short mode. If the path
46299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46300   # take no chances and rewrite it.
46301   # Note: m4 eats our [], so we need to use [ and ] instead.
46302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46303   if test "x$has_forbidden_chars" != x; then
46304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46305     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46306   fi
46307 
46308 
46309   windows_path="$new_path"
46310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46311     unix_path=`$CYGPATH -u "$windows_path"`
46312     new_path="$unix_path"
46313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46314     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46315     new_path="$unix_path"
46316   fi
46317 
46318   if test "x$path" != "x$new_path"; then
46319     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46320     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46321 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46322   fi
46323 
46324   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46325   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46326 
46327   else
46328     # We're on a posix platform. Hooray! :)
46329     path="$POTENTIAL_FREETYPE_LIB_PATH"
46330     has_space=`$ECHO "$path" | $GREP " "`
46331     if test "x$has_space" != x; then
46332       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46333 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46334       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46335     fi
46336 
46337     # Use eval to expand a potential ~
46338     eval path="$path"
46339     if test ! -f "$path" && test ! -d "$path"; then
46340       as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46341     fi
46342 
46343     POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46344   fi
46345 
46346 
46347     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46348     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46349 $as_echo_n "checking for freetype includes... " >&6; }
46350     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46351 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46352     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46353     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46354 $as_echo_n "checking for freetype libraries... " >&6; }
46355     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46356 $as_echo "$FREETYPE_LIB_PATH" >&6; }
46357   fi
46358 
46359               fi
46360             fi
46361           fi
46362         fi
46363       fi # end check in well-known locations
46364 
46365       if test "x$FOUND_FREETYPE" != xyes; then
46366 
46367   # Print a helpful message on how to acquire the necessary build dependency.
46368   # freetype is the help tag: freetype, cups, pulse, alsa etc
46369   MISSING_DEPENDENCY=freetype
46370 
46371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46372     cygwin_help $MISSING_DEPENDENCY
46373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46374     msys_help $MISSING_DEPENDENCY
46375   else
46376     PKGHANDLER_COMMAND=
46377 
46378     case $PKGHANDLER in
46379       apt-get)
46380         apt_help     $MISSING_DEPENDENCY ;;
46381       yum)
46382         yum_help     $MISSING_DEPENDENCY ;;
46383       port)
46384         port_help    $MISSING_DEPENDENCY ;;
46385       pkgutil)
46386         pkgutil_help $MISSING_DEPENDENCY ;;
46387       pkgadd)
46388         pkgadd_help  $MISSING_DEPENDENCY ;;
46389     esac
46390 
46391     if test "x$PKGHANDLER_COMMAND" != x; then
46392       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46393     fi
46394   fi
46395 
46396         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46397       fi
46398     fi # end user specified settings
46399 
46400     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46401     if test "x$FREETYPE_CFLAGS" = x; then
46402 
46403   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46404 
46405   # Input might be given as Windows format, start by converting to
46406   # unix format.
46407   path="$FREETYPE_INCLUDE_PATH"
46408   new_path=`$CYGPATH -u "$path"`
46409 
46410   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46411   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46412   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46413   # "foo.exe" is OK but "foo" is an error.
46414   #
46415   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46416   # It is also a way to make sure we got the proper file name for the real test later on.
46417   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46418   if test "x$test_shortpath" = x; then
46419     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46420 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46421     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46422   fi
46423 
46424   # Call helper function which possibly converts this using DOS-style short mode.
46425   # If so, the updated path is stored in $new_path.
46426 
46427   input_path="$new_path"
46428   # Check if we need to convert this using DOS-style short mode. If the path
46429   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46430   # take no chances and rewrite it.
46431   # Note: m4 eats our [], so we need to use [ and ] instead.
46432   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46433   if test "x$has_forbidden_chars" != x; then
46434     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46435     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46436     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46437     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46438       # Going to short mode and back again did indeed matter. Since short mode is
46439       # case insensitive, let's make it lowercase to improve readability.
46440       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46441       # Now convert it back to Unix-stile (cygpath)
46442       input_path=`$CYGPATH -u "$shortmode_path"`
46443       new_path="$input_path"
46444     fi
46445   fi
46446 
46447   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46448   if test "x$test_cygdrive_prefix" = x; then
46449     # As a simple fix, exclude /usr/bin since it's not a real path.
46450     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46451       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46452       # a path prefixed by /cygdrive for fixpath to work.
46453       new_path="$CYGWIN_ROOT_PATH$input_path"
46454     fi
46455   fi
46456 
46457 
46458   if test "x$path" != "x$new_path"; then
46459     FREETYPE_INCLUDE_PATH="$new_path"
46460     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46461 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46462   fi
46463 
46464   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46465 
46466   path="$FREETYPE_INCLUDE_PATH"
46467   has_colon=`$ECHO $path | $GREP ^.:`
46468   new_path="$path"
46469   if test "x$has_colon" = x; then
46470     # Not in mixed or Windows style, start by that.
46471     new_path=`cmd //c echo $path`
46472   fi
46473 
46474 
46475   input_path="$new_path"
46476   # Check if we need to convert this using DOS-style short mode. If the path
46477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46478   # take no chances and rewrite it.
46479   # Note: m4 eats our [], so we need to use [ and ] instead.
46480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46481   if test "x$has_forbidden_chars" != x; then
46482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46483     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46484   fi
46485 
46486 
46487   windows_path="$new_path"
46488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46489     unix_path=`$CYGPATH -u "$windows_path"`
46490     new_path="$unix_path"
46491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46493     new_path="$unix_path"
46494   fi
46495 
46496   if test "x$path" != "x$new_path"; then
46497     FREETYPE_INCLUDE_PATH="$new_path"
46498     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46499 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46500   fi
46501 
46502   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46503   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46504 
46505   else
46506     # We're on a posix platform. Hooray! :)
46507     path="$FREETYPE_INCLUDE_PATH"
46508     has_space=`$ECHO "$path" | $GREP " "`
46509     if test "x$has_space" != x; then
46510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46511 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46512       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46513     fi
46514 
46515     # Use eval to expand a potential ~
46516     eval path="$path"
46517     if test ! -f "$path" && test ! -d "$path"; then
46518       as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46519     fi
46520 
46521     FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46522   fi
46523 
46524       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46525         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46526       else
46527         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46528       fi
46529     fi
46530 
46531     if test "x$FREETYPE_LIBS" = x; then
46532 
46533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46534 
46535   # Input might be given as Windows format, start by converting to
46536   # unix format.
46537   path="$FREETYPE_LIB_PATH"
46538   new_path=`$CYGPATH -u "$path"`
46539 
46540   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46541   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46542   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46543   # "foo.exe" is OK but "foo" is an error.
46544   #
46545   # This test is therefore slightly more accurate than "test -f" to check for file precense.
46546   # It is also a way to make sure we got the proper file name for the real test later on.
46547   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46548   if test "x$test_shortpath" = x; then
46549     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46550 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46551     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46552   fi
46553 
46554   # Call helper function which possibly converts this using DOS-style short mode.
46555   # If so, the updated path is stored in $new_path.
46556 
46557   input_path="$new_path"
46558   # Check if we need to convert this using DOS-style short mode. If the path
46559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46560   # take no chances and rewrite it.
46561   # Note: m4 eats our [], so we need to use [ and ] instead.
46562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46563   if test "x$has_forbidden_chars" != x; then
46564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46565     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46566     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46567     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46568       # Going to short mode and back again did indeed matter. Since short mode is
46569       # case insensitive, let's make it lowercase to improve readability.
46570       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46571       # Now convert it back to Unix-stile (cygpath)
46572       input_path=`$CYGPATH -u "$shortmode_path"`
46573       new_path="$input_path"
46574     fi
46575   fi
46576 
46577   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46578   if test "x$test_cygdrive_prefix" = x; then
46579     # As a simple fix, exclude /usr/bin since it's not a real path.
46580     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46581       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46582       # a path prefixed by /cygdrive for fixpath to work.
46583       new_path="$CYGWIN_ROOT_PATH$input_path"
46584     fi
46585   fi
46586 
46587 
46588   if test "x$path" != "x$new_path"; then
46589     FREETYPE_LIB_PATH="$new_path"
46590     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46591 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46592   fi
46593 
46594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46595 
46596   path="$FREETYPE_LIB_PATH"
46597   has_colon=`$ECHO $path | $GREP ^.:`
46598   new_path="$path"
46599   if test "x$has_colon" = x; then
46600     # Not in mixed or Windows style, start by that.
46601     new_path=`cmd //c echo $path`
46602   fi
46603 
46604 
46605   input_path="$new_path"
46606   # Check if we need to convert this using DOS-style short mode. If the path
46607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46608   # take no chances and rewrite it.
46609   # Note: m4 eats our [], so we need to use [ and ] instead.
46610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46611   if test "x$has_forbidden_chars" != x; then
46612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46614   fi
46615 
46616 
46617   windows_path="$new_path"
46618   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46619     unix_path=`$CYGPATH -u "$windows_path"`
46620     new_path="$unix_path"
46621   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46622     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46623     new_path="$unix_path"
46624   fi
46625 
46626   if test "x$path" != "x$new_path"; then
46627     FREETYPE_LIB_PATH="$new_path"
46628     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46629 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46630   fi
46631 
46632   # Save the first 10 bytes of this path to the storage, so fixpath can work.
46633   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46634 
46635   else
46636     # We're on a posix platform. Hooray! :)
46637     path="$FREETYPE_LIB_PATH"
46638     has_space=`$ECHO "$path" | $GREP " "`
46639     if test "x$has_space" != x; then
46640       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46641 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46642       as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46643     fi
46644 
46645     # Use eval to expand a potential ~
46646     eval path="$path"
46647     if test ! -f "$path" && test ! -d "$path"; then
46648       as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46649     fi
46650 
46651     FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46652   fi
46653 
46654       if test "x$OPENJDK_TARGET_OS" = xwindows; then
46655         FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46656       else
46657         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46658       fi
46659     fi
46660 
46661     # Try to compile it
46662     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46663 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
46664     ac_ext=cpp
46665 ac_cpp='$CXXCPP $CPPFLAGS'
46666 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46667 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46668 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46669 
46670     PREV_CXXCFLAGS="$CXXFLAGS"
46671     PREV_LIBS="$LIBS"
46672     PREV_CXX="$CXX"
46673     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46674     LIBS="$LIBS $FREETYPE_LIBS"
46675     CXX="$FIXPATH $CXX"
46676     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46677 /* end confdefs.h.  */
46678 
46679           #include<ft2build.h>
46680           #include FT_FREETYPE_H
46681           int main () {
46682             FT_Init_FreeType(NULL);
46683             return 0;
46684           }
46685 
46686 _ACEOF
46687 if ac_fn_cxx_try_link "$LINENO"; then :
46688 
46689           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46690 $as_echo "yes" >&6; }
46691 
46692 else
46693 
46694           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46695 $as_echo "no" >&6; }
46696           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46697 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46698           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46699 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46700 
46701 
46702   # Print a helpful message on how to acquire the necessary build dependency.
46703   # freetype is the help tag: freetype, cups, pulse, alsa etc
46704   MISSING_DEPENDENCY=freetype
46705 
46706   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46707     cygwin_help $MISSING_DEPENDENCY
46708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46709     msys_help $MISSING_DEPENDENCY
46710   else
46711     PKGHANDLER_COMMAND=
46712 
46713     case $PKGHANDLER in
46714       apt-get)
46715         apt_help     $MISSING_DEPENDENCY ;;
46716       yum)
46717         yum_help     $MISSING_DEPENDENCY ;;
46718       port)
46719         port_help    $MISSING_DEPENDENCY ;;
46720       pkgutil)
46721         pkgutil_help $MISSING_DEPENDENCY ;;
46722       pkgadd)
46723         pkgadd_help  $MISSING_DEPENDENCY ;;
46724     esac
46725 
46726     if test "x$PKGHANDLER_COMMAND" != x; then
46727       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46728     fi
46729   fi
46730 
46731 
46732           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46733 
46734 
46735 fi
46736 rm -f core conftest.err conftest.$ac_objext \
46737     conftest$ac_exeext conftest.$ac_ext
46738     CXXCFLAGS="$PREV_CXXFLAGS"
46739     LIBS="$PREV_LIBS"
46740     CXX="$PREV_CXX"
46741     ac_ext=cpp
46742 ac_cpp='$CXXCPP $CPPFLAGS'
46743 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46744 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46745 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46746 
46747 
46748     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46749 $as_echo_n "checking if we should bundle freetype... " >&6; }
46750     if test "x$BUNDLE_FREETYPE" = xyes; then
46751       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46752     fi
46753     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46754 $as_echo "$BUNDLE_FREETYPE" >&6; }
46755 
46756   fi # end freetype needed
46757 
46758 
46759 
46760 
46761 
46762 
46763 
46764   ###############################################################################
46765   #
46766   # Check for alsa headers and libraries. Used on Linux/GNU systems.
46767   #
46768 
46769 # Check whether --with-alsa was given.
46770 if test "${with_alsa+set}" = set; then :
46771   withval=$with_alsa;
46772 fi
46773 
46774 
46775 # Check whether --with-alsa-include was given.
46776 if test "${with_alsa_include+set}" = set; then :
46777   withval=$with_alsa_include;
46778 fi
46779 
46780 
46781 # Check whether --with-alsa-lib was given.
46782 if test "${with_alsa_lib+set}" = set; then :
46783   withval=$with_alsa_lib;
46784 fi
46785 
46786 
46787   if test "x$ALSA_NOT_NEEDED" = xyes; then
46788     if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46789       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46790 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46791     fi
46792     ALSA_CFLAGS=
46793     ALSA_LIBS=
46794   else
46795     ALSA_FOUND=no
46796 
46797     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46798       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46799     fi
46800 
46801     if test "x${with_alsa}" != x; then
46802       ALSA_LIBS="-L${with_alsa}/lib -lasound"
46803       ALSA_CFLAGS="-I${with_alsa}/include"
46804       ALSA_FOUND=yes
46805     fi
46806     if test "x${with_alsa_include}" != x; then
46807       ALSA_CFLAGS="-I${with_alsa_include}"
46808       ALSA_FOUND=yes
46809     fi
46810     if test "x${with_alsa_lib}" != x; then
46811       ALSA_LIBS="-L${with_alsa_lib} -lasound"
46812       ALSA_FOUND=yes
46813     fi
46814     if test "x$ALSA_FOUND" = xno; then
46815 
46816 
46817   if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46818     # Source the builddeps file again, to make sure it uses the latest variables!
46819     . $builddepsfile
46820     # Look for a target and build machine specific resource!
46821     eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46822     if test "x$resource" = x; then
46823       # Ok, lets instead look for a target specific resource
46824       eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46825     fi
46826     if test "x$resource" = x; then
46827       # Ok, lets instead look for a build specific resource
46828       eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46829     fi
46830     if test "x$resource" = x; then
46831       # Ok, lets instead look for a generic resource
46832       # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46833       resource=${builddep_alsa}
46834     fi
46835     if test "x$resource" != x; then
46836       { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46837 $as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46838       # If the resource in the builddeps.conf file is an existing directory,
46839       # for example /java/linux/cups
46840       if test -d ${resource}; then
46841         depdir=${resource}
46842       else
46843 
46844   # alsa is for example mymodule
46845   # $resource is for example libs/general/libmymod_1_2_3.zip
46846   # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46847   # $with_builddeps_dir is for example /localhome/builddeps
46848   # depdir is the name of the variable into which we store the depdir, eg MYMOD
46849   # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46850   # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46851   filename=`basename $resource`
46852   filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46853   filebase=${filename%%.*}
46854   extension=${filename#*.}
46855   installdir=$with_builddeps_dir/$filebase
46856   if test ! -f $installdir/$filename.unpacked; then
46857     { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46858 $as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46859     if test ! -d $installdir; then
46860       mkdir -p $installdir
46861     fi
46862     if test ! -d $installdir; then
46863       as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46864     fi
46865     tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46866     touch $tmpfile
46867     if test ! -f $tmpfile; then
46868       as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46869     fi
46870 
46871   # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46872   # $tmpfile is the local file name for the downloaded file.
46873   VALID_TOOL=no
46874   if test "x$BDEPS_FTP" = xwget; then
46875     VALID_TOOL=yes
46876     wget -O $tmpfile $with_builddeps_server/$resource
46877   fi
46878   if test "x$BDEPS_FTP" = xlftp; then
46879     VALID_TOOL=yes
46880     lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46881   fi
46882   if test "x$BDEPS_FTP" = xftp; then
46883     VALID_TOOL=yes
46884     FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46885     FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46886     FTPUSERPWD=${FTPSERVER%%@*}
46887     if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46888       FTPUSER=${userpwd%%:*}
46889       FTPPWD=${userpwd#*@}
46890       FTPSERVER=${FTPSERVER#*@}
46891     else
46892       FTPUSER=ftp
46893       FTPPWD=ftp
46894     fi
46895     # the "pass" command does not work on some
46896     # ftp clients (read ftp.exe) but if it works,
46897     # passive mode is better!
46898     ( \
46899         echo "user $FTPUSER $FTPPWD"        ; \
46900         echo "pass"                         ; \
46901         echo "bin"                          ; \
46902         echo "get $FTPPATH $tmpfile"              ; \
46903     ) | ftp -in $FTPSERVER
46904   fi
46905   if test "x$VALID_TOOL" != xyes; then
46906     as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46907   fi
46908 
46909     mv $tmpfile $installdir/$filename
46910     if test ! -s $installdir/$filename; then
46911       as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46912     fi
46913     case "$extension" in
46914       zip)  echo "Unzipping $installdir/$filename..."
46915         (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46916         ;;
46917       tar.gz) echo "Untaring $installdir/$filename..."
46918         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46919         ;;
46920       tgz) echo "Untaring $installdir/$filename..."
46921         (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46922         ;;
46923       *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46924         ;;
46925     esac
46926   fi
46927   if test -f $installdir/$filename.unpacked; then
46928     depdir=$installdir
46929   fi
46930 
46931       fi
46932       # Source the builddeps file again, because in the previous command, the depdir
46933       # was updated to point at the current build dependency install directory.
46934       . $builddepsfile
46935       # Now extract variables from the builddeps.conf files.
46936       theroot=${builddep_alsa_ROOT}
46937       thecflags=${builddep_alsa_CFLAGS}
46938       thelibs=${builddep_alsa_LIBS}
46939       if test "x$depdir" = x; then
46940         as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46941       fi
46942       ALSA=$depdir
46943       if test "x$theroot" != x; then
46944         ALSA="$theroot"
46945       fi
46946       if test "x$thecflags" != x; then
46947         ALSA_CFLAGS="$thecflags"
46948       fi
46949       if test "x$thelibs" != x; then
46950         ALSA_LIBS="$thelibs"
46951       fi
46952       ALSA_FOUND=yes
46953       else ALSA_FOUND=no
46954 
46955     fi
46956     else ALSA_FOUND=no
46957 
46958   fi
46959 
46960     fi
46961     if test "x$ALSA_FOUND" = xno; then
46962 
46963 pkg_failed=no
46964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46965 $as_echo_n "checking for ALSA... " >&6; }
46966 
46967 if test -n "$ALSA_CFLAGS"; then
46968     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46969  elif test -n "$PKG_CONFIG"; then
46970     if test -n "$PKG_CONFIG" && \
46971     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46972   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46973   ac_status=$?
46974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46975   test $ac_status = 0; }; then
46976   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46977 else
46978   pkg_failed=yes
46979 fi
46980  else
46981     pkg_failed=untried
46982 fi
46983 if test -n "$ALSA_LIBS"; then
46984     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46985  elif test -n "$PKG_CONFIG"; then
46986     if test -n "$PKG_CONFIG" && \
46987     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46988   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46989   ac_status=$?
46990   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46991   test $ac_status = 0; }; then
46992   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46993 else
46994   pkg_failed=yes
46995 fi
46996  else
46997     pkg_failed=untried
46998 fi
46999 
47000 
47001 
47002 if test $pkg_failed = yes; then
47003 
47004 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47005         _pkg_short_errors_supported=yes
47006 else
47007         _pkg_short_errors_supported=no
47008 fi
47009         if test $_pkg_short_errors_supported = yes; then
47010                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47011         else
47012                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47013         fi
47014         # Put the nasty error message in config.log where it belongs
47015         echo "$ALSA_PKG_ERRORS" >&5
47016 
47017         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47018 $as_echo "no" >&6; }
47019                 ALSA_FOUND=no
47020 elif test $pkg_failed = untried; then
47021         ALSA_FOUND=no
47022 else
47023         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47024         ALSA_LIBS=$pkg_cv_ALSA_LIBS
47025         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47026 $as_echo "yes" >&6; }
47027         ALSA_FOUND=yes
47028 fi
47029     fi
47030     if test "x$ALSA_FOUND" = xno; then
47031       for ac_header in alsa/asoundlib.h
47032 do :
47033   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47034 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47035   cat >>confdefs.h <<_ACEOF
47036 #define HAVE_ALSA_ASOUNDLIB_H 1
47037 _ACEOF
47038 
47039             ALSA_FOUND=yes
47040             ALSA_CFLAGS=-Iignoreme
47041             ALSA_LIBS=-lasound
47042             DEFAULT_ALSA=yes
47043 
47044 else
47045   ALSA_FOUND=no
47046 fi
47047 
47048 done
47049 
47050     fi
47051     if test "x$ALSA_FOUND" = xno; then
47052 
47053   # Print a helpful message on how to acquire the necessary build dependency.
47054   # alsa is the help tag: freetype, cups, pulse, alsa etc
47055   MISSING_DEPENDENCY=alsa
47056 
47057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47058     cygwin_help $MISSING_DEPENDENCY
47059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47060     msys_help $MISSING_DEPENDENCY
47061   else
47062     PKGHANDLER_COMMAND=
47063 
47064     case $PKGHANDLER in
47065       apt-get)
47066         apt_help     $MISSING_DEPENDENCY ;;
47067       yum)
47068         yum_help     $MISSING_DEPENDENCY ;;
47069       port)
47070         port_help    $MISSING_DEPENDENCY ;;
47071       pkgutil)
47072         pkgutil_help $MISSING_DEPENDENCY ;;
47073       pkgadd)
47074         pkgadd_help  $MISSING_DEPENDENCY ;;
47075     esac
47076 
47077     if test "x$PKGHANDLER_COMMAND" != x; then
47078       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47079     fi
47080   fi
47081 
47082       as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47083     fi
47084   fi
47085 
47086 
47087 
47088 
47089 
47090 
47091   ###############################################################################
47092   #
47093   # Check for the jpeg library
47094   #
47095 
47096   USE_EXTERNAL_LIBJPEG=true
47097   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47098 $as_echo_n "checking for main in -ljpeg... " >&6; }
47099 if ${ac_cv_lib_jpeg_main+:} false; then :
47100   $as_echo_n "(cached) " >&6
47101 else
47102   ac_check_lib_save_LIBS=$LIBS
47103 LIBS="-ljpeg  $LIBS"
47104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47105 /* end confdefs.h.  */
47106 
47107 
47108 int
47109 main ()
47110 {
47111 return main ();
47112   ;
47113   return 0;
47114 }
47115 _ACEOF
47116 if ac_fn_cxx_try_link "$LINENO"; then :
47117   ac_cv_lib_jpeg_main=yes
47118 else
47119   ac_cv_lib_jpeg_main=no
47120 fi
47121 rm -f core conftest.err conftest.$ac_objext \
47122     conftest$ac_exeext conftest.$ac_ext
47123 LIBS=$ac_check_lib_save_LIBS
47124 fi
47125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47126 $as_echo "$ac_cv_lib_jpeg_main" >&6; }
47127 if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47128   cat >>confdefs.h <<_ACEOF
47129 #define HAVE_LIBJPEG 1
47130 _ACEOF
47131 
47132   LIBS="-ljpeg $LIBS"
47133 
47134 else
47135    USE_EXTERNAL_LIBJPEG=false
47136       { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47137 $as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47138 
47139 fi
47140 
47141 
47142 
47143   ###############################################################################
47144   #
47145   # Check for the gif library
47146   #
47147 
47148 
47149 # Check whether --with-giflib was given.
47150 if test "${with_giflib+set}" = set; then :
47151   withval=$with_giflib;
47152 fi
47153 
47154 
47155 
47156   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47157 $as_echo_n "checking for which giflib to use... " >&6; }
47158 
47159   # default is bundled
47160   DEFAULT_GIFLIB=bundled
47161 
47162   #
47163   # if user didn't specify, use DEFAULT_GIFLIB
47164   #
47165   if test "x${with_giflib}" = "x"; then
47166     with_giflib=${DEFAULT_GIFLIB}
47167   fi
47168 
47169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47170 $as_echo "${with_giflib}" >&6; }
47171 
47172   if test "x${with_giflib}" = "xbundled"; then
47173     USE_EXTERNAL_LIBGIF=false
47174   elif test "x${with_giflib}" = "xsystem"; then
47175     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47176 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47177 
47178 else
47179    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47180 fi
47181 
47182 
47183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47184 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47185 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47186   $as_echo_n "(cached) " >&6
47187 else
47188   ac_check_lib_save_LIBS=$LIBS
47189 LIBS="-lgif  $LIBS"
47190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47191 /* end confdefs.h.  */
47192 
47193 /* Override any GCC internal prototype to avoid an error.
47194    Use char because int might match the return type of a GCC
47195    builtin and then its argument prototype would still apply.  */
47196 #ifdef __cplusplus
47197 extern "C"
47198 #endif
47199 char DGifGetCode ();
47200 int
47201 main ()
47202 {
47203 return DGifGetCode ();
47204   ;
47205   return 0;
47206 }
47207 _ACEOF
47208 if ac_fn_cxx_try_link "$LINENO"; then :
47209   ac_cv_lib_gif_DGifGetCode=yes
47210 else
47211   ac_cv_lib_gif_DGifGetCode=no
47212 fi
47213 rm -f core conftest.err conftest.$ac_objext \
47214     conftest$ac_exeext conftest.$ac_ext
47215 LIBS=$ac_check_lib_save_LIBS
47216 fi
47217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47218 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47219 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47220   cat >>confdefs.h <<_ACEOF
47221 #define HAVE_LIBGIF 1
47222 _ACEOF
47223 
47224   LIBS="-lgif $LIBS"
47225 
47226 else
47227    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47228 fi
47229 
47230 
47231     USE_EXTERNAL_LIBGIF=true
47232   else
47233     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47234   fi
47235 
47236 
47237   ###############################################################################
47238   #
47239   # Check for the lcms2 library
47240   #
47241 
47242 
47243 # Check whether --with-lcms was given.
47244 if test "${with_lcms+set}" = set; then :
47245   withval=$with_lcms;
47246 fi
47247 
47248 
47249   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47250 $as_echo_n "checking for which lcms to use... " >&6; }
47251 
47252   DEFAULT_LCMS=bundled
47253 
47254   #
47255   # If user didn't specify, use DEFAULT_LCMS
47256   #
47257   if test "x${with_lcms}" = "x"; then
47258       with_lcms=${DEFAULT_LCMS}
47259   fi
47260 
47261   if test "x${with_lcms}" = "xbundled"; then
47262     USE_EXTERNAL_LCMS=false
47263     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47264 $as_echo "bundled" >&6; }
47265   elif test "x${with_lcms}" = "xsystem"; then
47266     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47267 $as_echo "system" >&6; }
47268 
47269 pkg_failed=no
47270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47271 $as_echo_n "checking for LCMS... " >&6; }
47272 
47273 if test -n "$LCMS_CFLAGS"; then
47274     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47275  elif test -n "$PKG_CONFIG"; then
47276     if test -n "$PKG_CONFIG" && \
47277     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47278   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47279   ac_status=$?
47280   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47281   test $ac_status = 0; }; then
47282   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47283 else
47284   pkg_failed=yes
47285 fi
47286  else
47287     pkg_failed=untried
47288 fi
47289 if test -n "$LCMS_LIBS"; then
47290     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47291  elif test -n "$PKG_CONFIG"; then
47292     if test -n "$PKG_CONFIG" && \
47293     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47294   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47295   ac_status=$?
47296   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47297   test $ac_status = 0; }; then
47298   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47299 else
47300   pkg_failed=yes
47301 fi
47302  else
47303     pkg_failed=untried
47304 fi
47305 
47306 
47307 
47308 if test $pkg_failed = yes; then
47309 
47310 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47311         _pkg_short_errors_supported=yes
47312 else
47313         _pkg_short_errors_supported=no
47314 fi
47315         if test $_pkg_short_errors_supported = yes; then
47316                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47317         else
47318                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47319         fi
47320         # Put the nasty error message in config.log where it belongs
47321         echo "$LCMS_PKG_ERRORS" >&5
47322 
47323         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47324 $as_echo "no" >&6; }
47325                 LCMS_FOUND=no
47326 elif test $pkg_failed = untried; then
47327         LCMS_FOUND=no
47328 else
47329         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47330         LCMS_LIBS=$pkg_cv_LCMS_LIBS
47331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47332 $as_echo "yes" >&6; }
47333         LCMS_FOUND=yes
47334 fi
47335     if test "x${LCMS_FOUND}" = "xyes"; then
47336       USE_EXTERNAL_LCMS=true
47337     else
47338       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
47339     fi
47340   else
47341     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
47342   fi
47343 
47344 
47345 
47346   ###############################################################################
47347   #
47348   # Check for the png library
47349   #
47350 
47351 
47352 # Check whether --with-libpng was given.
47353 if test "${with_libpng+set}" = set; then :
47354   withval=$with_libpng;
47355 fi
47356 
47357 
47358 
47359   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47360 $as_echo_n "checking for which libpng to use... " >&6; }
47361 
47362   # default is bundled
47363   DEFAULT_LIBPNG=bundled
47364 
47365   #
47366   # if user didn't specify, use DEFAULT_LIBPNG
47367   #
47368   if test "x${with_libpng}" = "x"; then
47369       with_libpng=${DEFAULT_LIBPNG}
47370   fi
47371 
47372   if test "x${with_libpng}" = "xbundled"; then
47373       USE_EXTERNAL_LIBPNG=false
47374       { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47375 $as_echo "bundled" >&6; }
47376   elif test "x${with_libpng}" = "xsystem"; then
47377 
47378 pkg_failed=no
47379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47380 $as_echo_n "checking for PNG... " >&6; }
47381 
47382 if test -n "$PNG_CFLAGS"; then
47383     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47384  elif test -n "$PKG_CONFIG"; then
47385     if test -n "$PKG_CONFIG" && \
47386     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47387   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47388   ac_status=$?
47389   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47390   test $ac_status = 0; }; then
47391   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47392 else
47393   pkg_failed=yes
47394 fi
47395  else
47396     pkg_failed=untried
47397 fi
47398 if test -n "$PNG_LIBS"; then
47399     pkg_cv_PNG_LIBS="$PNG_LIBS"
47400  elif test -n "$PKG_CONFIG"; then
47401     if test -n "$PKG_CONFIG" && \
47402     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47403   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47404   ac_status=$?
47405   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47406   test $ac_status = 0; }; then
47407   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47408 else
47409   pkg_failed=yes
47410 fi
47411  else
47412     pkg_failed=untried
47413 fi
47414 
47415 
47416 
47417 if test $pkg_failed = yes; then
47418 
47419 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47420         _pkg_short_errors_supported=yes
47421 else
47422         _pkg_short_errors_supported=no
47423 fi
47424         if test $_pkg_short_errors_supported = yes; then
47425                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47426         else
47427                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47428         fi
47429         # Put the nasty error message in config.log where it belongs
47430         echo "$PNG_PKG_ERRORS" >&5
47431 
47432         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47433 $as_echo "no" >&6; }
47434                  LIBPNG_FOUND=no
47435 elif test $pkg_failed = untried; then
47436          LIBPNG_FOUND=no
47437 else
47438         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47439         PNG_LIBS=$pkg_cv_PNG_LIBS
47440         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47441 $as_echo "yes" >&6; }
47442          LIBPNG_FOUND=yes
47443 fi
47444       if test "x${LIBPNG_FOUND}" = "xyes"; then
47445           USE_EXTERNAL_LIBPNG=true
47446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47447 $as_echo "system" >&6; }
47448       else
47449           { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47450 $as_echo "system not found" >&6; }
47451           as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47452       fi
47453   else
47454       as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47455   fi
47456 
47457 
47458   ###############################################################################
47459   #
47460   # Check for the zlib library
47461   #
47462 
47463 
47464 # Check whether --with-zlib was given.
47465 if test "${with_zlib+set}" = set; then :
47466   withval=$with_zlib;
47467 fi
47468 
47469 
47470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47471 $as_echo_n "checking for compress in -lz... " >&6; }
47472 if ${ac_cv_lib_z_compress+:} false; then :
47473   $as_echo_n "(cached) " >&6
47474 else
47475   ac_check_lib_save_LIBS=$LIBS
47476 LIBS="-lz  $LIBS"
47477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47478 /* end confdefs.h.  */
47479 
47480 /* Override any GCC internal prototype to avoid an error.
47481    Use char because int might match the return type of a GCC
47482    builtin and then its argument prototype would still apply.  */
47483 #ifdef __cplusplus
47484 extern "C"
47485 #endif
47486 char compress ();
47487 int
47488 main ()
47489 {
47490 return compress ();
47491   ;
47492   return 0;
47493 }
47494 _ACEOF
47495 if ac_fn_cxx_try_link "$LINENO"; then :
47496   ac_cv_lib_z_compress=yes
47497 else
47498   ac_cv_lib_z_compress=no
47499 fi
47500 rm -f core conftest.err conftest.$ac_objext \
47501     conftest$ac_exeext conftest.$ac_ext
47502 LIBS=$ac_check_lib_save_LIBS
47503 fi
47504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47505 $as_echo "$ac_cv_lib_z_compress" >&6; }
47506 if test "x$ac_cv_lib_z_compress" = xyes; then :
47507    ZLIB_FOUND=yes
47508 else
47509    ZLIB_FOUND=no
47510 fi
47511 
47512 
47513   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47514 $as_echo_n "checking for which zlib to use... " >&6; }
47515 
47516   DEFAULT_ZLIB=bundled
47517   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47518     #
47519     # On macosx default is system...on others default is
47520     #
47521     DEFAULT_ZLIB=system
47522   fi
47523 
47524   if test "x${ZLIB_FOUND}" != "xyes"; then
47525     #
47526     # If we don't find any system...set default to bundled
47527     #
47528     DEFAULT_ZLIB=bundled
47529   fi
47530 
47531   #
47532   # If user didn't specify, use DEFAULT_ZLIB
47533   #
47534   if test "x${with_zlib}" = "x"; then
47535     with_zlib=${DEFAULT_ZLIB}
47536   fi
47537 
47538   if test "x${with_zlib}" = "xbundled"; then
47539     USE_EXTERNAL_LIBZ=false
47540     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47541 $as_echo "bundled" >&6; }
47542   elif test "x${with_zlib}" = "xsystem"; then
47543     if test "x${ZLIB_FOUND}" = "xyes"; then
47544       USE_EXTERNAL_LIBZ=true
47545       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47546 $as_echo "system" >&6; }
47547     else
47548       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47549 $as_echo "system not found" >&6; }
47550       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
47551     fi
47552   else
47553     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47554   fi
47555 
47556 
47557 
47558   ###############################################################################
47559   LIBZIP_CAN_USE_MMAP=true
47560 
47561 
47562 
47563   ###############################################################################
47564   #
47565   # Check if altzone exists in time.h
47566   #
47567 
47568   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47569 /* end confdefs.h.  */
47570 #include <time.h>
47571 int
47572 main ()
47573 {
47574 return (int)altzone;
47575   ;
47576   return 0;
47577 }
47578 _ACEOF
47579 if ac_fn_cxx_try_link "$LINENO"; then :
47580   has_altzone=yes
47581 else
47582   has_altzone=no
47583 fi
47584 rm -f core conftest.err conftest.$ac_objext \
47585     conftest$ac_exeext conftest.$ac_ext
47586   if test "x$has_altzone" = xyes; then
47587 
47588 $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47589 
47590   fi
47591 
47592   ###############################################################################
47593   #
47594   # Check the maths library
47595   #
47596 
47597   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47598 $as_echo_n "checking for cos in -lm... " >&6; }
47599 if ${ac_cv_lib_m_cos+:} false; then :
47600   $as_echo_n "(cached) " >&6
47601 else
47602   ac_check_lib_save_LIBS=$LIBS
47603 LIBS="-lm  $LIBS"
47604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47605 /* end confdefs.h.  */
47606 
47607 /* Override any GCC internal prototype to avoid an error.
47608    Use char because int might match the return type of a GCC
47609    builtin and then its argument prototype would still apply.  */
47610 #ifdef __cplusplus
47611 extern "C"
47612 #endif
47613 char cos ();
47614 int
47615 main ()
47616 {
47617 return cos ();
47618   ;
47619   return 0;
47620 }
47621 _ACEOF
47622 if ac_fn_cxx_try_link "$LINENO"; then :
47623   ac_cv_lib_m_cos=yes
47624 else
47625   ac_cv_lib_m_cos=no
47626 fi
47627 rm -f core conftest.err conftest.$ac_objext \
47628     conftest$ac_exeext conftest.$ac_ext
47629 LIBS=$ac_check_lib_save_LIBS
47630 fi
47631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47632 $as_echo "$ac_cv_lib_m_cos" >&6; }
47633 if test "x$ac_cv_lib_m_cos" = xyes; then :
47634   cat >>confdefs.h <<_ACEOF
47635 #define HAVE_LIBM 1
47636 _ACEOF
47637 
47638   LIBS="-lm $LIBS"
47639 
47640 else
47641 
47642         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47643 $as_echo "$as_me: Maths library was not found" >&6;}
47644 
47645 
47646 fi
47647 
47648 
47649 
47650   ###############################################################################
47651   #
47652   # Check for libdl.so
47653 
47654   save_LIBS="$LIBS"
47655   LIBS=""
47656   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47657 $as_echo_n "checking for dlopen in -ldl... " >&6; }
47658 if ${ac_cv_lib_dl_dlopen+:} false; then :
47659   $as_echo_n "(cached) " >&6
47660 else
47661   ac_check_lib_save_LIBS=$LIBS
47662 LIBS="-ldl  $LIBS"
47663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47664 /* end confdefs.h.  */
47665 
47666 /* Override any GCC internal prototype to avoid an error.
47667    Use char because int might match the return type of a GCC
47668    builtin and then its argument prototype would still apply.  */
47669 #ifdef __cplusplus
47670 extern "C"
47671 #endif
47672 char dlopen ();
47673 int
47674 main ()
47675 {
47676 return dlopen ();
47677   ;
47678   return 0;
47679 }
47680 _ACEOF
47681 if ac_fn_cxx_try_link "$LINENO"; then :
47682   ac_cv_lib_dl_dlopen=yes
47683 else
47684   ac_cv_lib_dl_dlopen=no
47685 fi
47686 rm -f core conftest.err conftest.$ac_objext \
47687     conftest$ac_exeext conftest.$ac_ext
47688 LIBS=$ac_check_lib_save_LIBS
47689 fi
47690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47691 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47692 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47693   cat >>confdefs.h <<_ACEOF
47694 #define HAVE_LIBDL 1
47695 _ACEOF
47696 
47697   LIBS="-ldl $LIBS"
47698 
47699 fi
47700 
47701   LIBDL="$LIBS"
47702 
47703   LIBS="$save_LIBS"
47704 
47705 
47706   ###############################################################################
47707   #
47708   # statically link libstdc++ before C++ ABI is stablized on Linux unless
47709   # dynamic build is configured on command line.
47710   #
47711 
47712 # Check whether --with-stdc++lib was given.
47713 if test "${with_stdc__lib+set}" = set; then :
47714   withval=$with_stdc__lib;
47715         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47716                 && test "x$with_stdc__lib" != xdefault; then
47717           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47718         fi
47719 
47720 else
47721   with_stdc__lib=default
47722 
47723 fi
47724 
47725 
47726   if test "x$OPENJDK_TARGET_OS" = xlinux; then
47727     # Test if -lstdc++ works.
47728     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47729 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47730     ac_ext=cpp
47731 ac_cpp='$CXXCPP $CPPFLAGS'
47732 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47733 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47734 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47735 
47736     OLD_CXXFLAGS="$CXXFLAGS"
47737     CXXFLAGS="$CXXFLAGS -lstdc++"
47738     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47739 /* end confdefs.h.  */
47740 
47741 int
47742 main ()
47743 {
47744 return 0;
47745   ;
47746   return 0;
47747 }
47748 _ACEOF
47749 if ac_fn_cxx_try_link "$LINENO"; then :
47750   has_dynamic_libstdcxx=yes
47751 else
47752   has_dynamic_libstdcxx=no
47753 fi
47754 rm -f core conftest.err conftest.$ac_objext \
47755     conftest$ac_exeext conftest.$ac_ext
47756     CXXFLAGS="$OLD_CXXFLAGS"
47757     ac_ext=cpp
47758 ac_cpp='$CXXCPP $CPPFLAGS'
47759 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47760 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47761 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47762 
47763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47764 $as_echo "$has_dynamic_libstdcxx" >&6; }
47765 
47766     # Test if stdc++ can be linked statically.
47767     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47768 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47769     STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47770     ac_ext=cpp
47771 ac_cpp='$CXXCPP $CPPFLAGS'
47772 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47773 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47774 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47775 
47776     OLD_LIBS="$LIBS"
47777     OLD_CXX="$CXX"
47778     LIBS="$STATIC_STDCXX_FLAGS"
47779     CXX="$CC"
47780     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47781 /* end confdefs.h.  */
47782 
47783 int
47784 main ()
47785 {
47786 return 0;
47787   ;
47788   return 0;
47789 }
47790 _ACEOF
47791 if ac_fn_cxx_try_link "$LINENO"; then :
47792   has_static_libstdcxx=yes
47793 else
47794   has_static_libstdcxx=no
47795 fi
47796 rm -f core conftest.err conftest.$ac_objext \
47797     conftest$ac_exeext conftest.$ac_ext
47798     LIBS="$OLD_LIBS"
47799     CXX="$OLD_CXX"
47800     ac_ext=cpp
47801 ac_cpp='$CXXCPP $CPPFLAGS'
47802 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47803 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47804 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47805 
47806     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47807 $as_echo "$has_static_libstdcxx" >&6; }
47808 
47809     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47810       as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47811     fi
47812 
47813     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47814       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47815     fi
47816 
47817     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47818       as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47819     fi
47820 
47821     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47822 $as_echo_n "checking how to link with libstdc++... " >&6; }
47823     # If dynamic was requested, it's available since it would fail above otherwise.
47824     # If dynamic wasn't requested, go with static unless it isn't available.
47825     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47826       LIBCXX="$LIBCXX -lstdc++"
47827       LDCXX="$CXX"
47828       STATIC_CXX_SETTING="STATIC_CXX=false"
47829       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47830 $as_echo "dynamic" >&6; }
47831     else
47832       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47833       LDCXX="$CC"
47834       STATIC_CXX_SETTING="STATIC_CXX=true"
47835       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47836 $as_echo "static" >&6; }
47837     fi
47838   fi
47839 
47840 
47841   if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47842     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47843 
47844 pkg_failed=no
47845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47846 $as_echo_n "checking for LIBFFI... " >&6; }
47847 
47848 if test -n "$LIBFFI_CFLAGS"; then
47849     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47850  elif test -n "$PKG_CONFIG"; then
47851     if test -n "$PKG_CONFIG" && \
47852     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47853   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47854   ac_status=$?
47855   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47856   test $ac_status = 0; }; then
47857   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47858 else
47859   pkg_failed=yes
47860 fi
47861  else
47862     pkg_failed=untried
47863 fi
47864 if test -n "$LIBFFI_LIBS"; then
47865     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47866  elif test -n "$PKG_CONFIG"; then
47867     if test -n "$PKG_CONFIG" && \
47868     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47869   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47870   ac_status=$?
47871   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47872   test $ac_status = 0; }; then
47873   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47874 else
47875   pkg_failed=yes
47876 fi
47877  else
47878     pkg_failed=untried
47879 fi
47880 
47881 
47882 
47883 if test $pkg_failed = yes; then
47884 
47885 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47886         _pkg_short_errors_supported=yes
47887 else
47888         _pkg_short_errors_supported=no
47889 fi
47890         if test $_pkg_short_errors_supported = yes; then
47891                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47892         else
47893                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47894         fi
47895         # Put the nasty error message in config.log where it belongs
47896         echo "$LIBFFI_PKG_ERRORS" >&5
47897 
47898         as_fn_error $? "Package requirements (libffi) were not met:
47899 
47900 $LIBFFI_PKG_ERRORS
47901 
47902 Consider adjusting the PKG_CONFIG_PATH environment variable if you
47903 installed software in a non-standard prefix.
47904 
47905 Alternatively, you may set the environment variables LIBFFI_CFLAGS
47906 and LIBFFI_LIBS to avoid the need to call pkg-config.
47907 See the pkg-config man page for more details.
47908 " "$LINENO" 5
47909 elif test $pkg_failed = untried; then
47910         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47911 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47912 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47913 is in your PATH or set the PKG_CONFIG environment variable to the full
47914 path to pkg-config.
47915 
47916 Alternatively, you may set the environment variables LIBFFI_CFLAGS
47917 and LIBFFI_LIBS to avoid the need to call pkg-config.
47918 See the pkg-config man page for more details.
47919 
47920 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47921 See \`config.log' for more details" "$LINENO" 5; }
47922 else
47923         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47924         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47925         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47926 $as_echo "yes" >&6; }
47927         :
47928 fi
47929 
47930   fi
47931 
47932   if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47933     # Extract the first word of "llvm-config", so it can be a program name with args.
47934 set dummy llvm-config; ac_word=$2
47935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47936 $as_echo_n "checking for $ac_word... " >&6; }
47937 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47938   $as_echo_n "(cached) " >&6
47939 else
47940   if test -n "$LLVM_CONFIG"; then
47941   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47942 else
47943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47944 for as_dir in $PATH
47945 do
47946   IFS=$as_save_IFS
47947   test -z "$as_dir" && as_dir=.
47948     for ac_exec_ext in '' $ac_executable_extensions; do
47949   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47950     ac_cv_prog_LLVM_CONFIG="llvm-config"
47951     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47952     break 2
47953   fi
47954 done
47955   done
47956 IFS=$as_save_IFS
47957 
47958 fi
47959 fi
47960 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47961 if test -n "$LLVM_CONFIG"; then
47962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47963 $as_echo "$LLVM_CONFIG" >&6; }
47964 else
47965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47966 $as_echo "no" >&6; }
47967 fi
47968 
47969 
47970 
47971     if test "x$LLVM_CONFIG" != xllvm-config; then
47972       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47973     fi
47974 
47975     llvm_components="jit mcjit engine nativecodegen native"
47976     unset LLVM_CFLAGS
47977     for flag in $("$LLVM_CONFIG" --cxxflags); do
47978       if echo "${flag}" | grep -q '^-[ID]'; then
47979         if test "${flag}" != "-D_DEBUG" ; then
47980           if test "${LLVM_CFLAGS}" != "" ; then
47981             LLVM_CFLAGS="${LLVM_CFLAGS} "
47982           fi
47983           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47984         fi
47985       fi
47986     done
47987     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47988     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47989 
47990     unset LLVM_LDFLAGS
47991     for flag in $("${LLVM_CONFIG}" --ldflags); do
47992       if echo "${flag}" | grep -q '^-L'; then
47993         if test "${LLVM_LDFLAGS}" != ""; then
47994           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47995         fi
47996         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47997       fi
47998     done
47999 
48000     unset LLVM_LIBS
48001     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48002       if echo "${flag}" | grep -q '^-l'; then
48003         if test "${LLVM_LIBS}" != ""; then
48004           LLVM_LIBS="${LLVM_LIBS} "
48005         fi
48006         LLVM_LIBS="${LLVM_LIBS}${flag}"
48007       fi
48008     done
48009 
48010 
48011 
48012 
48013   fi
48014 
48015   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48016   if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
48017     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48018   fi
48019 
48020   # TODO better (platform agnostic) test
48021   if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
48022     LIBCXX="-lstdc++"
48023   fi
48024 
48025 
48026 
48027 
48028 
48029 ###############################################################################
48030 #
48031 # We need to do some final tweaking, when everything else is done.
48032 #
48033 ###############################################################################
48034 
48035 
48036   HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48037 
48038 
48039   # The name of the Service Agent jar.
48040   SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48041   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48042     SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48043   fi
48044 
48045 
48046 
48047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48048 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48049 
48050     if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48051       ENABLE_INTREE_EC=yes
48052       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48053 $as_echo "yes" >&6; }
48054     else
48055       ENABLE_INTREE_EC=no
48056       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48057 $as_echo "no" >&6; }
48058     fi
48059 
48060 
48061 
48062 
48063 ###############################################################################
48064 #
48065 # Configure parts of the build that only affect the build performance,
48066 # not the result.
48067 #
48068 ###############################################################################
48069 
48070 
48071   # How many cores do we have on this build system?
48072 
48073 # Check whether --with-num-cores was given.
48074 if test "${with_num_cores+set}" = set; then :
48075   withval=$with_num_cores;
48076 fi
48077 
48078   if test "x$with_num_cores" = x; then
48079     # The number of cores were not specified, try to probe them.
48080 
48081   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
48082 $as_echo_n "checking for number of cores... " >&6; }
48083   NUM_CORES=1
48084   FOUND_CORES=no
48085 
48086   if test -f /proc/cpuinfo; then
48087     # Looks like a Linux (or cygwin) system
48088     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
48089     FOUND_CORES=yes
48090   elif test -x /usr/sbin/psrinfo; then
48091     # Looks like a Solaris system
48092     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
48093     FOUND_CORES=yes
48094   elif test -x /usr/sbin/system_profiler; then
48095     # Looks like a MacOSX system
48096     NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
48097     FOUND_CORES=yes
48098   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
48099     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
48100     FOUND_CORES=yes
48101   elif test -n "$NUMBER_OF_PROCESSORS"; then
48102     # On windows, look in the env
48103     NUM_CORES=$NUMBER_OF_PROCESSORS
48104     FOUND_CORES=yes
48105   fi
48106 
48107   if test "x$FOUND_CORES" = xyes; then
48108     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48109 $as_echo "$NUM_CORES" >&6; }
48110   else
48111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48112 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
48113     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48114 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48115   fi
48116 
48117   else
48118     NUM_CORES=$with_num_cores
48119   fi
48120 
48121 
48122 
48123   # How much memory do we have on this build system?
48124 
48125 # Check whether --with-memory-size was given.
48126 if test "${with_memory_size+set}" = set; then :
48127   withval=$with_memory_size;
48128 fi
48129 
48130   if test "x$with_memory_size" = x; then
48131     # The memory size was not specified, try to probe it.
48132 
48133   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48134 $as_echo_n "checking for memory size... " >&6; }
48135   # Default to 1024 MB
48136   MEMORY_SIZE=1024
48137   FOUND_MEM=no
48138 
48139   if test -f /proc/meminfo; then
48140     # Looks like a Linux (or cygwin) system
48141     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48142     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48143     FOUND_MEM=yes
48144   elif test -x /usr/sbin/prtconf; then
48145     # Looks like a Solaris or AIX system
48146     MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48147     FOUND_MEM=yes
48148   elif test -x /usr/sbin/system_profiler; then
48149     # Looks like a MacOSX system
48150     MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48151     MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48152     FOUND_MEM=yes
48153   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48154     # Windows, but without cygwin
48155     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48156     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48157     FOUND_MEM=yes
48158   fi
48159 
48160   if test "x$FOUND_MEM" = xyes; then
48161     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48162 $as_echo "$MEMORY_SIZE MB" >&6; }
48163   else
48164     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48165 $as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48166     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48167 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48168   fi
48169 
48170   else
48171     MEMORY_SIZE=$with_memory_size
48172   fi
48173 
48174 
48175 
48176   # Provide a decent default number of parallel jobs for make depending on
48177   # number of cores, amount of memory and machine architecture.
48178 
48179 # Check whether --with-jobs was given.
48180 if test "${with_jobs+set}" = set; then :
48181   withval=$with_jobs;
48182 fi
48183 
48184   if test "x$with_jobs" = x; then
48185     # Number of jobs was not specified, calculate.
48186     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48187 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48188     # Approximate memory in GB, rounding up a bit.
48189     memory_gb=`expr $MEMORY_SIZE / 1100`
48190     # Pick the lowest of memory in gb and number of cores.
48191     if test "$memory_gb" -lt "$NUM_CORES"; then
48192       JOBS="$memory_gb"
48193     else
48194       JOBS="$NUM_CORES"
48195       # On bigger machines, leave some room for other processes to run
48196       if test "$JOBS" -gt "4"; then
48197         JOBS=`expr $JOBS '*' 90 / 100`
48198       fi
48199     fi
48200     # Cap number of jobs to 16
48201     if test "$JOBS" -gt "16"; then
48202       JOBS=16
48203     fi
48204     if test "$JOBS" -eq "0"; then
48205       JOBS=1
48206     fi
48207     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48208 $as_echo "$JOBS" >&6; }
48209   else
48210     JOBS=$with_jobs
48211   fi
48212 
48213 
48214 
48215 # Setup smart javac (after cores and memory have been setup)
48216 
48217 
48218 # Check whether --with-sjavac-server-java was given.
48219 if test "${with_sjavac_server_java+set}" = set; then :
48220   withval=$with_sjavac_server_java;
48221 fi
48222 
48223 
48224   if test "x$with_sjavac_server_java" != x; then
48225     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48226     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48227     if test "x$FOUND_VERSION" = x; then
48228       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48229     fi
48230   else
48231     SJAVAC_SERVER_JAVA=""
48232     # Hotspot specific options.
48233 
48234   $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48235   $ECHO "Command: $JAVA -verbosegc -version" >&5
48236   OUTPUT=`$JAVA -verbosegc -version 2>&1`
48237   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48238   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48239   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48240     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48241     JVM_ARG_OK=true
48242   else
48243     $ECHO "Arg failed:" >&5
48244     $ECHO "$OUTPUT" >&5
48245     JVM_ARG_OK=false
48246   fi
48247 
48248     # JRockit specific options.
48249 
48250   $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48251   $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48252   OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48253   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48254   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48255   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48256     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48257     JVM_ARG_OK=true
48258   else
48259     $ECHO "Arg failed:" >&5
48260     $ECHO "$OUTPUT" >&5
48261     JVM_ARG_OK=false
48262   fi
48263 
48264     SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48265   fi
48266 
48267 
48268   if test "$MEMORY_SIZE" -gt "2500"; then
48269 
48270   $ECHO "Check if jvm arg is ok: -d64" >&5
48271   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48272   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48273   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48274   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48275   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48276     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48277     JVM_ARG_OK=true
48278   else
48279     $ECHO "Arg failed:" >&5
48280     $ECHO "$OUTPUT" >&5
48281     JVM_ARG_OK=false
48282   fi
48283 
48284     if test "$JVM_ARG_OK" = true; then
48285       JVM_64BIT=true
48286       JVM_ARG_OK=false
48287     fi
48288   fi
48289 
48290   if test "$JVM_64BIT" = true; then
48291     if test "$MEMORY_SIZE" -gt "17000"; then
48292 
48293   $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48294   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48295   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48296   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48297   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48298   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48299     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48300     JVM_ARG_OK=true
48301   else
48302     $ECHO "Arg failed:" >&5
48303     $ECHO "$OUTPUT" >&5
48304     JVM_ARG_OK=false
48305   fi
48306 
48307     fi
48308     if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48309 
48310   $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48311   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48312   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48313   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48314   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48315   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48316     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48317     JVM_ARG_OK=true
48318   else
48319     $ECHO "Arg failed:" >&5
48320     $ECHO "$OUTPUT" >&5
48321     JVM_ARG_OK=false
48322   fi
48323 
48324     fi
48325     if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48326 
48327   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48328   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48329   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48330   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48331   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48332   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48333     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48334     JVM_ARG_OK=true
48335   else
48336     $ECHO "Arg failed:" >&5
48337     $ECHO "$OUTPUT" >&5
48338     JVM_ARG_OK=false
48339   fi
48340 
48341     fi
48342     if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48343 
48344   $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48345   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48346   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48347   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48348   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48349   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48350     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48351     JVM_ARG_OK=true
48352   else
48353     $ECHO "Arg failed:" >&5
48354     $ECHO "$OUTPUT" >&5
48355     JVM_ARG_OK=false
48356   fi
48357 
48358     fi
48359   fi
48360   if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48361 
48362   $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48363   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48364   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48365   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48366   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48367   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48368     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48369     JVM_ARG_OK=true
48370   else
48371     $ECHO "Arg failed:" >&5
48372     $ECHO "$OUTPUT" >&5
48373     JVM_ARG_OK=false
48374   fi
48375 
48376   fi
48377   if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48378 
48379   $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48380   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48381   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48382   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48383   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48384   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48385     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48386     JVM_ARG_OK=true
48387   else
48388     $ECHO "Arg failed:" >&5
48389     $ECHO "$OUTPUT" >&5
48390     JVM_ARG_OK=false
48391   fi
48392 
48393   fi
48394   if test "$JVM_ARG_OK" = false; then
48395 
48396   $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48397   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48398   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48399   FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48400   FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48401   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48402     SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48403     JVM_ARG_OK=true
48404   else
48405     $ECHO "Arg failed:" >&5
48406     $ECHO "$OUTPUT" >&5
48407     JVM_ARG_OK=false
48408   fi
48409 
48410   fi
48411 
48412   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48413 $as_echo_n "checking whether to use sjavac... " >&6; }
48414   # Check whether --enable-sjavac was given.
48415 if test "${enable_sjavac+set}" = set; then :
48416   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48417 else
48418   ENABLE_SJAVAC='no'
48419 fi
48420 
48421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48422 $as_echo "$ENABLE_SJAVAC" >&6; }
48423 
48424 
48425   if test "x$ENABLE_SJAVAC" = xyes; then
48426     SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48427   else
48428     SJAVAC_SERVER_DIR=
48429   fi
48430 
48431 
48432 
48433 # Can the C/C++ compiler use precompiled headers?
48434 
48435 
48436   ###############################################################################
48437   #
48438   # Can the C/C++ compiler use precompiled headers?
48439   #
48440   # Check whether --enable-precompiled-headers was given.
48441 if test "${enable_precompiled_headers+set}" = set; then :
48442   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48443 else
48444   ENABLE_PRECOMPH=yes
48445 fi
48446 
48447 
48448   USE_PRECOMPILED_HEADER=1
48449   if test "x$ENABLE_PRECOMPH" = xno; then
48450     USE_PRECOMPILED_HEADER=0
48451   fi
48452 
48453   if test "x$ENABLE_PRECOMPH" = xyes; then
48454     # Check that the compiler actually supports precomp headers.
48455     if test "x$GCC" = xyes; then
48456       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48457 $as_echo_n "checking that precompiled headers work... " >&6; }
48458       echo "int alfa();" > conftest.h
48459       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48460       if test ! -f conftest.hpp.gch; then
48461         USE_PRECOMPILED_HEADER=0
48462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48463 $as_echo "no" >&6; }
48464       else
48465         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48466 $as_echo "yes" >&6; }
48467       fi
48468       rm -f conftest.h conftest.hpp.gch
48469     fi
48470   fi
48471 
48472 
48473 
48474 
48475 # Setup use of ccache, if available
48476 
48477   # Check whether --enable-ccache was given.
48478 if test "${enable_ccache+set}" = set; then :
48479   enableval=$enable_ccache;
48480 fi
48481 
48482 
48483   CCACHE=
48484   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48485 $as_echo_n "checking is ccache enabled... " >&6; }
48486   ENABLE_CCACHE=$enable_ccache
48487   if test "x$enable_ccache" = xyes; then
48488     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48489 $as_echo "yes" >&6; }
48490     OLD_PATH="$PATH"
48491     if test "x$TOOLS_DIR" != x; then
48492       PATH=$TOOLS_DIR:$PATH
48493     fi
48494 
48495 
48496 
48497   # Publish this variable in the help.
48498 
48499 
48500   if test "x$CCACHE" = x; then
48501     # The variable is not set by user, try to locate tool using the code snippet
48502     for ac_prog in ccache
48503 do
48504   # Extract the first word of "$ac_prog", so it can be a program name with args.
48505 set dummy $ac_prog; ac_word=$2
48506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48507 $as_echo_n "checking for $ac_word... " >&6; }
48508 if ${ac_cv_path_CCACHE+:} false; then :
48509   $as_echo_n "(cached) " >&6
48510 else
48511   case $CCACHE in
48512   [\\/]* | ?:[\\/]*)
48513   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48514   ;;
48515   *)
48516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48517 for as_dir in $PATH
48518 do
48519   IFS=$as_save_IFS
48520   test -z "$as_dir" && as_dir=.
48521     for ac_exec_ext in '' $ac_executable_extensions; do
48522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48523     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48525     break 2
48526   fi
48527 done
48528   done
48529 IFS=$as_save_IFS
48530 
48531   ;;
48532 esac
48533 fi
48534 CCACHE=$ac_cv_path_CCACHE
48535 if test -n "$CCACHE"; then
48536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48537 $as_echo "$CCACHE" >&6; }
48538 else
48539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48540 $as_echo "no" >&6; }
48541 fi
48542 
48543 
48544   test -n "$CCACHE" && break
48545 done
48546 
48547   else
48548     # The variable is set, but is it from the command line or the environment?
48549 
48550     # Try to remove the string !CCACHE! from our list.
48551     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48552     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48553       # If it failed, the variable was not from the command line. Ignore it,
48554       # but warn the user (except for BASH, which is always set by the calling BASH).
48555       if test "xCCACHE" != xBASH; then
48556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48557 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48558       fi
48559       # Try to locate tool using the code snippet
48560       for ac_prog in ccache
48561 do
48562   # Extract the first word of "$ac_prog", so it can be a program name with args.
48563 set dummy $ac_prog; ac_word=$2
48564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48565 $as_echo_n "checking for $ac_word... " >&6; }
48566 if ${ac_cv_path_CCACHE+:} false; then :
48567   $as_echo_n "(cached) " >&6
48568 else
48569   case $CCACHE in
48570   [\\/]* | ?:[\\/]*)
48571   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48572   ;;
48573   *)
48574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48575 for as_dir in $PATH
48576 do
48577   IFS=$as_save_IFS
48578   test -z "$as_dir" && as_dir=.
48579     for ac_exec_ext in '' $ac_executable_extensions; do
48580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48581     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48583     break 2
48584   fi
48585 done
48586   done
48587 IFS=$as_save_IFS
48588 
48589   ;;
48590 esac
48591 fi
48592 CCACHE=$ac_cv_path_CCACHE
48593 if test -n "$CCACHE"; then
48594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48595 $as_echo "$CCACHE" >&6; }
48596 else
48597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48598 $as_echo "no" >&6; }
48599 fi
48600 
48601 
48602   test -n "$CCACHE" && break
48603 done
48604 
48605     else
48606       # If it succeeded, then it was overridden by the user. We will use it
48607       # for the tool.
48608 
48609       # First remove it from the list of overridden variables, so we can test
48610       # for unknown variables in the end.
48611       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48612 
48613       # Check if the provided tool contains a complete path.
48614       tool_specified="$CCACHE"
48615       tool_basename="${tool_specified##*/}"
48616       if test "x$tool_basename" = "x$tool_specified"; then
48617         # A command without a complete path is provided, search $PATH.
48618         { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48619 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48620         # Extract the first word of "$tool_basename", so it can be a program name with args.
48621 set dummy $tool_basename; ac_word=$2
48622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48623 $as_echo_n "checking for $ac_word... " >&6; }
48624 if ${ac_cv_path_CCACHE+:} false; then :
48625   $as_echo_n "(cached) " >&6
48626 else
48627   case $CCACHE in
48628   [\\/]* | ?:[\\/]*)
48629   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48630   ;;
48631   *)
48632   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48633 for as_dir in $PATH
48634 do
48635   IFS=$as_save_IFS
48636   test -z "$as_dir" && as_dir=.
48637     for ac_exec_ext in '' $ac_executable_extensions; do
48638   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48639     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48640     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48641     break 2
48642   fi
48643 done
48644   done
48645 IFS=$as_save_IFS
48646 
48647   ;;
48648 esac
48649 fi
48650 CCACHE=$ac_cv_path_CCACHE
48651 if test -n "$CCACHE"; then
48652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48653 $as_echo "$CCACHE" >&6; }
48654 else
48655   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48656 $as_echo "no" >&6; }
48657 fi
48658 
48659 
48660         if test "x$CCACHE" = x; then
48661           as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48662         fi
48663       else
48664         # Otherwise we believe it is a complete path. Use it as it is.
48665         { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48666 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48667         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48668 $as_echo_n "checking for CCACHE... " >&6; }
48669         if test ! -x "$tool_specified"; then
48670           { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48671 $as_echo "not found" >&6; }
48672           as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48673         fi
48674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48675 $as_echo "$tool_specified" >&6; }
48676       fi
48677     fi
48678   fi
48679 
48680 
48681 
48682   if test "x$CCACHE" = x; then
48683     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48684   fi
48685 
48686 
48687     CCACHE_STATUS="enabled"
48688     PATH="$OLD_PATH"
48689   elif test "x$enable_ccache" = xno; then
48690     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48691 $as_echo "no, explicitly disabled" >&6; }
48692   elif test "x$enable_ccache" = x; then
48693     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48694 $as_echo "no" >&6; }
48695   else
48696     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48697 $as_echo "unknown" >&6; }
48698     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48699   fi
48700 
48701 
48702 
48703 # Check whether --with-ccache-dir was given.
48704 if test "${with_ccache_dir+set}" = set; then :
48705   withval=$with_ccache_dir;
48706 fi
48707 
48708 
48709   if test "x$with_ccache_dir" != x; then
48710     # When using a non home ccache directory, assume the use is to share ccache files
48711     # with other users. Thus change the umask.
48712     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48713     if test "x$CCACHE" = x; then
48714       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48715 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48716     fi
48717   fi
48718 
48719   if test "x$CCACHE" != x; then
48720 
48721   if test "x$CCACHE" != x; then
48722     # Only use ccache if it is 3.1.4 or later, which supports
48723     # precompiled headers.
48724     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48725 $as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48726     HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48727     if test "x$HAS_GOOD_CCACHE" = x; then
48728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48729 $as_echo "no, disabling ccache" >&6; }
48730       CCACHE=
48731       CCACHE_STATUS="disabled"
48732     else
48733       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48734 $as_echo "yes" >&6; }
48735       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48736 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48737       PUSHED_FLAGS="$CXXFLAGS"
48738       CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48739       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48740 /* end confdefs.h.  */
48741 
48742 int
48743 main ()
48744 {
48745 
48746   ;
48747   return 0;
48748 }
48749 _ACEOF
48750 if ac_fn_cxx_try_compile "$LINENO"; then :
48751   CC_KNOWS_CCACHE_TRICK=yes
48752 else
48753   CC_KNOWS_CCACHE_TRICK=no
48754 fi
48755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48756       CXXFLAGS="$PUSHED_FLAGS"
48757       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48758         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48759 $as_echo "yes" >&6; }
48760       else
48761         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48762 $as_echo "no, disabling ccaching of precompiled headers" >&6; }
48763         CCACHE=
48764         CCACHE_STATUS="disabled"
48765       fi
48766     fi
48767   fi
48768 
48769   if test "x$CCACHE" != x; then
48770     CCACHE_SLOPPINESS=time_macros
48771     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48772     CCACHE_FLAGS=-fpch-preprocess
48773 
48774     if test "x$SET_CCACHE_DIR" != x; then
48775       mkdir -p $CCACHE_DIR > /dev/null 2>&1
48776       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48777     fi
48778   fi
48779 
48780   fi
48781 
48782 
48783 ###############################################################################
48784 #
48785 # And now the finish...
48786 #
48787 ###############################################################################
48788 
48789 # Check for some common pitfalls
48790 
48791   if test x"$OPENJDK_BUILD_OS" = xwindows; then
48792     file_to_test="$SRC_ROOT/LICENSE"
48793     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48794       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
48795     fi
48796   fi
48797 
48798 
48799   # Did user specify any unknown variables?
48800 
48801   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48802     # Replace the separating ! with spaces before presenting for end user.
48803     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48804     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48805 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48806   fi
48807 
48808 
48809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48810 $as_echo_n "checking if build directory is on local disk... " >&6; }
48811 
48812   # df -l lists only local disks; if the given directory is not found then
48813   # a non-zero exit code is given
48814   if test "x$DF" = x; then
48815     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48816       # msys does not have df; use Windows "net use" instead.
48817       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48818       if test "x$IS_NETWORK_DISK" = x; then
48819         OUTPUT_DIR_IS_LOCAL="yes"
48820       else
48821         OUTPUT_DIR_IS_LOCAL="no"
48822       fi
48823     else
48824       # No df here, say it's local
48825       OUTPUT_DIR_IS_LOCAL="yes"
48826     fi
48827   else
48828     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48829       OUTPUT_DIR_IS_LOCAL="yes"
48830     else
48831       OUTPUT_DIR_IS_LOCAL="no"
48832     fi
48833   fi
48834 
48835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48836 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48837 
48838 
48839 
48840   # Check if the user has any old-style ALT_ variables set.
48841   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48842 
48843   # Before generating output files, test if they exist. If they do, this is a reconfigure.
48844   # Since we can't properly handle the dependencies for this, warn the user about the situation
48845   if test -e $OUTPUT_ROOT/spec.gmk; then
48846     IS_RECONFIGURE=yes
48847   else
48848     IS_RECONFIGURE=no
48849   fi
48850 
48851 
48852 # At the end, call the custom hook. (Dummy macro if no custom sources available)
48853 
48854 
48855 # We're messing a bit with internal autoconf variables to put the config.status
48856 # in the output directory instead of the current directory.
48857 CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48858 
48859 # Create the actual output files. Now the main work of configure is done.
48860 cat >confcache <<\_ACEOF
48861 # This file is a shell script that caches the results of configure
48862 # tests run on this system so they can be shared between configure
48863 # scripts and configure runs, see configure's option --config-cache.
48864 # It is not useful on other systems.  If it contains results you don't
48865 # want to keep, you may remove or edit it.
48866 #
48867 # config.status only pays attention to the cache file if you give it
48868 # the --recheck option to rerun configure.
48869 #
48870 # `ac_cv_env_foo' variables (set or unset) will be overridden when
48871 # loading this file, other *unset* `ac_cv_foo' will be assigned the
48872 # following values.
48873 
48874 _ACEOF
48875 
48876 # The following way of writing the cache mishandles newlines in values,
48877 # but we know of no workaround that is simple, portable, and efficient.
48878 # So, we kill variables containing newlines.
48879 # Ultrix sh set writes to stderr and can't be redirected directly,
48880 # and sets the high bit in the cache file unless we assign to the vars.
48881 (
48882   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48883     eval ac_val=\$$ac_var
48884     case $ac_val in #(
48885     *${as_nl}*)
48886       case $ac_var in #(
48887       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48888 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48889       esac
48890       case $ac_var in #(
48891       _ | IFS | as_nl) ;; #(
48892       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48893       *) { eval $ac_var=; unset $ac_var;} ;;
48894       esac ;;
48895     esac
48896   done
48897 
48898   (set) 2>&1 |
48899     case $as_nl`(ac_space=' '; set) 2>&1` in #(
48900     *${as_nl}ac_space=\ *)
48901       # `set' does not quote correctly, so add quotes: double-quote
48902       # substitution turns \\\\ into \\, and sed turns \\ into \.
48903       sed -n \
48904         "s/'/'\\\\''/g;
48905           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48906       ;; #(
48907     *)
48908       # `set' quotes correctly as required by POSIX, so do not add quotes.
48909       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48910       ;;
48911     esac |
48912     sort
48913 ) |
48914   sed '
48915      /^ac_cv_env_/b end
48916      t clear
48917      :clear
48918      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48919      t end
48920      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48921      :end' >>confcache
48922 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48923   if test -w "$cache_file"; then
48924     if test "x$cache_file" != "x/dev/null"; then
48925       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48926 $as_echo "$as_me: updating cache $cache_file" >&6;}
48927       if test ! -f "$cache_file" || test -h "$cache_file"; then
48928         cat confcache >"$cache_file"
48929       else
48930         case $cache_file in #(
48931         */* | ?:*)
48932           mv -f confcache "$cache_file"$$ &&
48933           mv -f "$cache_file"$$ "$cache_file" ;; #(
48934         *)
48935           mv -f confcache "$cache_file" ;;
48936         esac
48937       fi
48938     fi
48939   else
48940     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48941 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48942   fi
48943 fi
48944 rm -f confcache
48945 
48946 test "x$prefix" = xNONE && prefix=$ac_default_prefix
48947 # Let make expand exec_prefix.
48948 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48949 
48950 DEFS=-DHAVE_CONFIG_H
48951 
48952 ac_libobjs=
48953 ac_ltlibobjs=
48954 U=
48955 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48956   # 1. Remove the extension, and $U if already installed.
48957   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48958   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48959   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48960   #    will be set to the directory where LIBOBJS objects are built.
48961   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48962   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48963 done
48964 LIBOBJS=$ac_libobjs
48965 
48966 LTLIBOBJS=$ac_ltlibobjs
48967 
48968 
48969 
48970 : "${CONFIG_STATUS=./config.status}"
48971 ac_write_fail=0
48972 ac_clean_files_save=$ac_clean_files
48973 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48974 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48975 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48976 as_write_fail=0
48977 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48978 #! $SHELL
48979 # Generated by $as_me.
48980 # Run this file to recreate the current configuration.
48981 # Compiler output produced by configure, useful for debugging
48982 # configure, is in config.log if it exists.
48983 
48984 debug=false
48985 ac_cs_recheck=false
48986 ac_cs_silent=false
48987 
48988 SHELL=\${CONFIG_SHELL-$SHELL}
48989 export SHELL
48990 _ASEOF
48991 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48992 ## -------------------- ##
48993 ## M4sh Initialization. ##
48994 ## -------------------- ##
48995 
48996 # Be more Bourne compatible
48997 DUALCASE=1; export DUALCASE # for MKS sh
48998 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48999   emulate sh
49000   NULLCMD=:
49001   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49002   # is contrary to our usage.  Disable this feature.
49003   alias -g '${1+"$@"}'='"$@"'
49004   setopt NO_GLOB_SUBST
49005 else
49006   case `(set -o) 2>/dev/null` in #(
49007   *posix*) :
49008     set -o posix ;; #(
49009   *) :
49010      ;;
49011 esac
49012 fi
49013 
49014 
49015 as_nl='
49016 '
49017 export as_nl
49018 # Printing a long string crashes Solaris 7 /usr/bin/printf.
49019 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49020 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49021 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49022 # Prefer a ksh shell builtin over an external printf program on Solaris,
49023 # but without wasting forks for bash or zsh.
49024 if test -z "$BASH_VERSION$ZSH_VERSION" \
49025     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49026   as_echo='print -r --'
49027   as_echo_n='print -rn --'
49028 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49029   as_echo='printf %s\n'
49030   as_echo_n='printf %s'
49031 else
49032   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49033     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49034     as_echo_n='/usr/ucb/echo -n'
49035   else
49036     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49037     as_echo_n_body='eval
49038       arg=$1;
49039       case $arg in #(
49040       *"$as_nl"*)
49041         expr "X$arg" : "X\\(.*\\)$as_nl";
49042         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49043       esac;
49044       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49045     '
49046     export as_echo_n_body
49047     as_echo_n='sh -c $as_echo_n_body as_echo'
49048   fi
49049   export as_echo_body
49050   as_echo='sh -c $as_echo_body as_echo'
49051 fi
49052 
49053 # The user is always right.
49054 if test "${PATH_SEPARATOR+set}" != set; then
49055   PATH_SEPARATOR=:
49056   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49057     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49058       PATH_SEPARATOR=';'
49059   }
49060 fi
49061 
49062 
49063 # IFS
49064 # We need space, tab and new line, in precisely that order.  Quoting is
49065 # there to prevent editors from complaining about space-tab.
49066 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
49067 # splitting by setting IFS to empty value.)
49068 IFS=" ""        $as_nl"
49069 
49070 # Find who we are.  Look in the path if we contain no directory separator.
49071 as_myself=
49072 case $0 in #((
49073   *[\\/]* ) as_myself=$0 ;;
49074   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49075 for as_dir in $PATH
49076 do
49077   IFS=$as_save_IFS
49078   test -z "$as_dir" && as_dir=.
49079     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
49080   done
49081 IFS=$as_save_IFS
49082 
49083      ;;
49084 esac
49085 # We did not find ourselves, most probably we were run as `sh COMMAND'
49086 # in which case we are not to be found in the path.
49087 if test "x$as_myself" = x; then
49088   as_myself=$0
49089 fi
49090 if test ! -f "$as_myself"; then
49091   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
49092   exit 1
49093 fi
49094 
49095 # Unset variables that we do not need and which cause bugs (e.g. in
49096 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
49097 # suppresses any "Segmentation fault" message there.  '((' could
49098 # trigger a bug in pdksh 5.2.14.
49099 for as_var in BASH_ENV ENV MAIL MAILPATH
49100 do eval test x\${$as_var+set} = xset \
49101   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
49102 done
49103 PS1='$ '
49104 PS2='> '
49105 PS4='+ '
49106 
49107 # NLS nuisances.
49108 LC_ALL=C
49109 export LC_ALL
49110 LANGUAGE=C
49111 export LANGUAGE
49112 
49113 # CDPATH.
49114 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49115 
49116 
49117 # as_fn_error STATUS ERROR [LINENO LOG_FD]
49118 # ----------------------------------------
49119 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49120 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49121 # script with STATUS, using 1 if that was 0.
49122 as_fn_error ()
49123 {
49124   as_status=$1; test $as_status -eq 0 && as_status=1
49125   if test "$4"; then
49126     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49127     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49128   fi
49129   $as_echo "$as_me: error: $2" >&2
49130   as_fn_exit $as_status
49131 } # as_fn_error
49132 
49133 
49134 # as_fn_set_status STATUS
49135 # -----------------------
49136 # Set $? to STATUS, without forking.
49137 as_fn_set_status ()
49138 {
49139   return $1
49140 } # as_fn_set_status
49141 
49142 # as_fn_exit STATUS
49143 # -----------------
49144 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49145 as_fn_exit ()
49146 {
49147   set +e
49148   as_fn_set_status $1
49149   exit $1
49150 } # as_fn_exit
49151 
49152 # as_fn_unset VAR
49153 # ---------------
49154 # Portably unset VAR.
49155 as_fn_unset ()
49156 {
49157   { eval $1=; unset $1;}
49158 }
49159 as_unset=as_fn_unset
49160 # as_fn_append VAR VALUE
49161 # ----------------------
49162 # Append the text in VALUE to the end of the definition contained in VAR. Take
49163 # advantage of any shell optimizations that allow amortized linear growth over
49164 # repeated appends, instead of the typical quadratic growth present in naive
49165 # implementations.
49166 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49167   eval 'as_fn_append ()
49168   {
49169     eval $1+=\$2
49170   }'
49171 else
49172   as_fn_append ()
49173   {
49174     eval $1=\$$1\$2
49175   }
49176 fi # as_fn_append
49177 
49178 # as_fn_arith ARG...
49179 # ------------------
49180 # Perform arithmetic evaluation on the ARGs, and store the result in the
49181 # global $as_val. Take advantage of shells that can avoid forks. The arguments
49182 # must be portable across $(()) and expr.
49183 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49184   eval 'as_fn_arith ()
49185   {
49186     as_val=$(( $* ))
49187   }'
49188 else
49189   as_fn_arith ()
49190   {
49191     as_val=`expr "$@" || test $? -eq 1`
49192   }
49193 fi # as_fn_arith
49194 
49195 
49196 if expr a : '\(a\)' >/dev/null 2>&1 &&
49197    test "X`expr 00001 : '.*\(...\)'`" = X001; then
49198   as_expr=expr
49199 else
49200   as_expr=false
49201 fi
49202 
49203 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49204   as_basename=basename
49205 else
49206   as_basename=false
49207 fi
49208 
49209 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49210   as_dirname=dirname
49211 else
49212   as_dirname=false
49213 fi
49214 
49215 as_me=`$as_basename -- "$0" ||
49216 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49217          X"$0" : 'X\(//\)$' \| \
49218          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49219 $as_echo X/"$0" |
49220     sed '/^.*\/\([^/][^/]*\)\/*$/{
49221             s//\1/
49222             q
49223           }
49224           /^X\/\(\/\/\)$/{
49225             s//\1/
49226             q
49227           }
49228           /^X\/\(\/\).*/{
49229             s//\1/
49230             q
49231           }
49232           s/.*/./; q'`
49233 
49234 # Avoid depending upon Character Ranges.
49235 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49236 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49237 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49238 as_cr_digits='0123456789'
49239 as_cr_alnum=$as_cr_Letters$as_cr_digits
49240 
49241 ECHO_C= ECHO_N= ECHO_T=
49242 case `echo -n x` in #(((((
49243 -n*)
49244   case `echo 'xy\c'` in
49245   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
49246   xy)  ECHO_C='\c';;
49247   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49248        ECHO_T=' ';;
49249   esac;;
49250 *)
49251   ECHO_N='-n';;
49252 esac
49253 
49254 rm -f conf$$ conf$$.exe conf$$.file
49255 if test -d conf$$.dir; then
49256   rm -f conf$$.dir/conf$$.file
49257 else
49258   rm -f conf$$.dir
49259   mkdir conf$$.dir 2>/dev/null
49260 fi
49261 if (echo >conf$$.file) 2>/dev/null; then
49262   if ln -s conf$$.file conf$$ 2>/dev/null; then
49263     as_ln_s='ln -s'
49264     # ... but there are two gotchas:
49265     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49266     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49267     # In both cases, we have to default to `cp -pR'.
49268     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49269       as_ln_s='cp -pR'
49270   elif ln conf$$.file conf$$ 2>/dev/null; then
49271     as_ln_s=ln
49272   else
49273     as_ln_s='cp -pR'
49274   fi
49275 else
49276   as_ln_s='cp -pR'
49277 fi
49278 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49279 rmdir conf$$.dir 2>/dev/null
49280 
49281 
49282 # as_fn_mkdir_p
49283 # -------------
49284 # Create "$as_dir" as a directory, including parents if necessary.
49285 as_fn_mkdir_p ()
49286 {
49287 
49288   case $as_dir in #(
49289   -*) as_dir=./$as_dir;;
49290   esac
49291   test -d "$as_dir" || eval $as_mkdir_p || {
49292     as_dirs=
49293     while :; do
49294       case $as_dir in #(
49295       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49296       *) as_qdir=$as_dir;;
49297       esac
49298       as_dirs="'$as_qdir' $as_dirs"
49299       as_dir=`$as_dirname -- "$as_dir" ||
49300 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49301          X"$as_dir" : 'X\(//\)[^/]' \| \
49302          X"$as_dir" : 'X\(//\)$' \| \
49303          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49304 $as_echo X"$as_dir" |
49305     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49306             s//\1/
49307             q
49308           }
49309           /^X\(\/\/\)[^/].*/{
49310             s//\1/
49311             q
49312           }
49313           /^X\(\/\/\)$/{
49314             s//\1/
49315             q
49316           }
49317           /^X\(\/\).*/{
49318             s//\1/
49319             q
49320           }
49321           s/.*/./; q'`
49322       test -d "$as_dir" && break
49323     done
49324     test -z "$as_dirs" || eval "mkdir $as_dirs"
49325   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49326 
49327 
49328 } # as_fn_mkdir_p
49329 if mkdir -p . 2>/dev/null; then
49330   as_mkdir_p='mkdir -p "$as_dir"'
49331 else
49332   test -d ./-p && rmdir ./-p
49333   as_mkdir_p=false
49334 fi
49335 
49336 
49337 # as_fn_executable_p FILE
49338 # -----------------------
49339 # Test if FILE is an executable regular file.
49340 as_fn_executable_p ()
49341 {
49342   test -f "$1" && test -x "$1"
49343 } # as_fn_executable_p
49344 as_test_x='test -x'
49345 as_executable_p=as_fn_executable_p
49346 
49347 # Sed expression to map a string onto a valid CPP name.
49348 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49349 
49350 # Sed expression to map a string onto a valid variable name.
49351 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49352 
49353 
49354 exec 6>&1
49355 ## ----------------------------------- ##
49356 ## Main body of $CONFIG_STATUS script. ##
49357 ## ----------------------------------- ##
49358 _ASEOF
49359 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49360 
49361 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49362 # Save the log message, to keep $0 and so on meaningful, and to
49363 # report actual input values of CONFIG_FILES etc. instead of their
49364 # values after options handling.
49365 ac_log="
49366 This file was extended by OpenJDK $as_me jdk8, which was
49367 generated by GNU Autoconf 2.69.  Invocation command line was
49368 
49369   CONFIG_FILES    = $CONFIG_FILES
49370   CONFIG_HEADERS  = $CONFIG_HEADERS
49371   CONFIG_LINKS    = $CONFIG_LINKS
49372   CONFIG_COMMANDS = $CONFIG_COMMANDS
49373   $ $0 $@
49374 
49375 on `(hostname || uname -n) 2>/dev/null | sed 1q`
49376 "
49377 
49378 _ACEOF
49379 
49380 case $ac_config_files in *"
49381 "*) set x $ac_config_files; shift; ac_config_files=$*;;
49382 esac
49383 
49384 case $ac_config_headers in *"
49385 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49386 esac
49387 
49388 
49389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49390 # Files that config.status was made for.
49391 config_files="$ac_config_files"
49392 config_headers="$ac_config_headers"
49393 
49394 _ACEOF
49395 
49396 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49397 ac_cs_usage="\
49398 \`$as_me' instantiates files and other configuration actions
49399 from templates according to the current configuration.  Unless the files
49400 and actions are specified as TAGs, all are instantiated by default.
49401 
49402 Usage: $0 [OPTION]... [TAG]...
49403 
49404   -h, --help       print this help, then exit
49405   -V, --version    print version number and configuration settings, then exit
49406       --config     print configuration, then exit
49407   -q, --quiet, --silent
49408                    do not print progress messages
49409   -d, --debug      don't remove temporary files
49410       --recheck    update $as_me by reconfiguring in the same conditions
49411       --file=FILE[:TEMPLATE]
49412                    instantiate the configuration file FILE
49413       --header=FILE[:TEMPLATE]
49414                    instantiate the configuration header FILE
49415 
49416 Configuration files:
49417 $config_files
49418 
49419 Configuration headers:
49420 $config_headers
49421 
49422 Report bugs to <build-dev@openjdk.java.net>.
49423 OpenJDK home page: <http://openjdk.java.net>."
49424 
49425 _ACEOF
49426 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49427 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49428 ac_cs_version="\\
49429 OpenJDK config.status jdk8
49430 configured by $0, generated by GNU Autoconf 2.69,
49431   with options \\"\$ac_cs_config\\"
49432 
49433 Copyright (C) 2012 Free Software Foundation, Inc.
49434 This config.status script is free software; the Free Software Foundation
49435 gives unlimited permission to copy, distribute and modify it."
49436 
49437 ac_pwd='$ac_pwd'
49438 srcdir='$srcdir'
49439 AWK='$AWK'
49440 test -n "\$AWK" || AWK=awk
49441 _ACEOF
49442 
49443 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49444 # The default lists apply if the user does not specify any file.
49445 ac_need_defaults=:
49446 while test $# != 0
49447 do
49448   case $1 in
49449   --*=?*)
49450     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49451     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49452     ac_shift=:
49453     ;;
49454   --*=)
49455     ac_option=`expr "X$1" : 'X\([^=]*\)='`
49456     ac_optarg=
49457     ac_shift=:
49458     ;;
49459   *)
49460     ac_option=$1
49461     ac_optarg=$2
49462     ac_shift=shift
49463     ;;
49464   esac
49465 
49466   case $ac_option in
49467   # Handling of the options.
49468   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49469     ac_cs_recheck=: ;;
49470   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49471     $as_echo "$ac_cs_version"; exit ;;
49472   --config | --confi | --conf | --con | --co | --c )
49473     $as_echo "$ac_cs_config"; exit ;;
49474   --debug | --debu | --deb | --de | --d | -d )
49475     debug=: ;;
49476   --file | --fil | --fi | --f )
49477     $ac_shift
49478     case $ac_optarg in
49479     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49480     '') as_fn_error $? "missing file argument" ;;
49481     esac
49482     as_fn_append CONFIG_FILES " '$ac_optarg'"
49483     ac_need_defaults=false;;
49484   --header | --heade | --head | --hea )
49485     $ac_shift
49486     case $ac_optarg in
49487     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49488     esac
49489     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49490     ac_need_defaults=false;;
49491   --he | --h)
49492     # Conflict between --help and --header
49493     as_fn_error $? "ambiguous option: \`$1'
49494 Try \`$0 --help' for more information.";;
49495   --help | --hel | -h )
49496     $as_echo "$ac_cs_usage"; exit ;;
49497   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49498   | -silent | --silent | --silen | --sile | --sil | --si | --s)
49499     ac_cs_silent=: ;;
49500 
49501   # This is an error.
49502   -*) as_fn_error $? "unrecognized option: \`$1'
49503 Try \`$0 --help' for more information." ;;
49504 
49505   *) as_fn_append ac_config_targets " $1"
49506      ac_need_defaults=false ;;
49507 
49508   esac
49509   shift
49510 done
49511 
49512 ac_configure_extra_args=
49513 
49514 if $ac_cs_silent; then
49515   exec 6>/dev/null
49516   ac_configure_extra_args="$ac_configure_extra_args --silent"
49517 fi
49518 
49519 _ACEOF
49520 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49521 if \$ac_cs_recheck; then
49522   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49523   shift
49524   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49525   CONFIG_SHELL='$SHELL'
49526   export CONFIG_SHELL
49527   exec "\$@"
49528 fi
49529 
49530 _ACEOF
49531 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49532 exec 5>>config.log
49533 {
49534   echo
49535   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49536 ## Running $as_me. ##
49537 _ASBOX
49538   $as_echo "$ac_log"
49539 } >&5
49540 
49541 _ACEOF
49542 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49543 _ACEOF
49544 
49545 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49546 
49547 # Handling of arguments.
49548 for ac_config_target in $ac_config_targets
49549 do
49550   case $ac_config_target in
49551     "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49552     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49553     "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49554     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49555     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49556     "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49557     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49558 
49559   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49560   esac
49561 done
49562 
49563 
49564 # If the user did not use the arguments to specify the items to instantiate,
49565 # then the envvar interface is used.  Set only those that are not.
49566 # We use the long form for the default assignment because of an extremely
49567 # bizarre bug on SunOS 4.1.3.
49568 if $ac_need_defaults; then
49569   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49570   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49571 fi
49572 
49573 # Have a temporary directory for convenience.  Make it in the build tree
49574 # simply because there is no reason against having it here, and in addition,
49575 # creating and moving files from /tmp can sometimes cause problems.
49576 # Hook for its removal unless debugging.
49577 # Note that there is a small window in which the directory will not be cleaned:
49578 # after its creation but before its name has been assigned to `$tmp'.
49579 $debug ||
49580 {
49581   tmp= ac_tmp=
49582   trap 'exit_status=$?
49583   : "${ac_tmp:=$tmp}"
49584   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49585 ' 0
49586   trap 'as_fn_exit 1' 1 2 13 15
49587 }
49588 # Create a (secure) tmp directory for tmp files.
49589 
49590 {
49591   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49592   test -d "$tmp"
49593 }  ||
49594 {
49595   tmp=./conf$$-$RANDOM
49596   (umask 077 && mkdir "$tmp")
49597 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49598 ac_tmp=$tmp
49599 
49600 # Set up the scripts for CONFIG_FILES section.
49601 # No need to generate them if there are no CONFIG_FILES.
49602 # This happens for instance with `./config.status config.h'.
49603 if test -n "$CONFIG_FILES"; then
49604 
49605 
49606 ac_cr=`echo X | tr X '\015'`
49607 # On cygwin, bash can eat \r inside `` if the user requested igncr.
49608 # But we know of no other shell where ac_cr would be empty at this
49609 # point, so we can use a bashism as a fallback.
49610 if test "x$ac_cr" = x; then
49611   eval ac_cr=\$\'\\r\'
49612 fi
49613 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49614 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49615   ac_cs_awk_cr='\\r'
49616 else
49617   ac_cs_awk_cr=$ac_cr
49618 fi
49619 
49620 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49621 _ACEOF
49622 
49623 
49624 {
49625   echo "cat >conf$$subs.awk <<_ACEOF" &&
49626   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49627   echo "_ACEOF"
49628 } >conf$$subs.sh ||
49629   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49630 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49631 ac_delim='%!_!# '
49632 for ac_last_try in false false false false false :; do
49633   . ./conf$$subs.sh ||
49634     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49635 
49636   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49637   if test $ac_delim_n = $ac_delim_num; then
49638     break
49639   elif $ac_last_try; then
49640     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49641   else
49642     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49643   fi
49644 done
49645 rm -f conf$$subs.sh
49646 
49647 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49648 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49649 _ACEOF
49650 sed -n '
49651 h
49652 s/^/S["/; s/!.*/"]=/
49653 p
49654 g
49655 s/^[^!]*!//
49656 :repl
49657 t repl
49658 s/'"$ac_delim"'$//
49659 t delim
49660 :nl
49661 h
49662 s/\(.\{148\}\)..*/\1/
49663 t more1
49664 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49665 p
49666 n
49667 b repl
49668 :more1
49669 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49670 p
49671 g
49672 s/.\{148\}//
49673 t nl
49674 :delim
49675 h
49676 s/\(.\{148\}\)..*/\1/
49677 t more2
49678 s/["\\]/\\&/g; s/^/"/; s/$/"/
49679 p
49680 b
49681 :more2
49682 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49683 p
49684 g
49685 s/.\{148\}//
49686 t delim
49687 ' <conf$$subs.awk | sed '
49688 /^[^""]/{
49689   N
49690   s/\n//
49691 }
49692 ' >>$CONFIG_STATUS || ac_write_fail=1
49693 rm -f conf$$subs.awk
49694 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49695 _ACAWK
49696 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49697   for (key in S) S_is_set[key] = 1
49698   FS = ""
49699 
49700 }
49701 {
49702   line = $ 0
49703   nfields = split(line, field, "@")
49704   substed = 0
49705   len = length(field[1])
49706   for (i = 2; i < nfields; i++) {
49707     key = field[i]
49708     keylen = length(key)
49709     if (S_is_set[key]) {
49710       value = S[key]
49711       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49712       len += length(value) + length(field[++i])
49713       substed = 1
49714     } else
49715       len += 1 + keylen
49716   }
49717 
49718   print line
49719 }
49720 
49721 _ACAWK
49722 _ACEOF
49723 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49724 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49725   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49726 else
49727   cat
49728 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49729   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49730 _ACEOF
49731 
49732 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49733 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49734 # trailing colons and then remove the whole line if VPATH becomes empty
49735 # (actually we leave an empty line to preserve line numbers).
49736 if test "x$srcdir" = x.; then
49737   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
49738 h
49739 s///
49740 s/^/:/
49741 s/[      ]*$/:/
49742 s/:\$(srcdir):/:/g
49743 s/:\${srcdir}:/:/g
49744 s/:@srcdir@:/:/g
49745 s/^:*//
49746 s/:*$//
49747 x
49748 s/\(=[   ]*\).*/\1/
49749 G
49750 s/\n//
49751 s/^[^=]*=[       ]*$//
49752 }'
49753 fi
49754 
49755 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49756 fi # test -n "$CONFIG_FILES"
49757 
49758 # Set up the scripts for CONFIG_HEADERS section.
49759 # No need to generate them if there are no CONFIG_HEADERS.
49760 # This happens for instance with `./config.status Makefile'.
49761 if test -n "$CONFIG_HEADERS"; then
49762 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49763 BEGIN {
49764 _ACEOF
49765 
49766 # Transform confdefs.h into an awk script `defines.awk', embedded as
49767 # here-document in config.status, that substitutes the proper values into
49768 # config.h.in to produce config.h.
49769 
49770 # Create a delimiter string that does not exist in confdefs.h, to ease
49771 # handling of long lines.
49772 ac_delim='%!_!# '
49773 for ac_last_try in false false :; do
49774   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49775   if test -z "$ac_tt"; then
49776     break
49777   elif $ac_last_try; then
49778     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49779   else
49780     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49781   fi
49782 done
49783 
49784 # For the awk script, D is an array of macro values keyed by name,
49785 # likewise P contains macro parameters if any.  Preserve backslash
49786 # newline sequences.
49787 
49788 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49789 sed -n '
49790 s/.\{148\}/&'"$ac_delim"'/g
49791 t rset
49792 :rset
49793 s/^[     ]*#[    ]*define[       ][      ]*/ /
49794 t def
49795 d
49796 :def
49797 s/\\$//
49798 t bsnl
49799 s/["\\]/\\&/g
49800 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
49801 D["\1"]=" \3"/p
49802 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
49803 d
49804 :bsnl
49805 s/["\\]/\\&/g
49806 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
49807 D["\1"]=" \3\\\\\\n"\\/p
49808 t cont
49809 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49810 t cont
49811 d
49812 :cont
49813 n
49814 s/.\{148\}/&'"$ac_delim"'/g
49815 t clear
49816 :clear
49817 s/\\$//
49818 t bsnlc
49819 s/["\\]/\\&/g; s/^/"/; s/$/"/p
49820 d
49821 :bsnlc
49822 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49823 b cont
49824 ' <confdefs.h | sed '
49825 s/'"$ac_delim"'/"\\\
49826 "/g' >>$CONFIG_STATUS || ac_write_fail=1
49827 
49828 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49829   for (key in D) D_is_set[key] = 1
49830   FS = ""
49831 }
49832 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49833   line = \$ 0
49834   split(line, arg, " ")
49835   if (arg[1] == "#") {
49836     defundef = arg[2]
49837     mac1 = arg[3]
49838   } else {
49839     defundef = substr(arg[1], 2)
49840     mac1 = arg[2]
49841   }
49842   split(mac1, mac2, "(") #)
49843   macro = mac2[1]
49844   prefix = substr(line, 1, index(line, defundef) - 1)
49845   if (D_is_set[macro]) {
49846     # Preserve the white space surrounding the "#".
49847     print prefix "define", macro P[macro] D[macro]
49848     next
49849   } else {
49850     # Replace #undef with comments.  This is necessary, for example,
49851     # in the case of _POSIX_SOURCE, which is predefined and required
49852     # on some systems where configure will not decide to define it.
49853     if (defundef == "undef") {
49854       print "/*", prefix defundef, macro, "*/"
49855       next
49856     }
49857   }
49858 }
49859 { print }
49860 _ACAWK
49861 _ACEOF
49862 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49863   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49864 fi # test -n "$CONFIG_HEADERS"
49865 
49866 
49867 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49868 shift
49869 for ac_tag
49870 do
49871   case $ac_tag in
49872   :[FHLC]) ac_mode=$ac_tag; continue;;
49873   esac
49874   case $ac_mode$ac_tag in
49875   :[FHL]*:*);;
49876   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49877   :[FH]-) ac_tag=-:-;;
49878   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49879   esac
49880   ac_save_IFS=$IFS
49881   IFS=:
49882   set x $ac_tag
49883   IFS=$ac_save_IFS
49884   shift
49885   ac_file=$1
49886   shift
49887 
49888   case $ac_mode in
49889   :L) ac_source=$1;;
49890   :[FH])
49891     ac_file_inputs=
49892     for ac_f
49893     do
49894       case $ac_f in
49895       -) ac_f="$ac_tmp/stdin";;
49896       *) # Look for the file first in the build tree, then in the source tree
49897          # (if the path is not absolute).  The absolute path cannot be DOS-style,
49898          # because $ac_f cannot contain `:'.
49899          test -f "$ac_f" ||
49900            case $ac_f in
49901            [\\/$]*) false;;
49902            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49903            esac ||
49904            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49905       esac
49906       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49907       as_fn_append ac_file_inputs " '$ac_f'"
49908     done
49909 
49910     # Let's still pretend it is `configure' which instantiates (i.e., don't
49911     # use $as_me), people would be surprised to read:
49912     #    /* config.h.  Generated by config.status.  */
49913     configure_input='Generated from '`
49914           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49915         `' by configure.'
49916     if test x"$ac_file" != x-; then
49917       configure_input="$ac_file.  $configure_input"
49918       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49919 $as_echo "$as_me: creating $ac_file" >&6;}
49920     fi
49921     # Neutralize special characters interpreted by sed in replacement strings.
49922     case $configure_input in #(
49923     *\&* | *\|* | *\\* )
49924        ac_sed_conf_input=`$as_echo "$configure_input" |
49925        sed 's/[\\\\&|]/\\\\&/g'`;; #(
49926     *) ac_sed_conf_input=$configure_input;;
49927     esac
49928 
49929     case $ac_tag in
49930     *:-:* | *:-) cat >"$ac_tmp/stdin" \
49931       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49932     esac
49933     ;;
49934   esac
49935 
49936   ac_dir=`$as_dirname -- "$ac_file" ||
49937 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49938          X"$ac_file" : 'X\(//\)[^/]' \| \
49939          X"$ac_file" : 'X\(//\)$' \| \
49940          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49941 $as_echo X"$ac_file" |
49942     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49943             s//\1/
49944             q
49945           }
49946           /^X\(\/\/\)[^/].*/{
49947             s//\1/
49948             q
49949           }
49950           /^X\(\/\/\)$/{
49951             s//\1/
49952             q
49953           }
49954           /^X\(\/\).*/{
49955             s//\1/
49956             q
49957           }
49958           s/.*/./; q'`
49959   as_dir="$ac_dir"; as_fn_mkdir_p
49960   ac_builddir=.
49961 
49962 case "$ac_dir" in
49963 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49964 *)
49965   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49966   # A ".." for each directory in $ac_dir_suffix.
49967   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49968   case $ac_top_builddir_sub in
49969   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49970   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49971   esac ;;
49972 esac
49973 ac_abs_top_builddir=$ac_pwd
49974 ac_abs_builddir=$ac_pwd$ac_dir_suffix
49975 # for backward compatibility:
49976 ac_top_builddir=$ac_top_build_prefix
49977 
49978 case $srcdir in
49979   .)  # We are building in place.
49980     ac_srcdir=.
49981     ac_top_srcdir=$ac_top_builddir_sub
49982     ac_abs_top_srcdir=$ac_pwd ;;
49983   [\\/]* | ?:[\\/]* )  # Absolute name.
49984     ac_srcdir=$srcdir$ac_dir_suffix;
49985     ac_top_srcdir=$srcdir
49986     ac_abs_top_srcdir=$srcdir ;;
49987   *) # Relative name.
49988     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49989     ac_top_srcdir=$ac_top_build_prefix$srcdir
49990     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49991 esac
49992 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49993 
49994 
49995   case $ac_mode in
49996   :F)
49997   #
49998   # CONFIG_FILE
49999   #
50000 
50001 _ACEOF
50002 
50003 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50004 # If the template does not know about datarootdir, expand it.
50005 # FIXME: This hack should be removed a few years after 2.60.
50006 ac_datarootdir_hack=; ac_datarootdir_seen=
50007 ac_sed_dataroot='
50008 /datarootdir/ {
50009   p
50010   q
50011 }
50012 /@datadir@/p
50013 /@docdir@/p
50014 /@infodir@/p
50015 /@localedir@/p
50016 /@mandir@/p'
50017 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50018 *datarootdir*) ac_datarootdir_seen=yes;;
50019 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50020   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50021 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50022 _ACEOF
50023 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50024   ac_datarootdir_hack='
50025   s&@datadir@&$datadir&g
50026   s&@docdir@&$docdir&g
50027   s&@infodir@&$infodir&g
50028   s&@localedir@&$localedir&g
50029   s&@mandir@&$mandir&g
50030   s&\\\${datarootdir}&$datarootdir&g' ;;
50031 esac
50032 _ACEOF
50033 
50034 # Neutralize VPATH when `$srcdir' = `.'.
50035 # Shell code in configure.ac might set extrasub.
50036 # FIXME: do we really want to maintain this feature?
50037 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50038 ac_sed_extra="$ac_vpsub
50039 $extrasub
50040 _ACEOF
50041 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50042 :t
50043 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50044 s|@configure_input@|$ac_sed_conf_input|;t t
50045 s&@top_builddir@&$ac_top_builddir_sub&;t t
50046 s&@top_build_prefix@&$ac_top_build_prefix&;t t
50047 s&@srcdir@&$ac_srcdir&;t t
50048 s&@abs_srcdir@&$ac_abs_srcdir&;t t
50049 s&@top_srcdir@&$ac_top_srcdir&;t t
50050 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50051 s&@builddir@&$ac_builddir&;t t
50052 s&@abs_builddir@&$ac_abs_builddir&;t t
50053 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50054 $ac_datarootdir_hack
50055 "
50056 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50057   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50058 
50059 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50060   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50061   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
50062       "$ac_tmp/out"`; test -z "$ac_out"; } &&
50063   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50064 which seems to be undefined.  Please make sure it is defined" >&5
50065 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50066 which seems to be undefined.  Please make sure it is defined" >&2;}
50067 
50068   rm -f "$ac_tmp/stdin"
50069   case $ac_file in
50070   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
50071   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
50072   esac \
50073   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50074  ;;
50075   :H)
50076   #
50077   # CONFIG_HEADER
50078   #
50079   if test x"$ac_file" != x-; then
50080     {
50081       $as_echo "/* $configure_input  */" \
50082       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
50083     } >"$ac_tmp/config.h" \
50084       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50085     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
50086       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
50087 $as_echo "$as_me: $ac_file is unchanged" >&6;}
50088     else
50089       rm -f "$ac_file"
50090       mv "$ac_tmp/config.h" "$ac_file" \
50091         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50092     fi
50093   else
50094     $as_echo "/* $configure_input  */" \
50095       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
50096       || as_fn_error $? "could not create -" "$LINENO" 5
50097   fi
50098  ;;
50099 
50100 
50101   esac
50102 
50103 done # for ac_tag
50104 
50105 
50106 as_fn_exit 0
50107 _ACEOF
50108 ac_clean_files=$ac_clean_files_save
50109 
50110 test $ac_write_fail = 0 ||
50111   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50112 
50113 
50114 # configure is writing to config.log, and then calls config.status.
50115 # config.status does its own redirection, appending to config.log.
50116 # Unfortunately, on DOS this fails, as config.log is still kept open
50117 # by configure, so config.status won't be able to write to it; its
50118 # output is simply discarded.  So we exec the FD to /dev/null,
50119 # effectively closing config.log, so it can be properly (re)opened and
50120 # appended to by config.status.  When coming back to configure, we
50121 # need to make the FD available again.
50122 if test "$no_create" != yes; then
50123   ac_cs_success=:
50124   ac_config_status_args=
50125   test "$silent" = yes &&
50126     ac_config_status_args="$ac_config_status_args --quiet"
50127   exec 5>/dev/null
50128   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50129   exec 5>>config.log
50130   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50131   # would make configure fail if this is the last instruction.
50132   $ac_cs_success || as_fn_exit 1
50133 fi
50134 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50135   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50136 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50137 fi
50138 
50139 
50140 # Try to move the config.log file to the output directory.
50141 if test -e ./config.log; then
50142   $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50143 fi
50144 
50145 # Make the compare script executable
50146 $CHMOD +x $OUTPUT_ROOT/compare.sh
50147 
50148 # Finally output some useful information to the user
50149 
50150   # Finally output some useful information to the user
50151 
50152   printf "\n"
50153   printf "====================================================\n"
50154   printf "A new configuration has been successfully created in\n"
50155   printf "$OUTPUT_ROOT\n"
50156   if test "x$CONFIGURE_COMMAND_LINE" != x; then
50157     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50158   else
50159     printf "using default settings.\n"
50160   fi
50161 
50162   printf "\n"
50163   printf "Configuration summary:\n"
50164   printf "* Debug level:    $DEBUG_LEVEL\n"
50165   printf "* JDK variant:    $JDK_VARIANT\n"
50166   printf "* JVM variants:   $with_jvm_variants\n"
50167   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50168 
50169   printf "\n"
50170   printf "Tools summary:\n"
50171   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50172     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50173   fi
50174   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50175   printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
50176   printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
50177 
50178   printf "\n"
50179   printf "Build performance summary:\n"
50180   printf "* Cores to use:   $JOBS\n"
50181   printf "* Memory limit:   $MEMORY_SIZE MB\n"
50182   if test "x$CCACHE_STATUS" != "x"; then
50183     printf "* ccache status:  $CCACHE_STATUS\n"
50184   fi
50185   printf "\n"
50186 
50187   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50188     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50189     printf "will result in longer build times.\n"
50190     printf "\n"
50191   fi
50192 
50193   if test "x$FOUND_ALT_VARIABLES" != "x"; then
50194     printf "WARNING: You have old-style ALT_ environment variables set.\n"
50195     printf "These are not respected, and will be ignored. It is recommended\n"
50196     printf "that you clean your environment. The following variables are set:\n"
50197     printf "$FOUND_ALT_VARIABLES\n"
50198     printf "\n"
50199   fi
50200 
50201   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50202     printf "WARNING: Your build output directory is not on a local disk.\n"
50203     printf "This will severely degrade build performance!\n"
50204     printf "It is recommended that you create an output directory on a local disk,\n"
50205     printf "and run the configure script again from that directory.\n"
50206     printf "\n"
50207   fi
50208 
50209   if test "x$IS_RECONFIGURE" = "xyes"; then
50210     printf "WARNING: The result of this configuration has overridden an older\n"
50211     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50212     printf "proper build. Failure to do so might result in strange build problems.\n"
50213     printf "\n"
50214   fi
50215